X-Original-To: alpine-aports@lists.alpinelinux.org Received: from peacecraft.izsrs.biz (peacecraft.izsrs.biz [199.195.253.49]) by lists.alpinelinux.org (Postfix) with ESMTP id C85AB5C4558 for ; Wed, 7 Dec 2016 22:41:21 +0000 (GMT) Received: by peacecraft.izsrs.biz (Postfix, from userid 1000) id D6D28E1CDD; Wed, 7 Dec 2016 05:31:59 -0500 (EST) From: Andrew Domaszek To: alpine-aports@lists.alpinelinux.org Cc: Andrew Domaszek Subject: [alpine-aports] [PATCH] testing/ebook-tools: new aport Date: Wed, 7 Dec 2016 05:31:48 -0500 Message-Id: <1481106708-27597-1-git-send-email-brimston3@hg0.us> X-Mailer: git-send-email 1.7.10.4 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: https://sourceforge.net/projects/ebook-tools Tools for accessing and converting various ebook file formats --- .../ebook-tools/10-cmake_libzip_zipconf_path.patch | 76 ++++++++++++++++++++++ testing/ebook-tools/APKBUILD | 39 +++++++++++ 2 files changed, 115 insertions(+) create mode 100644 testing/ebook-tools/10-cmake_libzip_zipconf_path.patch create mode 100644 testing/ebook-tools/APKBUILD diff --git a/testing/ebook-tools/10-cmake_libzip_zipconf_path.patch b/testing/ebook-tools/10-cmake_libzip_zipconf_path.patch new file mode 100644 index 0000000..71cc04b --- /dev/null +++ b/testing/ebook-tools/10-cmake_libzip_zipconf_path.patch @@ -0,0 +1,76 @@ +Author: Pino Toscano +Description: Get the include dir also for zipconf.h + Since libzip 0.11.x, the architecture-specific zipconf.h has been moved to + an include directory within the library path. + Adapt the CMake stuff to search for zipconf.h there, making sure to use all + the include directories needed when wanting to use libzip. +Forwarded: no +Last-Update: 2014-02-16 +Bug-Debian: https://bugs.debian.org/739152 + +--- a/cmake/FindLibZip.cmake ++++ b/cmake/FindLibZip.cmake +@@ -2,7 +2,7 @@ + # Once done this will define + # + # LIBZIP_FOUND - system has the zip library +-# LIBZIP_INCLUDE_DIR - the zip include directory ++# LIBZIP_INCLUDE_DIRS - the zip include directories + # LIBZIP_LIBRARY - Link this to use the zip library + # + # Copyright (c) 2006, Pino Toscano, +@@ -10,12 +10,12 @@ + # Redistribution and use is allowed according to the terms of the BSD license. + # For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +-if (LIBZIP_LIBRARY AND LIBZIP_INCLUDE_DIR) ++if (LIBZIP_LIBRARY AND LIBZIP_INCLUDE_DIRS) + # in cache already + set(LIBZIP_FOUND TRUE) +-else (LIBZIP_LIBRARY AND LIBZIP_INCLUDE_DIR) ++else (LIBZIP_LIBRARY AND LIBZIP_INCLUDE_DIRS) + +- find_path(LIBZIP_INCLUDE_DIR zip.h ++ find_path(_LIBZIP_INCLUDE_DIR zip.h + ${GNUWIN32_DIR}/include + ) + +@@ -24,13 +24,26 @@ + ${GNUWIN32_DIR}/lib + ) + ++ if (LIBZIP_LIBRARY) ++ get_filename_component(_LIBZIP_LIBRARY_DIR ${LIBZIP_LIBRARY} PATH) ++ ++ find_path(_ZIPCONF_INCLUDE_DIR zipconf.h ++ PATHS ++ ${_LIBZIP_LIBRARY_DIR}/include ++ ${_LIBZIP_LIBRARY_DIR}/libzip/include ++ ) ++ endif() ++ + include(FindPackageHandleStandardArgs) +- FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibZip DEFAULT_MSG LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR) ++ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibZip DEFAULT_MSG LIBZIP_LIBRARY _LIBZIP_INCLUDE_DIR _ZIPCONF_INCLUDE_DIR) + ++ set(LIBZIP_INCLUDE_DIRS) ++ list(APPEND LIBZIP_INCLUDE_DIRS "${_LIBZIP_INCLUDE_DIR}") ++ list(APPEND LIBZIP_INCLUDE_DIRS "${_ZIPCONF_INCLUDE_DIR}") + # ensure that they are cached +- set(LIBZIP_INCLUDE_DIR ${LIBZIP_INCLUDE_DIR} CACHE INTERNAL "The libzip include path") ++ set(LIBZIP_INCLUDE_DIRS ${LIBZIP_INCLUDE_DIRS} CACHE INTERNAL "The libzip include paths") + set(LIBZIP_LIBRARY ${LIBZIP_LIBRARY} CACHE INTERNAL "The libraries needed to use libzip") + +-endif (LIBZIP_LIBRARY AND LIBZIP_INCLUDE_DIR) ++endif (LIBZIP_LIBRARY AND LIBZIP_INCLUDE_DIRS) + +-mark_as_advanced(LIBZIP_INCLUDE_DIR LIBZIP_LIBRARY) ++mark_as_advanced(LIBZIP_INCLUDE_DIRS LIBZIP_LIBRARY) +--- a/src/libepub/CMakeLists.txt ++++ b/src/libepub/CMakeLists.txt +@@ -1,4 +1,4 @@ +-include_directories (${EBOOK-TOOLS_SOURCE_DIR}/src/libepub ${LIBXML2_INCLUDE_DIR} ${LIBZIP_INCLUDE_DIR}) ++include_directories (${EBOOK-TOOLS_SOURCE_DIR}/src/libepub ${LIBXML2_INCLUDE_DIR} ${LIBZIP_INCLUDE_DIRS}) + add_library (epub SHARED epub.c ocf.c opf.c linklist.c list.c) + target_link_libraries (epub ${LIBZIP_LIBRARY} ${LIBXML2_LIBRARIES}) + diff --git a/testing/ebook-tools/APKBUILD b/testing/ebook-tools/APKBUILD new file mode 100644 index 0000000..409feee --- /dev/null +++ b/testing/ebook-tools/APKBUILD @@ -0,0 +1,39 @@ +# Contributor: Andrew Domaszek +# Maintainer: +pkgname=ebook-tools +pkgver=0.2.2 +pkgrel=0 +pkgdesc="Tools for accessing and converting various ebook file formats." +url="https://sourceforge.net/projects/ebook-tools/" +arch="all" +license="MIT" +depends="" +depends_dev="cmake libxml2-dev libzip-dev" +makedepends="$depends_dev" +install="" +subpackages="$pkgname-dev $pkgname-doc" +source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + 10-cmake_libzip_zipconf_path.patch" + +builddir="$srcdir"/$pkgname-$pkgver +build() { + cd "$builddir" + cmake \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_INSTALL_PREFIX=/usr \ + . || return 1 + make || return 1 +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install || return 1 + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE || return 1 +} + +md5sums="67bce67ceb72dcc3578d6a81ef92b29b ebook-tools-0.2.2.tar.gz +e8ed59e57a07595a34277da6f0356eb4 10-cmake_libzip_zipconf_path.patch" +sha256sums="cbc35996e911144fa62925366ad6a6212d6af2588f1e39075954973bbee627ae ebook-tools-0.2.2.tar.gz +e7c9ab9589528a705409129f092cc966e8d856b66126cd93bbafa54dba185381 10-cmake_libzip_zipconf_path.patch" +sha512sums="b4518249835ed7cc672392bf2f8b1c62bc218e41c53663bb26ab34c9e43a99b6b7ae794babdb4bd775e467bb17918703a66ee57c8cf94cb7afc4ba2a7f74816a ebook-tools-0.2.2.tar.gz +5fadd9346232192ae618993c5f48ab84fac84d32dce3be55e4485d756f5a364569298488960bd21c0783d5e160a186f6f335d92194c5f63fc619218335f117ed 10-cmake_libzip_zipconf_path.patch" -- 2.8.3 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---