Skip to content

Commit

Permalink
Framework: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: FreeBSD
  • Loading branch information
fichtner committed Aug 19, 2016
1 parent e3bd2e0 commit 658a756
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 23 deletions.
18 changes: 18 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@ in the release notes and/or placed into UPDATING.

All ports committers are allowed to commit to this file.

20160317:
AUTHOR: [email protected]

This adds the possibility to use regular expressions for the makeplist stage
of the PLIST_SUB life.

From time to time, the values are too generic, and they get in the way of
other stuff.

This adds the possibility to have a `VAR_regex=regex` that will be used
instead of the `VAR=string` to search for possible replacements.

For example, in lang/perl5*, there is PERL_ARCH=mach, which will get replaced
in paths if a file is called, say "machine", will end up being
"%%PERL_ARCH%%ine". Adding PERL_ARCH_regex="\bmach\b" will ensure only full
words are replaced, so machine will stay machine, but "lib/mach/foo "will
still be replaced by "lib/%%PERL_ARCH%%/foo".

20160803:
AUTHOR: [email protected]

Expand Down
1 change: 1 addition & 0 deletions MOVED
Original file line number Diff line number Diff line change
Expand Up @@ -8620,3 +8620,4 @@ math/bamg||2016-08-14|No longer maintained upstream as is now part of freefem++
www/pecl-APC||2016-08-15|No longer maintained upstream, and not working with PHP > 5.4
textproc/libtext-wrapi18n-perl|textproc/p5-Text-WrapI18N|2016-08-15|Duplicate
textproc/libtext-charwidth-perl|textproc/p5-Text-CharWidth|2016-08-15|Duplicate
net-mgmt/netams||2016-08-18|Has expired: unmaintained, broken on most FreeBSD platforms
18 changes: 17 additions & 1 deletion Mk/Scripts/depends-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ set -e
. ${dp_SCRIPTSDIR}/functions.sh

recursive=0
missing=0
requires_wrkdir=0
while getopts "rw" FLAG; do
while getopts "mrw" FLAG; do
case "${FLAG}" in
m)
missing=1
recursive=1
;;
r)
recursive=1
;;
Expand Down Expand Up @@ -38,6 +43,10 @@ fi

set -u

if [ ${missing} -eq 1 ]; then
existing=$(${dp_PKG_INFO} -aoq|paste -d ' ' -s -)
fi

check_dep() {
local _dep wrkdir show_dep

Expand All @@ -62,6 +71,13 @@ check_dep() {
continue
fi

# If only looking for missing, show if missing
if [ ${missing} -eq 1 ]; then
case " ${existing} " in
*\ ${d#${PORTSDIR}/}\ *) continue ;; # We have it, nothing to see
esac
fi

# Grab any needed vars from the port.

if [ ${requires_wrkdir} -eq 1 -a ${recursive} -eq 1 ]; then
Expand Down
4 changes: 4 additions & 0 deletions Mk/Uses/cran.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ cran-auto-plist:
.endif

.if ${cran_ARGS:Mcompiles}
_USES_install+= 755:cran-strip
cran-strip:
${FIND} ${STAGEDIR}${PREFIX}/${R_MOD_DIR} -name '*.so' -exec ${STRIP_CMD} {} +
.include "${PORTSDIR}/math/R/compiler.mk"
.include "${USESDIR}/fortran.mk"
.endif

.endif #_INCLUDE_USES_CRAN_MK
4 changes: 2 additions & 2 deletions Mk/bsd.options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
# CONFLICTS_INSTALL CPPFLAGS CXXFLAGS DESKTOP_ENTRIES DISTFILES EXTRA_PATCHES
# EXTRACT_ONLY GH_ACCOUNT GH_PROJECT GH_TAGNAME IGNORE INFO INSTALL_TARGET
# LDFLAGS LIBS MAKE_ARGS MAKE_ENV PATCHFILES PATCH_SITES PLIST_DIRS
# PLIST_DIRSTRY PLIST_FILES PLIST_SUB PORTDOCS PORTEXAMPLES SUB_FILES SUB_LIST
# PLIST_FILES PLIST_SUB PORTDOCS PORTEXAMPLES SUB_FILES SUB_LIST
# TEST_TARGET USES,
# defining ${opt}_${variable} will add its content to the actual variable when
# the option is enabled. Defining ${opt}_${variable}_OFF will add its content
Expand All @@ -165,7 +165,7 @@ _OPTIONS_FLAGS= ALL_TARGET BROKEN CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \
DESKTOP_ENTRIES DISTFILES EXTRA_PATCHES EXTRACT_ONLY \
GH_ACCOUNT GH_PROJECT GH_TAGNAME GH_TUPLE IGNORE INFO \
INSTALL_TARGET LDFLAGS LIBS MAKE_ARGS MAKE_ENV MASTER_SITES \
PATCHFILES PATCH_SITES PLIST_DIRS PLIST_DIRSTRY PLIST_FILES \
PATCHFILES PATCH_SITES PLIST_DIRS PLIST_FILES \
PLIST_SUB PORTDOCS PORTEXAMPLES SUB_FILES SUB_LIST \
TEST_TARGET USES
_OPTIONS_DEPENDS= PKG FETCH EXTRACT PATCH BUILD LIB RUN
Expand Down
26 changes: 12 additions & 14 deletions Mk/bsd.port.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1404,10 +1404,6 @@ USES+= gnome
USES+= mate
.endif

.if defined(USE_BDB)
USES+=bdb:${USE_BDB}
.endif

.if defined(USE_MYSQL)
USE_MYSQL:= ${USE_MYSQL:N[yY][eE][sS]:Nclient}
.if defined(WANT_MYSQL_VER)
Expand Down Expand Up @@ -1604,13 +1600,18 @@ SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \
WWWDIR=${WWWDIR} ETCDIR=${ETCDIR}
# This is used for check-stagedir.sh and check_leftover.sh to replace
# directories/files with PLIST_SUB %%KEYS%%.
# Remove VARS which values are PLIST_SUB_SED_MIN long or shorter
PLIST_SUB_SED_MIN?= 2
PLIST_SUB_SED_tmp1= ${PLIST_SUB:C/.*=.{1,${PLIST_SUB_SED_MIN}}$//g}
# Remove VARS that are too generic
# Remove empty values
# Remove @comment values
PLIST_SUB_SED_tmp2= ${PLIST_SUB_tmp1:NEXTRACT_SUFX=*:NOSREL=*:NLIB32DIR=*:NPREFIX=*:NLOCALBASE=*:NRESETPREFIX=*:N*="":N*="@comment*}
# Handle VARS for which there is a _regex entry
PLIST_SUB_SED_tmp3?= ${PLIST_SUB_SED_tmp1:C/(${PLIST_SUB:M*_regex=*:C/_regex=.*/=.*/:Q:S/\\ /|/g:S/\\//g})//:C/(.*)_regex=(.*)/\1=\2/}
# Remove quotes
# Replace . with \. for later sed(1) usage
PLIST_SUB_SED_MIN?= 2
PLIST_SUB_SED?= ${PLIST_SUB:C/.*=.{1,${PLIST_SUB_SED_MIN}}$//g:NEXTRACT_SUFX=*:NOSREL=*:NLIB32DIR=*:NPREFIX=*:NLOCALBASE=*:NRESETPREFIX=*:N*="":N*="@comment*:C/([^=]*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\./\\./g}
PLIST_SUB_SED?= ${PLIST_SUB_SED_tmp3:C/([^=]*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\./\\./g}

# kludge to strip trailing whitespace from CFLAGS;
# sub-configure will not # survive double space
Expand Down Expand Up @@ -4007,10 +4008,12 @@ DEPENDS-LIST= \
PORTSDIR="${PORTSDIR}" \
dp_MAKE="${MAKE}" \
dp_PKGNAME="${PKGNAME}" \
dp_PKG_INFO="${PKG_INFO}" \
dp_SCRIPTSDIR="${SCRIPTSDIR}" \
${SH} ${SCRIPTSDIR}/depends-list.sh

ALL-DEPENDS-LIST= ${DEPENDS-LIST} -r ${_UNIFIED_DEPENDS:Q}
MISSING-DEPENDS-LIST= ${DEPENDS-LIST} -m ${_UNIFIED_DEPENDS:Q}
TEST-DEPENDS-LIST= ${DEPENDS-LIST} ${TEST_DEPENDS:Q}
CLEAN-DEPENDS-LIST= ${DEPENDS-LIST} -wr ${_UNIFIED_DEPENDS:Q}
CLEAN-DEPENDS-LIMITED-LIST= ${DEPENDS-LIST} -w ${_UNIFIED_DEPENDS:Q}
Expand Down Expand Up @@ -4290,12 +4293,8 @@ package-recursive: package

# Show missing dependencies
missing:
@_origins=$$(${PKG_INFO} -aoq); \
for dir in $$(${ALL-DEPENDS-LIST}); do \
_origin=$${dir##${PORTSDIR}/}; \
if ! $$(${ECHO_CMD} $${_origins} | ${GREP} -q $${_origin}); then \
${ECHO_CMD} $${_origin}; \
fi; \
@for dir in $$(${MISSING-DEPENDS-LIST}); do \
echo $${dir#${PORTSDIR}/}; \
done

# Show missing dependencies by name
Expand Down Expand Up @@ -4458,8 +4457,7 @@ generate-plist: ${WRKDIR}
${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} >> ${TMPPLIST}; \
fi

# Keep PLIST_DIRSTRY as compatibility
.for dir in ${PLIST_DIRS} ${PLIST_DIRSTRY}
.for dir in ${PLIST_DIRS}
@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dir ,' >> ${TMPPLIST}
.endfor

Expand Down
6 changes: 3 additions & 3 deletions Mk/bsd.sanity.mk
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ SANITY_UNSUPPORTED= USE_OPENAL USE_FAM USE_MAKESELF USE_ZIP USE_LHA USE_CMAKE \
PYDISTUTILS_AUTOPLIST PYTHON_PY3K_PLIST_HACK PYDISTUTILS_NOEGGINFO \
USE_PYTHON_PREFIX USE_BZIP2 USE_XZ USE_PGSQL NEED_ROOT \
UNIQUENAME LATEST_LINK USE_SQLITE USE_FIREBIRD USE_PHPEXT \
USE_ZENDEXT USE_PHP_BUILD
SANITY_DEPRECATED= PYTHON_PKGNAMESUFFIX USE_AUTOTOOLS PLIST_DIRSTRY \
USE_BDB USE_MYSQL WANT_MYSQL_VER USE_OPENSSL \
USE_ZENDEXT USE_PHP_BUILD USE_BDB PLIST_DIRSTRY
SANITY_DEPRECATED= PYTHON_PKGNAMESUFFIX USE_AUTOTOOLS \
USE_MYSQL WANT_MYSQL_VER USE_OPENSSL \
USE_PHPIZE WANT_PHP_CLI WANT_PHP_CGI WANT_PHP_MOD \
WANT_PHP_WEB WANT_PHP_EMB
SANITY_NOTNEEDED= WX_UNICODE
Expand Down
4 changes: 2 additions & 2 deletions Mk/bsd.tex.mk
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,12 @@ do-fmtutil-$F:
${RMDIR} ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/web2c || ${TRUE}
${RMDIR} ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR} || ${TRUE}
_PLIST_FILES+= ${TEX_FORMAT_${F:tu}_FILES}
_PLIST_DIRSTRY+=${TEX_FORMAT_${F:tu}_DIRS}
_PLIST_DIRS+=${TEX_FORMAT_${F:tu}_DIRS}
_PLIST_FILES+= ${TEX_FORMAT_${F:tu}_BIN}
. endfor
post-install-script: do-fmtutil
PLIST_FILES= ${_PLIST_FILES:O:u}
PLIST_DIRSTRY= ${_PLIST_DIRSTRY:O:u} ${TEXMFVARDIR}/web2c
PLIST_DIRS= ${_PLIST_DIRS:O:u} ${TEXMFVARDIR}/web2c
.endif

.if !empty(USE_TEX:Mupdmap)
Expand Down
2 changes: 1 addition & 1 deletion Tools/scripts/addport
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ my @commands;
my $passenv = "";
if ($addlchk && -f $portlint) {
$passenv = "DISTDIR=\"$distdir\"" if -d $distdir;
$passenv = $passenv . " PORTSDIR=\"$tmpdir\"" if !$nomkdir;
$passenv = $passenv . " PORTSDIR=\"$portsdir\"" if !$nomkdir;
push(@commands, "$make $passenv clean check-categories");
push(@commands, "$portlint $plint_args");
push(@commands, "$make $passenv FETCH_BEFORE_ARGS='-A' checksum") if !$nofetch;
Expand Down

0 comments on commit 658a756

Please sign in to comment.