aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-09-06 16:31:00 -0500
committerNatanael Copa <ncopa@alpinelinux.org>2017-09-20 10:01:08 +0000
commitb2fc35d402de58eb7f7cfe3df8fed79d6b9fb658 (patch)
tree1fdc1979abdb893f31b2565d80e476e67756e80d /main
parent09e4dd994fe45731bb5d2d11a333e2d17c9d8a05 (diff)
downloadaports-b2fc35d402de58eb7f7cfe3df8fed79d6b9fb658.tar.bz2
aports-b2fc35d402de58eb7f7cfe3df8fed79d6b9fb658.tar.xz
main/libidn: modernise, add test suite
Diffstat (limited to 'main')
-rw-r--r--main/libidn/APKBUILD31
-rw-r--r--main/libidn/localename-test-fix.patch34
2 files changed, 50 insertions, 15 deletions
diff --git a/main/libidn/APKBUILD b/main/libidn/APKBUILD
index 69b84c40c6..599c56d1cf 100644
--- a/main/libidn/APKBUILD
+++ b/main/libidn/APKBUILD
@@ -2,16 +2,19 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libidn
pkgver=1.33
-pkgrel=0
+pkgrel=1
pkgdesc="An encode and decode library for internationalized domain names"
url="http://www.gnu.org/software/libidn/"
arch="all"
license="GPL"
depends=
makedepends=
+checkdepends="diffutils"
install=
subpackages="$pkgname-doc $pkgname-dev"
-source="http://ftp.gnu.org/gnu/libidn/$pkgname-$pkgver.tar.gz"
+source="http://ftp.gnu.org/gnu/libidn/$pkgname-$pkgver.tar.gz
+ localename-test-fix.patch
+ "
builddir="$srcdir/$pkgname-$pkgver"
@@ -22,11 +25,6 @@ builddir="$srcdir/$pkgname-$pkgver"
# - CVE-2016-6262
# - CVE-2016-6263
-prepare() {
- cd "$builddir"
- return 0
-}
-
build() {
cd "$builddir"
@@ -37,16 +35,19 @@ build() {
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
- --disable-nls \
- || return 1
- make || return 1
+ --disable-nls
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
- make DESTDIR="$pkgdir" install || return 1
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
}
-md5sums="a9aa7e003665de9c82bd3f9fc6ccf308 libidn-1.33.tar.gz"
-sha256sums="44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19 libidn-1.33.tar.gz"
-sha512sums="38dd459eaeda0c9e3cc2d24d967113515a499747550a2a9157f32357def90d71a3a3b52398e96a44a28cd5948dc353b0473c4ff0453a69720191c4cb49cac2c6 libidn-1.33.tar.gz"
+sha512sums="38dd459eaeda0c9e3cc2d24d967113515a499747550a2a9157f32357def90d71a3a3b52398e96a44a28cd5948dc353b0473c4ff0453a69720191c4cb49cac2c6 libidn-1.33.tar.gz
+8251a6543a93db357181121d2f3895dd15d47b97e7c6b0004b1534f0479f8b08c380d184cb024dde9a158b967fad0643ea2a793e88bf90f07f3e67146ebab190 localename-test-fix.patch"
diff --git a/main/libidn/localename-test-fix.patch b/main/libidn/localename-test-fix.patch
new file mode 100644
index 0000000000..a2c4564a17
--- /dev/null
+++ b/main/libidn/localename-test-fix.patch
@@ -0,0 +1,34 @@
+--- libidn-1.33/lib/gltests/localename.c.old 2016-12-31 13:54:43.000000000 +0000
++++ libidn-1.33/lib/gltests/localename.c 2017-07-30 16:40:47.098541270 +0000
+@@ -40,7 +40,7 @@
+ # if defined __APPLE__ && defined __MACH__
+ # include <xlocale.h>
+ # endif
+-# if __GLIBC__ >= 2 && !defined __UCLIBC__
++# if defined __linux__
+ # include <langinfo.h>
+ # endif
+ # if !defined IN_LIBINTL
+@@ -2692,16 +2692,19 @@
+ locale_t thread_locale = uselocale (NULL);
+ if (thread_locale != LC_GLOBAL_LOCALE)
+ {
+-# if __GLIBC__ >= 2 && !defined __UCLIBC__
++# if defined(_NL_LOCALE_NAME)
++ const char *name = nl_langinfo(_NL_LOCALE_NAME(category));
++# if __GLIBC__ >= 2 && !defined __UCLIBC__
+ /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
+ glibc < 2.12.
+ See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
+- const char *name =
+- nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
++ if (name[0] == '\0')
++ name = nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
+ if (name[0] == '\0')
+ /* Fallback code for glibc < 2.4, which did not implement
+ nl_langinfo (_NL_LOCALE_NAME (category)). */
+ name = thread_locale->__names[category];
++# endif
+ return name;
+ # elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__)
+ /* FreeBSD, Mac OS X */