diff options
Diffstat (limited to 'ports/libzip')
| -rw-r--r-- | ports/libzip/CONTROL | 4 | ||||
| -rw-r--r-- | ports/libzip/LICENSE | 66 | ||||
| -rw-r--r-- | ports/libzip/cmake_dont_build_more_than_needed.patch | 19 | ||||
| -rw-r--r-- | ports/libzip/portfile.cmake | 32 |
4 files changed, 121 insertions, 0 deletions
diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL new file mode 100644 index 000000000..e82f0fee2 --- /dev/null +++ b/ports/libzip/CONTROL @@ -0,0 +1,4 @@ +Source: libzip +Version: rel-1-5-1 +Build-Depends: zlib +Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/libzip/LICENSE b/ports/libzip/LICENSE new file mode 100644 index 000000000..1c2e86bf2 --- /dev/null +++ b/ports/libzip/LICENSE @@ -0,0 +1,66 @@ +Copyright (C) 1999-2016 Dieter Baron and Thomas Klausner + +The authors can be contacted at <libzip@nih.at> + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +3. The names of the authors may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +For AES encryption support, files under the following license are used: + +--------------------------------------------------------------------------- +Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. +All rights reserved. + +LICENSE TERMS + +The free distribution and use of this software in both source and binary +form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + +ALTERNATIVELY, provided that this notice is retained in full, this product +may be distributed under the terms of the GNU General Public License (GPL), +in which case the provisions of the GPL apply INSTEAD OF those given above. + +DISCLAIMER + +This software is provided 'as is' with no explicit or implied warranties +in respect of its properties, including, but not limited to, correctness +and/or fitness for purpose. +--------------------------------------------------------------------------- +Issue Date: 18th November 2008 diff --git a/ports/libzip/cmake_dont_build_more_than_needed.patch b/ports/libzip/cmake_dont_build_more_than_needed.patch new file mode 100644 index 000000000..bb0af9749 --- /dev/null +++ b/ports/libzip/cmake_dont_build_more_than_needed.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 69cdb8b..4c985fb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -149,10 +149,10 @@ ENABLE_TESTING() + + # Targets + ADD_SUBDIRECTORY(lib) +-ADD_SUBDIRECTORY(man) +-ADD_SUBDIRECTORY(src) +-ADD_SUBDIRECTORY(regress) +-ADD_SUBDIRECTORY(examples) ++#ADD_SUBDIRECTORY(man) ++#ADD_SUBDIRECTORY(src) ++#ADD_SUBDIRECTORY(regress) ++#ADD_SUBDIRECTORY(examples) + + # pkgconfig file + SET(prefix ${CMAKE_INSTALL_PREFIX}) diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake new file mode 100644 index 000000000..b509c5eb0 --- /dev/null +++ b/ports/libzip/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nih-at/libzip + REF rel-1-5-1 + SHA512 778f438f6354f030656baa5497b3154ad8fb764011d2a6925136f32e06dc0dcd1ed93fe05dbf7be619004a68cdabe5e34a83b988c1501ed67e9cfa4fa540350f +) + +# Patch cmake and configuration to allow static builds +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Move zipconf.h to include and remove include directories from lib +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/debug/lib/libzip) + +# Remove debug include +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Copy copright information +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzip RENAME copyright) + +vcpkg_copy_pdbs() |
