aboutsummaryrefslogtreecommitdiff
path: root/lang/bf2c
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2014-02-21 11:31:12 +0000
committerRene Ladan <rene@FreeBSD.org>2014-02-21 11:31:12 +0000
commit89411770dcbac700b6d8bb622e1c10774672c854 (patch)
tree2f94b5c4200fcdb6fbb8716f43faaba34064d3ba /lang/bf2c
parent1ffeb794cce26ab8e6d6114d24173442fccde276 (diff)
downloadports-89411770dcbac700b6d8bb622e1c10774672c854.tar.gz
ports-89411770dcbac700b6d8bb622e1c10774672c854.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
Notes
Notes: svn path=/head/; revision=345375
Diffstat (limited to 'lang/bf2c')
-rw-r--r--lang/bf2c/Makefile15
-rw-r--r--lang/bf2c/files/patch-Makefile31
-rw-r--r--lang/bf2c/pkg-plist4
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%%