aboutsummaryrefslogtreecommitdiffstats
path: root/main/exiv2
diff options
context:
space:
mode:
Diffstat (limited to 'main/exiv2')
-rw-r--r--main/exiv2/0000-pthread-init-fix.patch29
-rw-r--r--main/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch36
-rw-r--r--main/exiv2/APKBUILD32
-rw-r--r--main/exiv2/fix_libc_definitions.patch11
4 files changed, 82 insertions, 26 deletions
diff --git a/main/exiv2/0000-pthread-init-fix.patch b/main/exiv2/0000-pthread-init-fix.patch
new file mode 100644
index 0000000000..ac69b14c10
--- /dev/null
+++ b/main/exiv2/0000-pthread-init-fix.patch
@@ -0,0 +1,29 @@
+From 620ef04e96f4c0d0894d976fc361588b6526a116 Mon Sep 17 00:00:00 2001
+From: clanmills <robin@clanmills.com>
+Date: Tue, 20 Jun 2017 20:41:30 +0100
+Subject: [PATCH] https://github.com/Exiv2/exiv2/issues/9 Fix submitted.
+
+---
+ src/actions.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/actions.cpp b/src/actions.cpp
+index 0ebe8505..17444c5b 100644
+--- a/src/actions.cpp
++++ b/src/actions.cpp
+@@ -2045,9 +2045,13 @@ namespace {
+ #else
+ /* Unix/Linux/Cygwin/MacOSX */
+ #include <pthread.h>
++ /* This is the critical section object (statically allocated). */
+ #if defined(__APPLE__)
+- /* This is the critical section object (statically allocated). */
+- static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
++ #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
++ static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
++ #else
++ static pthread_mutex_t cs = PTHREAD_MUTEX_INITIALIZER;
++ #endif
+ #else
+ static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+ #endif
diff --git a/main/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch b/main/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch
new file mode 100644
index 0000000000..86412532d0
--- /dev/null
+++ b/main/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch
@@ -0,0 +1,36 @@
+From d775683f579543c35463ab2a8d9425da10d2f016 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Wed, 4 Oct 2017 00:15:30 -0500
+Subject: [PATCH] Amend fix for #9 to apply to other Unix systems
+
+At least the musl libc on Linux has the same issue as Mac OS X: the
+PTHREAD_RECURSIVE_* static initialiser does not exist. This is a
+documented and purposeful omission:
+
+http://www.openwall.com/lists/musl/2017/02/20/3
+
+This commit uses similar logic to the Apple test on other Unixes.
+---
+ src/actions.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/actions.cpp b/src/actions.cpp
+index fe14de4..aa15ec7 100644
+--- a/src/actions.cpp
++++ b/src/actions.cpp
+@@ -2051,7 +2051,11 @@ namespace {
+ static pthread_mutex_t cs = PTHREAD_MUTEX_INITIALIZER;
+ #endif
+ #else
+- static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++ #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
++ static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++ #else
++ static pthread_mutex_t cs = PTHREAD_MUTEX_INITIALIZER;
++ #endif
+ #endif
+ #endif
+
+--
+2.10.0
+
diff --git a/main/exiv2/APKBUILD b/main/exiv2/APKBUILD
index f92028869f..8b96f6325c 100644
--- a/main/exiv2/APKBUILD
+++ b/main/exiv2/APKBUILD
@@ -1,39 +1,41 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=exiv2
-pkgver=0.25
+pkgver=0.26
pkgrel=0
pkgdesc="Exif and Iptc metadata manipulation library and tools."
url="http://exiv2.org"
arch="all"
+options="!check" # No test suite.
license="GPL-2.0-or-later"
depends=""
depends_dev="expat-dev zlib-dev"
makedepends="$depends_dev bash"
subpackages="$pkgname-dev $pkgname-doc"
-source="http://www.exiv2.org/exiv2-$pkgver.tar.gz
- fix_libc_definitions.patch
+source="http://www.exiv2.org/builds/exiv2-$pkgver-trunk.tar.gz
+ 0000-pthread-init-fix.patch
+ 0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch
"
-_builddir="$srcdir"/$pkgname-$pkgver
+builddir="$srcdir"/exiv2-trunk
prepare() {
- default_prepare || return 1
- cd "$_builddir"
- update_config_sub || return 1
+ default_prepare
+ cd "$builddir"
+ update_config_sub
}
build() {
- cd "$_builddir"
+ cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
- --prefix=/usr \
- || return 1
- make || return 1
+ --prefix=/usr
+ make
}
package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
}
-sha512sums="08d4e655ffdde715e0214f4bef01d55aba9b8ba517456a60e254a0f8541c20479e407545db28ca90a69dee8def6941fdd88f9a557fb382ebebe49e363aca8e8e exiv2-0.25.tar.gz
-06801f1d71d2ac8613c568eb6950776725eb4c06dc424fb9c540516fe31b15c811679c615fba18a3fbc4fac7314020b9bccb8176630bf7de3d75098e5a8d1d81 fix_libc_definitions.patch"
+sha512sums="d1e9cab886e279b045768dd9ec781f07d2d36d573119403d0b76dc571442173aae6972f86ec55c3ea53fb3ee9ca3571eb8fd63a2a6643a970852813e88634a86 exiv2-0.26-trunk.tar.gz
+9721d359708c385be7c86a8f8a63de43b05b2578a29b4339861e82873aa81a98a7ee7252847b6c55529341187d40f552c488589b416fd9d1e27418925929c018 0000-pthread-init-fix.patch
+485bd340169f69a3ce356e59e9138250cc14592f4477bb73827c799fe465535954469634fc58a1856f690f0e0b4171cba6fdd3391d43c0efc5e89652b93eb3ce 0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch"
diff --git a/main/exiv2/fix_libc_definitions.patch b/main/exiv2/fix_libc_definitions.patch
deleted file mode 100644
index 1a58b37c36..0000000000
--- a/main/exiv2/fix_libc_definitions.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/futils.cpp
-+++ b/src/futils.cpp
-@@ -333,7 +333,7 @@
- #ifdef EXV_HAVE_STRERROR_R
- const size_t n = 1024;
- // _GNU_SOURCE: See Debian bug #485135
--# if defined EXV_STRERROR_R_CHAR_P && defined _GNU_SOURCE
-+# if defined EXV_STRERROR_R_CHAR_P && defined _GNU_SOURCE && defined GLIBC
- char *buf = 0;
- char buf2[n];
- std::memset(buf2, 0x0, n);