summaryrefslogtreecommitdiff
path: root/audio/ladspa
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-07-15 22:58:50 +0000
committernia <nia@pkgsrc.org>2019-07-15 22:58:50 +0000
commitfb20db7e84f65a3bc5e4b67bb4fa06ebba1a5052 (patch)
tree7b017239e6bb14e5cdd2e10bd003b5facb3e46d6 /audio/ladspa
parentc25b2339f8646ef3067eecc8fa82c05c8ad413fb (diff)
downloadpkgsrc-fb20db7e84f65a3bc5e4b67bb4fa06ebba1a5052.tar.gz
ladspa: various portability improvements from clément bouvier
* Add libtool support in install and build targets * Add libtool support to test target * Add endian.h header for macosx * Bump PKGREVISION closes PR pkg/54368
Diffstat (limited to 'audio/ladspa')
-rw-r--r--audio/ladspa/Makefile8
-rw-r--r--audio/ladspa/PLIST12
-rw-r--r--audio/ladspa/distinfo6
-rw-r--r--audio/ladspa/patches/patch-aa103
-rw-r--r--audio/ladspa/patches/patch-ab8
5 files changed, 92 insertions, 45 deletions
diff --git a/audio/ladspa/Makefile b/audio/ladspa/Makefile
index 484d27583d1..ecf638c2184 100644
--- a/audio/ladspa/Makefile
+++ b/audio/ladspa/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2017/11/16 15:05:31 khorben Exp $
+# $NetBSD: Makefile,v 1.15 2019/07/15 22:58:50 nia Exp $
DISTNAME= ladspa_sdk_1.13
PKGNAME= ${DISTNAME:S/_sdk_/-/}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://www.ladspa.org/download/
EXTRACT_SUFX= .tgz
@@ -12,6 +12,8 @@ HOMEPAGE= http://www.ladspa.org/
COMMENT= Linux Audio Developers Simple Plugin API
LICENSE= gnu-lgpl-v2.1
+USE_LIBTOOL= yes
+
WRKSRC= ${WRKDIR}/ladspa_sdk/src
USE_TOOLS+= gmake
USE_LANGUAGES= c c++
@@ -20,12 +22,10 @@ MAKE_FILE= makefile
BUILDLINK_LIBS.dl+= ${BUILDLINK_LDADD.dl}
-INSTALLATION_DIRS+= bin include lib
MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}
MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q}
-#XXX does not work (No rule to make target 'targets')
#do-test:
# cd ${WRKSRC} && && ${BUILD_MAKE_CMD} test
diff --git a/audio/ladspa/PLIST b/audio/ladspa/PLIST
index d111e71dcd0..6b335fc94d7 100644
--- a/audio/ladspa/PLIST
+++ b/audio/ladspa/PLIST
@@ -1,10 +1,10 @@
-@comment $NetBSD: PLIST,v 1.2 2009/06/14 17:32:12 joerg Exp $
+@comment $NetBSD: PLIST,v 1.3 2019/07/15 22:58:50 nia Exp $
bin/analyseplugin
bin/applyplugin
bin/listplugins
include/ladspa.h
-lib/ladspa/amp.so
-lib/ladspa/delay.so
-lib/ladspa/filter.so
-lib/ladspa/noise.so
-lib/ladspa/sine.so
+lib/ladspa/amp.la
+lib/ladspa/delay.la
+lib/ladspa/filter.la
+lib/ladspa/noise.la
+lib/ladspa/sine.la
diff --git a/audio/ladspa/distinfo b/audio/ladspa/distinfo
index 0d1b13e0075..a9b0f9c0687 100644
--- a/audio/ladspa/distinfo
+++ b/audio/ladspa/distinfo
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.13 2017/11/25 11:57:28 kamil Exp $
+$NetBSD: distinfo,v 1.14 2019/07/15 22:58:50 nia Exp $
SHA1 (ladspa_sdk_1.13.tgz) = 2b69e28afb62c0d97943124f48ed82de796f83ed
RMD160 (ladspa_sdk_1.13.tgz) = e9eeae8edd24a6890fac3e34c4b55f844f44f8a0
SHA512 (ladspa_sdk_1.13.tgz) = a1dab807fda58e08869d3f519be5fa91c394690eb13006fbe7f20b332548e4676b32b01273f5695bf36c8da72190c07618662a76d50f991b3f05068ac2b346ef
Size (ladspa_sdk_1.13.tgz) = 70540 bytes
-SHA1 (patch-aa) = 80983955586f314e5e759516ae2c84d0933f1a0b
-SHA1 (patch-ab) = 1ad33baf6dcc4633e1459b6585cc8ccada57831f
+SHA1 (patch-aa) = 32adf919fe4194e5cc747a27f12047d6b8c66d00
+SHA1 (patch-ab) = 1357f25ef53c24c737a4888ba7d01fb724a3f315
SHA1 (patch-ac) = 40108e5e4fdba9b2be322d0de532a97322d22325
SHA1 (patch-plugins_amp.c) = e0336ff7fe078aa6b4e6b3d25b21b70ac6dc127d
SHA1 (patch-plugins_delay.c) = ee551be35938b69d7b535640858d67ceeb261ee0
diff --git a/audio/ladspa/patches/patch-aa b/audio/ladspa/patches/patch-aa
index 1b0962cf7db..7c534ae27f9 100644
--- a/audio/ladspa/patches/patch-aa
+++ b/audio/ladspa/patches/patch-aa
@@ -1,8 +1,10 @@
-$NetBSD: patch-aa,v 1.7 2017/11/25 11:57:28 kamil Exp $
+$NetBSD: patch-aa,v 1.8 2019/07/15 22:58:50 nia Exp $
* Fix the destination directories
* Use cc(1) to link the plug-ins
* Add support for CFLAGS and LDFLAGS
+* Add libtool support in install and build targets
+* Add libtool support to test target
--- makefile.orig 2007-11-06 10:42:45.000000000 +0000
+++ makefile
@@ -50,19 +52,29 @@ $NetBSD: patch-aa,v 1.7 2017/11/25 11:57:28 kamil Exp $
../plugins/%.so: plugins/%.c ladspa.h
- $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
- $(LD) -o ../plugins/$*.so plugins/$*.o -shared
-+ $(CC) $(LOCAL_CPPFLAGS) $(LOCAL_CFLAGS) -o plugins/$*.o -c plugins/$*.c
-+ $(CC) -shared $(LOCAL_LDFLAGS) -o ../plugins/$*.so plugins/$*.o
++ ${LIBTOOL} --tag=CC --mode=compile $(CC) $(LOCAL_CPPFLAGS) $(LOCAL_CFLAGS) -o plugins/$*.lo -c plugins/$*.c
++ ${LIBTOOL} --tag=CC --mode=link $(CC) $(LOCAL_LDFLAGS) -o ../plugins/$*.la plugins/$*.lo -rpath $(INSTALL_PLUGINS_DIR) -module -avoid-version
../plugins/%.so: plugins/%.cpp ladspa.h
- $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
- $(CPP) -o ../plugins/$*.so plugins/$*.o -shared
-+ $(CXX) $(LOCAL_CPPFLAGS) $(LOCAL_CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
-+ $(CXX) -shared $(LOCAL_LDFLAGS) -o ../plugins/$*.so plugins/$*.o
++ ${LIBTOOL} --tag=CXX --mode=compile $(CXX) $(LOCAL_CPPFLAGS) $(LOCAL_CXXFLAGS) -o plugins/$*.lo -c plugins/$*.cpp
++ ${LIBTOOL} --tag=CXX --mode=link $(CXX) $(LOCAL_LDFLAGS) -o ../plugins/$*.la plugins/$*.lo -rpath $(INSTALL_PLUGINS_DIR) -module -avoid-version
###############################################################################
#
-@@ -58,13 +59,13 @@ test: /tmp/test.wav ../snd/noise.wav alw
- -sndfile-play /tmp/test.wav
+@@ -50,39 +51,39 @@ test: /tmp/test.wav ../snd/noise.wav alw
+ @echo ---------------------------------------------
+ @echo First listen to the white noise input signal:
+ @echo ---------------------------------------------
+- -sndfile-play ../snd/noise.wav
++ #-sndfile-play ../snd/noise.wav
+ @echo -------------------------
+ @echo Compare to plugin output.
+ @echo -------------------------
+ @echo Should be a noise band around 6000Hz, repeated quietly after 1s.
+- -sndfile-play /tmp/test.wav
++ #-sndfile-play /tmp/test.wav
@echo Test complete.
-install: targets
@@ -72,48 +84,79 @@ $NetBSD: patch-aa,v 1.7 2017/11/25 11:57:28 kamil Exp $
- cp ../plugins/* $(INSTALL_PLUGINS_DIR)
- cp ladspa.h $(INSTALL_INCLUDE_DIR)
- cp ../bin/* $(INSTALL_BINARY_DIR)
+-
+-/tmp/test.wav: targets ../snd/noise.wav
+- ../bin/listplugins
+- ../bin/analyseplugin ../plugins/filter.so
+- ../bin/analyseplugin ../plugins/delay.so
+- ../bin/analyseplugin ../plugins/sine.so
+- echo ; ../bin/analyseplugin -l ../plugins/sine.so ; echo
+- ../bin/analyseplugin ../plugins/amp.so
+- ../bin/analyseplugin ../plugins/noise.so
+- ../bin/applyplugin -s 1 \
+- ../snd/noise.wav /tmp/test.wav \
+- ../plugins/filter.so lpf 500 \
+- ../plugins/filter.so lpf 500 \
+- ../plugins/sine.so sine_fcaa 6000 \
+- ../plugins/delay.so delay_5s 1 0.1 \
+- ../plugins/amp.so amp_mono 4 \
+install:
+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALL_PLUGINS_DIR)
+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALL_INCLUDE_DIR)
+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALL_BINARY_DIR)
-+ $(BSD_INSTALL_DATA) ../plugins/* ${DESTDIR}$(INSTALL_PLUGINS_DIR)
-+ $(BSD_INSTALL_DATA) ladspa.h ${DESTDIR}$(INSTALL_INCLUDE_DIR)
-+ $(BSD_INSTALL_PROGRAM) ../bin/* ${DESTDIR}$(INSTALL_BINARY_DIR)
-
- /tmp/test.wav: targets ../snd/noise.wav
- ../bin/listplugins
-@@ -82,7 +83,7 @@ install: targets
- ../plugins/delay.so delay_5s 1 0.1 \
- ../plugins/amp.so amp_mono 4 \
++ ${LIBTOOL} --mode=install $(BSD_INSTALL_LIB) ../plugins/*.la ${DESTDIR}$(INSTALL_PLUGINS_DIR)
++ ${LIBTOOL} --mode=install $(BSD_INSTALL_DATA) ladspa.h ${DESTDIR}$(INSTALL_INCLUDE_DIR)
++ ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) ../bin/* ${DESTDIR}$(INSTALL_BINARY_DIR)
++
++/tmp/test.wav: ../snd/noise.wav
++ ${LIBTOOL} --mode=execute ../bin/listplugins
++ ${LIBTOOL} --mode=execute -dlopen ../plugins/filter.la ../bin/analyseplugin ../plugins/filter.so
++ ${LIBTOOL} --mode=execute -dlopen ../plugins/delay.la ../bin/analyseplugin ../plugins/delay.so
++ ${LIBTOOL} --mode=execute -dlopen ../plugins/sine.la ../bin/analyseplugin ../plugins/sine.so
++ echo ; ${LIBTOOL} --mode=execute -dlopen -dlopen ../plugins/sine.la ../bin/analyseplugin -l ../plugins/sine.so ; echo
++ ${LIBTOOL} --mode=execute -dlopen ../plugins/amp.la ../bin/analyseplugin ../plugins/amp.so
++ ${LIBTOOL} --mode=execute -dlopen ../plugins/noise.la../bin/analyseplugin ../plugins/noise.so
++ ${LIBTOOL} --mode=execute -dlopen ../plugins/filter.la ../bin/applyplugin -s 1 \
++ ../snd/noise.wav /tmp/test.wav \
++ ../plugins/filter.so lpf 500 \
++ ../plugins/filter.so lpf 500 \
++ ../plugins/sine.so sine_fcaa 6000 \
++ ../plugins/delay.so delay_5s 1 0.1 \
++ ../plugins/amp.so amp_mono 4 \
-targets: $(PLUGINS) $(PROGRAMS)
+all: $(PLUGINS) $(PROGRAMS)
###############################################################################
#
-@@ -90,17 +91,17 @@ targets: $(PLUGINS) $(PROGRAMS)
+@@ -90,19 +91,21 @@ targets: $(PLUGINS) $(PROGRAMS)
#
../bin/applyplugin: applyplugin.o load.o default.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
-+ $(CC) $(LOCAL_LDFLAGS) $(LIBRARIES) \
- -o ../bin/applyplugin \
- applyplugin.o load.o default.o
+- -o ../bin/applyplugin \
+- applyplugin.o load.o default.o
++ ${LIBTOOL} --tag=CC --mode=compile $(CC) -c applyplugin.c
++ ${LIBTOOL} --tag=CC --mode=compile $(CC) -c load.c
++ ${LIBTOOL} --tag=CC --mode=compile $(CC) -c default.c
++ ${LIBTOOL} --tag=CC --mode=link $(CC) $(LOCAL_LDFLAGS) -o $@ $(^:.o=.lo) $(LIBRARIES) \
../bin/analyseplugin: analyseplugin.o load.o default.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
-+ $(CC) $(LOCAL_LDFLAGS) $(LIBRARIES) \
- -o ../bin/analyseplugin \
- analyseplugin.o load.o default.o
+- -o ../bin/analyseplugin \
+- analyseplugin.o load.o default.o
++ ${LIBTOOL} --tag=CC --mode=compile $(CC) -c analyseplugin.c
++ ${LIBTOOL} --tag=CC --mode=compile $(CC) -c load.c
++ ${LIBTOOL} --tag=CC --mode=compile $(CC) -c default.c
++ ${LIBTOOL} --tag=CC --mode=link $(CC) $(LOCAL_LDFLAGS) -o $@ $(^:.o=.lo) $(LIBRARIES)
../bin/listplugins: listplugins.o search.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
-+ $(CC) $(LOCAL_LDFLAGS) $(LIBRARIES) \
- -o ../bin/listplugins \
- listplugins.o search.o
-
-@@ -123,4 +124,3 @@ backup: clean
- tar czf `date '+../backup/ladspa_sdk.%Y%m%d%H%M.tgz'` ladspa_sdk/)
+- -o ../bin/listplugins \
+- listplugins.o search.o
++ ${LIBTOOL} --tag=CC --mode=compile $(CC) -c listplugins.c
++ ${LIBTOOL} --tag=CC --mode=compile $(CC) -c search.c
++ ${LIBTOOL} --tag=CC --mode=link $(CC) $(LOCAL_LDFLAGS) -o $@ $(^:.o=.lo) $(LIBRARIES)
###############################################################################
--
+ #
diff --git a/audio/ladspa/patches/patch-ab b/audio/ladspa/patches/patch-ab
index e9c54897a43..fa5ee15a49a 100644
--- a/audio/ladspa/patches/patch-ab
+++ b/audio/ladspa/patches/patch-ab
@@ -1,8 +1,10 @@
-$NetBSD: patch-ab,v 1.4 2012/01/11 18:05:09 hans Exp $
+$NetBSD: patch-ab,v 1.5 2019/07/15 22:58:50 nia Exp $
+
+Add endian.h header for macosx
--- applyplugin.c.orig 2007-11-06 10:52:56.000000000 +0000
+++ applyplugin.c
-@@ -6,7 +6,17 @@
+@@ -6,7 +6,19 @@
/*****************************************************************************/
#include <dlfcn.h>
@@ -15,6 +17,8 @@ $NetBSD: patch-ab,v 1.4 2012/01/11 18:05:09 hans Exp $
+# define LITTLE_ENDIAN 1234
+# define BYTE_ORDER LITTLE_ENDIAN
+# endif
++#elif defined(__APPLE__)
++# include <machine/endian.h>
+#else
+# include <sys/endian.h>
+#endif