summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/gsm/README6
-rw-r--r--libraries/gsm/gsm.SlackBuild119
-rw-r--r--libraries/gsm/gsm.info10
-rw-r--r--libraries/gsm/patches/gsm-1.0.12-64bit.patch16
-rw-r--r--libraries/gsm/patches/gsm-1.0.12-memcpy.patch11
-rw-r--r--libraries/gsm/patches/gsm-1.0.13-shared.patch151
-rw-r--r--libraries/gsm/slack-desc19
7 files changed, 332 insertions, 0 deletions
diff --git a/libraries/gsm/README b/libraries/gsm/README
new file mode 100644
index 0000000000..67e6c4235b
--- /dev/null
+++ b/libraries/gsm/README
@@ -0,0 +1,6 @@
+gsm contains command line utilities and libgsm, an implementation
+of the European GSM 06.10 provisional standard for full-rate speech
+transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
+excitation/long term prediction) coding at 13 kbit/s.
+
+The homepage link is dead there is no known homepage at this time. \ No newline at end of file
diff --git a/libraries/gsm/gsm.SlackBuild b/libraries/gsm/gsm.SlackBuild
new file mode 100644
index 0000000000..af8d051771
--- /dev/null
+++ b/libraries/gsm/gsm.SlackBuild
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+# Slackware build script for gsm
+
+# Copyright 2009 David Somero (dsomero@hotmail.com) Athens,TN USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PRGNAM=gsm
+VERSION=${VERSION:-1.0.13}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+mv $PRGNAM-1.0-pl13 $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Patches ripped off from gentoo...
+patch -p1 < $CWD/patches/gsm-1.0.13-shared.patch
+patch -p1 < $CWD/patches/gsm-1.0.12-memcpy.patch
+patch -p1 < $CWD/patches/gsm-1.0.12-64bit.patch
+
+mkdir -p $PKG/usr/bin
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX
+mkdir -p $PKG/usr/include/{gsm,libgsm}
+mkdir -p $PKG/usr/man/man{1,3}
+
+make CCINC="$SLKCFLAGS"
+make install \
+ INSTALL_ROOT=$PKG/usr \
+ GSM_INSTALL_LIB=$PKG/usr/lib$LIBDIRSUFFIX \
+ GSM_INSTALL_INC=$PKG/usr/include/gsm \
+ GSM_INSTALL_MAN=$PKG/usr/man/man3 \
+ TOAST_INSTALL_MAN=$PKG/usr/man/man1
+
+cp -p lib/libgsm.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX
+( cd $PKG/usr/lib$LIBDIRSUFFIX
+ ln -s libgsm.so.$VERSION libgsm.so.1
+ ln -s libgsm.so.$VERSION libgsm.so
+) || exit 1
+
+# some apps look for this in /usr/include
+( cd $PKG/usr/include/libgsm ; ln -s ../gsm/gsm.h gsm.h ) || exit 1
+
+# Replace hardlinks with softlinks
+( cd $PKG/usr/bin
+ rm -f toast ; ln -s tcat toast
+ rm -f untoast ; ln -s tcat untoast
+)
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ ChangeLog COPYRIGHT MACHINES README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/libraries/gsm/gsm.info b/libraries/gsm/gsm.info
new file mode 100644
index 0000000000..ffeb924eab
--- /dev/null
+++ b/libraries/gsm/gsm.info
@@ -0,0 +1,10 @@
+PRGNAM="gsm"
+VERSION="1.0.13"
+HOMEPAGE="http://user.cs.tu-berlin.de/~jutta/toast.html"
+DOWNLOAD="http://www.imagemagick.org/download/delegates/ffmpeg/gsm-1.0.13.tar.gz"
+MD5SUM="c1ba392ce61dc4aff1c29ea4e92f6df4"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="David Somero"
+EMAIL="dsomero@hotmail.com"
+APPROVED="rworkman"
diff --git a/libraries/gsm/patches/gsm-1.0.12-64bit.patch b/libraries/gsm/patches/gsm-1.0.12-64bit.patch
new file mode 100644
index 0000000000..bc28c5099c
--- /dev/null
+++ b/libraries/gsm/patches/gsm-1.0.12-64bit.patch
@@ -0,0 +1,16 @@
+diff -ur gsm-1.0-pl12.orig/inc/private.h gsm-1.0-pl12/inc/private.h
+--- gsm-1.0-pl12.orig/inc/private.h 2006-04-26 22:17:01.000000000 +0300
++++ gsm-1.0-pl12/inc/private.h 2007-08-19 12:23:02.000000000 +0300
+@@ -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/libraries/gsm/patches/gsm-1.0.12-memcpy.patch b/libraries/gsm/patches/gsm-1.0.12-memcpy.patch
new file mode 100644
index 0000000000..fc3c1ce232
--- /dev/null
+++ b/libraries/gsm/patches/gsm-1.0.12-memcpy.patch
@@ -0,0 +1,11 @@
+diff -ur gsm-1.0-pl12.orig/src/code.c gsm-1.0-pl12/src/code.c
+--- gsm-1.0-pl12.orig/src/code.c 2006-04-26 22:16:50.000000000 +0300
++++ gsm-1.0-pl12/src/code.c 2007-08-19 12:18:01.000000000 +0300
+@@ -8,6 +8,7 @@
+
+ #include "config.h"
+
++#include <string.h>
+
+ #ifdef HAS_STDLIB_H
+ #include <stdlib.h>
diff --git a/libraries/gsm/patches/gsm-1.0.13-shared.patch b/libraries/gsm/patches/gsm-1.0.13-shared.patch
new file mode 100644
index 0000000000..fc99e2c304
--- /dev/null
+++ b/libraries/gsm/patches/gsm-1.0.13-shared.patch
@@ -0,0 +1,151 @@
+diff -ur gsm-1.0-pl13.orig/Makefile gsm-1.0-pl13/Makefile
+--- gsm-1.0-pl13.orig/Makefile 2006-04-26 22:14:26.000000000 +0300
++++ gsm-1.0-pl13/Makefile 2009-09-08 14:50:02.000000000 +0300
+@@ -96,7 +96,7 @@
+ # Other tools
+
+ SHELL = /bin/sh
+-LN = ln
++LN = ln -s
+ BASENAME = basename
+ AR = ar
+ ARFLAGS = cr
+@@ -140,6 +140,7 @@
+ # Targets
+
+ LIBGSM = $(LIB)/libgsm.a
++LIBGSMSO= $(LIB)/libgsm.so
+
+ TOAST = $(BIN)/toast
+ UNTOAST = $(BIN)/untoast
+@@ -203,24 +204,43 @@
+
+ # Object files
+
+-GSM_OBJECTS = $(SRC)/add.o \
+- $(SRC)/code.o \
+- $(SRC)/debug.o \
+- $(SRC)/decode.o \
+- $(SRC)/long_term.o \
+- $(SRC)/lpc.o \
+- $(SRC)/preprocess.o \
+- $(SRC)/rpe.o \
+- $(SRC)/gsm_destroy.o \
+- $(SRC)/gsm_decode.o \
+- $(SRC)/gsm_encode.o \
+- $(SRC)/gsm_explode.o \
+- $(SRC)/gsm_implode.o \
+- $(SRC)/gsm_create.o \
+- $(SRC)/gsm_print.o \
+- $(SRC)/gsm_option.o \
+- $(SRC)/short_term.o \
+- $(SRC)/table.o
++STATIC_GSM_OBJECTS = $(SRC)/add.o \
++ $(SRC)/code.o \
++ $(SRC)/debug.o \
++ $(SRC)/decode.o \
++ $(SRC)/long_term.o \
++ $(SRC)/lpc.o \
++ $(SRC)/preprocess.o \
++ $(SRC)/rpe.o \
++ $(SRC)/gsm_destroy.o \
++ $(SRC)/gsm_decode.o \
++ $(SRC)/gsm_encode.o \
++ $(SRC)/gsm_explode.o \
++ $(SRC)/gsm_implode.o \
++ $(SRC)/gsm_create.o \
++ $(SRC)/gsm_print.o \
++ $(SRC)/gsm_option.o \
++ $(SRC)/short_term.o \
++ $(SRC)/table.o
++
++SHARED_GSM_OBJECTS = $(SRC)/add.lo \
++ $(SRC)/code.lo \
++ $(SRC)/debug.lo \
++ $(SRC)/decode.lo \
++ $(SRC)/long_term.lo \
++ $(SRC)/lpc.lo \
++ $(SRC)/preprocess.lo \
++ $(SRC)/rpe.lo \
++ $(SRC)/gsm_destroy.lo \
++ $(SRC)/gsm_decode.lo \
++ $(SRC)/gsm_encode.lo \
++ $(SRC)/gsm_explode.lo \
++ $(SRC)/gsm_implode.lo \
++ $(SRC)/gsm_create.lo \
++ $(SRC)/gsm_print.lo \
++ $(SRC)/gsm_option.lo \
++ $(SRC)/short_term.lo \
++ $(SRC)/table.lo
+
+ TOAST_OBJECTS = $(SRC)/toast.o \
+ $(SRC)/toast_lin.o \
+@@ -228,7 +248,7 @@
+ $(SRC)/toast_alaw.o \
+ $(SRC)/toast_audio.o
+
+-OBJECTS = $(GSM_OBJECTS) $(TOAST_OBJECTS)
++OBJECTS = $(STATIC_GSM_OBJECTS) $(SHARED_GSM_OBJECTS) $(TOAST_OBJECTS)
+
+ # Manuals
+
+@@ -277,9 +297,12 @@
+ $(CC) $(CFLAGS) $?
+ @-mv `$(BASENAME) $@` $@ > /dev/null 2>&1
+
++%.lo: %.c
++ $(CC) $(CFLAGS) -fPIC -c $< -o $@
++
+ # 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 +322,29 @@
+
+ # The basic API: libgsm
+
+-$(LIBGSM): $(LIB) $(GSM_OBJECTS)
++$(LIBGSMSO): $(LIB) $(SHARED_GSM_OBJECTS)
++ $(LD) $(LFLAGS) -o $@.1.0.13 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(SHARED_GSM_OBJECTS) -lc
++ ln -fs libgsm.so.1.0.13 lib/libgsm.so.1
++ ln -fs libgsm.so.1.0.13 lib/libgsm.so
++
++$(LIBGSM): $(LIB) $(STATIC_GSM_OBJECTS)
+ -rm $(RMFLAGS) $(LIBGSM)
+- $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
++ $(AR) $(ARFLAGS) $(LIBGSM) $(STATIC_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)
++ $(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
+@@ -426,7 +454,9 @@
+
+ clean: semi-clean
+ -rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \
+- $(TOAST) $(TCAT) $(UNTOAST) \
++ $(LIBGSMSO) $(LIB)/libgsm.so.1.0.13 \
++ $(LIB)libgsm.so.1 \
++ $(TOAST) $(TCAT) $(UNTOAST) \
+ $(ROOT)/gsm-1.0.tar.Z
+
+
diff --git a/libraries/gsm/slack-desc b/libraries/gsm/slack-desc
new file mode 100644
index 0000000000..e964380406
--- /dev/null
+++ b/libraries/gsm/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-------------------------------------------------------|
+gsm: gsm (Lossy speech compression library and tool)
+gsm:
+gsm: gsm contains command line utilities for libgsm, an implementation
+gsm: of the European GSM 06.10 provisional standard for full-rate speech
+gsm: transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
+gsm: excitation/long term prediction) coding at 13 kbit/s.
+gsm:
+gsm: Homepage: http://kbs.cs.tu-berlin.de/~jutta/toast.html
+gsm:
+gsm:
+gsm: