void-packages/srcpkgs/xseticon/patches/fix-makefile.patch
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: 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

35 lines
687 B
Diff

diff --git Makefile Makefile
index 725f750..17a47c0 100644
--- a/Makefile
+++ b/Makefile
@@ -9,22 +9,22 @@ GD_LIBS=-lgd
LIBS=${GLIB_LIBS} ${XLIB_LIBS} ${GD_LIBS}
+CFLAGS += $(GLIB_CFLAGS)
+CFLAGS += $(XLIB_CFLAGS)
+LDFLAGS := $(LIBS) $(LDFLAGS)
+
+INSTALL = install
+
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
all: xseticon
-xseticon.o: xseticon.c
- gcc ${GLIB_CFLAGS} ${XLIB_CFLAGS} -c $^ -o $@
-
-xseticon: xseticon.o
- gcc ${LIBS} $^ -o $@
-
.PHONY: clean
clean:
rm -f xseticon.o xseticon
.PHONY: install
install: xseticon
- install -d $(BINDIR)
- install -m 755 xseticon $(BINDIR)
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 xseticon $(DESTDIR)$(BINDIR)