861ac185a6
```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 ```
44 lines
1 KiB
Diff
44 lines
1 KiB
Diff
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -23,24 +23,25 @@
|
|
# SUCH DAMAGE.
|
|
#
|
|
# $Id: Makefile,v 1.3 2004/07/19 05:19:55 sobomax Exp $
|
|
+#
|
|
+# Linux Makefile by Matt Smith <mcs@darkregion.net>, 2011/01/04
|
|
|
|
-LIB= execinfo
|
|
+CC=cc
|
|
+AR=ar
|
|
+EXECINFO_CFLAGS=$(CFLAGS) -std=gnu99 -c
|
|
+EXECINFO_LDFLAGS=$(LDFLAGS)
|
|
|
|
-SRCS= stacktraverse.c stacktraverse.h execinfo.c execinfo.h
|
|
+all: static dynamic
|
|
|
|
-INCS= execinfo.h
|
|
+static:
|
|
+ $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c
|
|
+ $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c
|
|
+ $(AR) rcs libexecinfo.a stacktraverse.o execinfo.o
|
|
|
|
-SHLIB_MAJOR= 1
|
|
-SHLIB_MINOR= 0
|
|
+dynamic:
|
|
+ $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c -o stacktraverse.So
|
|
+ $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c -o execinfo.So
|
|
+ $(CC) -shared -Wl,-soname,libexecinfo.so.1 -o libexecinfo.so.1 stacktraverse.So execinfo.So
|
|
|
|
-NOPROFILE= yes
|
|
-
|
|
-DPADD= ${LIBM}
|
|
-LDADD= -lm
|
|
-
|
|
-#WARNS?= 4
|
|
-
|
|
-#stacktraverse.c: gen.py
|
|
-# ./gen.py > stacktraverse.c
|
|
-
|
|
-.include <bsd.lib.mk>
|
|
+clean:
|
|
+ rm -rf *.o *.So *.a *.so
|