new package: ladspa-sdk

This commit is contained in:
Tee KOBAYASHI 2022-05-08 18:28:55 +09:00 committed by xtkoba
parent f21c111e94
commit dda920f786
2 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,15 @@
TERMUX_PKG_HOMEPAGE=https://www.ladspa.org/
TERMUX_PKG_DESCRIPTION="Linux Audio Developer's Simple Plugin API"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.17
TERMUX_PKG_SRCURL=https://www.ladspa.org/download/ladspa_sdk_${TERMUX_PKG_VERSION}.tgz
TERMUX_PKG_SHA256=27d24f279e4b81bd17ecbdcc38e4c42991bb388826c0b200067ce0eb59d3da5b
TERMUX_PKG_DEPENDS="libc++, libsndfile"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="targets"
termux_step_pre_configure() {
TERMUX_PKG_SRCDIR+="/src"
TERMUX_PKG_BUILDDIR="$TERMUX_PKG_SRCDIR"
}

View File

@ -0,0 +1,78 @@
--- a/src/Makefile
+++ b/src/Makefile
@@ -4,9 +4,9 @@
#
# Change these if you want to install somewhere else.
-INSTALL_PLUGINS_DIR = /usr/lib/ladspa/
-INSTALL_INCLUDE_DIR = /usr/include/
-INSTALL_BINARY_DIR = /usr/bin/
+INSTALL_PLUGINS_DIR = @TERMUX_PREFIX@/lib/ladspa/
+INSTALL_INCLUDE_DIR = @TERMUX_PREFIX@/include/
+INSTALL_BINARY_DIR = @TERMUX_PREFIX@/bin/
###############################################################################
#
@@ -15,10 +15,11 @@
INCLUDES = -I.
LIBRARIES = -ldl -lm -lsndfile
-CFLAGS = $(INCLUDES) -Wall -Werror -O2 -fPIC \
+COMMON_FLAGS = $(INCLUDES) $(CPPFLAGS) -Wall -Werror -fPIC \
-DDEFAULT_LADSPA_PATH=$(INSTALL_PLUGINS_DIR)
+CFLAGS += $(COMMON_FLAGS)
BINFLAGS = -fPIE -pie
-CXXFLAGS = $(CFLAGS)
+CXXFLAGS += $(COMMON_FLAGS)
PLUGINS = ../plugins/amp.so \
../plugins/delay.so \
../plugins/filter.so \
@@ -27,8 +28,8 @@
PROGRAMS = ../bin/analyseplugin \
../bin/applyplugin \
../bin/listplugins
-CC = cc
-CPP = c++
+CC ?= cc
+CXX ?= c++
###############################################################################
#
@@ -47,11 +48,11 @@
-Wl,--version-script=gcc_exports.map
../plugins/%.so: plugins/%.cpp ladspa.h gcc_exports.map
- $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
- $(CPP) -o ../plugins/$*.so \
+ $(CXX) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
+ $(CXX) -o ../plugins/$*.so \
plugins/$*.o \
-shared \
- $(CXXFLAGS) \
+ $(CXXFLAGS) $(LDFLAGS) \
-fvisibility=hidden \
-fvisibility-inlines-hidden \
-s \
@@ -109,19 +110,19 @@
$(CC) $(CFLAGS) $(BINFLAGS) \
-o ../bin/applyplugin \
applyplugin.o load.o default.o \
- $(LIBRARIES)
+ $(LDFLAGS) $(LIBRARIES)
../bin/analyseplugin: analyseplugin.o load.o default.o
$(CC) $(CFLAGS) $(BINFLAGS) \
-o ../bin/analyseplugin \
analyseplugin.o load.o default.o \
- $(LIBRARIES)
+ $(LDFLAGS) $(LIBRARIES)
../bin/listplugins: listplugins.o search.o
$(CC) $(CFLAGS) $(BINFLAGS) \
-o ../bin/listplugins \
listplugins.o search.o \
- $(LIBRARIES)
+ $(LDFLAGS) $(LIBRARIES)
###############################################################################
#