1 |
commit: 01cb1df8882b9fbac492b6fbd28a6848f5012194 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 29 09:31:02 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 29 09:31:49 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01cb1df8 |
7 |
|
8 |
net-misc/apt-cacher-ng: Fix CFLAGS/LDFLAGS/openssl |
9 |
|
10 |
Package-Manager: Portage-2.3.67, Repoman-2.3.13 |
11 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=686608 |
12 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
13 |
|
14 |
....2_p2.ebuild => apt-cacher-ng-3.2_p2-r1.ebuild} | 9 +- |
15 |
.../files/apt-cacher-ng-3.2-flags.patch | 112 +++++++++++++++++++++ |
16 |
2 files changed, 118 insertions(+), 3 deletions(-) |
17 |
|
18 |
diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2-r1.ebuild |
19 |
similarity index 95% |
20 |
rename from net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2.ebuild |
21 |
rename to net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2-r1.ebuild |
22 |
index 97f303d5634..c66c11d82fa 100644 |
23 |
--- a/net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2.ebuild |
24 |
+++ b/net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2-r1.ebuild |
25 |
@@ -28,7 +28,7 @@ COMMON_DEPEND=" |
26 |
sys-apps/systemd |
27 |
) |
28 |
" |
29 |
-DEPEND=" |
30 |
+BDEPEND=" |
31 |
${COMMON_DEPEND} |
32 |
dev-util/cmake |
33 |
>sys-devel/gcc-4.8 |
34 |
@@ -42,6 +42,7 @@ RDEPEND=" |
35 |
" |
36 |
PATCHES=( |
37 |
"${WORKDIR}"/debian/patches/debian-changes |
38 |
+ "${FILESDIR}"/${PN}-3.2-flags.patch |
39 |
) |
40 |
S=${WORKDIR}/${P/_*} |
41 |
|
42 |
@@ -60,7 +61,9 @@ pkg_setup() { |
43 |
} |
44 |
|
45 |
src_configure(){ |
46 |
- mycmakeargs=( "-DCMAKE_INSTALL_PREFIX=/usr" ) |
47 |
+ mycmakeargs=( |
48 |
+ "-DCMAKE_INSTALL_PREFIX=/usr" |
49 |
+ ) |
50 |
if use fuse; then |
51 |
mycmakeargs+=( "-DHAVE_FUSE_25=yes" ) |
52 |
else |
53 |
@@ -76,7 +79,7 @@ src_configure(){ |
54 |
} |
55 |
|
56 |
src_install() { |
57 |
- pushd ${BUILD_DIR} || die |
58 |
+ pushd "${BUILD_DIR}" || die |
59 |
dosbin ${PN} |
60 |
if use fuse; then |
61 |
dobin acngfs |
62 |
|
63 |
diff --git a/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.2-flags.patch b/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.2-flags.patch |
64 |
new file mode 100644 |
65 |
index 00000000000..9a909dcc057 |
66 |
--- /dev/null |
67 |
+++ b/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.2-flags.patch |
68 |
@@ -0,0 +1,112 @@ |
69 |
+- Rip out additional CFLAGS/LDFLAGS |
70 |
+- Drop osslcompat (bug #686608) |
71 |
+ |
72 |
+--- a/CMakeLists.txt |
73 |
++++ b/CMakeLists.txt |
74 |
+@@ -106,16 +106,6 @@ |
75 |
+ _append(ACNG_CXXFLAGS -fvisibility-inlines-hidden) |
76 |
+ endif() |
77 |
+ |
78 |
+-foreach(linkarg -Wl,--as-needed -Wl,-O1 -Wl,--discard-all -Wl,--no-undefined -Wl,--build-id=sha1 -Wl,-fuse-ld=gold -Wl,--threads) |
79 |
+- STRING(REGEX REPLACE "=|-|," "" optname "${linkarg}") |
80 |
+- set(CMAKE_REQUIRED_FLAGS "${linkarg}") |
81 |
+- CHECK_CXX_COMPILER_FLAG("" "LD_${optname}") |
82 |
+- if(LD_${optname}) |
83 |
+- _append(CMAKE_EXE_LINKER_FLAGS ${linkarg}) |
84 |
+- endif() |
85 |
+- set(CMAKE_REQUIRED_FLAGS "") |
86 |
+-endforeach(linkarg) |
87 |
+- |
88 |
+ option(USE_SSL "Use OpenSSL library for TLS and other crypto functionality" on) |
89 |
+ |
90 |
+ IF(CMAKE_SYSTEM MATCHES "Darwin") |
91 |
+@@ -134,14 +124,6 @@ |
92 |
+ if(CMAKE_BUILD_TYPE MATCHES Debug) |
93 |
+ set(USE_LTO_DEFAULT off) |
94 |
+ _append(ACNG_COMPFLAGS -DDEBUG) |
95 |
+-else() |
96 |
+- set(CMAKE_REQUIRED_FLAGS "-Wl,--gc-sections") |
97 |
+- CHECK_CXX_COMPILER_FLAG("-Os -fdata-sections -ffunction-sections -Wl,--gc-sections" GC_SECTIONS) |
98 |
+- if(GC_SECTIONS) |
99 |
+- _append(ACNG_COMPFLAGS -fdata-sections -ffunction-sections) |
100 |
+- _append(CMAKE_EXE_LINKER_FLAGS -Wl,--gc-sections) |
101 |
+- endif() |
102 |
+- set(CMAKE_REQUIRED_FLAGS "") |
103 |
+ endif() |
104 |
+ |
105 |
+ # XXX: could use the modern macros instead but they were not available in CMake 2.x |
106 |
+@@ -167,23 +149,6 @@ |
107 |
+ endif() |
108 |
+ endif() |
109 |
+ |
110 |
+-option(USE_LTO "Enable Link Time Optimization (requires modern compilers)" ${USE_LTO_DEFAULT}) |
111 |
+- |
112 |
+-if(USE_LTO) |
113 |
+- SET(LDFLAGS_BACKUP "${CMAKE_EXE_LINKER_FLAGS}") |
114 |
+- SET(CMAKE_REQUIRED_FLAGS "${ACNG_COMPFLAGS} -flto") |
115 |
+- _append(CMAKE_EXE_LINKER_FLAGS -flto) |
116 |
+- CHECK_CXX_SOURCE_COMPILES("${CXX11_TESTSRC}" HAS_LTO) |
117 |
+- if(HAS_LTO) |
118 |
+- SET(ACNG_COMPFLAGS ${CMAKE_REQUIRED_FLAGS}) |
119 |
+- else() |
120 |
+- SET(CMAKE_REQUIRED_FLAGS "${ACNG_COMPFLAGS}") |
121 |
+- SET(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS_BACKUP}") |
122 |
+- message(WARNING "Link Time Optimization support broken, disabling it.") |
123 |
+- endif() |
124 |
+-endif() |
125 |
+-message("-- LTO use: ${USE_LTO}") |
126 |
+- |
127 |
+ FIND_LIBRARY(HAVE_SOCKETLIB socket) # separate socket lib looks like Solaris-like environment |
128 |
+ if(HAVE_SOCKETLIB) |
129 |
+ LIST(APPEND BaseNetworkLibs socket nsl) |
130 |
+@@ -378,7 +343,6 @@ |
131 |
+ |
132 |
+ CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/include/acsyscap.h.in" "${CMAKE_BINARY_DIR}/acsyscap.h") |
133 |
+ |
134 |
+-add_subdirectory(oldssl-workaround) |
135 |
+ add_subdirectory(client) |
136 |
+ add_subdirectory(fs) |
137 |
+ add_subdirectory(source) |
138 |
+@@ -415,3 +379,14 @@ |
139 |
+ CFGDIR: ${CFGDIR} |
140 |
+ SBINDIR: ${SBINDIR} |
141 |
+ ") |
142 |
++ |
143 |
++MESSAGE(STATUS "<<< Gentoo configuration >>> |
144 |
++Build type ${CMAKE_BUILD_TYPE} |
145 |
++Install path ${CMAKE_INSTALL_PREFIX} |
146 |
++Compiler flags: |
147 |
++C ${CMAKE_C_FLAGS} |
148 |
++C++ ${CMAKE_CXX_FLAGS} |
149 |
++Linker flags: |
150 |
++Executable ${CMAKE_EXE_LINKER_FLAGS} |
151 |
++Module ${CMAKE_MODULE_LINKER_FLAGS} |
152 |
++Shared ${CMAKE_SHARED_LINKER_FLAGS}\n") |
153 |
+--- a/fs/CMakeLists.txt |
154 |
++++ b/fs/CMakeLists.txt |
155 |
+@@ -20,7 +20,7 @@ |
156 |
+ list(APPEND fsSRCS ../source/aclogger.cc) |
157 |
+ endif() |
158 |
+ |
159 |
+- ADD_EXECUTABLE(acngfs ${fsSRCS} $<TARGET_OBJECTS:osslcompat>) |
160 |
++ ADD_EXECUTABLE(acngfs ${fsSRCS}) |
161 |
+ SET_TARGET_PROPERTIES(acngfs PROPERTIES COMPILE_FLAGS "${ACNG_COMPFLAGS} ${ACNG_CXXFLAGS} ${acngfs_cflags}") |
162 |
+ INSTALL(TARGETS acngfs DESTINATION ${LIBDIR}) |
163 |
+ if(HAVE_DLOPEN) |
164 |
+--- a/source/CMakeLists.txt |
165 |
++++ b/source/CMakeLists.txt |
166 |
+@@ -4,12 +4,12 @@ |
167 |
+ ADD_LIBRARY(acngstuff OBJECT ${SHAREDSRCS}) |
168 |
+ SET_TARGET_PROPERTIES(acngstuff PROPERTIES COMPILE_FLAGS "${ACNG_COMPFLAGS} ${ACNG_CXXFLAGS} ${CFLAGS_DAEMON} ${CFLAGS_PTHREAD}") |
169 |
+ |
170 |
+-ADD_EXECUTABLE(apt-cacher-ng $<TARGET_OBJECTS:acngstuff> ${ACNG_SRCS} apt-cacher.cc $<TARGET_OBJECTS:osslcompat>) |
171 |
++ADD_EXECUTABLE(apt-cacher-ng $<TARGET_OBJECTS:acngstuff> ${ACNG_SRCS} apt-cacher.cc) |
172 |
+ TARGET_LINK_LIBRARIES(apt-cacher-ng ${BaseNetworkLibs} ${ServerLibs} ${CompLibs} ${SSL_LIB_LIST} ${LDFLAGS_DAEMON} ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_LIBS_ACNG}) |
173 |
+ SET_TARGET_PROPERTIES(apt-cacher-ng PROPERTIES COMPILE_FLAGS "${ACNG_COMPFLAGS} ${ACNG_CXXFLAGS} ${CFLAGS_DAEMON} ${CFLAGS_PTHREAD}") |
174 |
+ INSTALL(TARGETS apt-cacher-ng DESTINATION ${SBINDIR}) |
175 |
+ |
176 |
+-ADD_EXECUTABLE(acngtool acngtool.cc $<TARGET_OBJECTS:acngstuff> $<TARGET_OBJECTS:osslcompat>) |
177 |
++ADD_EXECUTABLE(acngtool acngtool.cc $<TARGET_OBJECTS:acngstuff>) |
178 |
+ SET_TARGET_PROPERTIES(acngtool PROPERTIES COMPILE_FLAGS "${ACNG_COMPFLAGS} ${ACNG_CXXFLAGS} ${CFLAGS_PTHREAD}") |
179 |
+ TARGET_LINK_LIBRARIES(acngtool ${BaseNetworkLibs} ${CompLibs} ${SSL_LIB_LIST} ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_LIBS_ACNGTOOL}) |
180 |
+ INSTALL(TARGETS acngtool DESTINATION ${LIBDIR}) |