diff options
author | rene <rene@FreeBSD.org> | 2014-02-21 19:31:12 +0800 |
---|---|---|
committer | rene <rene@FreeBSD.org> | 2014-02-21 19:31:12 +0800 |
commit | 2dc8ae0f7f0d5a419d1c3f6455e7bdb6109958e0 (patch) | |
tree | 2f94b5c4200fcdb6fbb8716f43faaba34064d3ba /lang | |
parent | 80e9f9af7924e844edb57adaa8051b64426a2bf7 (diff) | |
download | freebsd-ports-gnome-2dc8ae0f7f0d5a419d1c3f6455e7bdb6109958e0.tar.gz freebsd-ports-gnome-2dc8ae0f7f0d5a419d1c3f6455e7bdb6109958e0.tar.zst freebsd-ports-gnome-2dc8ae0f7f0d5a419d1c3f6455e7bdb6109958e0.zip |
lang/bf2c: (upstream) Makefile cleanups
- use DESTDIR in upstream Makefile and drop MAKE_ARGS
- define install-strip target in upstream Makefile and use it
- replace pkg-plist by PORTDOCS and PLIST_FILES
Diffstat (limited to 'lang')
-rw-r--r-- | lang/bf2c/Makefile | 15 | ||||
-rw-r--r-- | lang/bf2c/files/patch-Makefile | 31 | ||||
-rw-r--r-- | lang/bf2c/pkg-plist | 4 |
3 files changed, 41 insertions, 9 deletions
diff --git a/lang/bf2c/Makefile b/lang/bf2c/Makefile index 492a20ef6379..ea831518194f 100644 --- a/lang/bf2c/Makefile +++ b/lang/bf2c/Makefile @@ -11,19 +11,24 @@ COMMENT= Optimizing BrainF*ck to C compiler LICENSE= BSD2CLAUSE +PATCH_STRIP= -p1 USE_GITHUB= yes GH_ACCOUNT= rene0 GH_COMMIT= 4761081 USE_XZ= yes -MAKE_ARGS= PREFIX="${STAGEDIR}${PREFIX}" - OPTIONS_DEFINE= DOCS +INSTALL_TARGET= install-strip + +PORTDOCS= README.md + +PLIST_FILES= bin/bf2c bin/gen_bf + post-install: - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/bf2c - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gen_bf ${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} +.for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} +.endfor .include <bsd.port.mk> diff --git a/lang/bf2c/files/patch-Makefile b/lang/bf2c/files/patch-Makefile new file mode 100644 index 000000000000..27ef2a63041d --- /dev/null +++ b/lang/bf2c/files/patch-Makefile @@ -0,0 +1,31 @@ +commit 186730742519bfa9cb7f9668fb508a78e65d26cc +Author: René Ladan <r.c.ladan@gmail.com> +Date: Fri Feb 21 12:20:57 2014 +0100 + + Add DESTDIR support and add install-strip and uninstall targets. + +diff --git a/Makefile b/Makefile +index d527b55..2ddbb8b 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,6 @@ +-.PHONY: all clean install ++.PHONY: all clean install install-strip uninstall ++ ++INSTALL_PROGRAM?=install + + all: bf2c gen_bf + +@@ -17,4 +19,11 @@ clean: + rm bf2c gen_bf $(obj) + + install: +- install bf2c gen_bf $(PREFIX)/bin ++ mkdir -p $(DESTDIR)$(PREFIX)/bin ++ $(INSTALL_PROGRAM) bf2c gen_bf $(DESTDIR)$(PREFIX)/bin ++ ++install-strip: ++ $(MAKE) INSTALL_PROGRAM='install -s' install ++ ++uninstall: ++ rm -rf $(DESTDIR)$(PREFIX)/bin diff --git a/lang/bf2c/pkg-plist b/lang/bf2c/pkg-plist deleted file mode 100644 index 1866d36ad33c..000000000000 --- a/lang/bf2c/pkg-plist +++ /dev/null @@ -1,4 +0,0 @@ -bin/bf2c -bin/gen_bf -%%PORTDOCS%%%%DOCSDIR%%/README.md -%%PORTDOCS%%@dirrm %%DOCSDIR%% |