void-packages/srcpkgs/ladspa-sdk/patches/fix-pie.patch
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

34 lines
1 KiB
Diff

--- a/src/makefile
+++ b/src/Makefile
@@ -15,7 +15,7 @@
INCLUDES = -I.
LIBRARIES = -ldl -lm
-CFLAGS = $(INCLUDES) -Wall -Werror -O2 -fPIC \
+CFLAGS += $(INCLUDES) -Wall -Werror -O2 -fPIC \
-DDEFAULT_LADSPA_PATH=$(INSTALL_PLUGINS_DIR)
BINFLAGS = -fPIE -pie
CXXFLAGS = $(CFLAGS)
@@ -83,17 +83,17 @@
../bin/applyplugin: applyplugin.o load.o default.o
$(CC) $(CFLAGS) $(BINFLAGS) \
-o ../bin/applyplugin \
- applyplugin.o load.o default.o \
+ applyplugin.o load.o default.o $(LDFLAGS) \
$(LIBRARIES)
../bin/analyseplugin: analyseplugin.o load.o default.o
$(CC) $(CFLAGS) $(BINFLAGS) \
-o ../bin/analyseplugin \
- analyseplugin.o load.o default.o \
+ analyseplugin.o load.o default.o $(LDFLAGS) \
$(LIBRARIES)
../bin/listplugins: listplugins.o search.o
$(CC) $(CFLAGS) $(BINFLAGS) \
-o ../bin/listplugins \
- listplugins.o search.o \
+ listplugins.o search.o $(LDFLAGS) \
$(LIBRARIES)
###############################################################################