diff options
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | fix_build_errs.patch | 23 |
3 files changed, 65 insertions, 30 deletions
@@ -1,17 +1,19 @@ pkgbase = lib7zip pkgdesc = A library using 7z.dll/7z.so(from 7-Zip) to handle different archive types. - pkgver = 1.6.5 - pkgrel = 1 - url = http://code.google.com/p/lib7zip/ + pkgver = 3.0.0_17.04 + pkgrel = 3 + url = https://github.com/stonewell/lib7zip arch = i686 arch = x86_64 license = MPL + makedepends = cmake makedepends = libtool options = !libtool - source = http://lib7zip.googlecode.com/files/lib7zip-1.6.5.tar.gz - source = http://downloads.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2 - md5sums = a127ec183797dcf685938372dc5bf72a - md5sums = bd6caaea567dc0d995c990c5cc883c89 + source = git+https://github.com/stonewell/lib7zip.git + source = https://github.com/p7zip-project/p7zip/archive/refs/tags/v17.04.tar.gz + source = fix_build_errs.patch + sha256sums = SKIP + sha256sums = ea029a2e21d2d6ad0a156f6679bd66836204aa78148a4c5e498fe682e77127ef + sha256sums = 4c3f39beea4142283d76c2652d01ceaa647717d72359f75b9e7164082ba3a12d pkgname = lib7zip - @@ -1,37 +1,47 @@ -# Maintainer: yugrotavele <yugrotavele at archlinux dot us> -# Contributor: speps <speps at aur dot archlinux dot org> +# Maintainer : doragasu <doragasu at hotmail dot com> +# Original submitter: speps <speps at aur dot archlinux dot org> _pkg=p7zip -_ver=9.20.1 +_commit=53abfeb6f1919fce3e65f21e37340153d2e4fe10 +_ver=17.04 pkgname=lib7zip -pkgver=1.6.5 -pkgrel=1 +pkgver=3.0.0_${_ver} +pkgrel=3 pkgdesc="A library using 7z.dll/7z.so(from 7-Zip) to handle different archive types." arch=(i686 x86_64) -url="http://code.google.com/p/lib7zip/" +url="https://github.com/stonewell/lib7zip" license=('MPL') -makedepends=('libtool') +makedepends=('cmake' 'libtool') options=('!libtool') -source=("http://lib7zip.googlecode.com/files/$pkgname-$pkgver.tar.gz" - "http://downloads.sourceforge.net/project/${_pkg}/${_pkg}/${_ver}/${_pkg}_${_ver}_src_all.tar.bz2") -md5sums=('a127ec183797dcf685938372dc5bf72a' - 'bd6caaea567dc0d995c990c5cc883c89') +source=("git+https://github.com/stonewell/${pkgname}.git" + "https://github.com/p7zip-project/${_pkg}/archive/refs/tags/v${_ver}.tar.gz" + "fix_build_errs.patch") +sha256sums=('SKIP' + 'ea029a2e21d2d6ad0a156f6679bd66836204aa78148a4c5e498fe682e77127ef' + '4c3f39beea4142283d76c2652d01ceaa647717d72359f75b9e7164082ba3a12d') -build() { - cd "$srcdir/$pkgname-$pkgver" +prepare() { + cd "${srcdir}/${pkgname}" + git checkout ${_commit} + patch -p1 < ../fix_build_errs.patch + + # point to p7zip source + export P7ZIP_SOURCE_DIR="${srcdir}/${_pkg}-${_ver}" - # point to p7zip source - export P7ZIP_SOURCE_DIR="$srcdir/${_pkg}_${_ver}" + cmake -DBUILD_SHARED_LIB=ON \ + -DP7ZIP_SOURCE_DIR=${P7ZIP_SOURCE_DIR} \ + -DCMAKE_BUILD_TYPE=RELEASE +} - ./configure --prefix=/usr - make +build() { + cd "${srcdir}/${pkgname}" + make } package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir/" install + cd "${srcdir}/${pkgname}/src" - # header - install -Dm644 Lib7Zip/$pkgname.h \ - "$pkgdir/usr/include/$pkgname.h" + # Provided CMakeLists does not install files, so install manually + install -Dm755 ${pkgname}.so ${pkgdir}/usr/lib/${pkgname}.so + install -Dm644 ${pkgname}.h ${pkgdir}/usr/include/${pkgname}.h } diff --git a/fix_build_errs.patch b/fix_build_errs.patch new file mode 100644 index 000000000000..48562cfe84aa --- /dev/null +++ b/fix_build_errs.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8d28c09..bc72155 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,7 +39,7 @@ SET(P7ZIP_INCLUDE_PATH "${P7ZIP_SOURCE_DIR}" + + + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +- set(warnings -Wall -Wextra -Werror -Wno-unused-parameter) ++ set(warnings -Wall -Wextra -Werror -Wno-unused-parameter -Wno-misleading-indentation) + set(cxx_warnings -Wno-class-memaccess) + set(no_undefined -Wl,--no-undefined) + elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3863b34..d69806b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -38,4 +38,5 @@ SET_TARGET_PROPERTIES(lib7zip_shared PROPERTIES LINKER_LANGUAGE CXX) + TARGET_INCLUDE_DIRECTORIES(lib7zip_shared PRIVATE + "${P7ZIP_INCLUDE_PATH}" + ) ++TARGET_LINK_LIBRARIES(lib7zip_shared dl) + ENDIF() |