diff options
author | James Le Cuirot <chewi@gentoo.org> | 2022-03-20 22:51:53 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2022-03-20 22:51:53 +0000 |
commit | e8468c7ce1130e455974c4d3ce0185d157753a6a (patch) | |
tree | 4e2f6735dede3ebce30ae413eb3de23160d89d59 /games-util | |
parent | gnome-base/gnome-shell: Depend on slotted gnome-bluetooth (diff) | |
download | gentoo-e8468c7ce1130e455974c4d3ce0185d157753a6a.tar.gz gentoo-e8468c7ce1130e455974c4d3ce0185d157753a6a.tar.bz2 gentoo-e8468c7ce1130e455974c4d3ce0185d157753a6a.zip |
games-util/joycond: Patch to install systemd files in the right locations
Closes: https://bugs.gentoo.org/833792
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-util')
-rw-r--r-- | games-util/joycond/files/joycond-systemd.patch | 32 | ||||
-rw-r--r-- | games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild (renamed from games-util/joycond/joycond-0.1.0_p20210730.ebuild) | 5 |
2 files changed, 36 insertions, 1 deletions
diff --git a/games-util/joycond/files/joycond-systemd.patch b/games-util/joycond/files/joycond-systemd.patch new file mode 100644 index 000000000000..8b8288350a3e --- /dev/null +++ b/games-util/joycond/files/joycond-systemd.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f9d6e93..4e05976 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,12 +28,24 @@ add_subdirectory(src) + install(TARGETS joycond DESTINATION /usr/bin/ + PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) +-install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION /lib/udev/rules.d/ ++ ++pkg_get_variable(UDEV_RULES_PATH udev udevdir) ++install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION ${UDEV_RULES_PATH}/rules.d/ + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ + ) +-install(FILES systemd/joycond.service DESTINATION /etc/systemd/system ++ ++execute_process(COMMAND systemd-path systemd-system-unit OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_PATH OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE UNIT_RETVAL) ++if(NOT "${UNIT_RETVAL}" EQUAL 0) ++ set(SYSTEMD_SYSTEM_UNIT_PATH "/usr/lib/systemd/system") ++endif() ++install(FILES systemd/joycond.service DESTINATION ${SYSTEMD_SYSTEM_UNIT_PATH} + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ + ) +-install(FILES systemd/joycond.conf DESTINATION /etc/modules-load.d ++ ++execute_process(COMMAND systemd-path modules-load OUTPUT_VARIABLE SYSTEMD_MODULES_LOAD_PATH OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE MODULES_RETVAL) ++if(NOT "${MODULES_RETVAL}" EQUAL 0) ++ set(SYSTEMD_MODULES_LOAD_PATH "/usr/lib/modules-load.d") ++endif() ++install(FILES systemd/joycond.conf DESTINATION ${SYSTEMD_MODULES_LOAD_PATH} + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ + ) diff --git a/games-util/joycond/joycond-0.1.0_p20210730.ebuild b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild index e06a319c6811..85cfd03bba1c 100644 --- a/games-util/joycond/joycond-0.1.0_p20210730.ebuild +++ b/games-util/joycond/joycond-0.1.0_p20210730-r1.ebuild @@ -31,9 +31,12 @@ CONFIG_CHECK=" S="${WORKDIR}/${PN}-${COMMIT}" +PATCHES=( + "${FILESDIR}"/${PN}-systemd.patch +) + src_install() { cmake_src_install - rm -r "${ED}"/etc/modules-load.d/ || die newinitd "${FILESDIR}"/${PN}.initd ${PN} doman doc/${PN}.1 } |