aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-05 17:19:54 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-03-05 23:36:03 +0100
commite6bd8b5e1def33beac3b6b4eb2f1f525f87ad0ea (patch)
tree696fc7a36df00b841986ac93c51571ffe42b9b55
parentebb7cf9e21060105d9950dd5142c0eb918083666 (diff)
downloadguix-e6bd8b5e1def33beac3b6b4eb2f1f525f87ad0ea.tar.gz
guix-e6bd8b5e1def33beac3b6b4eb2f1f525f87ad0ea.zip
gnu: zziplib: Incorporate grafted changes.
* gnu/packages/compression.scm (zziplib)[replacement]: Remove. [source](patches): New field. (zziplib/fixed): Remove variable.
-rw-r--r--gnu/packages/compression.scm9
1 files changed, 1 insertions, 8 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 1f76f9ac1e..b2edca4cd4 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1580,13 +1580,13 @@ recreates the stored directory structure by default.")
(package
(name "zziplib")
(version "0.13.69")
- (replacement zziplib/fixed)
(home-page "https://github.com/gdraheim/zziplib")
(source (origin
(method git-fetch)
(uri (git-reference (url home-page)
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (patches (search-patches "zziplib-CVE-2018-16548.patch"))
(sha256
(base32
"0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92"))))
@@ -1618,13 +1618,6 @@ recreates the stored directory structure by default.")
;; files carry the Zlib license; see "docs/copying.html" for details.
(license (list license:lgpl2.0+ license:mpl1.1))))
-(define zziplib/fixed
- (package
- (inherit zziplib)
- (source (origin
- (inherit (package-source zziplib))
- (patches (search-patches "zziplib-CVE-2018-16548.patch"))))))
-
(define-public libzip
(package
(name "libzip")
ke < 3.11.
+
+With CMake >= 3.11, the new behaviour of add_library() break the
+existing flann CMake code.
+
+From CMake Changelog [1]:
+"add_library() and add_executable() commands can now be called without
+ any sources and will not complain as long as sources are added later
+ via the target_sources() command."
+
+Note: flann CMake code doesn't use target_sources() since no source file
+are provided intentionally since the flann shared library is created by
+linking with the flann_cpp_s static library with this line:
+
+target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)
+
+If you try to use "add_library(flann_cpp SHARED ${CPP_SOURCES})" (as it should
+be normally done), the link fail due to already defined symbol.
+
+They are building the shared version using the static library "to speedup the
+build time" [3]
+
+This issue is already reported upstream [2] with a proposed solution.
+
+Upstream status: Pending
+
+Fixes:
+http://autobuild.buildroot.net/results/b2f/b2febfaf8c44ce477b3e4a5b9b976fd25e8d7454
+
+[1] https://cmake.org/cmake/help/v3.11/release/3.11.html
+[2] https://github.com/mariusmuja/flann/issues/369
+[3] https://github.com/mariusmuja/flann/commit/0fd62b43be2fbb0b8d791ee36290791224dc030c
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ src/cpp/CMakeLists.txt | 4 ++--
+ src/cpp/empty.cpp | 1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+ create mode 100644 src/cpp/empty.cpp
+
+diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
+index b44a735..a816863 100644
+--- a/src/cpp/CMakeLists.txt
++++ b/src/cpp/CMakeLists.txt
+@@ -29,7 +29,7 @@ if (BUILD_CUDA_LIB)
+ endif()
+
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+- add_library(flann_cpp SHARED "")
++ add_library(flann_cpp SHARED "empty.cpp")
+ set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX)
+ target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)
+
+@@ -85,7 +85,7 @@ if (BUILD_C_BINDINGS)
+ set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC)
+
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+- add_library(flann SHARED "")
++ add_library(flann SHARED "empty.cpp")
+ set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
+ target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
+ else()
+diff --git a/src/cpp/empty.cpp b/src/cpp/empty.cpp
+new file mode 100644
+index 0000000..40a8c17
+--- /dev/null
++++ b/src/cpp/empty.cpp
+@@ -0,0 +1 @@
++/* empty */
+--
+2.14.3