summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-07-13 10:53:09 +0200
committerRemi Collet <remi@remirepo.net>2020-07-13 10:53:09 +0200
commitbd9ef03952031919edd96885295ce9b48fa3d3e1 (patch)
tree39e656a6adb088702180ab9434c7603953a9c41f
parentc87434fb7371e721456288752414c748b7e96d74 (diff)
update to 1.7.2
fix installation layout using patch from https://github.com/nih-at/libzip/pull/190 fix pkgconfig usability using patch from https://github.com/nih-at/libzip/pull/191
-rw-r--r--compat_reports/1.7.1_to_1.7.2/compat_report.html519
-rw-r--r--libzip-gnuinstalldirs.patch126
-rw-r--r--libzip-privlibs.patch65
-rw-r--r--libzip.spec34
-rw-r--r--libzip.xml2
5 files changed, 735 insertions, 11 deletions
diff --git a/compat_reports/1.7.1_to_1.7.2/compat_report.html b/compat_reports/1.7.1_to_1.7.2/compat_report.html
new file mode 100644
index 0000000..85cdf05
--- /dev/null
+++ b/compat_reports/1.7.1_to_1.7.2/compat_report.html
@@ -0,0 +1,519 @@
+<!-- kind:binary;verdict:compatible;affected:0;added:0;removed:0;type_problems_high:0;type_problems_medium:0;type_problems_low:0;interface_problems_high:0;interface_problems_medium:0;interface_problems_low:0;changed_constants:0;tool_version:2.3 -->
+<!-- kind:source;verdict:compatible;affected:0;added:0;removed:0;type_problems_high:0;type_problems_medium:0;type_problems_low:0;interface_problems_high:0;interface_problems_medium:0;interface_problems_low:0;changed_constants:2;tool_version:2.3 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="viewport" content="width=device-width,initial-scale=1" />
+<meta name="keywords" content="libzip, compatibility, API, ABI, report" />
+<meta name="description" content="API/ABI compatibility report for the libzip library between 1.7.1 and 1.7.2 versions" />
+<title>libzip: 1.7.1 to 1.7.2 compatibility report</title>
+<style type="text/css">
+body {
+ font-family:Arial, sans-serif;
+ background-color:White;
+ color:Black;
+}
+hr {
+ color:Black;
+ background-color:Black;
+ height:1px;
+ border:0;
+}
+h1 {
+ margin-bottom:0px;
+ padding-bottom:0px;
+ font-size:1.625em;
+}
+h2 {
+ margin-bottom:0px;
+ padding-bottom:0px;
+ font-size:1.25em;
+ white-space:nowrap;
+}
+span.section {
+ font-weight:bold;
+ cursor:pointer;
+ color:#003E69;
+ white-space:nowrap;
+ margin-left:0.3125em;
+}
+span.new_sign {
+ font-weight:bold;
+ margin-left:1.65em;
+ color:#003E69;
+}
+span.new_sign_lbl {
+ margin-left:3em;
+ font-size:1em;
+ color:Black;
+}
+span:hover.section {
+ color:#336699;
+}
+span.sect_aff {
+ cursor:pointer;
+ padding-left:1.55em;
+ font-size:0.875em;
+ color:#cc3300;
+}
+span.sect_info {
+ cursor:pointer;
+ padding-left:1.55em;
+ font-size:0.875em;
+ color:Black;
+}
+span.ext {
+ font-weight:normal;
+}
+span.h_name {
+ color:#cc3300;
+ font-size:0.875em;
+ font-weight:bold;
+}
+div.h_list, div.lib_list {
+ font-size:0.94em;
+ padding-left:0.4em;
+}
+span.ns {
+ color:#408080;
+ font-size:0.94em;
+}
+span.lib_name {
+ color:Green;
+ font-size:0.875em;
+ font-weight:bold;
+}
+span.iname {
+ font-weight:bold;
+ color:#003E69;
+ margin-left:0.3125em;
+}
+span.iname_b {
+ font-weight:bold;
+}
+span.iname_a {
+ color:#333333;
+ font-weight:bold;
+ font-size:0.94em;
+}
+span.sym_p {
+ font-weight:normal;
+ white-space:normal;
+}
+span.sym_pd {
+ white-space:normal;
+}
+span.sym_p span, span.sym_pd span {
+ white-space:nowrap;
+}
+div.affect {
+ padding-left:1em;
+ padding-bottom:10px;
+ font-size:0.87em;
+ font-style:italic;
+ line-height:0.9em;
+}
+div.affected {
+ padding-left:1.9em;
+ padding-top:10px;
+}
+table.ptable {
+ border-collapse:collapse;
+ border:1px outset black;
+ margin-left:0.95em;
+ margin-top:3px;
+ margin-bottom:3px;
+ width:56.25em;
+}
+table.ptable td {
+ border:1px solid gray;
+ padding:3px;
+ font-size:0.875em;
+ text-align:left;
+ vertical-align:top;
+ max-width:28em;
+ word-wrap:break-word;
+}
+table.ptable th.pn {
+ width:2%;
+}
+table.ptable th.chg {
+ width:47%;
+}
+table.vtable {
+ border-collapse:collapse;
+ border:1px outset black;
+ margin-left:1.9em;
+ margin-top:0.7em;
+}
+table.vtable td {
+ border:1px solid gray;
+ padding:3px;
+ font-size:0.875em;
+ vertical-align:top;
+ max-width:450px;
+ word-wrap:break-word;
+}
+table.ptable th, table.vtable th {
+ background-color:#eeeeee;
+ font-weight:bold;
+ color:#333333;
+ font-family:Verdana, Arial;
+ font-size:0.875em;
+ border:1px solid gray;
+ text-align:center;
+ vertical-align:top;
+ white-space:nowrap;
+ padding:3px;
+}
+table.summary {
+ border-collapse:collapse;
+ border:1px outset black;
+}
+table.summary th {
+ background-color:#eeeeee;
+ font-weight:normal;
+ text-align:left;
+ font-size:0.94em;
+ white-space:nowrap;
+ border:1px inset gray;
+ padding:3px;
+}
+table.summary td {
+ text-align:right;
+ white-space:nowrap;
+ border:1px inset gray;
+ padding:3px 5px 3px 10px;
+}
+span.mngl {
+ padding-left:1em;
+ font-size:0.875em;
+ cursor:text;
+ color:#444444;
+ font-weight:bold;
+}
+span.pleft {
+ padding-left:2.5em;
+}
+span.sym_ver {
+ color:#333333;
+ white-space:nowrap;
+ font-family:"DejaVu Sans Mono", Monospace;
+}
+span.attr {
+ color:#333333;
+ font-weight:normal;
+}
+span.color_p {
+ font-style:italic;
+ color:Brown;
+}
+span.p {
+ font-style:italic;
+}
+span.fp {
+ font-style:italic;
+ background-color:#DCDCDC;
+}
+span.ttype {
+ font-weight:normal;
+}
+span.nowrap {
+ white-space:nowrap;
+}
+span.value {
+ font-weight:bold;
+}
+.passed {
+ background-color:#CCFFCC;
+ font-weight:normal;
+}
+.warning {
+ background-color:#F4F4AF;
+ font-weight:normal;
+}
+.failed {
+ background-color:#FFCCCC;
+ font-weight:normal;
+}
+.new {
+ background-color:#C6DEFF;
+ font-weight:normal;
+}
+.compatible {
+ background-color:#CCFFCC;
+ font-weight:normal;
+}
+.almost_compatible {
+ background-color:#FFDAA3;
+ font-weight:normal;
+}
+.incompatible {
+ background-color:#FFCCCC;
+ font-weight:normal;
+}
+.gray {
+ background-color:#DCDCDC;
+ font-weight:normal;
+}
+.top_ref {
+ font-size:0.69em;
+}
+.footer {
+ font-size:0.75em;
+}
+
+.tabset {
+ float:left;
+}
+a.tab {
+ border:1px solid Black;
+ float:left;
+ margin:0px 5px -1px 0px;
+ padding:3px 5px 3px 5px;
+ position:relative;
+ font-size:0.875em;
+ background-color:#DDD;
+ text-decoration:none;
+ color:Black;
+}
+a.disabled:hover
+{
+ color:Black;
+ background:#EEE;
+}
+a.active:hover
+{
+ color:Black;
+ background:White;
+}
+a.active {
+ border-bottom-color:White;
+ background-color:White;
+}
+div.tab {
+ border-top:1px solid Black;
+ padding:0px;
+ width:100%;
+ clear:both;
+}
+</style>
+<script type="text/javascript" language="JavaScript">
+<!--
+function showContent(header, id)
+{
+ e = document.getElementById(id);
+ if(e.style.display == 'none')
+ {
+ e.style.display = 'block';
+ e.style.visibility = 'visible';
+ header.innerHTML = header.innerHTML.replace(/\[[^0-9 ]\]/gi,"[&minus;]");
+ }
+ else
+ {
+ e.style.display = 'none';
+ e.style.visibility = 'hidden';
+ header.innerHTML = header.innerHTML.replace(/\[[^0-9 ]\]/gi,"[+]");
+ }
+}
+function initTabs()
+{
+ var url = window.location.href;
+ if(url.indexOf('_Source_')!=-1 || url.indexOf('#Source')!=-1)
+ {
+ var tab1 = document.getElementById('BinaryID');
+ var tab2 = document.getElementById('SourceID');
+ tab1.className='tab disabled';
+ tab2.className='tab active';
+ }
+ var sets = document.getElementsByTagName('div');
+ for (var i = 0; i < sets.length; i++)
+ {
+ if (sets[i].className.indexOf('tabset') != -1)
+ {
+ var tabs = [];
+ var links = sets[i].getElementsByTagName('a');
+ for (var j = 0; j < links.length; j++)
+ {
+ if (links[j].className.indexOf('tab') != -1)
+ {
+ tabs.push(links[j]);
+ links[j].tabs = tabs;
+ var tab = document.getElementById(links[j].href.substr(links[j].href.indexOf('#') + 1));
+ //reset all tabs on start
+ if (tab)
+ {
+ if (links[j].className.indexOf('active')!=-1) {
+ tab.style.display = 'block';
+ }
+ else {
+ tab.style.display = 'none';
+ }
+ }
+ links[j].onclick = function()
+ {
+ var tab = document.getElementById(this.href.substr(this.href.indexOf('#') + 1));
+ if (tab)
+ {
+ //reset all tabs before change
+ for (var k = 0; k < this.tabs.length; k++)
+ {
+ document.getElementById(this.tabs[k].href.substr(this.tabs[k].href.indexOf('#') + 1)).style.display = 'none';
+ this.tabs[k].className = this.tabs[k].className.replace('active', 'disabled');
+ }
+ this.className = 'tab active';
+ tab.style.display = 'block';
+ // window.location.hash = this.id.replace('ID', '');
+ return false;
+ }
+ }
+ }
+ }
+ }
+ }
+ if(url.indexOf('#')!=-1) {
+ location.href=location.href;
+ }
+}
+if (window.addEventListener) window.addEventListener('load', initTabs, false);
+else if (window.attachEvent) window.attachEvent('onload', initTabs);
+-->
+</script>
+</head>
+<body><a name='Source'></a><a name='Binary'></a><a name='Top'></a><h1>API compatibility report for the <span style='color:Blue;'>libzip</span> library between <span style='color:Red;'>1.7.1</span> and <span style='color:Red;'>1.7.2</span> versions on <span style='color:Blue;'>x86_64</span></h1>
+
+ <br/>
+ <div class='tabset'>
+ <a id='BinaryID' href='#BinaryTab' class='tab active'>Binary<br/>Compatibility</a>
+ <a id='SourceID' href='#SourceTab' style='margin-left:3px' class='tab disabled'>Source<br/>Compatibility</a>
+ </div><div id='BinaryTab' class='tab'>
+<h2>Test Info</h2><hr/>
+<table class='summary'>
+<tr><th>Library Name</th><td>libzip</td></tr>
+<tr><th>Version #1</th><td>1.7.1</td></tr>
+<tr><th>Version #2</th><td>1.7.2</td></tr>
+<tr><th>Arch</th><td>x86_64</td></tr>
+<tr><th>GCC Version</th><td>9</td></tr>
+<tr><th>Subject</th><td width='150px'>Binary Compatibility</td></tr>
+</table>
+<h2>Test Results</h2><hr/>
+<table class='summary'><tr><th>Total Header Files</th><td><a href='#Headers' style='color:Blue;'>2</a></td></tr>
+<tr><th>Total Libraries</th><td><a href='#Libs' style='color:Blue;'>1</a></td></tr>
+<tr><th>Total Symbols / Types</th><td>125 / 54</td></tr>
+<tr><th>Compatibility</th>
+<td class='compatible'>100%</td>
+</tr>
+</table>
+<h2>Problem Summary</h2><hr/>
+<table class='summary'><tr><th></th><th style='text-align:center;'>Severity</th><th style='text-align:center;'>Count</th></tr><tr><th>Added Symbols</th><td>-</td><td>0</td></tr>
+<tr><th>Removed Symbols</th><td>High</td><td>0</td></tr>
+<tr><th rowspan='3'>Problems with<br/>Data Types</th><td>High</td><td>0</td></tr>
+<tr><td>Medium</td><td>0</td></tr>
+<tr><td>Low</td><td>0</td></tr>
+<tr><th rowspan='3'>Problems with<br/>Symbols</th><td>High</td><td>0</td></tr>
+<tr><td>Medium</td><td>0</td></tr>
+<tr><td>Low</td><td>0</td></tr>
+<tr><th>Problems with<br/>Constants</th><td>Low</td><td>0</td></tr>
+</table>
+
+<a name='Headers'></a><h2>Header Files <span class='gray'>&nbsp;2&nbsp;</span></h2><hr/>
+<div class='h_list'>
+zip.h<br/>
+zipconf.h<br/>
+</div>
+<br/><a class='top_ref' href='#Top'>to the top</a><br/>
+<a name='Libs'></a><h2>Libraries <span class='gray'>&nbsp;1&nbsp;</span></h2><hr/>
+<div class='lib_list'>
+libzip.so.5.3<br/>
+</div>
+<br/><a class='top_ref' href='#Top'>to the top</a><br/>
+<br/><br/><br/></div><div id='SourceTab' class='tab'>
+<h2>Test Info</h2><hr/>
+<table class='summary'>
+<tr><th>Library Name</th><td>libzip</td></tr>
+<tr><th>Version #1</th><td>1.7.1</td></tr>
+<tr><th>Version #2</th><td>1.7.2</td></tr>
+<tr><th>Arch</th><td>x86_64</td></tr>
+<tr><th>Subject</th><td width='150px'>Source Compatibility</td></tr>
+</table>
+<h2>Test Results</h2><hr/>
+<table class='summary'><tr><th>Total Header Files</th><td><a href='#Headers' style='color:Blue;'>2</a></td></tr>
+<tr><th>Total Libraries</th><td><a href='#Libs' style='color:Blue;'>1</a></td></tr>
+<tr><th>Total Symbols / Types</th><td>263 / 91</td></tr>
+<tr><th>Compatibility</th>
+<td class='compatible'>100%</td>
+</tr>
+</table>
+<h2>Problem Summary</h2><hr/>
+<table class='summary'><tr><th></th><th style='text-align:center;'>Severity</th><th style='text-align:center;'>Count</th></tr><tr><th>Added Symbols</th><td>-</td><td>0</td></tr>
+<tr><th>Removed Symbols</th><td>High</td><td>0</td></tr>
+<tr><th rowspan='3'>Problems with<br/>Data Types</th><td>High</td><td>0</td></tr>
+<tr><td>Medium</td><td>0</td></tr>
+<tr><td>Low</td><td>0</td></tr>
+<tr><th rowspan='3'>Problems with<br/>Symbols</th><td>High</td><td>0</td></tr>
+<tr><td>Medium</td><td>0</td></tr>
+<tr><td>Low</td><td>0</td></tr>
+<tr><th>Problems with<br/>Constants</th><td>Low</td><td class='warning'><a href='#Constant_Source_Problems_Low' style='color:Blue;'>2</a></td></tr>
+</table>
+
+<a name='Low_Risk_Source_Problems'></a><a name='Constant_Source_Problems_Low'></a>
+<h2>Problems with Constants, Low Severity <span class='warning'>&nbsp;2&nbsp;</span></h2><hr/>
+<span class='h_name'>zipconf.h</span><br/>
+<span class="section" onclick="javascript:showContent(this, 'c_1')">
+<span class='ext'>[+]</span> LIBZIP_VERSION</span>
+<br/>
+<div id="c_1" style="display:none;">
+<table class='ptable'>
+<tr>
+<th class='pn'></th>
+<th class='chg'>Change</th>
+<th>Effect</th>
+</tr>
+<tr>
+<th>1</th>
+<td>The value of constant <b>LIBZIP_VERSION</b> has been changed from <b>&quot;1.7.1&quot;</b> to <b>&quot;1.7.2&quot;</b>.</td>
+<td>Recompilation of a client program may be broken.</td>
+</tr>
+</table>
+<br/>
+</div>
+
+<span class="section" onclick="javascript:showContent(this, 'c_2')">
+<span class='ext'>[+]</span> LIBZIP_VERSION_MICRO</span>
+<br/>
+<div id="c_2" style="display:none;">
+<table class='ptable'>
+<tr>
+<th class='pn'></th>
+<th class='chg'>Change</th>
+<th>Effect</th>
+</tr>
+<tr>
+<th>1</th>
+<td>The value of constant <b>LIBZIP_VERSION_MICRO</b> has been changed from <b>1</b> to <b>2</b>.</td>
+<td>Recompilation of a client program may be broken.</td>
+</tr>
+</table>
+<br/>
+</div>
+
+<br/>
+<a class='top_ref' href='#Top'>to the top</a><br/>
+<a name='Headers'></a><h2>Header Files <span class='gray'>&nbsp;2&nbsp;</span></h2><hr/>
+<div class='h_list'>
+zip.h<br/>
+zipconf.h<br/>
+</div>
+<br/><a class='top_ref' href='#Top'>to the top</a><br/>
+<a name='Libs'></a><h2>Libraries <span class='gray'>&nbsp;1&nbsp;</span></h2><hr/>
+<div class='lib_list'>
+libzip.so.5.3<br/>
+</div>
+<br/><a class='top_ref' href='#Top'>to the top</a><br/>
+<br/><br/><br/></div><hr/>
+<div class='footer' align='right'><i>Generated by <a href='https://github.com/lvc/abi-compliance-checker'>ABI Compliance Checker</a> 2.3 &#160;</i>
+</div>
+<br/>
+
+</body></html>
diff --git a/libzip-gnuinstalldirs.patch b/libzip-gnuinstalldirs.patch
new file mode 100644
index 0000000..088b5a6
--- /dev/null
+++ b/libzip-gnuinstalldirs.patch
@@ -0,0 +1,126 @@
+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
new file mode 100644
index 0000000..779d10c
--- /dev/null
+++ b/libzip-privlibs.patch
@@ -0,0 +1,65 @@
+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 bec3ccd..fefcd17 100644
--- a/libzip.spec
+++ b/libzip.spec
@@ -10,7 +10,7 @@
#
%global libname libzip
%global soname 5
-%global with_tests 0%{!?_without_tests:1}
+%bcond_without tests
%if 0%{?rhel} == 6
%global with_xz 0
%else
@@ -22,7 +22,7 @@ Name: %{libname}
%else
Name: %{libname}%{soname}
%endif
-Version: 1.7.1
+Version: 1.7.2
Release: 1%{?dist}
Summary: C library for reading, creating, and modifying zip archives
@@ -30,12 +30,15 @@ License: BSD
URL: https://libzip.org/
Source0: https://libzip.org/download/libzip-%{version}.tar.xz
+Patch0: libzip-gnuinstalldirs.patch
+Patch1: libzip-privlibs.patch
+
BuildRequires: gcc
-BuildRequires: zlib-devel
+BuildRequires: zlib-devel >= 1.1.2
BuildRequires: bzip2-devel
BuildRequires: openssl-devel
%if %{with_xz}
-BuildRequires: xz-devel
+BuildRequires: xz-devel >= 5.2
%endif
%if 0%{?rhel} == 6 || 0%{?rhel} == 7
BuildRequires: cmake3 >= 3.0.2
@@ -116,21 +119,25 @@ 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
# unwanted in package documentation
rm INSTALL.md
-%if ! %{with_xz}
-sed -e '/store_to_xz.test/d;/xz_to_store.test/d' -i regress/CMakeLists.txt
-%endif
-
%build
-%if 0%{?rhel} == 6 || 0%{?rhel} == 7
# drop skipped test which make test suite fails (cmake issue ?)
sed -e '/clone-fs-/d' \
+%if ! %{with_xz}
+ -e '/store_to_xz.test/d;/xz_to_store.test/d' \
+%endif
+%if 0%{?rhel} == 6 || 0%{?rhel} == 7
-e '/add_from_stdin/d' \
+%endif
-i regress/CMakeLists.txt
+
+%if 0%{?rhel} == 6 || 0%{?rhel} == 7
sed -e 's/COMMAND cmake /COMMAND cmake3 /' -i CMakeLists.txt regress/CMakeLists.txt
%cmake3 \
%else
@@ -161,7 +168,7 @@ make install DESTDIR=%{buildroot} INSTALL='install -p'
%check
-%if %{with_tests}
+%if %{with tests}
make check
%else
: Test suite disabled
@@ -198,6 +205,13 @@ make check
%changelog
+* Mon Jul 13 2020 Remi Collet <remi@remirepo.net> - 1.7.2-1
+- update to 1.7.2
+- fix installation layout using patch from
+ https://github.com/nih-at/libzip/pull/190
+- fix pkgconfig usability using patch from
+ https://github.com/nih-at/libzip/pull/191
+
* Sun Jun 14 2020 Remi Collet <remi@remirepo.net> - 1.7.1-1
- update to 1.7.1
diff --git a/libzip.xml b/libzip.xml
index b67343d..30940b6 100644
--- a/libzip.xml
+++ b/libzip.xml
@@ -9,7 +9,7 @@
<version>
<!-- Version of the library -->
-1.7.1
+1.7.2
</version>
<headers>