void-packages/srcpkgs/stfl/patches/cross-fix.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

23 lines
740 B
Diff

--- a/Makefile
+++ b/Makefile
@@ -20,9 +20,8 @@
include Makefile.cfg
-export CC = gcc -pthread
-export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
-export LDLIBS += -lncursesw
+override export CFLAGS += -I. -Wall -D_GNU_SOURCE -fPIC -pthread
+export LDLIBS += -lncursesw -lpthread
SONAME := libstfl.so.0
VERSION := 0.24
@@ -39,7 +38,7 @@ libstfl.a: public.o base.o parser.o dump
libstfl.so.$(VERSION): public.o base.o parser.o dump.o style.o binding.o iconv.o \
$(patsubst %.c,%.o,$(wildcard widgets/*.c))
- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $(LDLIBS) $^
+ $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $(LDLIBS) $(LDFLAGS) $^
clean:
rm -f libstfl.a example core core.* *.o Makefile.deps