[arch-commits] Commit in (5 files)

David Runge dvzrv at archlinux.org
Tue Oct 2 19:03:03 UTC 2018


    Date: Tuesday, October 2, 2018 @ 19:03:03
  Author: dvzrv
Revision: 389064

Adding lsp-plugins.

Added:
  lsp-plugins/
  lsp-plugins/repos/
  lsp-plugins/trunk/
  lsp-plugins/trunk/PKGBUILD
  lsp-plugins/trunk/relro_pie.patch

-----------------+
 PKGBUILD        |   48 +++++++
 relro_pie.patch |  349 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 397 insertions(+)

Added: lsp-plugins/trunk/PKGBUILD
===================================================================
--- lsp-plugins/trunk/PKGBUILD	                        (rev 0)
+++ lsp-plugins/trunk/PKGBUILD	2018-10-02 19:03:03 UTC (rev 389064)
@@ -0,0 +1,48 @@
+# Maintainer: David Runge <dave at sleepmap.de>
+pkgname=lsp-plugins
+pkgver=1.1.4
+pkgrel=1
+pkgdesc="Collection of free plugins compatible with LADSPA, LV2 and LinuxVST"
+arch=('x86_64')
+url="https://lsp-plug.in"
+license=('LGPL3')
+groups=('ladspa-plugins' 'lv2-plugins' 'pro-audio' 'vst-plugins')
+depends=('cairo' 'glu' 'jack' 'libglvnd' 'libsndfile')
+makedepends=('ladspa' 'lv2' 'php')
+source=("https://github.com/sadko4u/${pkgname}/archive/${pkgname}-${pkgver}.tar.gz"
+        'relro_pie.patch')
+sha512sums=('214af5c9cb3adf5013359768356594ba9e8d2ee214e9b10e2f51d7b1b51e6c7a7aaebff826149dcd7a9fa945cbac623422c53e46165b2091f5c35ca0d0807617'
+            '8801dc4f00ec5feb3766b532db413462e4d0c64329c8ce1941d875705c99d772d60796fa88aa92c94e59be8324b8a1ff88664d98d2e5541b26f56fa8b1654ae0')
+
+prepare() {
+#  local _relro="-Wl,-z,relro,-z,now"
+  mv -v "$pkgname-$pkgname-$pkgver" "$pkgname-$pkgver"
+  cd "$pkgname-$pkgver"
+  patch -Np1 -i ../relro_pie.patch
+  # removing /usr/local/lib from RPATH
+  sed -e '/LD_PATH/ s|:/usr/local/lib||' \
+      -i Makefile
+}
+
+build() {
+  local _test_path="$(pwd)/.build-test"
+  cd "$pkgname-$pkgver"
+  make
+  make OBJDIR=${_test_path} clean
+  make OBJDIR=${_test_path} test
+}
+
+check() {
+  local _test_path="$(pwd)/.build-test"
+  cd "$pkgname-$pkgver"
+  ${_test_path}/lsp-plugins-test utest --nofork --debug --verbose
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  make BIN_PATH=/usr/bin \
+       LIB_PATH=/usr/lib \
+       DOC_PATH=/usr/share/doc \
+       DESTDIR="$pkgdir/" \
+       install
+}

