summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-09-21 08:16:41 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-09-21 08:16:41 +0200
commitd1ac33007194d529a298f9d565cfaa69f7991f3d (patch)
tree76f10f7774d072b633f26bba92f058bdbc5e64ef /media-libs/ladspa-sdk
parentdev-util/cucumber-messages: add 17.1.1 (diff)
downloadgentoo-d1ac33007194d529a298f9d565cfaa69f7991f3d.tar.gz
gentoo-d1ac33007194d529a298f9d565cfaa69f7991f3d.tar.bz2
gentoo-d1ac33007194d529a298f9d565cfaa69f7991f3d.zip
media-libs/ladspa-sdk: bump to 1.17, cleanup and update
Package-Manager: Portage-3.0.23, Repoman-3.0.3 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'media-libs/ladspa-sdk')
-rw-r--r--media-libs/ladspa-sdk/Manifest1
-rw-r--r--media-libs/ladspa-sdk/files/ladspa-sdk-1.17-properbuild.patch116
-rw-r--r--media-libs/ladspa-sdk/ladspa-sdk-1.17.ebuild68
3 files changed, 185 insertions, 0 deletions
diff --git a/media-libs/ladspa-sdk/Manifest b/media-libs/ladspa-sdk/Manifest
index 424164eb62a2..94d76bad5d71 100644
--- a/media-libs/ladspa-sdk/Manifest
+++ b/media-libs/ladspa-sdk/Manifest
@@ -1 +1,2 @@
DIST ladspa_sdk_1.15.tgz 71179 BLAKE2B 7a201fd968433241fda190874d51b835f425c8f35270dc8fac9acf4e9e1546fa20d48f85e894b9eb263dd5d84c2b407481d168e18256dfe2cdd026fe0c805a65 SHA512 a521622e23d988284244003e4ccfc3b42f6ddc7944cb00e7949b87e09d7f39a0cbb64b6d8b5a5af0a5ccf7179f88815416a88f02d3912957167e54b74accfc65
+DIST ladspa_sdk_1.17.tgz 71052 BLAKE2B cfb80e8ced314d5cc62fcb7f0b82e58f572503f2a732b2bb8a58343e8f69e417c0b0a2919bbb40629567fb331bf60a7f0c6f186db47e5b2651725b039526cdbb SHA512 37f94aa52b5a2f8709528989dea289eb01342f3bcb9e85d0f4829ddd9d90b2934a113db11100f09375a50f6612122b78156fec916f2c78a22406253d5cb394c7
diff --git a/media-libs/ladspa-sdk/files/ladspa-sdk-1.17-properbuild.patch b/media-libs/ladspa-sdk/files/ladspa-sdk-1.17-properbuild.patch
new file mode 100644
index 000000000000..341970939290
--- /dev/null
+++ b/media-libs/ladspa-sdk/files/ladspa-sdk-1.17-properbuild.patch
@@ -0,0 +1,116 @@
+diff --git a/src/Makefile b/src/Makefile
+index 774930a..765f66e 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -14,11 +14,10 @@ INSTALL_BINARY_DIR = /usr/bin/
+ #
+
+ INCLUDES = -I.
+-LIBRARIES = -ldl -lm -lsndfile
+-CFLAGS = $(INCLUDES) -Wall -Werror -O2 -fPIC \
+- -DDEFAULT_LADSPA_PATH=$(INSTALL_PLUGINS_DIR)
+-BINFLAGS = -fPIE -pie
+-CXXFLAGS = $(CFLAGS)
++DYNAMIC_LD_LIBS = -ldl
++LIBRARIES = $(DYNAMIC_LD_LIBS) -lm -lsndfile
++CFLAGS = -Wall -Werror -O3
++CXXFLAGS = -Wall -Werror -O3
+ PLUGINS = ../plugins/amp.so \
+ ../plugins/delay.so \
+ ../plugins/filter.so \
+@@ -28,34 +27,25 @@ PROGRAMS = ../bin/analyseplugin \
+ ../bin/applyplugin \
+ ../bin/listplugins
+ CC = cc
+-CPP = c++
++CXX = c++
++MKDIR_P = mkdirhier
+
+ ###############################################################################
+ #
+ # RULES TO BUILD PLUGINS FROM C OR C++ CODE
+ #
+
++../plugins/filter.so: plugins/filter.c ladspa.h gcc_exports.map
++ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -o plugins/filter.o -c plugins/filter.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o ../plugins/filter.so plugins/filter.o -nostartfiles -shared -lm
++
+ ../plugins/%.so: plugins/%.c ladspa.h gcc_exports.map
+- $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
+- $(CC) -o ../plugins/$*.so \
+- plugins/$*.o \
+- -shared \
+- $(CFLAGS) \
+- -fvisibility=hidden \
+- -fvisibility-inlines-hidden \
+- -s \
+- -Wl,--version-script=gcc_exports.map
++ $(CC) $(CFLAGS) $(INCLUDES) -fPIC -o plugins/$*.o -c plugins/$*.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o -nostartfiles -shared
+
+ ../plugins/%.so: plugins/%.cpp ladspa.h gcc_exports.map
+- $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
+- $(CPP) -o ../plugins/$*.so \
+- plugins/$*.o \
+- -shared \
+- $(CXXFLAGS) \
+- -fvisibility=hidden \
+- -fvisibility-inlines-hidden \
+- -s \
+- -Wl,--version-script=gcc_exports.map
++ $(CXX) $(CXXFLAGS) $(INCLUDES) -fPIC -o plugins/$*.o -c plugins/$*.cpp
++ $(CXX) $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
+
+ ###############################################################################
+ #
+@@ -66,7 +56,7 @@ test: /tmp/test.wav ../snd/noise.wav always
+ @echo ---------------------------------------------
+ @echo First listen to the white noise input signal:
+ @echo ---------------------------------------------
+- -sndfile-play ../snd/noise.wav
++ @echo -sndfile-play ../snd/noise.wav
+ @echo -------------------------
+ @echo Compare to plugin output.
+ @echo -------------------------
+@@ -75,12 +65,12 @@ test: /tmp/test.wav ../snd/noise.wav always
+ @echo Test complete.
+
+ install: targets
+- -mkdir -p $(INSTALL_PLUGINS_DIR)
+- -mkdir -p $(INSTALL_INCLUDE_DIR)
+- -mkdir -p $(INSTALL_BINARY_DIR)
+- cp ../plugins/* $(INSTALL_PLUGINS_DIR)
+- cp ladspa.h $(INSTALL_INCLUDE_DIR)
+- cp ../bin/* $(INSTALL_BINARY_DIR)
++ -$(MKDIR_P) $(DESTDIR)$(INSTALL_PLUGINS_DIR)
++ -$(MKDIR_P) $(DESTDIR)$(INSTALL_INCLUDE_DIR)
++ -$(MKDIR_P) $(DESTDIR)$(INSTALL_BINARY_DIR)
++ cp ../plugins/* $(DESTDIR)$(INSTALL_PLUGINS_DIR)
++ cp ladspa.h $(DESTDIR)$(INSTALL_INCLUDE_DIR)
++ cp ../bin/* $(DESTDIR)$(INSTALL_BINARY_DIR)
+
+ /tmp/test.wav: targets ../snd/noise.wav
+ ../bin/listplugins
+@@ -106,19 +96,19 @@ targets: $(PLUGINS) $(PROGRAMS)
+ #
+
+ ../bin/applyplugin: applyplugin.o load.o default.o
+- $(CC) $(CFLAGS) $(BINFLAGS) \
++ $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) \
+ -o ../bin/applyplugin \
+ applyplugin.o load.o default.o \
+ $(LIBRARIES)
+
+ ../bin/analyseplugin: analyseplugin.o load.o default.o
+- $(CC) $(CFLAGS) $(BINFLAGS) \
++ $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) \
+ -o ../bin/analyseplugin \
+ analyseplugin.o load.o default.o \
+ $(LIBRARIES)
+
+ ../bin/listplugins: listplugins.o search.o
+- $(CC) $(CFLAGS) $(BINFLAGS) \
++ $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) \
+ -o ../bin/listplugins \
+ listplugins.o search.o \
+ $(LIBRARIES)
diff --git a/media-libs/ladspa-sdk/ladspa-sdk-1.17.ebuild b/media-libs/ladspa-sdk/ladspa-sdk-1.17.ebuild
new file mode 100644
index 000000000000..209b002aa3ed
--- /dev/null
+++ b/media-libs/ladspa-sdk/ladspa-sdk-1.17.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs portability multilib-minimal
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}_${PV}
+
+DESCRIPTION="The Linux Audio Developer's Simple Plugin API"
+HOMEPAGE="http://www.ladspa.org/"
+SRC_URI="http://www.ladspa.org/download/${MY_P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE=""
+
+CDEPEND="media-libs/libsndfile"
+RDEPEND="${CDEPEND}"
+DEPEND="
+ ${CDEPEND}
+ >=sys-apps/sed-4
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-properbuild.patch"
+)
+
+HTML_DOCS="doc/*.html"
+
+src_prepare() {
+ default
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ cd src
+ emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+ DYNAMIC_LD_LIBS="$(dlopen_lib)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ targets
+}
+
+multilib_src_test() {
+ cd src
+ emake test
+}
+
+multilib_src_install() {
+ cd src
+ emake INSTALL_PLUGINS_DIR="/usr/$(get_libdir)/ladspa" \
+ DESTDIR="${ED}" \
+ MKDIR_P="mkdir -p" \
+ install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ # Needed for apps like rezound
+ dodir /etc/env.d
+ echo "LADSPA_PATH=${EPREFIX}/usr/$(get_libdir)/ladspa" > "${ED}/etc/env.d/60ladspa"
+}