SHARED_LIBS, a bit more intricate (very little)

This commit is contained in:
espie 2005-12-23 16:59:13 +00:00
parent 87f6392afe
commit 6943d4e1a1
3 changed files with 30 additions and 23 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.30 2005/04/17 21:18:29 espie Exp $
# $OpenBSD: Makefile,v 1.31 2005/12/23 16:59:13 espie Exp $
COMMENT= "u-law to gsm encoding audio converter and library"
@ -6,6 +6,7 @@ DISTNAME= gsm-1.0.10
PKGNAME= ${DISTNAME}p0
CATEGORIES= audio
MASTER_SITES= ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/
SHARED_LIBS= gsm 1.0
# Missing redistribution terms in license
PERMIT_PACKAGE_CDROM= "no redistribution"
@ -14,7 +15,9 @@ PERMIT_DISTFILES_CDROM= "no redistribution"
PERMIT_DISTFILES_FTP= "no redistribution"
WANTLIB= c
MAKE_FLAGS= CC="${CC}" DEBUG="${CFLAGS}" LDINC='-L$$(LIB)'
MAKE_FLAGS= CC="${CC}" DEBUG="${CFLAGS}" LDINC='-L$$(LIB)' \
LIBgsm_VERSION=${LIBgsm_VERSION}
FAKE_FLAGS= ${MAKE_FLAGS} INSTALL_ROOT="${WRKINST}${PREFIX}"
WRKDIST= ${WRKDIR}/gsm-1.0-pl10

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
--- Makefile.orig Tue Jul 2 10:36:06 1996
+++ Makefile Sun Jul 29 15:24:46 2001
$OpenBSD: patch-Makefile,v 1.5 2005/12/23 16:59:13 espie Exp $
--- Makefile.orig Tue Jul 2 16:36:06 1996
+++ Makefile Thu Dec 22 13:46:49 2005
@@ -7,11 +7,13 @@
SASR = -DSASR
######### Define SASR if >> is a signed arithmetic shift (-1 >> 1 == -1)
@ -35,17 +35,18 @@ $OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
@@ -106,6 +108,9 @@ COMPRESS = compress
@@ -106,7 +108,10 @@ COMPRESS = compress
COMPRESSFLAGS =
# RANLIB = true
RANLIB = ranlib
+RM = rm -f
+
+PICFLAG = -fpic
+PICFLAG = -fpic
+
#
# You shouldn't have to configure below this line if you're porting.
@@ -136,11 +141,20 @@ CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(M
#
@@ -136,11 +141,21 @@ CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(M
LFLAGS = $(LDFLAGS) $(LDINC)
######### It's $(LD) $(LFLAGS)
@ -54,19 +55,20 @@ $OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
# Targets
LIBGSM = $(LIB)/libgsm.a
+LIBgsm_VERSION= 1.0
+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes"
+LIBGSMSO =
+INSTALLED_LIBGSMSO =
+.else
+LIBGSMSO = $(LIB)/libgsm.so.1.0
+INSTALLED_LIBGSMSO = $(GSM_INSTALL_LIB)/libgsm.so.1.0
+LIBGSMSO = $(LIB)/libgsm.so.${LIBgsm_VERSION}
+INSTALLED_LIBGSMSO = $(GSM_INSTALL_LIB)/libgsm.so.${LIBgsm_VERSION}
+.endif
+
TOAST = $(BIN)/toast
UNTOAST = $(BIN)/untoast
TCAT = $(BIN)/tcat
@@ -258,6 +272,7 @@ STUFF = ChangeLog \
@@ -258,6 +273,7 @@ STUFF = ChangeLog \
GSM_INSTALL_TARGETS = \
$(GSM_INSTALL_LIB)/libgsm.a \
@ -74,7 +76,7 @@ $OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
$(GSM_INSTALL_INC)/gsm.h \
$(GSM_INSTALL_MAN)/gsm.3 \
$(GSM_INSTALL_MAN)/gsm_explode.3 \
@@ -277,9 +292,12 @@ TOAST_INSTALL_TARGETS = \
@@ -277,9 +293,12 @@ TOAST_INSTALL_TARGETS = \
$(CC) $(CFLAGS) $?
@-mv `$(BASENAME) $@` $@ > /dev/null 2>&1
@ -88,7 +90,7 @@ $OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
@-echo $(ROOT): Done.
tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
@@ -299,8 +317,11 @@ install: toastinstall gsminstall
@@ -299,8 +318,11 @@ install: toastinstall gsminstall
# The basic API: libgsm
@ -101,7 +103,7 @@ $OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
$(RANLIB) $(LIBGSM)
@@ -308,14 +329,14 @@ $(LIBGSM): $(LIB) $(GSM_OBJECTS)
@@ -308,14 +330,14 @@ $(LIBGSM): $(LIB) $(GSM_OBJECTS)
# Toast, Untoast and Tcat -- the compress-like frontends to gsm.
$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
@ -119,7 +121,7 @@ $OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
$(LN) $(TOAST) $(TCAT)
@@ -342,61 +363,49 @@ toastinstall:
@@ -342,63 +364,51 @@ toastinstall:
gsmuninstall:
-if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
@ -193,13 +195,15 @@ $OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
- chmod 444 $@
+ ${BSD_INSTALL_DATA} $? $@
+ $(RANLIB) $@
+
+$(INSTALLED_LIBGSMSO): $(LIBGSMSO)
+ ${BSD_INSTALL_MAN} $? $@
+
# Distribution
@@ -416,16 +425,16 @@ uninstall: toastuninstall gsmuninstall
dist: gsm-1.0.tar.Z
@@ -416,16 +426,16 @@ uninstall: toastuninstall gsmuninstall
@-echo uninstall: Done.
semi-clean:
@ -219,7 +223,7 @@ $OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
$(TOAST) $(TCAT) $(UNTOAST) \
$(ROOT)/gsm-1.0.tar.Z
@@ -434,29 +443,29 @@ clean: semi-clean
@@ -434,29 +444,29 @@ clean: semi-clean
# but aren't generally needed to port this.
$(TLS)/sweet: $(TLS)/sweet.o $(TLS)/taste.o
@ -254,7 +258,7 @@ $OpenBSD: patch-Makefile,v 1.4 2001/07/29 19:29:48 brad Exp $
# Various conversion programs between linear, text, .gsm and the code
@@ -474,21 +483,21 @@ $(TST)/test-result: $(TST)/lin2cod $(TST
@@ -474,21 +484,21 @@ $(TST)/test-result: $(TST)/lin2cod $(TST
( cd $(TST); ./run )
$(TST)/lin2txt: $(TST)/lin2txt.o $(LIBGSM)

View File

@ -1,2 +1,2 @@
@comment $OpenBSD: PFRAG.shared,v 1.4 2004/08/06 14:37:27 espie Exp $
@lib lib/libgsm.so.1.0
@comment $OpenBSD: PFRAG.shared,v 1.5 2005/12/23 16:59:14 espie Exp $
@lib lib/libgsm.so.${LIBgsm_VERSION}