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 Oct 20, 2015
1 parent 38ea73f commit eecd42e
Show file tree
Hide file tree
Showing 17 changed files with 190 additions and 108 deletions.
1 change: 1 addition & 0 deletions GIDs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ ldap:*:389:
tiarra:*:398:
uhub:*:411:
drweb:*:426:
varnish:*:429:
quasselcore:*:442:
callweaver:*:444:
ecartis:*:450:
Expand Down
1 change: 0 additions & 1 deletion LEGAL
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ fp-freebsd-ws-* security/f-prot Free for personal users on personal workstatio
fuse-emulator-roms* emulators/fuse-roms No explicit permission to redistribute
Opus-22.rom emulators/fuse-roms No explicit permission to redistribute
freefonts-* x11-fonts/freefonts License prohibits redistribution; see individual .license files
freqship/* sysutils/freqsdwn License agreement is required to download
fretsonfire/FretsOnFire-*-linux* games/fretsonfire-data Only Unreal Voodoo site is allowed to distribute the music
fvcom/sourcecode1.tar.gz science/fvcom Requires (free) registration
fvcom/sourcecode1.tar.gz science/fvcom-mpi Requires (free) registration
Expand Down
3 changes: 2 additions & 1 deletion MOVED
Original file line number Diff line number Diff line change
Expand Up @@ -7687,7 +7687,6 @@ devel/rubygem-mash|devel/rubygem-hashie|2015-06-30|Has expired: Deprecated by up
net/rubygem-bunny060|net/rubygem-bunny|2015-06-30|Has expired: Use net/rubygem-bunny instead
security/rubygem-hmac|security/rubygem-ruby-hmac|2015-06-30|Has expired: Duplicate of security/rubygem-ruby-hmac
www/ruby-amazon|www/ruby-aws|2015-06-30|Has expired: Rendered obsolete by upstream since Amazon shut down access to AWS API v3 (2008-03-31). Use www/ruby-aws instead
net/ntp-rc||2015-06-30|Has gone GA
net/ptpd2-devel|net/ptpd2|2015-07-02|Development version no longer necessary
devel/erlang-cowlib|www/erlang-cowlib|2015-07-03|Move to www where it belongs
net/py-google||2015-07-03|Google no longer supports the SOAP API for search
Expand Down Expand Up @@ -7893,3 +7892,5 @@ www/moodle27||2015-10-11|Has expired: Please upgrade to moodle28 or moodle29
graphics/epeg|devel/efl|2015-10-11|Has expired: Merged into devel/efl
x11-drivers/xf86-video-ati-ums||2015-10-13|Not supported by xorg-server 1.17
x11/nvidia-driver-173||2015-10-13|Does not support xorg-server 1.15 and higher
net-mgmt/bsnmptools||2015-10-16|Has expired: client tools (including SNMPv3 support) are part of the base system
security/yubikey-personalization|security/ykpers|2015-10-18|Port duplicate with security/ykpers
6 changes: 4 additions & 2 deletions Mk/Scripts/check-stagedir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ setup_plist_seds() {
unset PLIST_SUB_SED
# Used for generate_plist
sed_files_gen="s!^${PREFIX}/!!g; ${sed_plist_sub} \
${sed_portdocsexamples} /^share\/licenses/d;"
${sed_portdocsexamples} /^share\/licenses/d; \
\#${LOCALBASE}/lib/debug#d;"
sed_dirs_gen="s!^${PREFIX}/!!g; ${sed_plist_sub} s,^,@dir ,; \
${sed_portdocsexamples} \
/^@dir share\/licenses/d;"

# These prevent ignoring DOCS/EXAMPLES dirs with sed_portdocsexamples
sed_files="s!^${PREFIX}/!!g; ${sed_plist_sub} /^share\/licenses/d;"
sed_files="s!^${PREFIX}/!!g; ${sed_plist_sub} /^share\/licenses/d; \
\#${LOCALBASE}/lib/debug#d;"
sed_dirs="s!^${PREFIX}/!!g; ${sed_plist_sub} s,^,@dir ,; \
/^@dir share\/licenses/d;"

Expand Down
51 changes: 0 additions & 51 deletions Mk/Scripts/clean-depends-list.sh

This file was deleted.

45 changes: 39 additions & 6 deletions Mk/Scripts/depends-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ set -e
. ${dp_SCRIPTSDIR}/functions.sh

recursive=0
while getopts "r" FLAG; do
requires_wrkdir=0
while getopts "rw" FLAG; do
case "${FLAG}" in
r)
recursive=1
;;
w)
# Only list dependencies that have a WRKDIR. Used for
# 'make clean-depends'.
requires_wrkdir=1
;;
*)
echo "Unknown flag" >&2
exit 1
Expand All @@ -20,12 +26,19 @@ while getopts "r" FLAG; do
done
shift $((OPTIND-1))

validate_env dp_ALLDEPENDS dp_PORTSDIR dp_PKGNAME
[ ${recursive} -eq 1 ] && validate_env dp_MAKE
validate_env dp_PORTSDIR dp_PKGNAME
if [ ${recursive} -eq 1 -o ${requires_wrkdir} -eq 1 ]; then
validate_env dp_MAKE
# Cache command executions to avoid looking them up again in every
# sub-make.
MAKE="${dp_MAKE}" PORTSDIR="${dp_PORTSDIR}" export_ports_env >/dev/null
fi

set -u

check_dep() {
local _dep wrkdir show_dep

for _dep ; do
myifs=${IFS}
IFS=:
Expand All @@ -41,16 +54,36 @@ check_dep() {
*\ ${d}\ *) continue ;; # Already checked
esac
checked="${checked} ${d}"
# Check if the dependency actually exists or skip otherwise.
if [ ! -d ${d} ]; then
echo "${dp_PKGNAME}: \"${d}\" non-existent -- dependency list incomplete" >&2
continue
fi
echo ${d}

# Grab any needed vars from the port.

if [ ${requires_wrkdir} -eq 1 -a ${recursive} -eq 1 ]; then
set -- $(${dp_MAKE} -C ${d} -VWRKDIR -V_UNIFIED_DEPENDS)
wrkdir="$1"
shift
elif [ ${requires_wrkdir} -eq 1 -a ${recursive} -eq 0 ]; then
set -- "$(${dp_MAKE} -C ${d} -VWRKDIR)"
wrkdir="$1"
elif [ ${recursive} -eq 1 ]; then
set -- $(${dp_MAKE} -C ${d} -V_UNIFIED_DEPENDS)
fi

# If a WRKDIR is required to show the dependency, check for it.
show_dep=1
if [ ${requires_wrkdir} -eq 1 ] && ! [ -d "${wrkdir}" ]; then
show_dep=0
fi
[ ${show_dep} -eq 1 ] && echo ${d}
if [ ${recursive} -eq 1 ]; then
check_dep $(${dp_MAKE} -C ${d} -V_UNIFIED_DEPENDS)
check_dep $@
fi
done
}

checked=
check_dep ${dp_ALLDEPENDS}
check_dep $@
12 changes: 10 additions & 2 deletions Mk/Scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,14 @@ validate_env() {
}

export_ports_env() {
local export_vars make_cmd make_env var results value
local export_vars make_cmd make_env var results value uses

validate_env MAKE PORTSDIR

uses="perl5 python"

make_env="\
_PORTS_ENV_CHECK=1 \
PACKAGE_BUILDING=1 \
GNU_CONFIGURE=1 \
USE_JAVA=1 \
Expand All @@ -181,13 +184,17 @@ export_ports_env() {
OPSYS \
OSREL \
OSVERSION \
PYTHON_PORTVERSION \
PYTHONBASE \
UID \
_JAVA_OS_LIST_REGEXP \
_JAVA_PORTS_INSTALLED \
_JAVA_VENDOR_LIST_REGEXP \
_JAVA_VERSION_LIST_REGEXP \
_OSRELEASE \
_PERL5_FROM_BIN \
_PKG_CHECKED \
_PYTHON_DEFAULT_VERSION \
_SMP_CPUS \
"

Expand All @@ -196,7 +203,8 @@ export_ports_env() {
done

# Bring in all the vars, but not empty ones.
eval $(${MAKE} -f ${PORTSDIR}/Mk/bsd.port.mk ${make_cmd} | grep -v '=$')
eval $(${MAKE} -f ${PORTSDIR}/Mk/bsd.port.mk ${make_cmd} \
USES="${uses}" | grep -v '=$')
for var in ${export_vars}; do
# Export and display non-empty ones. This is not redundant
# with above since we're looping on all vars here; do not
Expand Down
46 changes: 46 additions & 0 deletions Mk/Scripts/generate-symbols.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#! /bin/sh
# $FreeBSD$
# Maintainer: [email protected]

msg() {
echo "====> $@"
}

msg "Finding symbols"

# Find all ELF files, strip them, and move symbols to PREFIX/usr/lib/debug/ORIG_PATH
ELF_FILES=$(mktemp -t elf_files)
LF=$(printf '\nX')
LF=${LF%X}
find ${STAGEDIR} -type f \
-exec /usr/bin/file -nNF "${LF}" {} + | while read f; do
read output
case "${output}" in
ELF\ *\ executable,\ *FreeBSD*,\ not\ stripped*|\
ELF\ *\ shared\ object,\ *FreeBSD*,\ not\ stripped*)
echo "${f}"
;;
esac
done > ${ELF_FILES}

# Create all of the /usr/local/lib/* dirs
lib_dir="${STAGEDIR}.debug${PREFIX}/lib/debug"
sed -e "s,^${STAGEDIR}${PREFIX}/,${lib_dir}/," -e 's,/[^/]*$,,' \
${ELF_FILES} | sort -u | xargs mkdir -p

while read staged_elf_file; do
elf_file_name="${staged_elf_file##*/}"
lib_dir_dest="${lib_dir}/${staged_elf_file#${STAGEDIR}${PREFIX}/}"
# Strip off filename
lib_dir_dest="${lib_dir_dest%/*}"
# Save symbols to f.debug
objcopy --only-keep-debug "${staged_elf_file}" \
"${lib_dir_dest}/${elf_file_name}.debug"
# Strip and add a reference to f.debug for finding the symbols.
objcopy --strip-debug --strip-unneeded \
--add-gnu-debuglink="${lib_dir_dest}/${elf_file_name}.debug" \
"${staged_elf_file}"
msg "Saved symbols for ${staged_elf_file}"
done < ${ELF_FILES}

