pkgsrc/audio/cdparanoia/patches/patch-ca
drochner c7f222233b some fixes and cleanup:
-replace a struct member name "private" in a public header, it is
 reserved in C+, fixes build problems reported by joerg and wiz
-link against librt on Linux (needed for clock_gettime()), should
 fix build problem reported by dsainty
-don't even compile cooked_interface.c on NetBSD, and g/c patches
 which added NetBSD support code which was never used
bump PKGREVISION
2009-08-14 15:51:05 +00:00

63 lines
2 KiB
Text

$NetBSD: patch-ca,v 1.9 2009/08/14 15:51:06 drochner Exp $
--- interface/Makefile.in.orig 2008-08-21 18:08:54.000000000 +0200
+++ interface/Makefile.in
@@ -15,15 +15,13 @@ LD=@CC@
LDFLAGS=@LDFLAGS@ $(FLAGS)
AR=@AR@
RANLIB=@RANLIB@
-LIBS = -lm -lrt
+LIBS = -lm @EXTRA_LIBS@
CPPFLAGS+=-D_REENTRANT
-OFILES = scan_devices.o common_interface.o cooked_interface.o interface.o\
- scsi_interface.o smallft.o toc.o test_interface.o
+OFILES = scan_devices.o common_interface.o interface.o\
+ smallft.o toc.o test_interface.o @EXTRA_OBJS@
-export VERSION
-
-all: lib slib
+all: slib
debug:
$(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
@@ -32,26 +30,24 @@ lib:
$(MAKE) libcdda_interface.a CFLAGS="$(OPT)"
slib:
- $(MAKE) lessmessy
- $(MAKE) libcdda_interface.so CFLAGS="$(OPT) -fpic"
- [ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so libcdda_interface.so.0
+ $(MAKE) libcdda_interface.la VERSION=$(VERSION) CFLAGS="$(OPT)"
-test:
+test:
+ $(MAKE) lessmessy
$(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
$(CC) $(DEBUG) -c test.c
- $(LD) $(DEBUG) test.o $(LDFLAGS) -o cdda_test $(LIBS) libcdda_interface.a
+ $(LIBTOOL) --mode=link $(LD) $(DEBUG) test.o $(LDFLAGS) -o cdda_test $(LIBS) libcdda_interface.la
+
+libcdda_interface.la: $(OFILES)
+ $(LIBTOOL) --mode=link $(CC) -o libcdda_interface.la $(OFILES:.o=.lo) \
+ -version-info 1:0 -rpath $(PREFIX)/lib $(LDFLAGS) $(LIBS)
+
+libcdda_interface.a: libcdda_interface.la
-libcdda_interface.a: $(OFILES)
- $(AR) -r libcdda_interface.a $(OFILES)
- $(RANLIB) libcdda_interface.a
-
-libcdda_interface.so: $(OFILES)
- $(CC) -fpic -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(OFILES) $(LIBS)
- [ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so.0
- [ -e libcdda_interface.so ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so
+libcdda_interface.so: libcdda_interface.la
.c.o:
- $(CC) $(CFLAGS) -c $<
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
lessmessy:
-rm -f *.o core *~ *.out