aboutsummaryrefslogtreecommitdiffstats
path: root/main/file
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-09-24 09:41:01 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-09-24 09:41:52 +0300
commit647fe352d560e1ec51a75a1aee950759243e0fdb (patch)
tree1cfb6da6bd58885fe4a77432e1eacb22c77a22a1 /main/file
parent3c7abb352b123bcd0b8005d4b589be516b9061e5 (diff)
downloadaports-647fe352d560e1ec51a75a1aee950759243e0fdb.tar.bz2
aports-647fe352d560e1ec51a75a1aee950759243e0fdb.tar.xz
main/file: fix regexp usage to work with musl
Diffstat (limited to 'main/file')
-rw-r--r--main/file/APKBUILD20
-rw-r--r--main/file/fix-regexp.patch18
2 files changed, 33 insertions, 5 deletions
diff --git a/main/file/APKBUILD b/main/file/APKBUILD
index 21a1477e1f..cede77ed1c 100644
--- a/main/file/APKBUILD
+++ b/main/file/APKBUILD
@@ -1,19 +1,26 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=file
pkgver=5.19
-pkgrel=1
+pkgrel=2
pkgdesc="File type identification utility"
url="http://www.darwinsys.com/file/"
arch="all"
license="BSD"
depends=""
-source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz"
+source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz
+ fix-regexp.patch
+ "
subpackages="$pkgname-dev $pkgname-doc"
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
cd "$_builddir"
update_config_sub || return 1
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
}
build() {
@@ -34,6 +41,9 @@ package() {
rm "$pkgdir"/usr/lib/*.la || return 1
}
-md5sums="e3526f59023f3f7d1ffa4d541335edab file-5.19.tar.gz"
-sha256sums="9484b3bbda1acc7b13a4f71031a85ce10c77bd0ffec7226741a219ef587e3a7c file-5.19.tar.gz"
-sha512sums="f897454f731b013634f38c02c927d7fb5d0660d5b1a81b7bf614da244558dd64ae44ab35ffc6a5e634a7f670ee287c0e87c70e44266c3123e0d1b73fa303c6ed file-5.19.tar.gz"
+md5sums="e3526f59023f3f7d1ffa4d541335edab file-5.19.tar.gz
+b67b9314541cbf163f43687bff7d6008 fix-regexp.patch"
+sha256sums="9484b3bbda1acc7b13a4f71031a85ce10c77bd0ffec7226741a219ef587e3a7c file-5.19.tar.gz
+a366c128d43ad01675c5f10799ed8b9b6f74ca79a99efe656c3b3bb17153d7a3 fix-regexp.patch"
+sha512sums="f897454f731b013634f38c02c927d7fb5d0660d5b1a81b7bf614da244558dd64ae44ab35ffc6a5e634a7f670ee287c0e87c70e44266c3123e0d1b73fa303c6ed file-5.19.tar.gz
+af2fb7ccb85132c24a2fc4954cd8f51103a6726f53159b4afb1229cb4622e1418c1a8e1b1e748164afb533dde65ebaa531d69fc724cc9bb8edf3a379bc4e33f9 fix-regexp.patch"
diff --git a/main/file/fix-regexp.patch b/main/file/fix-regexp.patch
new file mode 100644
index 0000000000..5cd3a0ee40
--- /dev/null
+++ b/main/file/fix-regexp.patch
@@ -0,0 +1,18 @@
+From 2a041a52c1eda4fb466bb39539a16b45e5cf31cc Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Tue, 23 Sep 2014 23:42:44 +0000
+Subject: [PATCH] PR/383: make regex use \x and not the non-ascii characters.
+
+diff --git a/magic/Magdir/windows b/magic/Magdir/windows
+index dd1e55d..320cb0b 100644
+--- a/magic/Magdir/windows
++++ b/magic/Magdir/windows
+@@ -160,7 +160,7 @@
+
+ # Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013
+ # emtpy ,comment , section , unicode line
+-0 regex/s \\`(\r\n|;|[[]|\xFF\xFE)
++0 regex/s \\`(\\r\\n|;|[[]|\\xFF\\xFE)
+ # left bracket in section line
+ >&0 search/8192 [
+ # http://en.wikipedia.org/wiki/Autorun.inf