summaryrefslogtreecommitdiff
path: root/net-misc/apt-cacher-ng/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
commitd99093fb4bb5652015c06274d64083daa2439e4f (patch)
treecf61513204d97974179580065e85df5c8009087c /net-misc/apt-cacher-ng/files
parent463397cf1e064185110fe57c568d73f99a06f5d1 (diff)
gentoo resync : 03.03.2021
Diffstat (limited to 'net-misc/apt-cacher-ng/files')
-rw-r--r--net-misc/apt-cacher-ng/files/apt-cacher-ng-3.6-optional-systemd.patch62
-rw-r--r--net-misc/apt-cacher-ng/files/apt-cacher-ng-9999999-flags.patch18
2 files changed, 62 insertions, 18 deletions
diff --git a/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.6-optional-systemd.patch b/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.6-optional-systemd.patch
new file mode 100644
index 000000000000..944802015e59
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.6-optional-systemd.patch
@@ -0,0 +1,62 @@
+commit f73ba7b31712c1c5543da5a6dab554cac48d2904
+Author: John Helmert III <jchelmert3@posteo.net>
+Date: Fri Feb 19 10:59:51 2021 -0600
+
+ Make systemd fully optional
+
+ Avoid linking to systemd without SDINSTALL set. Unconditionally install
+ systemd files with SDTYPE=notify because <systemd-209 is long gone.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3c99864..5bafc45 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -228,14 +228,16 @@ CHECK_CXX_SOURCE_COMPILES("${TESTSRC}" HAVE_PREAD)
+ FILE(READ ${TESTKITDIR}/HAVE_DAEMON.cc TESTSRC)
+ CHECK_CXX_SOURCE_COMPILES("${TESTSRC}" HAVE_DAEMON)
+
+-pkg_check_modules(lsd "libsystemd>=209")
+-# either part of the big library nowadays or in the helper library on older systems
+-if(NOT lsd_FOUND)
+-pkg_check_modules(lsd libsystemd-daemon)
++if(SDINSTALL)
++ pkg_check_modules(lsd "libsystemd>=209")
++ # either part of the big library nowadays or in the helper library on older systems
++ if(NOT lsd_FOUND)
++ pkg_check_modules(lsd libsystemd-daemon)
++ endif()
++ _append(CFLAGS_DAEMON ${lsd_CFLAGS})
++ _append(LDFLAGS_DAEMON ${lsd_LDFLAGS})
++ set(HAVE_SD_NOTIFY ${lsd_FOUND})
+ endif()
+-_append(CFLAGS_DAEMON ${lsd_CFLAGS})
+-_append(LDFLAGS_DAEMON ${lsd_LDFLAGS})
+-set(HAVE_SD_NOTIFY ${lsd_FOUND})
+
+ SET(CMAKE_REQUIRED_LIBRARIES dl)
+ FILE(READ ${TESTKITDIR}/HAVE_DLOPEN.cc TESTSRC)
+diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt
+index 850f9b8..6ba333f 100644
+--- a/systemd/CMakeLists.txt
++++ b/systemd/CMakeLists.txt
+@@ -1,17 +1,10 @@
+ cmake_minimum_required(VERSION 3.1)
+
+ unset(SDTYPE)
+-if(HAVE_SD_NOTIFY)
+- set(SDTYPE notify)
+-else()
+- set(SDTYPE simple)
+-endif()
++set(SDTYPE notify)
+ CONFIGURE_FILE(apt-cacher-ng.service.in apt-cacher-ng.service)
+ CONFIGURE_FILE(apt-cacher-ng.conf.in apt-cacher-ng.conf)
+ unset(SDTYPE)
+
+-# this is experimental and is supposed to match LSB
+-if(SDINSTALL)
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-cacher-ng.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d/)
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-cacher-ng.service DESTINATION /lib/systemd/system)
+-endif()
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-cacher-ng.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d/)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-cacher-ng.service DESTINATION /lib/systemd/system)
diff --git a/net-misc/apt-cacher-ng/files/apt-cacher-ng-9999999-flags.patch b/net-misc/apt-cacher-ng/files/apt-cacher-ng-9999999-flags.patch
deleted file mode 100644
index 8fe769ada328..000000000000
--- a/net-misc/apt-cacher-ng/files/apt-cacher-ng-9999999-flags.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -114,15 +114,6 @@
-
- if(CMAKE_BUILD_TYPE MATCHES Debug)
- set(USE_LTO_DEFAULT off)
--else()
-- set(CMAKE_REQUIRED_FLAGS "-Wl,--gc-sections")
-- CHECK_CXX_COMPILER_FLAG("-Os -fdata-sections -ffunction-sections -Wl,--gc-sections" GC_SECTIONS)
-- if(GC_SECTIONS)
-- _append(ACNG_COMPFLAGS -fdata-sections -ffunction-sections)
-- _append(CMAKE_EXE_LINKER_FLAGS -Wl,--gc-sections)
-- _append(CMAKE_SHARED_LINKER_FLAGS -Wl,--gc-sections)
-- endif()
-- set(CMAKE_REQUIRED_FLAGS "")
- endif()
-
- option(USE_LTO "Enable Link Time Optimization (requires modern compilers)" ${USE_LTO_DEFAULT})