summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Sun2019-05-05 11:56:09 -0400
committerAndrew Sun2019-05-05 11:56:09 -0400
commitd9c92547e389cbbd2b18c357c1781bb673053ccc (patch)
tree25d6eed0767ff3f549c5eacccd95281fe49f9008
parent36d65bccc3916f9b79f5a7cb12656c608a379288 (diff)
downloadaur-d9c92547e389cbbd2b18c357c1781bb673053ccc.tar.gz
add new depends and patch
-rw-r--r--.SRCINFO10
-rw-r--r--0001-libarchive-3.3.3-bcrypt-fix.patch63
-rw-r--r--PKGBUILD29
3 files changed, 89 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 26815b8b9720..147687a60339 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,23 +1,29 @@
pkgbase = mingw-w64-libarchive
pkgdesc = library that can create and read several streaming archive formats (mingw-w64)
pkgver = 3.3.3
- pkgrel = 1
+ pkgrel = 2
url = http://www.libarchive.org/
arch = any
license = BSD
- makedepends = mingw-w64-cmake
+ makedepends = mingw-w64-configure
depends = mingw-w64-crt
depends = mingw-w64-bzip2
depends = mingw-w64-expat
depends = mingw-w64-lz4
+ depends = mingw-w64-lzo
+ depends = mingw-w64-libsystre
+ depends = mingw-w64-nettle
depends = mingw-w64-openssl
depends = mingw-w64-xz
depends = mingw-w64-zlib
+ depends = mingw-w64-zstd
options = !buildflags
options = staticlibs
options = !strip
source = libarchive-3.3.3.tar.gz::https://github.com/libarchive/libarchive/archive/v3.3.3.tar.gz
+ source = 0001-libarchive-3.3.3-bcrypt-fix.patch
sha256sums = 720da414e7aebb255fcdaee106894e4d30e2472ac1390c2c15b70c84c7479658
+ sha256sums = 2c318a025029998a9389eb99ab80f733c0fcf3b4888421879f2f6b4530d7f522
pkgname = mingw-w64-libarchive
diff --git a/0001-libarchive-3.3.3-bcrypt-fix.patch b/0001-libarchive-3.3.3-bcrypt-fix.patch
new file mode 100644
index 000000000000..1bc3a760184a
--- /dev/null
+++ b/0001-libarchive-3.3.3-bcrypt-fix.patch
@@ -0,0 +1,63 @@
+diff -Naur libarchive-3.3.3.orig/libarchive/archive_cryptor.c libarchive-3.3.3/libarchive/archive_cryptor.c
+--- libarchive-3.3.3.orig/libarchive/archive_cryptor.c 2018-09-04 15:36:21.010905600 -0400
++++ libarchive-3.3.3/libarchive/archive_cryptor.c 2018-09-04 15:39:13.953139100 -0400
+@@ -57,7 +57,7 @@
+ return 0;
+ }
+
+-#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H)
++#elif defined(_WIN32) || defined(__CYGWIN__) && defined(HAVE_BCRYPT_H) && defined(HAVE_WINDOWS_H)
+ #ifdef _MSC_VER
+ #pragma comment(lib, "Bcrypt.lib")
+ #endif
+@@ -168,7 +168,7 @@
+ return 0;
+ }
+
+-#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H)
++#elif defined(_WIN32) || defined(__CYGWIN__) && defined(HAVE_BCRYPT_H) && defined(HAVE_WINDOWS_H)
+
+ static int
+ aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len)
+diff -Naur libarchive-3.3.3.orig/libarchive/archive_cryptor_private.h libarchive-3.3.3/libarchive/archive_cryptor_private.h
+--- libarchive-3.3.3.orig/libarchive/archive_cryptor_private.h 2018-09-04 15:36:21.079906500 -0400
++++ libarchive-3.3.3/libarchive/archive_cryptor_private.h 2018-09-04 15:39:58.077520000 -0400
+@@ -63,7 +63,10 @@
+ unsigned encr_pos;
+ } archive_crypto_ctx;
+
+-#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H)
++#elif defined(_WIN32) || defined(__CYGWIN__) && defined(HAVE_BCRYPT_H) && defined(HAVE_WINDOWS_H)
++#if defined(__CYGWIN__)
++ # include <windows.h>
++#endif
+ #include <bcrypt.h>
+
+ /* Common in other bcrypt implementations, but missing from VS2008. */
+diff -Naur libarchive-3.3.3.orig/libarchive/archive_hmac.c libarchive-3.3.3/libarchive/archive_hmac.c
+--- libarchive-3.3.3.orig/libarchive/archive_hmac.c 2018-09-04 15:36:20.986905600 -0400
++++ libarchive-3.3.3/libarchive/archive_hmac.c 2018-09-04 15:41:06.218433900 -0400
+@@ -74,7 +74,7 @@
+ memset(ctx, 0, sizeof(*ctx));
+ }
+
+-#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H)
++#elif defined(_WIN32) || defined(__CYGWIN__) && defined(HAVE_BCRYPT_H) && defined(HAVE_WINDOWS_H)
+
+ #ifndef BCRYPT_HASH_REUSABLE_FLAG
+ # define BCRYPT_HASH_REUSABLE_FLAG 0x00000020
+diff -Naur libarchive-3.3.3.orig/libarchive/archive_hmac_private.h libarchive-3.3.3/libarchive/archive_hmac_private.h
+--- libarchive-3.3.3.orig/libarchive/archive_hmac_private.h 2018-09-04 15:36:21.006904800 -0400
++++ libarchive-3.3.3/libarchive/archive_hmac_private.h 2018-09-04 15:42:32.374554800 -0400
+@@ -53,7 +53,10 @@
+
+ typedef CCHmacContext archive_hmac_sha1_ctx;
+
+-#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H)
++#elif defined(_WIN32) || defined(__CYGWIN__) && defined(HAVE_BCRYPT_H) && defined(HAVE_WINDOWS_H)
++#if defined(__CYGWIN__)
++ # include <windows.h>
++#endif
+ #include <bcrypt.h>
+
+ typedef struct {
diff --git a/PKGBUILD b/PKGBUILD
index db6b6d2b88f1..a3121027c28b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,25 +3,33 @@
pkgname=mingw-w64-libarchive
pkgver=3.3.3
-pkgrel=1
+pkgrel=2
pkgdesc="library that can create and read several streaming archive formats (mingw-w64)"
arch=(any)
url="http://www.libarchive.org/"
-license=(BSD)
-depends=(mingw-w64-crt mingw-w64-bzip2 mingw-w64-expat mingw-w64-lz4 mingw-w64-openssl mingw-w64-xz mingw-w64-zlib)
-makedepends=('mingw-w64-cmake')
+license=('BSD')
+depends=(mingw-w64-crt mingw-w64-bzip2 mingw-w64-expat mingw-w64-lz4 mingw-w64-lzo mingw-w64-libsystre mingw-w64-nettle mingw-w64-openssl mingw-w64-xz mingw-w64-zlib mingw-w64-zstd)
+makedepends=('mingw-w64-configure')
options=('!buildflags' 'staticlibs' '!strip')
-source=("libarchive-${pkgver}.tar.gz::https://github.com/libarchive/libarchive/archive/v${pkgver}.tar.gz")
-sha256sums=('720da414e7aebb255fcdaee106894e4d30e2472ac1390c2c15b70c84c7479658')
+source=("libarchive-${pkgver}.tar.gz::https://github.com/libarchive/libarchive/archive/v${pkgver}.tar.gz"
+ "0001-libarchive-3.3.3-bcrypt-fix.patch")
+sha256sums=('720da414e7aebb255fcdaee106894e4d30e2472ac1390c2c15b70c84c7479658'
+ '2c318a025029998a9389eb99ab80f733c0fcf3b4888421879f2f6b4530d7f522')
+
+prepare() {
+ cd "${srcdir}/libarchive-${pkgver}"
+ patch -p1 -i ${srcdir}/0001-libarchive-3.3.3-bcrypt-fix.patch
+ autoreconf -fiv
+}
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
build() {
- cd "libarchive-${pkgver}"
+ cd "${srcdir}/libarchive-${pkgver}"
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
- ${_arch}-cmake \
- -DENABLE_TEST=OFF \
+ ${_arch}-configure \
+ --without-xml2 \
..
make
popd
@@ -32,8 +40,7 @@ package() {
for _arch in ${_architectures}; do
cd "${srcdir}/libarchive-${pkgver}/build-${_arch}"
make install DESTDIR="${pkgdir}"
- rm -r "${pkgdir}"/usr/${_arch}/share
- rm "${pkgdir}"/usr/${_arch}/bin/*.exe
+ ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.exe
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
done