summaryrefslogtreecommitdiff
path: root/audio/gsm
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2000-01-26 22:09:31 +0000
committerjlam <jlam@pkgsrc.org>2000-01-26 22:09:31 +0000
commit1944e9c4eab82e275480fb343e0c26b08a87b489 (patch)
treed361eea1e9fef28ec8d0a3f1fd5d6f3e6310aa23 /audio/gsm
parent80a3fd2bdb9d8f5c1ced2423a2494e2fb0d9fb2a (diff)
downloadpkgsrc-1944e9c4eab82e275480fb343e0c26b08a87b489.tar.gz
* Libtoolize libgsm.a build.
* Use a shared library numbering scheme of libgsm.so.x.y instead of libgsm.so.x.y.z. Instead of libgsm.so.1.0.10, we now have libgsm.so.1.10.
Diffstat (limited to 'audio/gsm')
-rw-r--r--audio/gsm/Makefile11
-rw-r--r--audio/gsm/files/patch-sum4
-rw-r--r--audio/gsm/patches/patch-ab202
-rw-r--r--audio/gsm/pkg/PLIST18
4 files changed, 130 insertions, 105 deletions
diff --git a/audio/gsm/Makefile b/audio/gsm/Makefile
index c43ce1ce29d..72f51a0d20e 100644
--- a/audio/gsm/Makefile
+++ b/audio/gsm/Makefile
@@ -1,19 +1,18 @@
-# $NetBSD: Makefile,v 1.12 1999/09/26 22:06:27 jlam Exp $
+# $NetBSD: Makefile,v 1.13 2000/01/26 22:09:31 jlam Exp $
# FreeBSD Id: Makefile,v 1.10 1997/07/17 15:12:39 max Exp
#
DISTNAME= gsm-1.0.10
+WRKSRC= ${WRKDIR}/gsm-1.0-pl10
CATEGORIES= audio
MASTER_SITES= ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/
MAINTAINER= packages@netbsd.org
HOMEPAGE= http://kbs.cs.tu-berlin.de/~jutta/toast.html
-MAKE_FLAGS= PREFIX="${PREFIX}"
-
-WRKSRC= ${WRKDIR}/gsm-1.0-pl10
+USE_LIBTOOL= yes
-post-install:
- @strip ${PREFIX}/bin/toast
+NO_CONFIGURE= yes
+MAKE_ENV+= INSTALL_ROOT="${PREFIX}" ROOT="${WRKSRC}"
.include "../../mk/bsd.pkg.mk"
diff --git a/audio/gsm/files/patch-sum b/audio/gsm/files/patch-sum
index fbbbeb98b97..5837289d293 100644
--- a/audio/gsm/files/patch-sum
+++ b/audio/gsm/files/patch-sum
@@ -1,5 +1,5 @@
-$NetBSD: patch-sum,v 1.1 1999/07/09 13:50:12 agc Exp $
+$NetBSD: patch-sum,v 1.2 2000/01/26 22:09:32 jlam Exp $
MD5 (patch-aa) = 2bd740c76a9740f71f237f1a6644aef1
-MD5 (patch-ab) = d0c0a32ccb7dd88bb140a64862327c02
+MD5 (patch-ab) = d98d176b190e4598da1d084b1bbf56f2
MD5 (patch-ac) = cf6b3603fc53b7194c98671b2d90ad9a
diff --git a/audio/gsm/patches/patch-ab b/audio/gsm/patches/patch-ab
index 4ac7318cf0f..b2fcde8d58b 100644
--- a/audio/gsm/patches/patch-ab
+++ b/audio/gsm/patches/patch-ab
@@ -1,52 +1,42 @@
-$NetBSD: patch-ab,v 1.5 1998/08/07 10:35:56 agc Exp $
+$NetBSD: patch-ab,v 1.6 2000/01/26 22:09:32 jlam Exp $
--- Makefile.orig Tue Jul 2 10:36:06 1996
-+++ Makefile Mon Mar 16 02:32:43 1998
++++ Makefile Sun Jan 16 02:16:43 2000
@@ -7,11 +7,13 @@
SASR = -DSASR
######### Define SASR if >> is a signed arithmetic shift (-1 >> 1 == -1)
-MULHACK = -DUSE_FLOAT_MUL
-+#MULHACK = -DUSE_FLOAT_MUL # Don't define it for FreeBSD, cause SIGFPE
-+MULHACK =
++#MULHACK = -DUSE_FLOAT_MUL
++MULHACK =
######### Define this if your host multiplies floats faster than integers,
######### e.g. on a SPARCstation.
-FAST = -DFAST
-+#FAST = -DFAST
-+FAST =
++#FAST = -DFAST
++FAST =
######### Define together with USE_FLOAT_MUL to enable the GSM library's
######### approximation option for incorrect, but good-enough results.
-@@ -43,8 +45,8 @@
+@@ -43,7 +45,7 @@
# CC = /usr/lang/acc
# CCFLAGS = -c -O
-CC = gcc -ansi -pedantic
--CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1
-+#CC = gcc -ansi -pedantic
-+CCFLAGS = -c -DNeedFunctionPrototypes=1
++# CC = gcc -ansi -pedantic
+ CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1
LD = $(CC)
-
-@@ -59,6 +61,7 @@
- ######### Includes needed by $(CC)
-
- # LDINC = -L/usr/gnu/lib/gcc-2.1/gcc-lib/sparc-sun-sunos4.1.2/2.1
-+LDINC = -L$(LIB)
- ######### Library paths needed by $(LD)
-
- # LDLIB = -lgcc
-@@ -71,7 +74,7 @@
+@@ -71,7 +73,7 @@
# Leave INSTALL_ROOT empty (or just don't execute "make install") to
# not install gsm and toast outside of this directory.
-INSTALL_ROOT =
-+INSTALL_ROOT = $(PREFIX)
++# INSTALL_ROOT =
# Where do you want to install the gsm library, header file, and manpages?
#
-@@ -80,7 +83,7 @@
+@@ -80,7 +82,7 @@
GSM_INSTALL_ROOT = $(INSTALL_ROOT)
GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
@@ -55,135 +45,171 @@ $NetBSD: patch-ab,v 1.5 1998/08/07 10:35:56 agc Exp $
GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
-@@ -96,7 +99,7 @@
+@@ -96,8 +98,9 @@
# Other tools
SHELL = /bin/sh
-LN = ln
+LN = ln -s
BASENAME = basename
++DIRNAME = dirname
AR = ar
ARFLAGS = cr
-@@ -129,17 +132,19 @@
+ RMFLAGS =
+@@ -114,7 +117,7 @@
+
+ # Local Directories
+
+-ROOT = .
++#ROOT = .
+ ADDTST = $(ROOT)/add-test
+ TST = $(ROOT)/tst
+ MAN = $(ROOT)/man
+@@ -129,7 +132,7 @@
# DEBUG = -DNDEBUG
######### Remove -DNDEBUG to enable assertions.
-CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
-+CFLAGS += $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
++CFLAGS += $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
$(WAV49) $(CCINC) -I$(INC)
######### It's $(CC) $(CFLAGS)
- LFLAGS = $(LDFLAGS) $(LDINC)
- ######### It's $(LD) $(LFLAGS)
-
-+.SUFFIXES: .c .so .o
+@@ -139,7 +142,7 @@
# Targets
- LIBGSM = $(LIB)/libgsm.a
-+LIBGSM_SHARED = $(LIB)/libgsm.so.1.0.10
+-LIBGSM = $(LIB)/libgsm.a
++LIBGSM = $(LIB)/libgsm.la
TOAST = $(BIN)/toast
UNTOAST = $(BIN)/untoast
-@@ -258,6 +263,7 @@
+@@ -257,7 +260,7 @@
+ # Install targets
GSM_INSTALL_TARGETS = \
- $(GSM_INSTALL_LIB)/libgsm.a \
-+ $(GSM_INSTALL_LIB)/libgsm.so.1.0.10 \
+- $(GSM_INSTALL_LIB)/libgsm.a \
++ $(GSM_INSTALL_LIB)/libgsm.la \
$(GSM_INSTALL_INC)/gsm.h \
$(GSM_INSTALL_MAN)/gsm.3 \
$(GSM_INSTALL_MAN)/gsm_explode.3 \
-@@ -277,9 +283,12 @@
+@@ -273,10 +276,15 @@
+
+ # Default rules
+
++.SUFFIXES: .o .lo
++
+ .c.o:
$(CC) $(CFLAGS) $?
@-mv `$(BASENAME) $@` $@ > /dev/null 2>&1
-+.c.so:
-+ ${CC} -fpic -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
++.c.lo:
++ cd `${DIRNAME} $@` && ${LIBTOOL} ${CC} ${CFLAGS} $?
+
# Target rules
--all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
-+all: $(LIBGSM) $(LIBGSM_SHARED) $(TOAST) $(TCAT) $(UNTOAST)
- @-echo $(ROOT): Done.
+ all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
+@@ -299,16 +307,20 @@
- tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
-@@ -304,11 +313,15 @@
- $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
- $(RANLIB) $(LIBGSM)
+ # The basic API: libgsm
+
+-$(LIBGSM): $(LIB) $(GSM_OBJECTS)
++$(LIBGSM): $(LIB) $(GSM_OBJECTS:.o=.lo)
+ -rm $(RMFLAGS) $(LIBGSM)
+- $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
+- $(RANLIB) $(LIBGSM)
++ cd $(LIB) && \
++ $(LIBTOOL) $(CC) -o `$(BASENAME) $@` \
++ $(GSM_OBJECTS:.o=.lo) \
++ -rpath $(GSM_INSTALL_LIB) -version-info 1:10
-+$(LIBGSM_SHARED): $(LIB) $(GSM_OBJECTS:S/o$/so/g)
-+ -rm $(RMFLAGS) $(LIBGSM_SHARED)
-+ ld -Bshareable -o $(LIBGSM_SHARED) $(GSM_OBJECTS:S/o$/so/g)
-+
# 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) -lgsm $(LDLIB)
++ cd $(BIN) && \
++ $(LIBTOOL) $(LD) $(LFLAGS) -o `$(BASENAME) $@` \
++ $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
$(UNTOAST): $(BIN) $(TOAST)
-rm $(RMFLAGS) $(UNTOAST)
-@@ -332,12 +345,14 @@
+@@ -332,12 +344,12 @@
gsminstall:
-if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
- make $(GSM_INSTALL_TARGETS) ; \
-+ make INSTALL_ROOT=$(INSTALL_ROOT) \
-+ $(GSM_INSTALL_TARGETS); \
++ $(MAKE) $(GSM_INSTALL_TARGETS) ; \
fi
toastinstall:
-if [ x"$(TOAST_INSTALL_ROOT)" != x ]; then \
- make $(TOAST_INSTALL_TARGETS); \
-+ make INSTALL_ROOT=$(INSTALL_ROOT) \
-+ $(TOAST_INSTALL_TARGETS); \
++ $(MAKE) $(TOAST_INSTALL_TARGETS); \
fi
gsmuninstall:
-@@ -357,11 +372,11 @@
+@@ -351,52 +363,34 @@
+ fi
+
+ $(TOAST_INSTALL_BIN)/toast: $(TOAST)
+- -rm $@
+- cp $(TOAST) $@
+- chmod 755 $@
++ ${LIBTOOL} ${BSD_INSTALL_PROGRAM} $? $(TOAST_INSTALL_BIN)
$(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast
- -rm $@
+- -rm $@
- ln $? $@
-+ cd $(TOAST_INSTALL_BIN) && $(LN) toast $@
++ ${LN} -f toast $@
$(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast
- -rm $@
+- -rm $@
- ln $? $@
-+ cd $(TOAST_INSTALL_BIN) && $(LN) toast $@
++ ${LN} -f toast $@
$(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1
- -rm $@
-@@ -397,6 +412,12 @@
- -rm $@
- cp $? $@
- chmod 444 $@
-+ ranlib $@
+- -rm $@
+- cp $? $@
+- chmod 444 $@
++ ${BSD_INSTALL_MAN} $? $(TOAST_INSTALL_MAN)
+
+ $(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3
+- -rm $@
+- cp $? $@
+- chmod 444 $@
++ ${BSD_INSTALL_MAN} $? $(GSM_INSTALL_MAN)
+
+ $(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3
+- -rm $@
+- cp $? $@
+- chmod 444 $@
++ ${BSD_INSTALL_MAN} $? $(GSM_INSTALL_MAN)
+
+ $(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3
+- -rm $@
+- cp $? $@
+- chmod 444 $@
++ ${BSD_INSTALL_MAN} $? $(GSM_INSTALL_MAN)
+
+ $(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3
+- -rm $@
+- cp $? $@
+- chmod 444 $@
++ ${BSD_INSTALL_MAN} $? $(GSM_INSTALL_MAN)
+
+ $(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h
+- -rm $@
+- cp $? $@
+- chmod 444 $@
+-
+-$(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
+- -rm $@
+- cp $? $@
+- chmod 444 $@
++ ${BSD_INSTALL_DATA} $? $(GSM_INSTALL_INC)
+
-+$(GSM_INSTALL_LIB)/libgsm.so.1.0.10: $(LIBGSM_SHARED)
-+ -rm $@
-+ cp $? $@
-+ chmod 444 $@
++$(GSM_INSTALL_LIB)/libgsm.la: $(LIBGSM)
++ ${LIBTOOL} ${BSD_INSTALL_DATA} $? $(GSM_INSTALL_LIB)
# Distribution
-@@ -416,7 +437,7 @@
- @-echo uninstall: Done.
-
- semi-clean:
-- -rm $(RMFLAGS) */*.o \
-+ -rm $(RMFLAGS) */*.o */*.so \
- $(TST)/lin2cod $(TST)/lin2txt \
- $(TST)/cod2lin $(TST)/cod2txt \
- $(TST)/gsm2cod \
-@@ -425,7 +446,8 @@
- -print | xargs rm $(RMFLAGS)
-
- clean: semi-clean
-- -rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \
-+ -rm $(RMFLAGS) $(LIBGSM) $(LIBGSM_SHARED) \
-+ $(ADDTST)/add \
- $(TOAST) $(TCAT) $(UNTOAST) \
- $(ROOT)/gsm-1.0.tar.Z
-
diff --git a/audio/gsm/pkg/PLIST b/audio/gsm/pkg/PLIST
index 5ce913f39b0..166c21811ae 100644
--- a/audio/gsm/pkg/PLIST
+++ b/audio/gsm/pkg/PLIST
@@ -1,12 +1,12 @@
-@comment $NetBSD: PLIST,v 1.7 1998/07/15 11:51:58 agc Exp $
-bin/toast
+@comment $NetBSD: PLIST,v 1.8 2000/01/26 22:09:32 jlam Exp $
bin/tcat
+bin/toast
bin/untoast
-man/man1/toast.1
-man/man3/gsm.3.gz
-man/man3/gsm_explode.3.gz
-man/man3/gsm_option.3.gz
-man/man3/gsm_print.3.gz
-lib/libgsm.a
-lib/libgsm.so.1.0.10
include/gsm.h
+lib/libgsm.a
+lib/libgsm.so.1.10
+man/man1/toast.1
+man/man3/gsm.3
+man/man3/gsm_explode.3
+man/man3/gsm_option.3
+man/man3/gsm_print.3