lirc: fix build on ubuntu

autoconf looks in /proc/version for `Ubuntu` and on match overrides the
`--with-systemdsystemunitdir` value set in `configureFlags` causing the
build to fail.

> mkdir -p '/lib/systemd/system'
> mkdir: cannot create directory '/lib': Permission denied

patch `configure.ac` to prevent the override when building on ubuntu

authored by Reno Dakota and committed by Bjørn Forsman 3348c124 d6a39b5a

+27
+5
pkgs/by-name/li/lirc/package.nix
··· 46 46 # Add a workaround for linux-headers-5.18 until upstream adapts: 47 47 # https://sourceforge.net/p/lirc/git/merge-requests/45/ 48 48 ./linux-headers-5.18.patch 49 + 50 + # remove check for `Ubuntu` in /proc/version which will override 51 + # --with-systemdsystemunitdir 52 + # https://sourceforge.net/p/lirc/tickets/385/ 53 + ./ubuntu.diff 49 54 ]; 50 55 51 56 postPatch = ''
+22
pkgs/by-name/li/lirc/ubuntu.diff
··· 1 + diff --git a/configure.ac b/configure.ac 2 + index d28c673..1cd0548 100644 3 + --- a/configure.ac 4 + +++ b/configure.ac 5 + @@ -434,16 +434,7 @@ AC_CHECK_LIB([udev], [udev_device_new_from_device_id], [ 6 + LIBS="$LIBS $LIBUDEV_LIBS" 7 + ]) 8 + 9 + -dnl Ubuntu's systemd pkg-config seems broken beyond repair. So: 10 + -kernelversion=`cat /proc/version || echo "non-linux"` 11 + -AS_CASE([$kernelversion], 12 + - [*Ubuntu*],[ 13 + - AC_MSG_NOTICE([Hardwiring Ubuntu systemd setup]) 14 + - AC_SUBST([systemdsystemunitdir], [/lib/systemd/system]) 15 + - AM_CONDITIONAL([WITH_SYSTEMDSYSTEMUNITDIR], [true]) 16 + - ],[*],[ 17 + - SYSTEMD_SYSTEMUNITDIR 18 + -]) 19 + +SYSTEMD_SYSTEMUNITDIR 20 + 21 + AC_ARG_WITH(lockdir, 22 + [ --with-lockdir=DIR Old-school device lock files in DIR (/var/lock{/lockdev})],