rm -f ${ELF_FILES}
14 changes: 6 additions & 8 deletions Mk/Scripts/qa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,13 @@ stripped() {
[ -n "${STRIP}" ] || return 0
# Split file and result into 2 lines and read separately to ensure
# files with spaces are kept intact.
find ${STAGEDIR} -type f \
-exec /usr/bin/file --exclude ascii -nNF "${LF}" {} + |
# Using readelf -h ... /ELF Header:/ will match on all ELF files.
find ${STAGEDIR} -type f ! -name '*.a' \
-exec readelf -S {} + 2>/dev/null | awk '\
/File:/ {sub(/File: /, "", $0); file=$0} \
/SYMTAB/ {print file}' |
while read f; do
read output
case "${output}" in
*ELF\ *\ executable,\ *FreeBSD*,\ not\ stripped*|*ELF\ *\ shared\ object,\ *FreeBSD*,\ not\ stripped*)
warn "'${f#${STAGEDIR}${PREFIX}/}' is not stripped consider trying INSTALL_TARGET=install-strip or using \${STRIP_CMD}"
;;
esac
warn "'${f#${STAGEDIR}${PREFIX}/}' is not stripped consider trying INSTALL_TARGET=install-strip or using \${STRIP_CMD}"
done
}

Expand Down
2 changes: 2 additions & 0 deletions Mk/Uses/perl5.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ IGNORE= Incorrect 'USES+=perl5:${perl5_ARGS}' perl5 takes no arguments
USE_PERL5?= run build

