[Midnightbsd-cvs] mports [24225] trunk/Mk/bsd.mport.mk: fix a few bugs with paths
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Sep 5 19:15:41 EDT 2018
Revision: 24225
http://svnweb.midnightbsd.org/mports/?rev=24225
Author: laffer1
Date: 2018-09-05 19:15:41 -0400 (Wed, 05 Sep 2018)
Log Message:
-----------
fix a few bugs with paths
Modified Paths:
--------------
trunk/Mk/bsd.mport.mk
Modified: trunk/Mk/bsd.mport.mk
===================================================================
--- trunk/Mk/bsd.mport.mk 2018-09-05 23:15:19 UTC (rev 24224)
+++ trunk/Mk/bsd.mport.mk 2018-09-05 23:15:41 UTC (rev 24225)
@@ -521,10 +521,34 @@
.undef NO_PACKAGE
.endif
+.if empty(FLAVOR)
+_WRKDIR= work
+.else
+_WRKDIR= work-${FLAVOR}
+.endif
+
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work
+BINARY_LINKDIR= ${WRKDIR}/.bin
+PATH:= ${BINARY_LINKDIR}:${PATH}
+.if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*}
+MAKE_ENV+= PATH=${PATH}
+CONFIGURE_ENV+= PATH=${PATH}
+.endif
+
.if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) && empty(USE_GITHUB:Mnodefault)
-WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT}
+.if defined(WRKSRC)
+DEV_WARNING+= "You are using USE_GITHUB and WRKSRC is set which is wrong. Set GH_PROJECT correctly, set WRKSRC_SUBDIR or remove WRKSRC entirely."
.endif
+WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT}
+.endif
+
+.if !default(IGNORE_MASTER_SITE_GITLAB) && defined(USE_GITLAB) && empty(USE_GITLAB:Mnodefault)
+WRKSRC?= ${WRKDIR}/${GL_PROJECT}-${GL_COMMIT}-${GL_COMMIT}
+.endif
+
+# If the distname is not extracting into a specific subdirectory, have the
+# ports framework force extract into a subdirectory so that metadata files
+# do not get in the way of the build, and vice-versa.
.if defined(NO_WRKSUBDIR)
# Some ports have DISTNAME=PORTNAME, and USE_RC_SUBR=PORTNAME, in those case,
# the rc file will conflict with WRKSRC, as WRKSRC is artificial, make it the
More information about the Midnightbsd-cvs
mailing list