summaryrefslogtreecommitdiff
path: root/media-libs/ladspa-sdk
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/ladspa-sdk')
-rw-r--r--media-libs/ladspa-sdk/Manifest3
-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, 187 insertions, 0 deletions
diff --git a/media-libs/ladspa-sdk/Manifest b/media-libs/ladspa-sdk/Manifest
index 6a2964d6fa67..69d826e3a3ea 100644
--- a/media-libs/ladspa-sdk/Manifest
+++ b/media-libs/ladspa-sdk/Manifest
@@ -1,4 +1,7 @@
AUX ladspa-sdk-1.15-properbuild.patch 3933 BLAKE2B bbddaddd99c24db14306443b82106c17a096aee2ec684b717c8fccb76dd028e62f0ac8a575777450a0037cc154ea6e1515a6e732dd9822ddff39980afeb0c154 SHA512 bc276c02b9f23643616372477d5b2e9d186977ae1f3aef3a984162d46c362df06dd6e0b8a3156f1eb7e37dc66cbb4db8768cebcd0879ba6b36ab0245db2dbb9b
+AUX ladspa-sdk-1.17-properbuild.patch 3984 BLAKE2B 12a65c1118a070a4f408cf4ec9ffaf8331fd7beb9625503a5bbcad2ab937508333e64b8ba0418fd8db0bcbfe03bf29befbbbd290ad9af2b890f5ee1ee9c20061 SHA512 05c40e4a60716a0f3a2ce98fe268179cdb37dbeac59bc85314155484bacc469691fb7db397e40ba0f078ec38be7ec9f1c4d36ebe561869491c8b7710c74e6ed1
DIST ladspa_sdk_1.15.tgz 71179 BLAKE2B 7a201fd968433241fda190874d51b835f425c8f35270dc8fac9acf4e9e1546fa20d48f85e894b9eb263dd5d84c2b407481d168e18256dfe2cdd026fe0c805a65 SHA512 a521622e23d988284244003e4ccfc3b42f6ddc7944cb00e7949b87e09d7f39a0cbb64b6d8b5a5af0a5ccf7179f88815416a88f02d3912957167e54b74accfc65
+DIST ladspa_sdk_1.17.tgz 71052 BLAKE2B cfb80e8ced314d5cc62fcb7f0b82e58f572503f2a732b2bb8a58343e8f69e417c0b0a2919bbb40629567fb331bf60a7f0c6f186db47e5b2651725b039526cdbb SHA512 37f94aa52b5a2f8709528989dea289eb01342f3bcb9e85d0f4829ddd9d90b2934a113db11100f09375a50f6612122b78156fec916f2c78a22406253d5cb394c7
EBUILD ladspa-sdk-1.15-r1.ebuild 1218 BLAKE2B 4975611ec6f2d6f8f53645bc2354c9c5bd456343a27846875529cd0e6811fe7193bf89e9df0a4045a4a2a2335ee0301f09ddffe9d35af6f1a6caecb96c3307cd SHA512 4d77ec73526b2e9e67e1f78671155787ad3f6c70b362b1d4dcb6bab2f1528fdc03803185cd61968bd1bf9f7a872e3f5af6d7a75e4469a361f29b200062132dfc
+EBUILD ladspa-sdk-1.17.ebuild 1260 BLAKE2B 6aa65c004ff1589c571a0eeb213579d0203584af86097a35c5ce48d8d3f5941141fc630a0ebb90c6e94354a3b7277350a91f87a4de9d839066a6eb347f05aed0 SHA512 a44d002f899096a82d98996aac401ce2af992fbd32f5be06df3bf6de54a2bb4a53d58d9a8a6411e8a36399c9a4d4d36d893c625df981b0329965972f273bc6a6
MISC metadata.xml 256 BLAKE2B 211ca90d8f704be5ca8a1994f0e8f1adbe1fd4937a10a301ced0b9be171dfdabb223661d168535cd7f5edfe0c8edca4620945e13dc3c43b5832ac183913188f0 SHA512 fde3b658512fa6742886d7dd84efc906331b43f5b0f8fdca353fe2280653381716d7143473c9237b9fe58b9df5889b38b008da34f6ce4b64336f38642d78e3dd
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"
+}