summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-21 23:17:36 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-21 23:17:36 -0500
commit2ecb9eb5c72734ea72bea46de1021c5274200936 (patch)
tree3d1cf9ee80b1f0552ffca9ad2d6b51ec39101224 /user
parentb799dde0149930ab3efae47caaae37a85939cf20 (diff)
downloadpackages-2ecb9eb5c72734ea72bea46de1021c5274200936.tar.gz
packages-2ecb9eb5c72734ea72bea46de1021c5274200936.tar.bz2
packages-2ecb9eb5c72734ea72bea46de1021c5274200936.tar.xz
packages-2ecb9eb5c72734ea72bea46de1021c5274200936.zip
user/gsm: pull in, modernise
Diffstat (limited to 'user')
-rw-r--r--user/gsm/APKBUILD55
-rw-r--r--user/gsm/gsm-64bit.patch15
-rw-r--r--user/gsm/gsm-makefile.patch115
3 files changed, 185 insertions, 0 deletions
diff --git a/user/gsm/APKBUILD b/user/gsm/APKBUILD
new file mode 100644
index 000000000..681fe4ad1
--- /dev/null
+++ b/user/gsm/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer:
+pkgname=gsm
+pkgver=1.0.17
+pkgrel=0
+_soname=1.0.12
+pkgdesc="Shared libraries for GSM speech compressor"
+url="http://www.quut.com/gsm/"
+arch="all"
+options="!check" # No test data included in this release.
+license="TU-Berlin-2.0"
+depends=""
+makedepends=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
+source="http://www.quut.com/gsm/gsm-$pkgver.tar.gz
+ gsm-64bit.patch
+ gsm-makefile.patch
+ "
+builddir="$srcdir"/gsm-${pkgver%.*}-pl${pkgver##*.}
+
+build() {
+ cd "$builddir"
+ export RPM_OPT_FLAGS="$CFLAGS -fPIC"
+ make all
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"/usr/bin \
+ "$pkgdir"/usr/include/gsm \
+ "$pkgdir"/usr/lib \
+ "$pkgdir"/usr/share/man/man1 \
+ "$pkgdir"/usr/share/man/man3
+
+ make install \
+ INSTALL_ROOT="$pkgdir"/usr \
+ GSM_INSTALL_INC="$pkgdir"/usr/include/gsm \
+ GSM_INSTALL_LIB="$pkgdir"/usr/lib
+ cp -p lib/libgsm.so.$_soname "$pkgdir"/usr/lib/
+ ln -s libgsm.so.$_soname "$pkgdir"/usr/lib/libgsm.so.1
+ ln -s libgsm.so.$_soname "$pkgdir"/usr/lib/libgsm.so
+
+ ln -s gsm/gsm.h "$pkgdir"/usr/include/
+ rm -f "$pkgdir"/usr/lib/lib*.a
+}
+
+tools() {
+ pkgdesc="GSM speech compressor tools"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr
+}
+
+sha512sums="983b442a1ee3f8bce0523f671071823598c4edb222f8d3de1ad7997c85cbeb7bc49ee87130e12f0f815266a29ad2ef58e59672e81bf41cdadc292baf66942026 gsm-1.0.17.tar.gz
+5b01f6d2fd3ee7cd859da70870463e2ccc6614c5fb1bd5efc88a223a0c5477271221557fef13ba46697e70cc5820c13efff738413f8990d5884b95cc89c30152 gsm-64bit.patch
+1d92b7eacf52e5281c9f1a0f08313d10f15c35d22fb2292e5a885ceb3cb766557a5e3a08954db75fb13db59345ef9f6b08939881ba38c9d384e09a1c96b47bc5 gsm-makefile.patch"
diff --git a/user/gsm/gsm-64bit.patch b/user/gsm/gsm-64bit.patch
new file mode 100644
index 000000000..195ed31fa
--- /dev/null
+++ b/user/gsm/gsm-64bit.patch
@@ -0,0 +1,15 @@
+--- gsm-1.0-pl12/inc/private.h.64bit 2006-04-26 21:17:01.000000000 +0200
++++ gsm-1.0-pl12/inc/private.h 2007-05-11 00:25:23.000000000 +0200
+@@ -10,10 +10,10 @@
+ #define PRIVATE_H
+
+ typedef short word; /* 16 bit signed int */
+-typedef long longword; /* 32 bit signed int */
++typedef int longword; /* 32 bit signed int */
+
+ typedef unsigned short uword; /* unsigned word */
+-typedef unsigned long ulongword; /* unsigned longword */
++typedef unsigned int ulongword; /* unsigned longword */
+
+ struct gsm_state {
+
diff --git a/user/gsm/gsm-makefile.patch b/user/gsm/gsm-makefile.patch
new file mode 100644
index 000000000..b11e1506d
--- /dev/null
+++ b/user/gsm/gsm-makefile.patch
@@ -0,0 +1,115 @@
+--- gsm-1.0-pl12/Makefile.mk 2006-04-26 21:14:26.000000000 +0200
++++ gsm-1.0-pl12/Makefile 2007-05-13 13:03:32.000000000 +0200
+@@ -30,6 +30,10 @@
+ ######### define this, and read about the GSM_OPT_WAV49 option in the
+ ######### manual page on gsm_option(3).
+
++PG =
++#PG = -g -pg
++######### Profiling flags. If you don't know what that means, leave it blank
++
+ # Choose a compiler. The code works both with ANSI and K&R-C.
+ # Use -DNeedFunctionPrototypes to compile with, -UNeedFunctionPrototypes to
+ # compile without, function prototypes in the header files.
+@@ -44,7 +48,7 @@
+ # CCFLAGS = -c -O
+
+ CC = gcc -ansi -pedantic
+-CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1 -Wall -Wno-comment
++CCFLAGS = -c $(RPM_OPT_FLAGS) -D_REENTRANT -DNeedFunctionPrototypes=1
+
+ LD = $(CC)
+
+@@ -81,7 +85,7 @@
+ GSM_INSTALL_ROOT = $(INSTALL_ROOT)
+ GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
+ GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
+-GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
++GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3
+
+
+ # Where do you want to install the toast binaries and their manpage?
+@@ -91,16 +95,16 @@
+
+ TOAST_INSTALL_ROOT = $(INSTALL_ROOT)
+ TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
+-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
++TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1
+
+ # Other tools
+
+ SHELL = /bin/sh
+-LN = ln
++LN = ln -s
+ BASENAME = basename
+ AR = ar
+ ARFLAGS = cr
+-RMFLAGS =
++RMFLAGS = -f
+ FIND = find
+ COMPRESS = compress
+ COMPRESSFLAGS =
+@@ -129,17 +133,18 @@
+ # DEBUG = -DNDEBUG
+ ######### Remove -DNDEBUG to enable assertions.
+
+-CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
++CFLAGS = $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
+ $(WAV49) $(CCINC) -I$(INC)
+ ######### It's $(CC) $(CFLAGS)
+
+-LFLAGS = $(LDFLAGS) $(LDINC)
++LFLAGS = $(PG) $(LDFLAGS) $(LDINC)
+ ######### It's $(LD) $(LFLAGS)
+
+
+ # Targets
+
+ LIBGSM = $(LIB)/libgsm.a
++LIBGSMSO = $(LIB)/libgsm.so
+
+ TOAST = $(BIN)/toast
+ UNTOAST = $(BIN)/untoast
+@@ -279,7 +284,7 @@
+
+ # Target rules
+
+-all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
++all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
+ @-echo $(ROOT): Done.
+
+ tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
+@@ -299,24 +304,28 @@
+
+ # The basic API: libgsm
+
++$(LIBGSMSO): $(LIB) $(GSM_OBJECTS)
++ $(LD) -o $@.1.0.12 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc
++ ln -fs libgsm.so.1.0.12 lib/libgsm.so.1
++ ln -fs libgsm.so.1.0.12 lib/libgsm.so
++
+ $(LIBGSM): $(LIB) $(GSM_OBJECTS)
+ -rm $(RMFLAGS) $(LIBGSM)
+ $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
+ $(RANLIB) $(LIBGSM)
+
+-
+ # Toast, Untoast and Tcat -- the compress-like frontends to gsm.
+
+-$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
+- $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
++$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM) $(LIBGSMSO)
++ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
+
+ $(UNTOAST): $(BIN) $(TOAST)
+ -rm $(RMFLAGS) $(UNTOAST)
+- $(LN) $(TOAST) $(UNTOAST)
++ $(LN) toast $(UNTOAST)
+
+ $(TCAT): $(BIN) $(TOAST)
+ -rm $(RMFLAGS) $(TCAT)
+- $(LN) $(TOAST) $(TCAT)
++ $(LN) toast $(TCAT)
+
+
+ # The local bin and lib directories