# remove when 5.20 goes away.
.if !defined(_PORTS_ENV_CHECK)
.sinclude "${LOCALBASE}/etc/perl5_version"
.endif
.if defined(PERL_VERSION)
PERL5_DEPEND= ${PERL5}
THIS_IS_OLD_PERL= yes
Expand Down
9 changes: 9 additions & 0 deletions Mk/Uses/python.mk
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,12 @@ WARNING+= "PYTHON3_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=p
.endif

.if exists(${LOCALBASE}/bin/python)
.if !defined(_PYTHON_DEFAULT_VERSION)
_PYTHON_DEFAULT_VERSION!= (${LOCALBASE}/bin/python -c \
'import sys; print("%d.%d" % sys.version_info[:2])' 2> /dev/null \
|| ${ECHO_CMD} ${_PYTHON_PORTBRANCH}) | ${TAIL} -1
.endif
_EXPORTED_VARS+= _PYTHON_DEFAULT_VERSION
.if defined(PYTHON_DEFAULT) && (${PYTHON_DEFAULT} != ${_PYTHON_DEFAULT_VERSION})
WARNING+= "Your requested default python version ${PYTHON_DEFAULT} is different from the installed default python interpreter version ${_PYTHON_DEFAULT_VERSION}"
.endif
Expand Down Expand Up @@ -382,7 +385,10 @@ PYTHON_MAJOR_VER= ${PYTHON_VER:R}
PYTHON_REL= # empty
PYTHON_ABIVER= # empty
PYTHON_PORTSDIR= ${_PYTHON_RELPORTDIR}${PYTHON_SUFFIX}
.if !defined(PYTHON_PORTVERSION)
PYTHON_PORTVERSION!= ${MAKE} -V PORTVERSION -C ${PYTHON_PORTSDIR}
.endif
_EXPORTED_VARS+= PYTHON_PORTVERSION
# Create a 4 integer version string, prefixing 0 to the last token if
# it's a single character. Only use the the first 3 tokens of
# PORTVERSION to support pre-release versions (rc3, alpha4, etc) of
Expand All @@ -395,8 +401,11 @@ PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION}
PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags
.endif

.if !defined(PYTHONBASE)
PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \
2> /dev/null || ${ECHO_CMD} ${LOCALBASE}) | ${TAIL} -1
.endif
_EXPORTED_VARS+= PYTHONBASE

PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/python${_PYTHON_VERSION}${PYTHON_ABIVER}
PYTHON_LIBDIR= ${PYTHONBASE}/lib/python${_PYTHON_VERSION}
Expand Down
Loading

0 comments on commit eecd42e

Please sign in to comment.