gsm:moved into main for pisi 2.0

This commit is contained in:
2015-07-22 16:08:03 +03:00
parent a3e487790f
commit 11f2a2a547
9 changed files with 557 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
from pisi.actionsapi import shelltools
WorkDir="gsm-1.0-pl13"
def setup():
multilib = " -m32" if get.buildTYPE() == "emul32" else ""
pisitools.dosed("Makefile", "pardusCC", "%s %s" % (get.CC(), multilib))
pisitools.dosed("Makefile", "pardusCFLAGS", "%s %s" % (get.CFLAGS(), multilib))
def build():
autotools.make()
def install():
if get.buildTYPE() == "emul32":
autotools.rawInstall("DESTDIR=%s bindir=/emul32 libdir=/usr/lib32" % get.installDIR())
pisitools.remove("/usr/lib32/libgsm.a")
return
else:
autotools.rawInstall("DESTDIR=%s bindir=/usr/bin" % get.installDIR())
for bin in ["tcat","untoast"]:
pisitools.remove("/usr/bin/%s" % bin)
pisitools.dosym("toast", "/usr/bin/%s" % bin)
# Move gsm.h out of gsm subdir
# pisitools.insinto("/usr/include","inc/gsm.h")
# pisitools.removeDir("/usr/include/gsm")
# No static libs
pisitools.remove("/usr/lib/libgsm.a")
pisitools.dodoc("ChangeLog", "COPYRIGHT", "MACHINES", "MANIFEST", "README")
@@ -0,0 +1,33 @@
--- Makefile~ 2007-01-16 17:18:52.000000000 +0100
+++ Makefile 2007-01-16 17:28:12.000000000 +0100
@@ -249,6 +249,9 @@
$(DESTDIR)$(libdir)/libgsm.a \
$(DESTDIR)$(libdir)/libgsm.so \
$(DESTDIR)$(includedir)/gsm/gsm.h \
+ $(DESTDIR)$(includedir)/gsm/private.h \
+ $(DESTDIR)$(includedir)/gsm/unproto.h \
+ $(DESTDIR)$(includedir)/gsm/proto.h \
$(DESTDIR)$(mandir)/man3/gsm.3 \
$(DESTDIR)$(mandir)/man3/gsm_explode.3 \
$(DESTDIR)$(mandir)/man3/gsm_option.3 \
@@ -380,6 +383,20 @@
-rm $(RMFLAGS) $@
-mkdir -p $(DESTDIR)$(includedir)/gsm/
install -m0444 $? $@
+$(DESTDIR)$(includedir)/gsm/private.h: $(INC)/private.h
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(includedir)/gsm/
+ -install -m0444 $? $@
+
+$(DESTDIR)$(includedir)/gsm/proto.h: $(INC)/proto.h
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(includedir)/gsm/
+ -install -m0444 $? $@
+$(DESTDIR)$(includedir)/gsm/unproto.h: $(INC)/unproto.h
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(includedir)/gsm/
+ -install -m0444 $? $@
+
$(DESTDIR)$(libdir)/libgsm.a: $(LIBGSM)
-rm $(RMFLAGS) $@
@@ -0,0 +1,26 @@
--- gsm-1.0-pl10/src/code.c.includes 1996-07-02 16:32:36.000000000 +0200
+++ gsm-1.0-pl10/src/code.c 2004-04-14 14:25:50.000000000 +0200
@@ -7,6 +7,7 @@
/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/code.c,v 1.3 1996/07/02 09:59:05 jutta Exp $ */
#include "config.h"
+#include <string.h>
#ifdef HAS_STDLIB_H
--- gsm-1.0-pl10/src/toast.c.includes 1996-07-02 16:32:55.000000000 +0200
+++ gsm-1.0-pl10/src/toast.c 2004-04-14 14:31:22.000000000 +0200
@@ -6,7 +6,13 @@
/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast.c,v 1.8 1996/07/02 10:41:04 jutta Exp $ */
+#define _BSD_SOURCE
+#define _GNU_SOURCE
#include "toast.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
/* toast -- lossy sound compression using the gsm library.
*/
@@ -0,0 +1,301 @@
--- Makefile 1996-07-02 16:36:06.000000000 +0200
+++ Makefile.oden 2004-09-11 17:39:00.308986936 +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
+CCFLAGS = -c $(RPM_OPT_FLAGS) -fPIC -D_REENTRANT -DNeedFunctionPrototypes=1
LD = $(CC)
@@ -64,43 +68,27 @@
# LDLIB = -lgcc
######### Additional libraries needed by $(LD)
-
-# Where do you want to install libraries, binaries, a header file
-# and the manual pages?
-#
-# Leave INSTALL_ROOT empty (or just don't execute "make install") to
-# not install gsm and toast outside of this directory.
-
-INSTALL_ROOT =
-
# Where do you want to install the gsm library, header file, and manpages?
#
-# Leave GSM_INSTALL_ROOT empty to not install the GSM library outside of
+# Leave DESTDIR empty to not install the GSM library outside of
# this directory.
-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
+DESTDIR =
-
-# Where do you want to install the toast binaries and their manpage?
-#
-# Leave TOAST_INSTALL_ROOT empty to not install the toast binaries outside
-# of this directory.
-
-TOAST_INSTALL_ROOT = $(INSTALL_ROOT)
-TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
+prefix = /usr
+libdir = $(prefix)/lib
+includedir = $(prefix)/include
+datadir = $(prefix)/share
+mandir = $(datadir)/man
# 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 +117,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
@@ -257,18 +246,19 @@
# Install targets
GSM_INSTALL_TARGETS = \
- $(GSM_INSTALL_LIB)/libgsm.a \
- $(GSM_INSTALL_INC)/gsm.h \
- $(GSM_INSTALL_MAN)/gsm.3 \
- $(GSM_INSTALL_MAN)/gsm_explode.3 \
- $(GSM_INSTALL_MAN)/gsm_option.3 \
- $(GSM_INSTALL_MAN)/gsm_print.3
+ $(DESTDIR)$(libdir)/libgsm.a \
+ $(DESTDIR)$(libdir)/libgsm.so \
+ $(DESTDIR)$(includedir)/gsm/gsm.h \
+ $(DESTDIR)$(mandir)/man3/gsm.3 \
+ $(DESTDIR)$(mandir)/man3/gsm_explode.3 \
+ $(DESTDIR)$(mandir)/man3/gsm_option.3 \
+ $(DESTDIR)$(mandir)/man3/gsm_print.3
TOAST_INSTALL_TARGETS = \
- $(TOAST_INSTALL_BIN)/toast \
- $(TOAST_INSTALL_BIN)/tcat \
- $(TOAST_INSTALL_BIN)/untoast \
- $(TOAST_INSTALL_MAN)/toast.1
+ $(DESTDIR)$(bindir)/toast \
+ $(DESTDIR)$(bindir)/tcat \
+ $(DESTDIR)$(bindir)/untoast \
+ $(DESTDIR)$(mandir)/man1/toast.1
# Default rules
@@ -279,7 +269,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 +289,28 @@
# The basic API: libgsm
+$(LIBGSMSO): $(LIB) $(GSM_OBJECTS)
+ $(LD) -o $@.1.0.10 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc
+ ln -fs libgsm.so.1.0.10 lib/libgsm.so.1
+ ln -fs libgsm.so.1.0.10 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) $(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
@@ -331,72 +325,71 @@
# Installation
gsminstall:
- -if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
- make $(GSM_INSTALL_TARGETS) ; \
- fi
+ make $(GSM_INSTALL_TARGETS)
toastinstall:
- -if [ x"$(TOAST_INSTALL_ROOT)" != x ]; then \
- make $(TOAST_INSTALL_TARGETS); \
- fi
+ make $(TOAST_INSTALL_TARGETS)
gsmuninstall:
- -if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
- rm $(RMFLAGS) $(GSM_INSTALL_TARGETS) ; \
- fi
+ rm $(RMFLAGS) $(GSM_INSTALL_TARGETS)
toastuninstall:
- -if [ x"$(TOAST_INSTALL_ROOT)" != x ] ; then \
- rm $(RMFLAGS) $(TOAST_INSTALL_TARGETS); \
- fi
-
-$(TOAST_INSTALL_BIN)/toast: $(TOAST)
- -rm $@
- cp $(TOAST) $@
- chmod 755 $@
-
-$(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast
- -rm $@
- ln $? $@
-
-$(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast
- -rm $@
- ln $? $@
-
-$(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1
- -rm $@
- cp $? $@
- chmod 444 $@
-
-$(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3
- -rm $@
- cp $? $@
- chmod 444 $@
-
-$(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3
- -rm $@
- cp $? $@
- chmod 444 $@
-
-$(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3
- -rm $@
- cp $? $@
- chmod 444 $@
-
-$(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3
- -rm $@
- cp $? $@
- chmod 444 $@
-
-$(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h
- -rm $@
- cp $? $@
- chmod 444 $@
-
-$(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
- -rm $@
- cp $? $@
- chmod 444 $@
+ rm $(RMFLAGS) $(TOAST_INSTALL_TARGETS)
+
+$(DESTDIR)$(bindir)/toast: $(TOAST)
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(bindir)
+ install -m0755 $(TOAST) $@
+
+$(DESTDIR)$(bindir)/untoast: $(DESTDIR)$(bindir)/toast
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(bindir)
+ ln -sf $(TOAST) $@
+
+$(DESTDIR)$(bindir)/tcat: $(DESTDIR)$(bindir)/toast
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(bindir)
+ ln -sf $(TOAST) $@
+
+$(DESTDIR)$(mandir)/man1/toast.1: $(MAN)/toast.1
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(mandir)/man1/
+ install -m0444 $? $@
+
+$(DESTDIR)$(mandir)/man3/gsm.3: $(MAN)/gsm.3
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(mandir)/man3/
+ install -m0444 $? $@
+
+$(DESTDIR)$(mandir)/man3/gsm_option.3: $(MAN)/gsm_option.3
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(mandir)/man3/
+ install -m0444 $? $@
+
+$(DESTDIR)$(mandir)/man3/gsm_explode.3: $(MAN)/gsm_explode.3
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(mandir)/man3/
+ install -m0444 $? $@
+
+$(DESTDIR)$(mandir)/man3/gsm_print.3: $(MAN)/gsm_print.3
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(mandir)/man3/
+ install -m0444 $? $@
+
+$(DESTDIR)$(includedir)/gsm/gsm.h: $(INC)/gsm.h
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(includedir)/gsm/
+ install -m0444 $? $@
+
+$(DESTDIR)$(libdir)/libgsm.a: $(LIBGSM)
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(libdir)
+ install -m0444 $? $@
+
+$(DESTDIR)$(libdir)/libgsm.so: $(LIBGSMSO)
+ -rm $(RMFLAGS) $@
+ -mkdir -p $(DESTDIR)$(libdir)
+ cp -av $?* $(DESTDIR)$(libdir)/
# Distribution
@@ -0,0 +1,10 @@
--- libgsm-1.0.10.orig/inc/toast.h
+++ libgsm-1.0.10/inc/toast.h
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <ctype.h>
+#include <pthread.h>
#include <signal.h>
#include <errno.h>
@@ -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 {
@@ -0,0 +1,14 @@
diff -Nur gsm-1.0-pl13-old/Makefile gsm-1.0-pl13/Makefile
--- gsm-1.0-pl13-old/Makefile 2010-02-15 15:25:07.747416137 +0200
+++ gsm-1.0-pl13/Makefile 2010-02-15 15:26:45.211541984 +0200
@@ -47,8 +47,8 @@
# CC = /usr/lang/acc
# CCFLAGS = -c -O
-CC = gcc -ansi -pedantic
-CCFLAGS = -c $(RPM_OPT_FLAGS) -fPIC -D_REENTRANT -DNeedFunctionPrototypes=1
+CC = pardusCC -ansi -pedantic
+CCFLAGS = -c pardusCFLAGS -fPIC -D_REENTRANT -DNeedFunctionPrototypes=1
LD = $(CC)
+96
View File
@@ -0,0 +1,96 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>gsm</Name>
<Homepage>http://kbs.cs.tu-berlin.de/~jutta/toast.html</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>OSI-Approved</License>
<IsA>library</IsA>
<Summary>Lossy speech compression library and tool</Summary>
<Description>Gsm is an implementation of the final draft GSM 06.10 standard for full-rate speech transcoding</Description>
<Archive sha1sum="668b0a180039a50d379b3d5a22e78da4b1d90afc" type="targz">http://osxwinebuilder.googlecode.com/files/gsm-1.0.13.tar.gz</Archive>
<Patches>
<Patch level="1">gsm-1.0.10-dyn.patch</Patch>
<Patch level="1">gsm-1.0-pl10-includes.patch</Patch>
<Patch>gsm-1.0-pl10-shared.diff</Patch>
<Patch>gsm-1.0-pl10-add-includefile.patch</Patch>
<Patch level="1">pardusflags.patch</Patch>
<Patch level="1">gsm-1.0.12-64bit.patch</Patch>
</Patches>
</Source>
<Package>
<Name>gsm</Name>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="data">/usr/share/doc</Path>
</Files>
</Package>
<Package>
<Name>gsm-devel</Name>
<Summary>Development files for gsm</Summary>
<RuntimeDependencies>
<Dependency release="current">gsm</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<!-- FIXME: Remove this if not necessary -->
<Path fileType="man">/usr/share/man/man3</Path>
</Files>
</Package>
<Package>
<Name>gsm-32bit</Name>
<PartOf>emul32</PartOf>
<Summary>32-bit shared libraries for gsm</Summary>
<BuildType>emul32</BuildType>
<BuildDependencies>
<Dependency>glibc-32bit</Dependency>
</BuildDependencies>
<RuntimeDependencies>
<Dependency release="current">gsm</Dependency>
<Dependency>glibc-32bit</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib32</Path>
</Files>
</Package>
<History>
<Update release="4">
<Date>2014-12-14</Date>
<Version>1.0.13</Version>
<Comment>Rebuild.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-05-21</Date>
<Version>1.0.13</Version>
<Comment>Rebuild.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2014-01-23</Date>
<Version>1.0.13</Version>
<Comment>Rebuild.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="1">
<Date>2011-05-04</Date>
<Version>1.0.13</Version>
<Comment>First release</Comment>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</PISI>
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>gsm</Name>
<Summary xml:lang="tr">Kayıplı ses sıkıştırması kitaplığı ve araçları</Summary>
<Description xml:lang="tr">GSM, tam oranlı konuşma kod çevrimi için GSM 06.10 standardı son taslak uyarlamasıdır</Description>
<Description xml:lang="fr">Gsm est une implémentation du brouillon final du standard GSM 06.10 pour un transcodage audio à plein régime.</Description>
<Description xml:lang="es">Gsm es una implementación del estándar GSM 06.10 final draft de codificación de voz full-rate</Description>
</Source>
<Package>
<Name>gsm-devel</Name>
<Summary xml:lang="tr">gsm için geliştirme dosyaları</Summary>
</Package>
<Package>
<Name>gsm-32bit</Name>
<Summary xml:lang="tr">gsm için 32-bit paylaşımlı kitaplıklar</Summary>
</Package>
</PISI>