X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 8BD38DC057E for ; Mon, 20 Apr 2015 12:09:33 +0000 (UTC) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 299D2DC00C9 for ; Mon, 20 Apr 2015 12:09:28 +0000 (UTC) Received: by laat2 with SMTP id t2so125006779laa.1 for ; Mon, 20 Apr 2015 05:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=k7ri5OAUisqGE0tDuMFbU/FxUbO5MobOAHHnsycwKiE=; b=OMTdj42tKT0SK1P4mIJlfhFut/RecKSJlZ/um6NP9uCm4G7+mAMk8ROKH9sl/vZk1T Z8kQSjLsPilI1trYeFdZ9wI9B8ZXUooKkY8UGevd2IE6jw3YX6IGm5FqxwUl/krJilsa Ko/xXDCpGcrgv8QCPke5jpoiVwKEbboVATNfSiLQBJrS5MnEw8LWGjDlcPajmRX/81/Z ImQxIaApufNRIOJ9TLrQ2hY56J73qWrY/pycHtS5/1RrPHG9kv0qXCJtU3H0Flx7sISn hf3uaBAQYIoF6KKahM4Fk7C+1ZsQvyzNrVjzw2jLbFgeetXg3KVmcYFtQWMMyJ+9mraq rAbw== X-Received: by 10.152.239.135 with SMTP id vs7mr15426451lac.104.1429531766094; Mon, 20 Apr 2015 05:09:26 -0700 (PDT) Received: from dabu2.mshome.net (85-76-113-233-nat.elisa-mobile.fi. [85.76.113.233]) by mx.google.com with ESMTPSA id jl4sm4273999lbc.14.2015.04.20.05.09.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Apr 2015 05:09:25 -0700 (PDT) Sender: Frankie Robertson From: Frankie Robertson To: alpine-aports@lists.alpinelinux.org Cc: Frankie Robertson Subject: [alpine-aports] [PATCH] Initial APKBUILD of HFST Date: Mon, 20 Apr 2015 12:09:10 +0000 Message-Id: <1429531750-16707-1-git-send-email-frankie@robertson.name> X-Mailer: git-send-email 2.0.5 X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Musl libc fixes submitted to upstream here: https://sourceforge.net/p/hfst/bugs/295/ --- testing/hfst/APKBUILD | 69 +++++++++++++++++++++++++++++++ testing/hfst/missing_unistd_include.patch | 10 +++++ testing/hfst/unnulled_getline_usage.patch | 11 +++++ 3 files changed, 90 insertions(+) create mode 100644 testing/hfst/APKBUILD create mode 100644 testing/hfst/missing_unistd_include.patch create mode 100644 testing/hfst/unnulled_getline_usage.patch diff --git a/testing/hfst/APKBUILD b/testing/hfst/APKBUILD new file mode 100644 index 0000000..34b0f92 --- /dev/null +++ b/testing/hfst/APKBUILD @@ -0,0 +1,69 @@ +# Contributor: Frankie Robertson +# Maintainer: +pkgname=hfst +pkgver=3.8.2 +pkgrel=0 +pkgdesc="Helsinki Finite-State Transducer Technology toolkit" +url="http://www.ling.helsinki.fi/kieliteknologia/tutkimus/hfst/" +arch="all" +license="LGPL3" +depends="" +depends_dev="" +makedepends="$depends_dev python3 python3-dev python 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" + +_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" + ./configure \ + --prefix=/usr \ + --enable-proc \ + --without-foma \ + --enable-lexc \ + -enable-all-tools \ + || return 1 + make || 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 + rm -f "$pkgdir"/usr/lib/*.la +} + +python() { + 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/ +} + +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" diff --git a/testing/hfst/missing_unistd_include.patch b/testing/hfst/missing_unistd_include.patch new file mode 100644 index 0000000..5a5e673 --- /dev/null +++ b/testing/hfst/missing_unistd_include.patch @@ -0,0 +1,10 @@ +--- hfst-3.8.2/libhfst/src/implementations/optimized-lookup/transducer.h ++++ hfst-3.8.2/libhfst/src/implementations/optimized-lookup/transducer_new.h +@@ -14,6 +14,7 @@ + #ifndef _HFST_OL_TRANSDUCER_TRANSDUCER_H_ + #define _HFST_OL_TRANSDUCER_TRANSDUCER_H_ + ++#include + #include + #include + #include diff --git a/testing/hfst/unnulled_getline_usage.patch b/testing/hfst/unnulled_getline_usage.patch new file mode 100644 index 0000000..bce1950 --- /dev/null +++ b/testing/hfst/unnulled_getline_usage.patch @@ -0,0 +1,11 @@ +--- 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.0.5 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---