Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160729198
D12603.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D12603.diff
View Options
Index: head/CHANGES
===================================================================
--- head/CHANGES
+++ head/CHANGES
@@ -10,6 +10,20 @@
All ports committers are allowed to commit to this file.
+20171011:
+AUTHOR: bapt@FreeBSD.org
+
+ New BINARY_ALIAS variable has been added, when defined it will create symlinks
+ of some given binaries in a directory which will be prepended to the PATH.
+
+ The syntax is the following:
+ BINARY_ALIAS= target1=source1 target2=source2
+
+ For example to have a "swig" binary in the path which will be pointing at
+ swig3.0 and a "sed" pointing at GNU sed: gsed
+
+ BINARY_ALIAS= swig=swig3.0 sed=gsed
+
20170625:
AUTHOR: kde@FreeBSD.org
Index: head/Mk/bsd.port.mk
===================================================================
--- head/Mk/bsd.port.mk
+++ head/Mk/bsd.port.mk
@@ -1063,7 +1063,7 @@
MINIMAL_PKG_VERSION= 1.6.0
_PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \
- ${STAGEDIR}${PREFIX} ${WRKDIR}/pkg
+ ${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${BINARY_LINKDIR}
# Ensure .CURDIR contains an absolute path without a trailing slash. Failed
# builds can occur when PORTSDIR is a symbolic link, or with something like
@@ -1607,6 +1607,13 @@
.endif
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/${_WRKDIR}
+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}
.endif
@@ -5182,6 +5189,15 @@
.endif
.endif
+.if !empty(BINARY_ALIAS)
+.if !target(create-binary-alias)
+create-binary-alias: ${BINARY_LINKDIR}
+.for target src in ${BINARY_ALIAS:C/=/ /}
+ @${RLN} `which ${src}` ${BINARY_LINKDIR}/${target}
+.endfor
+.endif
+.endif
+
.if defined(WARNING)
WARNING_WAIT?= 10
show-warnings:
@@ -5269,7 +5285,8 @@
700:post-patch 850:post-patch-script \
${_OPTIONS_patch} ${_USES_patch}
_CONFIGURE_DEP= patch
-_CONFIGURE_SEQ= 150:build-depends 151:lib-depends 200:configure-message \
+_CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \
+ 200:configure-message \
300:pre-configure 450:pre-configure-script \
490:run-autotools-fixup 500:do-configure 700:post-configure \
850:post-configure-script \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 28, 6:47 AM (6 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34425967
Default Alt Text
D12603.diff (2 KB)
Attached To
Mode
D12603: Add a mechanism to allow having binary found first in the path
Attached
Detach File
Event Timeline
Log In to Comment