Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-24.11] lirc: fix build on ubuntu #365528

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkgs/by-name/li/lirc/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ stdenv.mkDerivation rec {
# Add a workaround for linux-headers-5.18 until upstream adapts:
# https://sourceforge.net/p/lirc/git/merge-requests/45/
./linux-headers-5.18.patch

# remove check for `Ubuntu` in /proc/version which will override
# --with-systemdsystemunitdir
# https://sourceforge.net/p/lirc/tickets/385/
./ubuntu.diff
];

postPatch = ''
Expand Down
22 changes: 22 additions & 0 deletions pkgs/by-name/li/lirc/ubuntu.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/configure.ac b/configure.ac
index d28c673..1cd0548 100644
--- a/configure.ac
+++ b/configure.ac
@@ -434,16 +434,7 @@ AC_CHECK_LIB([udev], [udev_device_new_from_device_id], [
LIBS="$LIBS $LIBUDEV_LIBS"
])

-dnl Ubuntu's systemd pkg-config seems broken beyond repair. So:
-kernelversion=`cat /proc/version || echo "non-linux"`
-AS_CASE([$kernelversion],
- [*Ubuntu*],[
- AC_MSG_NOTICE([Hardwiring Ubuntu systemd setup])
- AC_SUBST([systemdsystemunitdir], [/lib/systemd/system])
- AM_CONDITIONAL([WITH_SYSTEMDSYSTEMUNITDIR], [true])
- ],[*],[
- SYSTEMD_SYSTEMUNITDIR
-])
+SYSTEMD_SYSTEMUNITDIR

AC_ARG_WITH(lockdir,
[ --with-lockdir=DIR Old-school device lock files in DIR (/var/lock{/lockdev})],
Loading