Fix build of devrplay.so on Linux.

1) define _GNU_SOURCE before including any system headers
2) libtoolize the buildling of devrplay.so
3) Add PLIST.Linux with devrplay.la in it.
This commit is contained in:
sbd 2012-02-06 02:40:29 +00:00
parent 34bdb2acef
commit 62c7214501
4 changed files with 63 additions and 1 deletions

2
audio/rplay/PLIST.Linux Normal file
View file

@ -0,0 +1,2 @@
@comment $NetBSD: PLIST.Linux,v 1.1 2012/02/06 02:40:29 sbd Exp $
lib/devrplay.la

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.15 2009/10/06 17:27:51 joerg Exp $
$NetBSD: distinfo,v 1.16 2012/02/06 02:40:29 sbd Exp $
SHA1 (rplay-3.3.2.tar.gz) = 80b8001998a6f9837773f26285afffd609df2662
RMD160 (rplay-3.3.2.tar.gz) = e5c740eade2cc770ea78c8f53020fa6d78f59861
@ -34,3 +34,5 @@ SHA1 (patch-bc) = ea0d5d00cf71263f6f6cf2e54a8dd8b730aba8e8
SHA1 (patch-ca) = d5ffe7a8e0f2112adf0d11b5661d565e5a57dec8
SHA1 (patch-cb) = 24c810e43d6735c24908ba429ede32a49cff36e8
SHA1 (patch-cc) = 824d7c70282d24e489c7c041982018da13ac70ce
SHA1 (patch-devrplay_Makefile.in) = 0e158606fefa128cfcd798cd7919fe589ba04144
SHA1 (patch-devrplay_devrplay.c) = b9a5434a8060347217e5a683cfc84d9bf73d9572

View file

@ -0,0 +1,45 @@
$NetBSD: patch-devrplay_Makefile.in,v 1.1 2012/02/06 02:40:29 sbd Exp $
--- devrplay/Makefile.in.orig 1999-03-23 02:36:30.000000000 +0000
+++ devrplay/Makefile.in
@@ -10,29 +10,30 @@ MKINSTALLDIRS= @srcdir@/../mkinstalldirs
CPPFLAGS= $(CC_OPTIONS) -fPIC -I. -I../include -I@srcdir@/../include @DEFS@
-.c.o:
- $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+.SUFFIXES: .lo
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -shared -c $(CPPFLAGS) $(CFLAGS) $<
-LDFLAGS= $(LD_OPTIONS) -shared @LDFLAGS@ @LIBS@ -L../librplay -lrplay -ldl
+LDFLAGS= $(LD_OPTIONS) @LDFLAGS@ @LIBS@ -L../librplay -lrplay -ldl -rpath $(libdir)
-TARGET= devrplay.so
+TARGET= devrplay.la
SRCS= devrplay.c
-OBJS= devrplay.o
+OBJS= devrplay.lo
all: $(TARGET)
#$(TARGET): $(OBJS) ../librplay/librplay.so
# $(CC) -o $@ $(OBJS) ../librplay/rplay.lo ../librplay/rptp.lo $(LDFLAGS)
-$(TARGET): $(OBJS) ../librplay/librplay.so
- $(CC) -o $@ $(OBJS) $(LDFLAGS)
+$(TARGET): $(OBJS) ../librplay/librplay.la
+ $(LIBTOOL) --mode=link $(CC) -module -shared -avoid-version -o $@ $(OBJS) $(LDFLAGS)
-../librplay/librplay.so:
- (cd ../librplay; $(MAKE) $(MFLAGS) librplay.so)
+../librplay/librplay.la:
+ (cd ../librplay; $(MAKE) $(MFLAGS) librplay.la)
install: all
$(MKINSTALLDIRS) $(libdir)
- $(INSTALL_DATA) $(TARGET) $(libdir)
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(TARGET) $(libdir)
uninstall:
$(RM) $(libdir)/$(TARGET)

View file

@ -0,0 +1,13 @@
$NetBSD: patch-devrplay_devrplay.c,v 1.1 2012/02/06 02:40:29 sbd Exp $
--- devrplay/devrplay.c.orig 1999-03-21 00:44:48.000000000 +0000
+++ devrplay/devrplay.c
@@ -26,6 +26,8 @@
* Copyright (C) 1998, 1999 Manish Singh <yosh@gimp.org>
*/
+#define _GNU_SOURCE 1
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif