mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
The following functional changes were made to bsd.sites.mk:
* MASTER_SITES variable can now look like MACRO1/subdir1 MACRO2/subdir2, and be expanded in a way that you expect it to, that is apply different subdirs to different sites. You can safely replace ${M_S_FOO:S/%SUBDIR%/bar/} with FOO/bar. * If M_S_SUBDIR is unset, a macro in M_S won't set it anymore, but rather substitute %SUBDIR% all by itself. Now it's possible to use macros with different default subdirs and they will expand in a proper way.
This commit is contained in:
parent
e6f344844d
commit
aa5fbade3d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=172060
2 changed files with 29 additions and 5 deletions
13
CHANGES
13
CHANGES
|
@ -10,6 +10,19 @@ in the release notes.
|
||||||
|
|
||||||
All ports committers are allowed to commit to this file.
|
All ports committers are allowed to commit to this file.
|
||||||
|
|
||||||
|
20060903:
|
||||||
|
AUTHOR: sat@FreeBSD.org
|
||||||
|
The following functional changes were made to bsd.sites.mk:
|
||||||
|
|
||||||
|
* MASTER_SITES variable can now look like MACRO1/subdir1 MACRO2/subdir2, and
|
||||||
|
be expanded in a way that you expect it to, that is apply different subdirs
|
||||||
|
to different sites. You can safely replace ${M_S_FOO:S/%SUBDIR%/bar/} with
|
||||||
|
FOO/bar.
|
||||||
|
|
||||||
|
* If M_S_SUBDIR is unset, a macro in M_S won't set it anymore, but rather
|
||||||
|
substitute %SUBDIR% all by itself. Now it's possible to use macros with
|
||||||
|
different default subdirs and they will expand in a proper way.
|
||||||
|
|
||||||
20060805:
|
20060805:
|
||||||
AUTHOR: sat@FreeBSD.org
|
AUTHOR: sat@FreeBSD.org
|
||||||
The following functional changes were made to bsd.sites.mk:
|
The following functional changes were made to bsd.sites.mk:
|
||||||
|
|
|
@ -1294,15 +1294,22 @@ MASTER_SITES_SUBDIRS= \
|
||||||
SOURCEFORGE:${PORTNAME:L} \
|
SOURCEFORGE:${PORTNAME:L} \
|
||||||
SOURCEFORGE_EXTENDED:${PORTNAME:L}
|
SOURCEFORGE_EXTENDED:${PORTNAME:L}
|
||||||
|
|
||||||
.if defined(MASTER_SITES) && ${MASTER_SITES:N*/*}
|
.if defined(MASTER_SITES) && ${MASTER_SITES:N*\:/*}
|
||||||
|
|
||||||
.for _site__ in ${MASTER_SITES}
|
.for _site__ in ${MASTER_SITES}
|
||||||
_site_=${_site__}
|
_site_=${_site__}
|
||||||
. if ${_site_:M*/*}
|
. if ${_site_:M*\:/*}
|
||||||
MASTER_SITES_EXP+= ${_site_}
|
MASTER_SITES_EXP+= ${_site_}
|
||||||
MASTER_SITES_EXP:= ${MASTER_SITES_EXP}
|
MASTER_SITES_EXP:= ${MASTER_SITES_EXP}
|
||||||
. else
|
. else
|
||||||
_site_url_= ${_site_:C@^(.*):[^/:]+$@\1@}
|
_site_urlpath_= ${_site_:C@^(.*):[^/:]+$@\1@}
|
||||||
|
. if ${_site_urlpath_:M*/*}
|
||||||
|
_site_url_= ${_site_urlpath_:C@^([^/]+)/.*$@\1@}
|
||||||
|
_site_subdir_= ${_site_urlpath_:S/^${_site_urlpath_:C@^([^/]+)/.*$@\1@}//:S!^/!!:S!/$!!}
|
||||||
|
. else
|
||||||
|
_site_url_= ${_site_urlpath_}
|
||||||
|
.undef _site_subdir_
|
||||||
|
. endif
|
||||||
_site_group_= ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://}
|
_site_group_= ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://}
|
||||||
. for _abbrev_ in ${MASTER_SITES_ABBREVS}
|
. for _abbrev_ in ${MASTER_SITES_ABBREVS}
|
||||||
. if ${_site_url_} == ${_abbrev_:C/:.*//}
|
. if ${_site_url_} == ${_abbrev_:C/:.*//}
|
||||||
|
@ -1310,12 +1317,16 @@ _site_url_= ${_abbrev_:C/.*://}
|
||||||
. endif
|
. endif
|
||||||
. endfor
|
. endfor
|
||||||
. for _subdir_ in ${MASTER_SITES_SUBDIRS}
|
. for _subdir_ in ${MASTER_SITES_SUBDIRS}
|
||||||
. if ${_site_url_} == ${_subdir_:C/:.*//}
|
. if ${_site_url_} == ${_subdir_:C/:.*//} && !defined(MASTER_SITE_SUBDIR)
|
||||||
MASTER_SITE_SUBDIR?= ${_subdir_:C/.*://}
|
_site_subdir_?= ${_subdir_:C/.*://}
|
||||||
. endif
|
. endif
|
||||||
. endfor
|
. endfor
|
||||||
. ifdef MASTER_SITE_${_site_url_}
|
. ifdef MASTER_SITE_${_site_url_}
|
||||||
|
. ifdef _site_subdir_
|
||||||
|
MASTER_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S^%SUBDIR%^${_site_subdir_}^:S/$/:${_site_group_}/:S/:$//}
|
||||||
|
. else
|
||||||
MASTER_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//}
|
MASTER_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//}
|
||||||
|
. endif
|
||||||
MASTER_SITES_EXP:= ${MASTER_SITES_EXP}
|
MASTER_SITES_EXP:= ${MASTER_SITES_EXP}
|
||||||
. endif
|
. endif
|
||||||
. endif
|
. endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue