aboutsummaryrefslogtreecommitdiffstats
path: root/audio/portaudio
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2004-03-16 07:54:11 +0800
committerkris <kris@FreeBSD.org>2004-03-16 07:54:11 +0800
commit231d3b486644891cf9b0e4700478ff5644f2117c (patch)
tree38dc1eec00541c1caf364755e2b054014a52430b /audio/portaudio
parent5db8473ba46aeab9e473e6392b3f69867dfe6301 (diff)
downloadfreebsd-ports-gnome-231d3b486644891cf9b0e4700478ff5644f2117c.tar.gz
freebsd-ports-gnome-231d3b486644891cf9b0e4700478ff5644f2117c.tar.zst
freebsd-ports-gnome-231d3b486644891cf9b0e4700478ff5644f2117c.zip
Better fix for amd64 (don't pessimize lib.a by compiling objects with -fPIC)
Diffstat (limited to 'audio/portaudio')
-rw-r--r--audio/portaudio/Makefile4
-rw-r--r--audio/portaudio/files/patch-Makefile.in48
-rw-r--r--audio/portaudio/files/patch-configure18
3 files changed, 66 insertions, 4 deletions
diff --git a/audio/portaudio/Makefile b/audio/portaudio/Makefile
index 8467619ed81c..3e0189f4e6b3 100644
--- a/audio/portaudio/Makefile
+++ b/audio/portaudio/Makefile
@@ -25,10 +25,6 @@ NO_FILTER_SHLIBS=yes
PLIST_SUB+= SHLIB_VERSION=${SHLIB_VERSION}
SHLIB_VERSION= 0
-.if ${MACHINE_ARCH:L} == amd64
-CFLAGS+= -fPIC
-.endif
-
pre-everything::
.if !defined(WITH_PATESTS)
@${ECHO_MSG}
diff --git a/audio/portaudio/files/patch-Makefile.in b/audio/portaudio/files/patch-Makefile.in
new file mode 100644
index 000000000000..b0d24b715502
--- /dev/null
+++ b/audio/portaudio/files/patch-Makefile.in
@@ -0,0 +1,48 @@
+--- Makefile.in.orig Mon Mar 15 15:51:08 2004
++++ Makefile.in Mon Mar 15 15:51:59 2004
+@@ -15,6 +15,7 @@
+ DLL_LIBS = @DLL_LIBS@
+
+ OTHER_OBJS = @OTHER_OBJS@
++OTHER_SHOBJS = @OTHER_SHOBJS@
+
+ PALIB = libportaudio.a
+ PADLL = @PADLL@
+@@ -25,6 +26,10 @@
+ pa_common/pa_convert.o \
+ pa_common/pa_lib.o
+
++COMMON_SHOBJS = \
++ pa_common/pa_convert.So \
++ pa_common/pa_lib.So
++
+ TESTS = \
+ bin/patest_buffer \
+ bin/patest_clip \
+@@ -50,8 +55,15 @@
+ bin/patest_underflow \
+ bin/patest_wire
+
++.SUFFIXES: .o .So
++
++.c.So:
++ $(CC) $(CFLAGS) -fPIC -o $*.So -c $?
++
+ OBJS = $(COMMON_OBJS) $(OTHER_OBJS)
+
++SHOBJS = $(COMMON_SHOBJS) $(OTHER_SHOBJS)
++
+ all: lib/$(PALIB) lib/$(PADLLV) tests
+
+ tests: bin/ $(TESTS)
+@@ -60,8 +72,8 @@
+ $(AR) ruv lib/$(PALIB) $(OBJS)
+ $(RANLIB) lib/$(PALIB)
+
+-lib/$(PADLLV): lib/ $(OBJS) Makefile $(PAINC)
+- $(CC) $(SHARED_FLAGS) -o lib/$(PADLLV) $(OBJS) $(DLL_LIBS)
++lib/$(PADLLV): lib/ $(SHOBJS) Makefile $(PAINC)
++ $(CC) $(SHARED_FLAGS) -o lib/$(PADLLV) $(SHOBJS) $(DLL_LIBS)
+
+ $(TESTS): bin/%: lib/$(PALIB) Makefile $(PAINC) pa_tests/%.c
+ $(CC) -o $@ $(CFLAGS) pa_tests/$*.c lib/$(PALIB) $(LIBS)
diff --git a/audio/portaudio/files/patch-configure b/audio/portaudio/files/patch-configure
new file mode 100644
index 000000000000..25233c71a03e
--- /dev/null
+++ b/audio/portaudio/files/patch-configure
@@ -0,0 +1,18 @@
+--- configure.orig Mon Mar 15 15:52:38 2004
++++ configure Mon Mar 15 15:53:00 2004
+@@ -1972,6 +1972,7 @@
+ fi
+
+ OTHER_OBJS="pa_unix_oss/pa_unix_oss.o pa_unix_oss/pa_unix.o";
++ OTHER_SHOBJS="pa_unix_oss/pa_unix_oss.So pa_unix_oss/pa_unix.So";
+ LIBS="-lm -lpthread";
+ PADLL="libportaudio.so";
+ SHARED_FLAGS="-shared";
+@@ -2404,6 +2405,7 @@
+ s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+ s,@AR@,$AR,;t t
+ s,@OTHER_OBJS@,$OTHER_OBJS,;t t
++s,@OTHER_SHOBJS@,$OTHER_SHOBJS,;t t
+ s,@PADLL@,$PADLL,;t t
+ s,@SHARED_FLAGS@,$SHARED_FLAGS,;t t
+ s,@DLL_LIBS@,$DLL_LIBS,;t t