Added: lsp-plugins/trunk/relro_pie.patch
===================================================================
--- lsp-plugins/trunk/relro_pie.patch	                        (rev 0)
+++ lsp-plugins/trunk/relro_pie.patch	2018-10-02 19:03:03 UTC (rev 389064)
@@ -0,0 +1,349 @@
+diff -ruN lsp-plugins/Makefile lsp-plugins-fix/Makefile
+--- lsp-plugins/Makefile	2018-10-02 19:34:33.893727476 +0200
++++ lsp-plugins-fix/Makefile	2018-10-02 19:35:32.626431501 +0200
+@@ -30,6 +30,7 @@
+ INC_FLAGS               = -I"${CURDIR}/include"
+ INSTALLATIONS           = install_ladspa install_lv2 install_jack install_doc install_vst
+ RELEASES                = release_ladspa release_lv2 release_jack release_src release_doc release_vst
++CC_FLAGS                = -DLSP_NO_EXPERIMENTAL
+ 
+ # Build profile
+ ifndef BUILD_PROFILE
+@@ -88,14 +89,14 @@
+ export BASEDIR          = ${CURDIR}
+ export INCLUDE          = ${INC_FLAGS}
+ export MAKE_OPTS        = -s
+-export CFLAGS           = $(CC_ARCH) -std=c++98 -fPIC -fdata-sections -ffunction-sections -fno-exceptions -fno-asynchronous-unwind-tables -Wall -pthread -pipe -fno-rtti $(CC_FLAGS) -DLSP_MAIN_VERSION=\"$(VERSION)\"
++export CFLAGS           = $(CC_ARCH) -std=c++98 -fPIC -fdata-sections -ffunction-sections -fno-exceptions -fno-asynchronous-unwind-tables -Wall -pipe -fno-rtti $(CC_FLAGS) -DLSP_MAIN_VERSION=\"$(VERSION)\"
+ export CC               = g++
+ export PHP              = php
+ export LD               = ld
+ export LDFLAGS          = $(LD_ARCH) -L$(LD_PATH)
+-export SO_FLAGS         = $(CC_ARCH) -Wl,-rpath,$(LD_PATH) -Wl,--gc-sections -shared -Llibrary -lc -lm -fPIC -lpthread
++export SO_FLAGS         = $(CC_ARCH) -Wl,-rpath,$(LD_PATH) -Wl,-z,relro,-z,now -Wl,--gc-sections -shared -Llibrary -lc -fPIC
+ export MERGE_FLAGS      = $(LD_ARCH) -r
+-export EXE_FLAGS        = $(CC_ARCH) -Wl,-rpath,$(LD_PATH) -Wl,--gc-sections -lm -fPIC -pthread
++export EXE_FLAGS        = $(CC_ARCH) -Wl,-rpath,$(LD_PATH) -Wl,-z,relro,-z,now -Wl,--gc-sections -pie -fPIE
+ 
+ # Objects
+ export OBJ_CORE         = $(OBJDIR)/core.o
+@@ -134,6 +135,9 @@
+ export PHP_PLUGINS      = $(OBJDIR)/plugins.php
+ 
+ # Compile headers and linkage libraries
++export PTHREAD_LIBS     = -lpthread
++export MATH_LIBS        = -lm
++export DL_LIBS          = -ldl
+ export CAIRO_HEADERS    = $(shell pkg-config --cflags cairo)
+ export CAIRO_LIBS       = $(shell pkg-config --libs cairo)
+ export XLIB_HEADERS     = $(shell pkg-config --cflags x11)
+diff -ruN lsp-plugins/TODO.txt lsp-plugins-fix/TODO.txt
+--- lsp-plugins/TODO.txt	2018-10-02 19:34:33.897060773 +0200
++++ lsp-plugins-fix/TODO.txt	2018-10-02 19:35:32.626431501 +0200
+@@ -11,6 +11,8 @@
+ 
+ === 1.1.5 ===
+ 
++* Fixed building issues under Ubuntu Linux related to compiler and linker
++  flags reordering.
+ - Migrated to CMake build system.
+ - Additional display mode for spectrum analyzer added.
+ - Added possibility to double-click the parameter's value number and enter it manually from keyboard.
+@@ -19,6 +21,7 @@
+ - Added subsystem for loading missed files.
+ - Additional DSP code optimizations for ARMv7A architecture.
+ - Extended unit and performance test coverage.
++- Changed link oder of libraries
+ 
+ *******************************************************************************
+ * Release steps
+@@ -104,6 +107,40 @@
+ * FEATURE REQUESTS: Detailed
+ *******************************************************************************
+ 
++==== Link order of libraries ====
++
++The ordering of libraries on the command line follows the same convection as for object files:
++they are searched from left to right--a library containing the definition of a function should
++appear after any source files or object files which use it. This includes libraries specified
++with the short-cut -l option, as shown in the following command:
++
++$ gcc -Wall calc.c -lm -o calc   (correct order)
++
++With some compilers the opposite ordering (placing the -lm option before the file which uses it)
++would result in an error,
++
++$ cc -Wall -lm calc.c -o calc    (incorrect order)
++main.o: In function `main':
++main.o(.text+0xf): undefined reference to `sqrt'
++
++because there is no library or object file containing sqrt after 'calc.c'. The option -lm
++should appear after the file 'calc.c'.
++
++When several libraries are being used, the same convention should be followed for the libraries
++themselves. A library which calls an external function defined in another library should appear
++before the library containing the function.
++
++For example, a program 'data.c' using the GNU Linear Programming library 'libglpk.a', which in
++turn uses the math library 'libm.a', should be compiled as,
++
++$ gcc -Wall data.c -lglpk -lm
++
++since the object files in 'libglpk.a' use functions defined in 'libm.a'.
++
++As for object files, most current compilers will search all libraries, regardless of order.
++However, since not all compilers do this it is best to follow the convention of ordering libraries
++from left to right. 
++
+ ==== Sampler ====
+   naught101:
+     So, the features I was thinking for Klangerzueger were:
+diff -ruN lsp-plugins/include/container/jack/ports.h lsp-plugins-fix/include/container/jack/ports.h
+--- lsp-plugins/include/container/jack/ports.h	2018-10-02 19:34:33.897060773 +0200
++++ lsp-plugins-fix/include/container/jack/ports.h	2018-10-02 19:35:32.626431501 +0200
+@@ -237,7 +237,7 @@
+                 if ((pMidi != NULL) && (pBuffer != NULL) && IS_OUT_PORT(pMetadata))
+                 {
+                     // Reset buffer
+-                    jack_midi_reset_buffer(pBuffer);
++                    jack_midi_clear_buffer(pBuffer);
+ 
+                     // Transfer MIDI events
+                     size_t events = pMidi->nEvents;
+diff -ruN lsp-plugins/src/container/Makefile lsp-plugins-fix/src/container/Makefile
+--- lsp-plugins/src/container/Makefile	2018-10-02 19:34:34.253723619 +0200
++++ lsp-plugins-fix/src/container/Makefile	2018-10-02 19:35:32.626431501 +0200
+@@ -3,16 +3,19 @@
+ OBJ_HELPERS             = $(OBJDIR)/CairoCanvas.o
+ 
+ # Detemine what modules to build
+-PACKAGES                = $(OBJ_CORE) $(OBJ_DSP) $(OBJ_METADATA) $(OBJ_PLUGINS) $(SNDFILE_LIBS)
++OBJFILES                = $(OBJ_CORE) $(OBJ_DSP) $(OBJ_METADATA) $(OBJ_PLUGINS)
++LIBS                    = $(SNDFILE_LIBS) $(PTHREAD_LIBS) $(MATH_LIBS)
+ ifeq ($(LSP_TESTING),1)
+-PACKAGES               += $(OBJ_TEST_CORE) $(OPENGL_LIBS)
++OBJFILES               += $(OBJ_TEST_CORE)
++LIBS                   += $(OPENGL_LIBS)
+ MODULES                 = $(BIN_TEST)
+ endif
+ ifneq ($(LSP_TESTING),1)
+ MODULES                 = $(LIB_LADSPA) $(LIB_LV2) $(LIB_JACK) $(BIN_PROFILE) $(LIB_VST)
+ endif
+ 
+-UI_PACKAGES             = $(PACKAGES) $(OBJ_UI_CORE) $(OBJ_RES_CORE) $(XLIB_LIBS) $(CAIRO_LIBS)
++UI_OBJFILES             = $(OBJFILES) $(OBJ_UI_CORE) $(OBJ_RES_CORE) 
++UI_LIBS                 = $(LIBS) $(XLIB_LIBS) $(CAIRO_LIBS)
+ 
+ .PHONY: all
+ 
+@@ -24,36 +27,36 @@
+ 
+ $(LIB_LADSPA):
+ 	@echo "  $(CC) ladspa.cpp"
+-	@$(CC) -o $(OBJDIR)/ladspa.o -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) ladspa.cpp  
++	@$(CC) -o $(OBJDIR)/ladspa.o -c ladspa.cpp $(CPPFLAGS) $(CFLAGS) $(INCLUDE) 
+ 	@echo "  $(CC) $(notdir $(LIB_LADSPA))"
+-	@$(CC) -o $(LIB_LADSPA) $(SO_FLAGS) $(PACKAGES) $(OBJDIR)/ladspa.o  
++	@$(CC) -o $(LIB_LADSPA) $(OBJDIR)/ladspa.o $(OBJFILES) $(SO_FLAGS) $(LIBS)
+ 
+ $(LIB_LV2): $(OBJ_HELPERS)
+ 	@echo "  $(CC) lv2.cpp"
+-	@$(CC) -o $(OBJDIR)/lv2.o -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) lv2.cpp 
++	@$(CC) -o $(OBJDIR)/lv2.o -c lv2.cpp $(CPPFLAGS) $(CFLAGS) $(INCLUDE) 
+ 	@echo "  $(CC) $(notdir $(LIB_LV2))"
+-	@$(CC) -o $(LIB_LV2) $(SO_FLAGS) $(UI_PACKAGES) $(OBJ_HELPERS) $(OBJDIR)/lv2.o
++	@$(CC) -o $(LIB_LV2) $(OBJDIR)/lv2.o $(OBJ_HELPERS) $(UI_OBJFILES) $(SO_FLAGS) $(UI_LIBS)
+ 
+ $(LIB_VST):
+ 	@echo "  $(CC) vst.cpp"
+-	@$(CC) -o $(OBJDIR)/vst.o -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) vst.cpp 
++	@$(CC) -o $(OBJDIR)/vst.o -c vst.cpp $(CPPFLAGS) $(CFLAGS) $(INCLUDE) 
+ 	@echo "  $(CC) $(notdir $(LIB_VST))"
+-	@$(CC) -o $(LIB_VST) $(SO_FLAGS) $(UI_PACKAGES) $(OBJDIR)/vst.o 
++	@$(CC) -o $(LIB_VST) $(OBJDIR)/vst.o $(UI_OBJFILES) $(SO_FLAGS) $(UI_LIBS) 
+ 
+ $(LIB_JACK): $(OBJ_HELPERS)
+ 	@echo "  $(CC) jack.cpp"
+-	@$(CC) -o $(OBJDIR)/jack.o -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(JACK_HEADERS) jack.cpp 
++	@$(CC) -o $(OBJDIR)/jack.o -c jack.cpp $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(JACK_HEADERS) 
+ 	@echo "  $(CC) $(notdir $(LIB_JACK))"
+-	@$(CC) -o $(LIB_JACK) $(SO_FLAGS) $(JACK_LIBS) $(OBJ_HELPERS) $(UI_PACKAGES) $(OBJDIR)/jack.o
++	@$(CC) -o $(LIB_JACK) $(OBJDIR)/jack.o $(OBJ_HELPERS) $(UI_OBJFILES) $(SO_FLAGS) $(UI_LIBS) $(JACK_LIBS)
+ 
+ $(BIN_PROFILE): $(LIB_JACK)
+ 	@echo "  $(CC) profile.cpp"
+-	@$(CC) -o $(OBJDIR)/profile.o -c $(CPPFLAGS) -DLSP_PROFILING_MAIN $(CFLAGS) $(INCLUDE) $(JACK_HEADERS) profile.cpp
++	@$(CC) -o $(OBJDIR)/profile.o -c profile.cpp $(CPPFLAGS) -DLSP_PROFILING_MAIN $(CFLAGS) $(INCLUDE) $(JACK_HEADERS) 
+ 	@echo "  $(CC) $(notdir $(BIN_PROFILE))"
+-	@$(CC) -o $(BIN_PROFILE) $(EXE_FLAGS) $(JACK_LIBS) $(OBJ_HELPERS) $(UI_PACKAGES) $(OBJDIR)/jack.o $(OBJDIR)/profile.o 
++	@$(CC) -o $(BIN_PROFILE) $(OBJDIR)/jack.o $(OBJDIR)/profile.o $(OBJ_HELPERS) $(UI_OBJFILES) $(EXE_FLAGS) $(UI_LIBS) $(JACK_LIBS) 
+ 
+ $(BIN_TEST): $(LIB_JACK)
+ 	@echo "  $(CC) test.cpp"
+-	@$(CC) -o $(OBJDIR)/test.o -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(JACK_HEADERS) test.cpp
++	@$(CC) -o $(OBJDIR)/test.o -c test.cpp $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(JACK_HEADERS) 
+ 	@echo "  $(CC) $(notdir $(BIN_TEST))"
+-	@$(CC) -o $(BIN_TEST) $(EXE_FLAGS) $(JACK_LIBS) $(OBJ_HELPERS) $(UI_PACKAGES) $(OBJDIR)/jack.o $(OBJDIR)/test.o 
++	@$(CC) -o $(BIN_TEST) $(OBJDIR)/jack.o $(OBJDIR)/test.o $(OBJ_HELPERS) $(UI_OBJFILES) $(EXE_FLAGS) $(UI_LIBS) $(JACK_LIBS)   
+diff -ruN lsp-plugins/src/utils/Makefile lsp-plugins-fix/src/utils/Makefile
+--- lsp-plugins/src/utils/Makefile	2018-10-02 19:34:34.273723405 +0200
++++ lsp-plugins-fix/src/utils/Makefile	2018-10-02 19:35:32.626431501 +0200
+@@ -3,6 +3,8 @@
+ FILES                   = $(addprefix $(OBJDIR)/, $(FILELIST))
+ FILE                    = $(@:$(OBJDIR)/%.o=%.cpp)
+ SUBDIRS                 =
++OBJ_FILES               = $(OBJ_CORE) $(OBJ_METADATA)
++OBJ_LIBS                = $(PTHREAD_LIBS) $(MATH_LIBS)
+ 
+ .PHONY: all target files subdirs $(SUBDIRS)
+ 
+@@ -18,25 +20,25 @@
+ 
+ $(FILES):
+ 	@echo "  $(CC) $(FILE)"
+-	@$(CC) -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(FILE) -o $(@)
++	@$(CC) -o $(@) -c $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(FILE)
+ 
+ # Rules for each utility
+ $(UTL_GENTTL): $(FILES) $(SUBDIRS)
+ 	@echo "  $(CC) $(notdir $(UTL_GENTTL))"
+-	@$(CC) $(EXE_FLAGS) $(SNDFILE_LIBS) -o $(UTL_GENTTL) $(OBJDIR)/lv2_genttl.o $(OBJ_CORE) $(OBJ_METADATA)
++	@$(CC) -o $(UTL_GENTTL) $(OBJDIR)/lv2_genttl.o $(OBJ_FILES) $(EXE_FLAGS) $(SNDFILE_LIBS) $(OBJ_LIBS)
+ 	
+ $(UTL_JACKMAKE): $(FILES) $(SUBDIRS)
+ 	@echo "  $(CC) $(notdir $(UTL_JACKMAKE))"
+-	@$(CC) $(EXE_FLAGS) $(SNDFILE_LIBS) -o $(UTL_JACKMAKE) $(OBJDIR)/jack_genmake.o $(OBJ_CORE) $(OBJ_METADATA)
++	@$(CC) -o $(UTL_JACKMAKE)  $(OBJDIR)/jack_genmake.o $(OBJ_FILES) $(EXE_FLAGS) $(SNDFILE_LIBS) $(OBJ_LIBS)
+ 	
+ $(UTL_VSTMAKE): $(FILES) $(SUBDIRS)
+ 	@echo "  $(CC) $(notdir $(UTL_VSTMAKE))"
+-	@$(CC) $(EXE_FLAGS) $(SNDFILE_LIBS) -o $(UTL_VSTMAKE) $(OBJDIR)/vst_genmake.o $(OBJ_CORE) $(OBJ_METADATA)
++	@$(CC) -o $(UTL_VSTMAKE) $(OBJDIR)/vst_genmake.o $(OBJ_FILES) $(EXE_FLAGS) $(OBJ_LIBS)
+ 	
+ $(UTL_GENPHP): $(FILES) $(SUBDIRS)
+ 	@echo "  $(CC) $(notdir $(UTL_GENPHP))"
+-	@$(CC) $(EXE_FLAGS) $(SNDFILE_LIBS) -o $(UTL_GENPHP) $(OBJDIR)/gen_php.o $(OBJ_CORE) $(OBJ_METADATA)
++	@$(CC) -o $(UTL_GENPHP) $(OBJDIR)/gen_php.o $(OBJ_FILES) $(EXE_FLAGS) $(SNDFILE_LIBS) $(OBJ_LIBS)
+ 	
+ $(UTL_RESGEN): $(FILES) $(SUBDIRS)
+ 	@echo "  $(CC) $(notdir $(UTL_RESGEN))"
+-	@$(CC) $(EXE_FLAGS) $(SNDFILE_LIBS) $(EXPAT_HEADERS) $(EXPAT_LIBS) -o $(UTL_RESGEN) $(OBJDIR)/resource_gen.o $(OBJ_CORE) $(OBJ_METADATA)
++	@$(CC) -o $(UTL_RESGEN) $(OBJDIR)/resource_gen.o $(OBJ_FILES) $(EXPAT_HEADERS) $(EXE_FLAGS) $(EXPAT_LIBS) $(SNDFILE_LIBS) $(OBJ_LIBS)
+diff -ruN lsp-plugins/src/utils/jack_genmake.cpp lsp-plugins-fix/src/utils/jack_genmake.cpp
+--- lsp-plugins/src/utils/jack_genmake.cpp	2018-10-02 19:34:34.273723405 +0200
++++ lsp-plugins-fix/src/utils/jack_genmake.cpp	2018-10-02 19:35:32.626431501 +0200
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <alloca.h>
++#include <errno.h>
+ 
+ #include <metadata/metadata.h>
+ #include <plugins/plugins.h>
+@@ -11,13 +12,16 @@
+ {
+     static int gen_cpp_file(const char *path, const plugin_metadata_t *meta, const char *plugin_name, const char *cpp_name)
+     {
+-        char fname[PATH_MAX];
+-        snprintf(fname, PATH_MAX, "%s/%s", path, cpp_name);
++        char fname[PATH_MAX], cppfile[PATH_MAX];
++
++        // Replace all underscores
++        strncpy(cppfile, cpp_name, PATH_MAX);
++        cppfile[PATH_MAX-1] = '\0';
++        for (char *p=cppfile; *p != '\0'; ++p)
++            if (*p == '_')
++                *p = '-';
+ 
+-        // Replace character '_' to '-'
+-        for (char *dst = fname; *dst != '\0'; ++dst)
+-            if (*dst == '_')
+-                *dst = '-';
++        snprintf(fname, PATH_MAX, "%s/%s", path, cppfile);
+ 
+         printf("Generating source file %s\n", fname);
+ 
+@@ -25,7 +29,8 @@
+         FILE *out = fopen(fname, "w");
+         if (out == NULL)
+         {
+-            fprintf(stderr, "Error creating file %s\n", fname);
++            int code = errno;
++            fprintf(stderr, "Error creating file %s, code=%d\n", fname, code);
+             return -1;
+         }
+ 
+@@ -64,7 +69,8 @@
+         FILE *out = fopen(fname, "w");
+         if (out == NULL)
+         {
+-            fprintf(stderr, "Error creating file %s\n", fname);
++            int code = errno;
++            fprintf(stderr, "Error creating file %s, code=%d\n", fname, code);
+             return -2;
+         }
+ 
+@@ -72,7 +78,6 @@
+ 
+         fprintf(out, "FILES                   = $(patsubst %%.cpp, %%, $(wildcard *.cpp))\n");
+         fprintf(out, "FILE                    = $(@:%%=%%.cpp)\n");
+-        fprintf(out, "EXE_FLAGS              += -ldl\n");
+         fprintf(out, "\n");
+ 
+         fprintf(out, ".PHONY: all\n\n");
+@@ -81,10 +86,9 @@
+ 
+         fprintf(out, "$(FILES):\n");
+         fprintf(out, "\t at echo \"  $(CC) $(FILE)\"\n");
+-//        fprintf(out, "\t at echo $(CC) $(CPPFLAGS) $(CFLAGS) $(EXE_FLAGS) $(INCLUDE) $(FILE) -o $(@)\n");
+-        fprintf(out, "\t@$(CC) $(CPPFLAGS) $(CFLAGS) $(EXE_FLAGS) $(INCLUDE) $(FILE) -o $(@)\n\n");
++        fprintf(out, "\t@$(CC) -o $(@) $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(FILE) $(EXE_FLAGS) $(DL_LIBS)\n\n");
+ 
+-        fprintf(out, "install: $(FILES)\n\n");
++        fprintf(out, "install: $(FILES)\n");
+         fprintf(out, "\t@$(INSTALL) $(FILES) $(TARGET_PATH)/");
+ 
+         // Close file
+diff -ruN lsp-plugins/src/utils/vst_genmake.cpp lsp-plugins-fix/src/utils/vst_genmake.cpp
+--- lsp-plugins/src/utils/vst_genmake.cpp	2018-10-02 19:34:34.273723405 +0200
++++ lsp-plugins-fix/src/utils/vst_genmake.cpp	2018-10-02 19:35:32.626431501 +0200
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <alloca.h>
++#include <errno.h>
+ 
+ #include <metadata/metadata.h>
+ #include <plugins/plugins.h>
+@@ -30,8 +31,9 @@
+         FILE *out = fopen(fname, "w");
+         if (out == NULL)
+         {
+-            fprintf(stderr, "Error creating file %s\n", fname);
+-            return -1;
++            int code = errno;
++            fprintf(stderr, "Error creating file %s, code=%d\n", fname, code);
++            return -2;
+         }
+ 
+         // Write to file
+@@ -70,7 +72,8 @@
+         FILE *out = fopen(fname, "w");
+         if (out == NULL)
+         {
+-            fprintf(stderr, "Error creating file %s\n", fname);
++            int code = errno;
++            fprintf(stderr, "Error creating file %s, code=%d\n", fname, code);
+             return -2;
+         }
+ 
+@@ -86,8 +89,7 @@
+ 
+         fprintf(out, "$(FILES):\n");
+         fprintf(out, "\t at echo \"  $(CC) $(FILE)\"\n");
+-//        fprintf(out, "\t at echo $(CC) $(CPPFLAGS) $(CFLAGS) $(SO_FLAGS) $(INCLUDE) $(FILE) -o $(@)\n");
+-        fprintf(out, "\t@$(CC) $(CPPFLAGS) $(CFLAGS) $(SO_FLAGS) $(INCLUDE) $(FILE) -o $(@)\n\n");
++        fprintf(out, "\t@$(CC) -o $(@) $(CPPFLAGS) $(CFLAGS) $(INCLUDE) $(FILE) $(SO_FLAGS) $(DL_LIBS)\n\n");
+ 
+         // Close file
+         fclose(out);



More information about the arch-commits mailing list