summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcy <cy@35697150-7ecd-e111-bb59-0022644237b5>2021-03-31 02:46:05 +0000
committercy <cy@35697150-7ecd-e111-bb59-0022644237b5>2021-03-31 02:46:05 +0000
commitbce8c0595a9dae88c6f404be13a1807f377f3f1b (patch)
tree818d91e20193b07ce7e47cf476bbdc3c4a611fe0
parent35c4a4ec50872935b7b84372444a363fd5a0d311 (diff)
downloadfreebsd-ports-bce8c0595a9dae88c6f404be13a1807f377f3f1b.tar.gz
freebsd-ports-bce8c0595a9dae88c6f404be13a1807f377f3f1b.tar.bz2
devel/bitkeeper: fix poudriere build
r569286 fixed manual port stage however it broke poudriere builds. This resulted in either a nested directory tree of $STAGEDIR/$PREFIX/bitkeeper/$PREFIX/bitkeeper under poudriere or simply $STAGEDIR when building by hand, making any conventional fix mutulally exclusive. To resolve we rename DESTDIR within the port to some arbitrary name, PDESTDIR, and set the port's BINDIR to /bitkeeper, from /usr/local/bitkeeper, to avoid the other source of nesting. git-svn-id: http://svn.freebsd.org/ports/head@569607 35697150-7ecd-e111-bb59-0022644237b5
-rw-r--r--devel/bitkeeper/Makefile6
-rw-r--r--devel/bitkeeper/files/patch-src_Makefile15
2 files changed, 20 insertions, 1 deletions
diff --git a/devel/bitkeeper/Makefile b/devel/bitkeeper/Makefile
index 2fb44fa7ea78..ff0a8b75d9b0 100644
--- a/devel/bitkeeper/Makefile
+++ b/devel/bitkeeper/Makefile
@@ -37,12 +37,16 @@ MANDIRS= ${PREFIX}/bitkeeper/man
WRKSRC= ${WRKDIR}/bk-${PORTVERSION}/src
ALL_TARGET= p
+post-patch:
+ @${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e \
+ 's/DESTDIR/PDESTDIR/g'
+
do-build:
@(cd ${WRKSRC}; ${MAKE_CMD} ${ALL_TARGET})
do-install:
@(cd ${WRKSRC}; \
- ${MAKE_CMD} DESTDIR=${STAGEDIR}${PREFIX}/bitkeeper ${INSTALL_TARGET}); \
+ ${MAKE_CMD} PDESTDIR=${STAGEDIR}${PREFIX} ${INSTALL_TARGET})
${INSTALL_SCRIPT} ${WRKDIR}/bk ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKDIR}/bk-man.conf \
${STAGEDIR}${PREFIX}/etc/man.d/bk.conf
diff --git a/devel/bitkeeper/files/patch-src_Makefile b/devel/bitkeeper/files/patch-src_Makefile
new file mode 100644
index 000000000000..18deccec90ec
--- /dev/null
+++ b/devel/bitkeeper/files/patch-src_Makefile
@@ -0,0 +1,15 @@
+--- Makefile.orig 2018-12-29 05:21:08.000000000 -0800
++++ Makefile 2021-03-30 17:02:38.009421000 -0700
+@@ -70,11 +70,7 @@
+ EXE=
+ # You can set this to anywhere you like and do a
+ # build production" and you'll have an installed BitKeeper.
+- ifeq (,$(INSTALLED_BK))
+- BINDIR := /usr/local/bitkeeper
+- else
+- BINDIR := $(shell "$(INSTALLED_BK)" bin)
+- endif
++ BINDIR := /bitkeeper
+ INSTALL=install
+ RESOURCE=
+ endif