Subject: [alpine-aports] [PATCH 1/2] testing/hfst: upgrade to 3.9.1

From: Sören Tempel <[email-masked]>
Date: Mon, 21 Mar 2016 01:11:04 +0100

Also remove the python3 subpackage and rename the python2 subpackage to
py-hfst. The python3 subpackage was removed because a) we currently
don't support python3 packages and b) it couldn't be installed (maybe
because we don't package setuptools for python3?).
---
 testing/hfst/APKBUILD                     | 61 +++++++++++++++----------------
 testing/hfst/unnulled_getline_usage.patch | 11 ------
 2 files changed, 29 insertions(+), 43 deletions(-)
 delete mode 100644 testing/hfst/unnulled_getline_usage.patch

diff --git a/testing/hfst/APKBUILD b/testing/hfst/APKBUILD
index dd76d02..0e33cb2 100644
--- a/testing/hfst/APKBUILD
+++ b/testing/hfst/APKBUILD
@@ -1,68 +1,65 @@
+# Contributor: Sören Tempel <[email-masked]>
 # Contributor: Frankie Robertson <[email-masked]>
 # Maintainer:
 pkgname=hfst
-pkgver=3.8.2
+pkgver=3.9.1
 pkgrel=0
 pkgdesc="Helsinki Finite-State Transducer Technology toolkit"
-url="http://www.ling.helsinki.fi/kieliteknologia/tutkimus/hfst/"
+url="http://www.ling.helsinki.fi/kieliteknologia/tutkimus/$pkgname/"
 arch="all"
 license="LGPL3"
 depends=""
 depends_dev=""
-makedepends="$depends_dev python3 python3-dev python python-dev swig"
+makedepends="$depends_dev python bison python-dev swig"
 install=""
-subpackages="hfst-dev hfst-doc hfst-python3 hfst-python"
-source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz missing_unistd_include.patch unnulled_getline_usage.patch"
+subpackages="$pkgname-dev $pkgname-doc py-$pkgname:py"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+	missing_unistd_include.patch"
 
 _builddir="$srcdir"/$pkgname-$pkgver
 prepare() {
-	local i
 	cd "$_builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
+	default_prepare || return 1
+	update_config_sub || return 1
 }
 
 build() {
 	cd "$_builddir"
 	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
 		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--localstatedir=/var \
 		--enable-proc \
 		--without-foma \
 		--enable-lexc \
-		-enable-all-tools \
+		--enable-all-tools \
 		|| return 1
-	make || return 1
+	make -j1 || return 1
 }
 
 package() {
 	cd "$_builddir"
 	make DESTDIR="$pkgdir" install || return 1
-	cd swig
-	/usr/bin/env python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
-	/usr/bin/env python3 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+
+	cd python || return 1
+	python2 setup.py install \
+		--prefix=/usr --root="$pkgdir" || return 1
 }
 
-python() {
+py() {
+	pkgdesc="$pkgdesc (python bindings)"
 	depends="python"
-	mkdir -p "$subpkgdir"/usr/lib/
-	cp -r "$pkgdir"/usr/lib/python2* "$subpkgdir"/usr/lib/
-}
 
-python3() {
-	depends="python3"
 	mkdir -p "$subpkgdir"/usr/lib/
-	cp -r "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/
+	cp -r "$pkgdir"/usr/lib/python2* "$subpkgdir"/usr/lib/
 }
 
-md5sums="814ffcf9624e24906335b1e12266e8fb  hfst-3.8.2.tar.gz
-4aef69581668aa22cf1e93cbd6493030  missing_unistd_include.patch
-a87269069eeed9e2d564a3c6a4fcf030  unnulled_getline_usage.patch"
-sha256sums="bdae235271368a8d13db4a224fe8a53cf7266b8fce194cf63c96031e007e3d63  hfst-3.8.2.tar.gz
-158d633416a482308f420c6d9e3c8648f96238fc7209d70055e629a0ff978b80  missing_unistd_include.patch
-bafa91e28828b571f72d5e7709cb8e0e8400fa8b8dfead86a7f3a6cab26fb408  unnulled_getline_usage.patch"
-sha512sums="415fafd38259f1c4580aa833c23d8315c605e44752380243c514783f657bae996b8a4af424faf830f6d8f5df90a4d849d8487858ce691dae8993dc8656132c9a  hfst-3.8.2.tar.gz
-0bfc63709dbefaaa4084bf78d169283a58ab4ee586e800446f5d92ee179d4c84959802f54e72ffa5366c49a2a30883deb54c562c9dcace21662d5cbdd06789d6  missing_unistd_include.patch
-0baed95620943341c2de9565921b423f75fd7b0b2c247dd2d3ce4021e10e257fa57bff5164b145c9138e654c1e446a98bf6caf585bcfa9a2e870b96885ca8548  unnulled_getline_usage.patch"
+md5sums="3d7a54b6ce67d180545d599b7d9fa7c9  hfst-3.9.1.tar.gz
+4aef69581668aa22cf1e93cbd6493030  missing_unistd_include.patch"
+sha256sums="fa55eab71d86ffebe75ed28476d76cb6bcde51dbc73064a8ef1db7112d2985ec  hfst-3.9.1.tar.gz
+158d633416a482308f420c6d9e3c8648f96238fc7209d70055e629a0ff978b80  missing_unistd_include.patch"
+sha512sums="2d0d4acd132cb4a41c4a1f259b2556ac3ce352158ad88ea2312d056e1942dd2d5d0968e86ee62e00aca36fb757371657d0466132ae3576b70962f5313357df44  hfst-3.9.1.tar.gz
+0bfc63709dbefaaa4084bf78d169283a58ab4ee586e800446f5d92ee179d4c84959802f54e72ffa5366c49a2a30883deb54c562c9dcace21662d5cbdd06789d6  missing_unistd_include.patch"
diff --git a/testing/hfst/unnulled_getline_usage.patch b/testing/hfst/unnulled_getline_usage.patch
deleted file mode 100644
index bce1950..0000000
--- a/testing/hfst/unnulled_getline_usage.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- hfst-3.8.2/tools/src/hfst-reweight.cc
-+++ hfst-3.8.2/tools/src/hfst-reweight_new.cc
-@@ -409,7 +409,7 @@
-             free(symbol);
-             addition = 0;
-             multiplier = 1;
--            char* line;
-+            char* line = NULL;
-             size_t len = 0;
-             size_t linen = 0;
-             verbose_printf("Reading reweights from %s\n", tsv_file_name);
-- 
2.7.4

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Sören Tempel <[email-masked]>
Date: Mon, 21 Mar 2016 01:11:05 +0100

This package is outdated can't be installed currently and depends on a
python3 subpackage which was removed in the previous commit. Furthermore
it has no maintainer.

See the previous commit eaf3ffdf72ca7b10f33c965aee90b783281c99e7
---
 testing/omorfi/APKBUILD      | 62 --------------------------------------------
 unmaintained/omorfi/APKBUILD | 62 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 62 deletions(-)
 delete mode 100644 testing/omorfi/APKBUILD
 create mode 100644 unmaintained/omorfi/APKBUILD

diff --git a/testing/omorfi/APKBUILD b/testing/omorfi/APKBUILD
deleted file mode 100644
index 06e7291..0000000
--- a/testing/omorfi/APKBUILD
+++ /dev/null
@@ -1,62 +0,0 @@
-# Contributor: Frankie Robertson <[email-masked]>
-# Maintainer:
-pkgname=omorfi
-pkgver=20150326
-pkgrel=0
-pkgdesc="Open morphology for Finnish"
-url="https://github.com/flammie/omorfi"
-arch="noarch"
-license="GPL3"
-depends="hfst bash"
-depends_dev=""
-makedepends="$depends_dev autoconf automake libtool zip hfst-python3"
-install=""
-subpackages="ormofi-doc omorfi-utils omorfi-voikko omorfi-python3"
-source="$pkgname-$pkgver.tar.gz::https://github.com/flammie/omorfi/archive/$pkgver.tar.gz"
-
-_builddir="$srcdir/$pkgname-$pkgver"
-prepare() {
-	local i
-	cd "$_builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
-}
-
-build() {
-	cd "$_builddir"
-	./autogen.sh
-	./configure --prefix=/usr \
-		|| return 1
-	make || return 1
-}
-
-package() {
-	cd "$_builddir"
-	make DESTDIR="$pkgdir" install || return 1
-	rm -rf "$pkgdir"/usr/share/pkgconfig
-}
-
-utils() {
-	depends="bash"
-	mkdir -p "$subpkgdir"/usr/
-	cp -r "$pkgdir"/usr/bin "$subpkgdir"/usr/
-}
-
-voikko() {
-	depends="voikko"
-	mkdir -p "$subpkgdir"/usr/lib/
-	cp -r "$pkgdir"/usr/lib/voikko "$subpkgdir"/usr/lib/
-}
-
-python3() {
-	depends="python3"
-	mkdir -p "$subpkgdir"/usr/lib/
-	cp -r "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/
-}
-
-md5sums="6a3e7b16c85e78c0ce0e5214c2e8db7d  omorfi-20150326.tar.gz"
-sha256sums="359d34c93ef07d5852d53774da3454ab649d8d22b8f22bb4a7910dbaae8db82f  omorfi-20150326.tar.gz"
-sha512sums="618884ec8909efa23a4f77df0a934056dee4a7d235285a108381d0c5ce62d941cc7ff55f788a1618e3257a7541193fd661e1c6c78a71606473c88d68cc73ea78  omorfi-20150326.tar.gz"
diff --git a/unmaintained/omorfi/APKBUILD b/unmaintained/omorfi/APKBUILD
new file mode 100644
index 0000000..06e7291
--- /dev/null
+++ b/unmaintained/omorfi/APKBUILD
@@ -0,0 +1,62 @@
+# Contributor: Frankie Robertson <[email-masked]>
+# Maintainer:
+pkgname=omorfi
+pkgver=20150326
+pkgrel=0
+pkgdesc="Open morphology for Finnish"
+url="https://github.com/flammie/omorfi"
+arch="noarch"
+license="GPL3"
+depends="hfst bash"
+depends_dev=""
+makedepends="$depends_dev autoconf automake libtool zip hfst-python3"
+install=""
+subpackages="ormofi-doc omorfi-utils omorfi-voikko omorfi-python3"
+source="$pkgname-$pkgver.tar.gz::https://github.com/flammie/omorfi/archive/$pkgver.tar.gz"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	./autogen.sh
+	./configure --prefix=/usr \
+		|| return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	rm -rf "$pkgdir"/usr/share/pkgconfig
+}
+
+utils() {
+	depends="bash"
+	mkdir -p "$subpkgdir"/usr/
+	cp -r "$pkgdir"/usr/bin "$subpkgdir"/usr/
+}
+
+voikko() {
+	depends="voikko"
+	mkdir -p "$subpkgdir"/usr/lib/
+	cp -r "$pkgdir"/usr/lib/voikko "$subpkgdir"/usr/lib/
+}
+
+python3() {
+	depends="python3"
+	mkdir -p "$subpkgdir"/usr/lib/
+	cp -r "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/
+}
+
+md5sums="6a3e7b16c85e78c0ce0e5214c2e8db7d  omorfi-20150326.tar.gz"
+sha256sums="359d34c93ef07d5852d53774da3454ab649d8d22b8f22bb4a7910dbaae8db82f  omorfi-20150326.tar.gz"
+sha512sums="618884ec8909efa23a4f77df0a934056dee4a7d235285a108381d0c5ce62d941cc7ff55f788a1618e3257a7541193fd661e1c6c78a71606473c88d68cc73ea78  omorfi-20150326.tar.gz"
-- 
2.7.4

---