```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 ```
20 lines
785 B
Diff
20 lines
785 B
Diff
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -6,7 +6,7 @@
|
|
|
|
CC?=gcc
|
|
CFLAGS?=-O2 -Wall -g -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC
|
|
-LDFLAGS?=-Wl,-z,now -Wl,-z,relro -Wl,-soname,libscrypt.so.0 -Wl,--version-script=libscrypt.version
|
|
+MYLDFLAGS?=-Wl,-z,now -Wl,-z,relro -Wl,-soname,libscrypt.so.0 -Wl,--version-script=libscrypt.version
|
|
CFLAGS_EXTRA?=-Wl,-rpath=.
|
|
|
|
all: reference
|
|
@@ -14,7 +14,7 @@
|
|
OBJS= crypto_scrypt-nosse.o sha256.o crypto-mcf.o b64.o crypto-scrypt-saltgen.o crypto_scrypt-check.o crypto_scrypt-hash.o slowequals.o
|
|
|
|
libscrypt.so.0: $(OBJS)
|
|
- $(CC) $(LDFLAGS) -shared -o libscrypt.so.0 $(OBJS) -lm -lc
|
|
+ $(CC) $(MYLDFLAGS) -shared -o libscrypt.so.0 $(OBJS) -lm -lc $(LDFLAGS)
|
|
ar rcs libscrypt.a $(OBJS)
|
|
|
|
reference: libscrypt.so.0 main.o crypto_scrypt-hexconvert.o
|