summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-07-13 13:54:48 +0200
committerRemi Collet <remi@remirepo.net>2020-07-13 13:54:48 +0200
commitd27841e49abd19c5c00ac6de7583ade4ef91d61d (patch)
treefc6598a782ba0bfa0fa19eacaecc4efae1085b39
parente1f0ec372cdd602e67debc7743f1a5a078ec6e76 (diff)
test build for upstream fix
-rw-r--r--libzip-gnuinstalldirs.patch126
-rw-r--r--libzip-privlibs.patch65
-rw-r--r--libzip.spec12
3 files changed, 7 insertions, 196 deletions
diff --git a/libzip-gnuinstalldirs.patch b/libzip-gnuinstalldirs.patch
deleted file mode 100644
index 088b5a6..0000000
--- a/libzip-gnuinstalldirs.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From ebe01b5c259fa28b4da24cc1c11ab24a31281b64 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 13 Jul 2020 08:16:59 +0200
-Subject: [PATCH] restore GNUInstallDirs
-
----
- CMakeLists.txt | 17 +++++++++--------
- lib/CMakeLists.txt | 10 +++++-----
- man/CMakeLists.txt | 8 ++++----
- 3 files changed, 18 insertions(+), 17 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8013d2ea..b2f81b1c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -29,6 +29,7 @@ include(CheckCSourceRuns)
- include(CheckCSourceCompiles)
- include(CheckStructHasMember)
- include(TestBigEndian)
-+include(GNUInstallDirs)
- if(ENABLE_COMMONCRYPTO)
- check_include_files(CommonCrypto/CommonCrypto.h COMMONCRYPTO_FOUND)
- else()
-@@ -234,7 +235,7 @@ endif(WIN32)
-
- # rpath handling: use rpath in installed binaries
- if(NOT CMAKE_SYSTEM_NAME MATCHES Linux)
-- set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
-+ set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
- endif()
-
-@@ -279,9 +280,9 @@ endif()
- # pkgconfig file
- set(prefix ${CMAKE_INSTALL_PREFIX})
- set(exec_prefix \${prefix})
--set(bindir \${exec_prefix}/bin)
--set(libdir \${exec_prefix}/lib)
--set(includedir \${prefix}/include)
-+SET(bindir \${exec_prefix}/${CMAKE_INSTALL_BINDIR})
-+SET(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
-+SET(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
- if(CMAKE_SYSTEM_NAME MATCHES BSD)
- set(PKG_CONFIG_RPATH "-Wl,-R\${libdir}")
- endif(CMAKE_SYSTEM_NAME MATCHES BSD)
-@@ -295,7 +296,7 @@ foreach(LIB ${LIBS_PRIVATE})
- endforeach()
- configure_file(libzip.pc.in libzip.pc @ONLY)
- if(LIBZIP_DO_INSTALL)
-- install(FILES ${PROJECT_BINARY_DIR}/libzip.pc DESTINATION lib/pkgconfig)
-+ install(FILES ${PROJECT_BINARY_DIR}/libzip.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
- endif()
-
- # fixed size integral types
-@@ -417,7 +418,7 @@ write_basic_package_version_file("${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config-v
- COMPATIBILITY AnyNewerVersion)
-
- configure_package_config_file("${PROJECT_NAME}-config.cmake.in" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
-- INSTALL_DESTINATION lib/cmake/libzip)
-+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libzip)
-
- # Add targets to the build-tree export set
- export(TARGETS zip
-@@ -427,10 +428,10 @@ export(TARGETS zip
- if(LIBZIP_DO_INSTALL)
- install(FILES ${PROJECT_BINARY_DIR}/zipconf.h DESTINATION include)
- install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
-- DESTINATION lib/cmake/${PROJECT_NAME}
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
- )
- install(EXPORT ${PROJECT_NAME}-targets NAMESPACE libzip:: FILE ${PROJECT_NAME}-targets.cmake
-- DESTINATION lib/cmake/${PROJECT_NAME}
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
- )
- endif()
-
-diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
-index 5a6f1713..082203d0 100644
---- a/lib/CMakeLists.txt
-+++ b/lib/CMakeLists.txt
-@@ -181,11 +181,11 @@ target_include_directories(zip
- if(LIBZIP_DO_INSTALL)
- install(TARGETS zip
- EXPORT ${PROJECT_NAME}-targets
-- RUNTIME DESTINATION bin
-- ARCHIVE DESTINATION lib
-- INCLUDES DESTINATION include
-- LIBRARY DESTINATION lib)
-- install(FILES zip.h DESTINATION include)
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+ install(FILES zip.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
- endif()
-
- # create zip_err_str.h from zip.h
-diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
-index ce714ec4..90d462a5 100644
---- a/man/CMakeLists.txt
-+++ b/man/CMakeLists.txt
-@@ -104,10 +104,10 @@ foreach(MAN_PAGE ${MAN_PAGES})
- string(REGEX REPLACE "[1-9]$" "${DOCUMENTATION_FORMAT}" SOURCE_FILE ${MAN_PAGE})
- if(LIBZIP_DO_INSTALL)
- if (DOCUMENTATION_FORMAT MATCHES "html")
-- install(FILES ${PROJECT_BINARY_DIR}/man/${MAN_PAGE} DESTINATION share/doc/${PROJECT_NAME} RENAME ${SOURCE_FILE})
-+ install(FILES ${PROJECT_BINARY_DIR}/man/${MAN_PAGE} DESTINATION ${CMAKE_INSTALL_DOCDIR}/${PROJECT_NAME} RENAME ${SOURCE_FILE})
- else()
- string(REGEX REPLACE ".*(.)$" "man\\1" SUBDIR ${MAN_PAGE})
-- install(FILES ${PROJECT_BINARY_DIR}/man/${MAN_PAGE} DESTINATION man/${SUBDIR})
-+ install(FILES ${PROJECT_BINARY_DIR}/man/${MAN_PAGE} DESTINATION ${CMAKE_INSTALL_MANDIR}/${SUBDIR})
- endif()
- endif()
- # configure_file does not find out about updates to the sources, and it does not provide a target
-@@ -147,9 +147,9 @@ foreach(LINKS_LINE ${MANPAGE_LINKS})
- set(TARGET ${CMAKE_MATCH_2})
- if(LIBZIP_DO_INSTALL)
- if (DOCUMENTATION_FORMAT MATCHES "html")
-- INSTALL(FILES ${PROJECT_BINARY_DIR}/man/${SOURCE}.3 DESTINATION share/doc/${PROJECT_NAME} RENAME ${TARGET}.html)
-+ INSTALL(FILES ${PROJECT_BINARY_DIR}/man/${SOURCE}.3 DESTINATION ${CMAKE_INSTALL_DOCDIR}/${PROJECT_NAME} RENAME ${TARGET}.html)
- else()
-- INSTALL(FILES ${PROJECT_BINARY_DIR}/man/${SOURCE}.3 DESTINATION man/man3 RENAME ${TARGET}.3)
-+ INSTALL(FILES ${PROJECT_BINARY_DIR}/man/${SOURCE}.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 RENAME ${TARGET}.3)
- endif()
- endif()
- endif()
diff --git a/libzip-privlibs.patch b/libzip-privlibs.patch
deleted file mode 100644
index 779d10c..0000000
--- a/libzip-privlibs.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From a5cc4eb9e2ea44253bb1ca9f59ca65a314127cef Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 13 Jul 2020 09:10:26 +0200
-Subject: [PATCH] switch back to library names from find_package
-
----
- lib/CMakeLists.txt | 12 ++++++------
- src/CMakeLists.txt | 2 +-
- 2 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
-index 5a6f1713..7ae2afef 100644
---- a/lib/CMakeLists.txt
-+++ b/lib/CMakeLists.txt
-@@ -138,12 +138,12 @@ endif(WIN32)
-
- if(HAVE_LIBBZ2)
- target_sources(zip PRIVATE zip_algorithm_bzip2.c)
-- target_link_libraries(zip PRIVATE BZip2::BZip2)
-+ target_link_libraries(zip PRIVATE ${BZIP2_LIBRARIES})
- endif()
-
- if(HAVE_LIBLZMA)
- target_sources(zip PRIVATE zip_algorithm_xz.c)
-- target_link_libraries(zip PRIVATE LibLZMA::LibLZMA)
-+ target_link_libraries(zip PRIVATE ${LIBLZMA_LIBRARY})
- endif()
-
- if(HAVE_COMMONCRYPTO)
-@@ -153,13 +153,13 @@ elseif(HAVE_WINDOWS_CRYPTO)
- target_link_libraries(zip PRIVATE bcrypt)
- elseif(HAVE_GNUTLS)
- target_sources(zip PRIVATE zip_crypto_gnutls.c)
-- target_link_libraries(zip PRIVATE GnuTLS::GnuTLS Nettle::Nettle)
-+ target_link_libraries(zip PRIVATE ${GNUTLS_LIBRARY} ${NETTLE_LIBRARY})
- elseif(HAVE_OPENSSL)
- target_sources(zip PRIVATE zip_crypto_openssl.c)
-- target_link_libraries(zip PRIVATE OpenSSL::Crypto)
-+ target_link_libraries(zip PRIVATE ${OPENSSL_LIBRARIES})
- elseif(HAVE_MBEDTLS)
- target_sources(zip PRIVATE zip_crypto_mbedtls.c)
-- target_link_libraries(zip PRIVATE MbedTLS::MbedTLS)
-+ target_link_libraries(zip PRIVATE ${MBEDTLS_LIBRARIES})
- endif()
-
- if(HAVE_CRYPTO)
-@@ -170,7 +170,7 @@ if(SHARED_LIB_VERSIONNING)
- set_target_properties(zip PROPERTIES VERSION 5.3 SOVERSION 5)
- endif()
-
--target_link_libraries(zip PRIVATE ZLIB::ZLIB)
-+target_link_libraries(zip PRIVATE ${ZLIB_LIBRARIES})
- target_include_directories(zip
- PUBLIC
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/lib>
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index b6eb0b19..85ce0e63 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -10,4 +10,4 @@ foreach(PROGRAM zipcmp zipmerge ziptool)
- target_sources(${PROGRAM} PRIVATE getopt.c)
- endif(NOT HAVE_GETOPT)
- endforeach()
--target_link_libraries(zipcmp ${FTS_LIB} ZLIB::ZLIB)
-+target_link_libraries(zipcmp ${FTS_LIB} ${ZLIB_LIBRARIES})
diff --git a/libzip.spec b/libzip.spec
index 7bb5fe5..5d1fc75 100644
--- a/libzip.spec
+++ b/libzip.spec
@@ -30,9 +30,10 @@ License: BSD
URL: https://libzip.org/
Source0: https://libzip.org/download/libzip-%{version}.tar.xz
-Patch0: libzip-gnuinstalldirs.patch
-Patch1: libzip-privlibs.patch
+Patch1: https://github.com/nih-at/libzip/commit/ebe01b5c259fa28b4da24cc1c11ab24a31281b64.patch
Patch2: https://github.com/nih-at/libzip/commit/992ed23c322c9abb9a108a6d119c09aada50ca9c.patch
+Patch3: https://github.com/nih-at/libzip/commit/4fdcd241a48387d1a3aecd04ca25a115a9a689f6.patch
+Patch4: https://github.com/nih-at/libzip/commit/f520e28292d112ab1bd52d41567d89fb98cc5090.patch
BuildRequires: gcc
BuildRequires: zlib-devel >= 1.1.2
@@ -120,9 +121,10 @@ The %{name}-tools package provides command line tools split off %{name}:
%prep
%setup -q -n %{libname}-%{version}
-%patch0 -p1 -b .gnuinstalldirs
-#patch1 -p1 -b .privlib
-%patch2 -p1 -b .up
+%patch1 -p1 -b .up1
+%patch2 -p1 -b .up2
+%patch3 -p1 -b .up3
+%patch4 -p1 -b .up4
# unwanted in package documentation
rm INSTALL.md