aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.dk>2017-11-22 03:52:39 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-11-29 23:03:36 +0100
commit86563770727dd2b567ccb74be1c9737ddec79f68 (patch)
tree21f21309905352c80f990bcd3a64c2fc02be733e
parentca11d13285797a10bd38a4b2d14322303e56d51b (diff)
downloadaports-86563770727dd2b567ccb74be1c9737ddec79f68.tar.gz
aports-86563770727dd2b567ccb74be1c9737ddec79f68.tar.bz2
aports-86563770727dd2b567ccb74be1c9737ddec79f68.tar.xz
community/gammu: upgrade to 1.38.5 and modernize abuild
-rw-r--r--community/gammu/APKBUILD51
-rw-r--r--community/gammu/disable-at-charset-test.patch23
2 files changed, 46 insertions, 28 deletions
diff --git a/community/gammu/APKBUILD b/community/gammu/APKBUILD
index a59227c842..3ff943e5fa 100644
--- a/community/gammu/APKBUILD
+++ b/community/gammu/APKBUILD
@@ -1,56 +1,51 @@
# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
+# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=gammu
-pkgver=1.38.1
+pkgver=1.38.5
pkgrel=0
pkgdesc="Gammu provides an abstraction layer for cell phones access"
url="https://wammu.eu/"
arch="all"
license="GPLv2+"
depends="dialog bluez"
-depends_dev=""
-makedepends="$depends_dev unixodbc-dev libdbi-dev postgresql-dev
+makedepends="unixodbc-dev libdbi-dev postgresql-dev
bluez-dev mysql-dev libusb-dev curl-dev cmake doxygen linux-headers"
-install=""
subpackages="$pkgname-smsd:_smsd $pkgname-doc $pkgname-dev $pkgname-libs"
-source="https://sourceforge.net/projects/${pkgname}/files/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
-
-_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
-}
+source="https://dl.cihar.com/$pkgname/releases/${pkgname}-${pkgver}.tar.bz2
+ disable-at-charset-test.patch
+ "
+builddir="$srcdir/$pkgname-$pkgver"
build() {
- cd "$_builddir"
+ cd "$builddir"
cmake . -DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DWITH_NOKIA_SUPPORT=ON \
- -DWITH_Bluez=ON \
- -DWITH_IrDA=On \
- || return 1
- make || return 1
+ -DWITH_BLUETOOTH=ON \
+ -DWITH_IRDA=ON
+ make
+}
+
+check() {
+ cd "$builddir"
+ make test
}
package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
}
_smsd() {
- cd "$_builddir"
pkgdesc="Gammu SMS daemon"
- mkdir -p "$subpkgdir"/usr/bin/ || return 1
+
+ cd "$builddir"
+ mkdir -p "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/gammu-smsd \
"$pkgdir"/usr/bin/gammu-smsd-monitor \
"$pkgdir"/usr/bin/gammu-smsd-inject "$subpkgdir"/usr/bin
}
-md5sums="72cbf9035509978e24e5ddf2a3b46b9e gammu-1.38.1.tar.bz2"
-sha256sums="830ad11f88318c9a08645ac41d328e5c0e5ecd4b02c972343c0ec32d772ff1c2 gammu-1.38.1.tar.bz2"
-sha512sums="c13df82b5b018cc42a7fe7a2c29e6332534426e7c5765d2f97dfa79096ee9b37bbfc87da0b5c403ce1d9877d176da90ccbde5f643a5fa11e824aa683a050c6b0 gammu-1.38.1.tar.bz2"
+sha512sums="89a6b3872dfd9b4ebaf8b0f51265fec7e7ef72a42178f85846c7f52d926e96b3087bbe6650c4246e66c2624822021c5803b1bb6ca8ac90f3e5c109a644c0ee80 gammu-1.38.5.tar.bz2
+3963da83e7bf9138f676242d0b7fe8ce3c8da7fe34d7ac12b6d439c48d2754e55c2b5442b7773f58fdcf16aa23872c58426fbb079cecc59ba143055cda543fa4 disable-at-charset-test.patch"
diff --git a/community/gammu/disable-at-charset-test.patch b/community/gammu/disable-at-charset-test.patch
new file mode 100644
index 0000000000..1ab18c89b8
--- /dev/null
+++ b/community/gammu/disable-at-charset-test.patch
@@ -0,0 +1,23 @@
+Workaround for flaw in musl 1.1.8's CP437 char mapping
+
+FIXME: Remove this patch after musl upgrade.
+
+See: http://www.openwall.com/lists/musl/2017/11/22/2
+--- a/tests/at-charset.c
++++ b/tests/at-charset.c
+@@ -93,15 +93,6 @@
+ test_result(mywstrncmp(ubuffer, latin1text, sizeof(latin1text) / 2) == TRUE);
+
+ #ifdef ICONV_FOUND
+- Priv->Charset = AT_CHARSET_PCCP437;
+- error = ATGEN_EncodeText(s, latin1text, sizeof(latin1text) / 2, buffer, sizeof(buffer), &result);
+- gammu_test_result(error, "Encode - 3");
+- strconv_test_result(latin1cp437, buffer, result);
+-
+- error = ATGEN_DecodeText(s, buffer, result, ubuffer, sizeof(ubuffer), FALSE, FALSE);
+- gammu_test_result(error, "Decode - 3");
+- test_result(mywstrncmp(ubuffer, latin1text, sizeof(latin1text) / 2) == TRUE);
+-
+ Priv->Charset = AT_CHARSET_ISO88591;
+ error = ATGEN_EncodeText(s, latin1text, sizeof(latin1text) / 2, buffer, sizeof(buffer), &result);
+ gammu_test_result(error, "Encode - 4");