pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/54368: audio/ladsap: install error with relative library path and fails to build on macosx



The following reply was made to PR pkg/54368; it has been noted by GNATS.

From: =?utf-8?Q?cl=C3=A9ment_bouvier?= <clement.bouvier.europe%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/54368: audio/ladsap: install error with relative library path
 and fails to build on macosx
Date: Mon, 15 Jul 2019 20:23:00 +0400

 --Apple-Mail=_8E1209A0-A1F0-4559-A5D7-83DFC54EFA4E
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=utf-8
 
 Hi!
 
 I did wrongly write my email address so=E2=80=A6.
 I also have a better patch than previous one:
 * comments in the patch files
 * remove the comment about do-test because the cause was a previous =
 patch which changed the "targets" into "all"
 * remove targets as prerequisite of test "target"
 * add tag Libtool flags
 * "test" target is based on Libtool. Now the test target works
 * comment "sndfile-play" in the test target.
 * increment PKGREVISION
 
 The "do-test" works on macosx, probably on other platforms too.
 
 Cl=C3=A9ment.
 
 
 --Apple-Mail=_8E1209A0-A1F0-4559-A5D7-83DFC54EFA4E
 Content-Disposition: attachment;
 	filename=ladspa.patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="ladspa.patch"
 Content-Transfer-Encoding: 7bit
 
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/audio/ladspa/Makefile,v
 retrieving revision 1.14
 diff -u -r1.14 Makefile
 --- Makefile	16 Nov 2017 15:05:31 -0000	1.14
 +++ Makefile	15 Jul 2019 16:15:19 -0000
 @@ -2,7 +2,7 @@
  
  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 @@
  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 @@
  
  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
  
 Index: PLIST
 ===================================================================
 RCS file: /cvsroot/pkgsrc/audio/ladspa/PLIST,v
 retrieving revision 1.2
 diff -u -r1.2 PLIST
 --- PLIST	14 Jun 2009 17:32:12 -0000	1.2
 +++ PLIST	15 Jul 2019 16:15:19 -0000
 @@ -3,8 +3,8 @@
  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
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/audio/ladspa/distinfo,v
 retrieving revision 1.13
 diff -u -r1.13 distinfo
 --- distinfo	25 Nov 2017 11:57:28 -0000	1.13
 +++ distinfo	15 Jul 2019 16:15:19 -0000
 @@ -4,8 +4,8 @@
  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
 Index: patches/patch-aa
 ===================================================================
 RCS file: /cvsroot/pkgsrc/audio/ladspa/patches/patch-aa,v
 retrieving revision 1.7
 diff -u -r1.7 patch-aa
 --- patches/patch-aa	25 Nov 2017 11:57:28 -0000	1.7
 +++ patches/patch-aa	15 Jul 2019 16:15:19 -0000
 @@ -3,6 +3,8 @@
  * 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 @@
   ../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 @@
  -	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)
   
   ###############################################################################
 --
 + #
 Index: patches/patch-ab
 ===================================================================
 RCS file: /cvsroot/pkgsrc/audio/ladspa/patches/patch-ab,v
 retrieving revision 1.4
 diff -u -r1.4 patch-ab
 --- patches/patch-ab	11 Jan 2012 18:05:09 -0000	1.4
 +++ patches/patch-ab	15 Jul 2019 16:15:19 -0000
 @@ -1,8 +1,10 @@
  $NetBSD: patch-ab,v 1.4 2012/01/11 18:05:09 hans 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 @@
  +#  define LITTLE_ENDIAN 1234
  +#  define BYTE_ORDER LITTLE_ENDIAN
  +# endif
 ++#elif defined(__APPLE__)
 ++# include <machine/endian.h>
  +#else
  +# include <sys/endian.h>
  +#endif
 
 --Apple-Mail=_8E1209A0-A1F0-4559-A5D7-83DFC54EFA4E--
 


Home | Main Index | Thread Index | Old Index