aboutsummaryrefslogtreecommitdiffstats
path: root/community/mapplauncherd/0001-fix-cmake-and-add-pkgconfig.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/mapplauncherd/0001-fix-cmake-and-add-pkgconfig.patch')
-rw-r--r--community/mapplauncherd/0001-fix-cmake-and-add-pkgconfig.patch327
1 files changed, 0 insertions, 327 deletions
diff --git a/community/mapplauncherd/0001-fix-cmake-and-add-pkgconfig.patch b/community/mapplauncherd/0001-fix-cmake-and-add-pkgconfig.patch
deleted file mode 100644
index bacd41858dd..00000000000
--- a/community/mapplauncherd/0001-fix-cmake-and-add-pkgconfig.patch
+++ /dev/null
@@ -1,327 +0,0 @@
-From b05bf15c01175c5bae1ea01b60b2fb2f4d7ca4cb Mon Sep 17 00:00:00 2001
-From: Bart Ribbers <bribbers@disroot.org>
-Date: Tue, 31 Mar 2020 12:52:50 +0200
-Subject: [PATCH 1/6] Fix linking to systemd on non-glibc systems
-
-Yes, systemd doesn't even run on non-glibc systems, but elogind does and
-this way it links to both systemd and elogind
----
- src/launcherlib/CMakeLists.txt | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
-index 2e32d69..2c9fb4d 100644
---- a/src/launcherlib/CMakeLists.txt
-+++ b/src/launcherlib/CMakeLists.txt
-@@ -2,7 +2,12 @@ include(GNUInstallDirs)
-
- set(COMMON ${CMAKE_HOME_DIRECTORY}/src/common)
-
--include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${COMMON})
-+# Find systemd
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(SYSTEMD "libsystemd" REQUIRED)
-+
-+# Set include dirs
-+include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${SYSTEMD_INCLUDE_DIRS} ${COMMON})
-
- # Hide all symbols except the ones explicitly exported in the code (like main())
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
-@@ -16,12 +21,15 @@ set(HEADERS appdata.h booster.h connection.h daemon.h logger.h launcherlib.h
-
- # Set libraries to be linked. Shared libraries to be preloaded are not linked in anymore,
- # but dlopen():ed and listed in src/launcher/preload.h instead.
--link_libraries(${LIBDL} "-L/lib -lsystemd -lcap")
-+link_libraries(${LIBDL} "-L/lib -lcap")
-
- # Set executable
- add_library(applauncherd MODULE ${SRC} ${MOC_SRC})
- set_target_properties(applauncherd PROPERTIES VERSION 0.1 SOVERSION 0)
-
-+target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
-+
-+
- # Add install rule
- install(TARGETS applauncherd DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
- install(FILES ${HEADERS} DESTINATION /usr/include/applauncherd
---
-2.23.0
-
-
-From e4d7e241753158fdf5fbbe5be0955e600a94b6c9 Mon Sep 17 00:00:00 2001
-From: Bart Ribbers <bribbers@disroot.org>
-Date: Tue, 31 Mar 2020 12:53:44 +0200
-Subject: [PATCH 2/6] Fix the install rules for executables
-
----
- src/invoker/CMakeLists.txt | 2 +-
- src/single-instance/CMakeLists.txt | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/invoker/CMakeLists.txt b/src/invoker/CMakeLists.txt
-index 6531ca0..3a35a6b 100644
---- a/src/invoker/CMakeLists.txt
-+++ b/src/invoker/CMakeLists.txt
-@@ -19,6 +19,6 @@ add_executable(invoker ${SRC})
- target_link_libraries(invoker ${DBUS_LDFLAGS})
-
- # Add install rule
--install(PROGRAMS invoker DESTINATION /usr/bin/)
-+install(TARGETS invoker DESTINATION /usr/bin/)
-
-
-diff --git a/src/single-instance/CMakeLists.txt b/src/single-instance/CMakeLists.txt
-index cc04ba2..acc1439 100644
---- a/src/single-instance/CMakeLists.txt
-+++ b/src/single-instance/CMakeLists.txt
-@@ -26,4 +26,4 @@ link_libraries(${DBUS_LDFLAGS})
- add_executable(single-instance ${SRC})
-
- # Add install rule
--install(PROGRAMS single-instance DESTINATION /usr/bin/)
-+install(TARGETS single-instance DESTINATION /usr/bin/)
---
-2.23.0
-
-
-From 233bcbb11bd0ac12f4fec6963715e4ad5c6ca9c5 Mon Sep 17 00:00:00 2001
-From: Bart Ribbers <bribbers@disroot.org>
-Date: Tue, 31 Mar 2020 13:50:00 +0200
-Subject: [PATCH 3/6] Make CMake respect current source dir when generating
- docs
-
----
- CMakeLists.txt | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0c5e5b4..1a91369 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -47,7 +47,10 @@ add_subdirectory(src)
- # Target for documentation (make doc)
- find_program(Doxygen NAMES doxygen)
- if (EXISTS ${Doxygen})
-- add_custom_target(doc COMMAND cd doc && ${Doxygen} doxygen-impldoc.conf COMMAND cd doc && ${Doxygen} doxygen-userdoc.conf COMMAND cd doc && ${Doxygen} doxygen-mdeclarativecache.conf)
-+ add_custom_target(doc
-+ COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/doc && ${Doxygen} doxygen-impldoc.conf
-+ COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/doc && ${Doxygen} doxygen-userdoc.conf
-+ COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/doc && ${Doxygen} doxygen-mdeclarativecache.conf)
- else (EXISTS ${Doxygen})
- message(STATUS "Doxygen not found: you're not able to build documentation.")
- endif (EXISTS ${Doxygen})
---
-2.23.0
-
-
-From aa52e831099e4639c3c1cb64f25330d93c767f87 Mon Sep 17 00:00:00 2001
-From: Bart Ribbers <bribbers@disroot.org>
-Date: Fri, 13 Nov 2020 15:16:22 +0100
-Subject: [PATCH 4/6] Respect GNUInstallDirs
-
-This allows packagers to set the proper directories to install stuff
-too using CMAKE_INSTALL_PREFIX, CMAKE_INSTALL_LIBDIR, etc.
-
-Also make installing systemd unit files optional, for systemd without
-systemd, but enable them by default
----
- CMakeLists.txt | 11 ++++++++---
- src/booster-generic/CMakeLists.txt | 7 +++++--
- src/invoker/CMakeLists.txt | 4 +---
- src/launcherlib/CMakeLists.txt | 2 +-
- src/single-instance/CMakeLists.txt | 2 +-
- 5 files changed, 16 insertions(+), 10 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1a91369..05bb06b 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -3,6 +3,11 @@ project(Applauncherd)
- cmake_minimum_required(VERSION 2.6)
- cmake_policy(VERSION 2.6)
-
-+include(FeatureSummary)
-+include(GNUInstallDirs)
-+
-+option(INSTALL_SYSTEMD_UNITS "Install systemd unit files" ON)
-+
- #
- # NOTE: For verbose build use VERBOSE=1
- #
-@@ -56,6 +61,6 @@ else (EXISTS ${Doxygen})
- endif (EXISTS ${Doxygen})
-
- # Install html documentation
--install(DIRECTORY doc/implementation-documentation DESTINATION /usr/share/doc/applauncherd OPTIONAL)
--install(DIRECTORY doc/user-documentation DESTINATION /usr/share/doc/applauncherd OPTIONAL)
--install(DIRECTORY doc/mdeclarativecache-documentation DESTINATION /usr/share/doc/applauncherd OPTIONAL)
-+install(DIRECTORY doc/implementation-documentation DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR} OPTIONAL)
-+install(DIRECTORY doc/user-documentation DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR} OPTIONAL)
-+install(DIRECTORY doc/mdeclarativecache-documentation DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR} OPTIONAL)
-diff --git a/src/booster-generic/CMakeLists.txt b/src/booster-generic/CMakeLists.txt
-index 2b0672b..71be130 100644
---- a/src/booster-generic/CMakeLists.txt
-+++ b/src/booster-generic/CMakeLists.txt
-@@ -17,5 +17,8 @@ add_executable(booster-generic ${SRC} ${MOC_SRC})
- add_dependencies(booster-generic applauncherd)
-
- # Add install rule
--install(TARGETS booster-generic DESTINATION /usr/libexec/mapplauncherd/)
--install(FILES booster-generic.service DESTINATION /usr/lib/systemd/user/)
-+install(TARGETS booster-generic DESTINATION ${CMAKE_INSTALL_FULL_LIBEXECDIR}/mapplauncherd/)
-+
-+if(INSTALL_SYSTEMD_UNITS)
-+ install(FILES booster-generic.service DESTINATION /usr/lib/systemd/user/)
-+endif()
-diff --git a/src/invoker/CMakeLists.txt b/src/invoker/CMakeLists.txt
-index 3a35a6b..78be60c 100644
---- a/src/invoker/CMakeLists.txt
-+++ b/src/invoker/CMakeLists.txt
-@@ -19,6 +19,4 @@ add_executable(invoker ${SRC})
- target_link_libraries(invoker ${DBUS_LDFLAGS})
-
- # Add install rule
--install(TARGETS invoker DESTINATION /usr/bin/)
--
--
-+install(TARGETS invoker DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
-diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
-index 2c9fb4d..5396614 100644
---- a/src/launcherlib/CMakeLists.txt
-+++ b/src/launcherlib/CMakeLists.txt
-@@ -32,5 +32,5 @@ target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
-
- # Add install rule
- install(TARGETS applauncherd DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
--install(FILES ${HEADERS} DESTINATION /usr/include/applauncherd
-+install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
- PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
-diff --git a/src/single-instance/CMakeLists.txt b/src/single-instance/CMakeLists.txt
-index acc1439..fd9be9c 100644
---- a/src/single-instance/CMakeLists.txt
-+++ b/src/single-instance/CMakeLists.txt
-@@ -26,4 +26,4 @@ link_libraries(${DBUS_LDFLAGS})
- add_executable(single-instance ${SRC})
-
- # Add install rule
--install(TARGETS single-instance DESTINATION /usr/bin/)
-+install(TARGETS single-instance DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
---
-2.23.0
-
-
-From 9450c10b0f463cc0929bc90bc419af95422090c2 Mon Sep 17 00:00:00 2001
-From: Bart Ribbers <bribbers@disroot.org>
-Date: Fri, 13 Nov 2020 16:53:18 +0100
-Subject: [PATCH 5/6] Add pkgconfig file
-
-Without it, -lapplauncherd is undefined and it can not be used to
-compile other applications with it. I needed this to get
-mapplauncherd-qt to compile
----
- CMakeLists.txt | 7 ++++---
- src/launcherlib/CMakeLists.txt | 25 +++++++++++++++++--------
- src/launcherlib/applauncherd.pc.in | 9 +++++++++
- 3 files changed, 30 insertions(+), 11 deletions(-)
- create mode 100644 src/launcherlib/applauncherd.pc.in
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 05bb06b..814890d 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,7 +1,8 @@
--project(Applauncherd)
-+cmake_minimum_required(VERSION 3.0)
-+cmake_policy(VERSION 3.0)
-
--cmake_minimum_required(VERSION 2.6)
--cmake_policy(VERSION 2.6)
-+project(Applauncherd
-+ VERSION 4.1.43)
-
- include(FeatureSummary)
- include(GNUInstallDirs)
-diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
-index 5396614..adab08f 100644
---- a/src/launcherlib/CMakeLists.txt
-+++ b/src/launcherlib/CMakeLists.txt
-@@ -1,5 +1,3 @@
--include(GNUInstallDirs)
--
- set(COMMON ${CMAKE_HOME_DIRECTORY}/src/common)
-
- # Find systemd
-@@ -24,13 +22,24 @@ set(HEADERS appdata.h booster.h connection.h daemon.h logger.h launcherlib.h
- link_libraries(${LIBDL} "-L/lib -lcap")
-
- # Set executable
--add_library(applauncherd MODULE ${SRC} ${MOC_SRC})
--set_target_properties(applauncherd PROPERTIES VERSION 0.1 SOVERSION 0)
--
-+add_library(applauncherd SHARED ${SRC} ${MOC_SRC})
- target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
-
-+set_target_properties(applauncherd PROPERTIES
-+ VERSION ${PROJECT_VERSION}
-+ SOVERSION ${PROJECT_VERSION_MAJOR})
-+
-+# Configure and install the pkgconfig file
-+configure_file(applauncherd.pc.in
-+ ${CMAKE_CURRENT_BINARY_DIR}/applauncherd.pc
-+ @ONLY)
-+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/applauncherd.pc
-+ DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig)
-
- # Add install rule
--install(TARGETS applauncherd DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
--install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
-- PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
-+install(TARGETS applauncherd
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
-+install(FILES ${HEADERS}
-+ DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
-+ COMPONENT Devel
-+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
-diff --git a/src/launcherlib/applauncherd.pc.in b/src/launcherlib/applauncherd.pc.in
-new file mode 100644
-index 0000000..2a8edad
---- /dev/null
-+++ b/src/launcherlib/applauncherd.pc.in
-@@ -0,0 +1,9 @@
-+prefix=@CMAKE_INSTALL_PREFIX@
-+exec_prefix=${prefix}
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/applauncherd
-+
-+Name: applauncherd
-+Version: @PROJECT_VERSION@
-+Libs: -lapplauncherd
-+Cflags: -I${includedir}
---
-2.23.0
-
-
-From ad49ea13ae04e3a00c4b996e5f0e2d82b00fe463 Mon Sep 17 00:00:00 2001
-From: Bart Ribbers <bribbers@disroot.org>
-Date: Sat, 17 Apr 2021 19:10:25 +0200
-Subject: [PATCH 6/6] Packaging: add new pkgconfig file to devel package
-
----
- rpm/mapplauncherd.spec | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/rpm/mapplauncherd.spec b/rpm/mapplauncherd.spec
-index 6bf24d4..0bc8b74 100644
---- a/rpm/mapplauncherd.spec
-+++ b/rpm/mapplauncherd.spec
-@@ -93,6 +93,7 @@ install -D -m 0755 scripts/booster-cgroup-mount %{buildroot}/usr/lib/startup/boo
- %files devel
- %defattr(-,root,root,-)
- %{_includedir}/applauncherd/*
-+%{_libdir}/pkgconfig/*.pc
-
- %files cgroup
- %{_unitdir}/booster-cgroup-mount.service
---
-2.23.0
-