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 Jan 11, 2023
1 parent 9502085 commit 87e8de0
Show file tree
Hide file tree
Showing 26 changed files with 469 additions and 226 deletions.
13 changes: 13 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ in the release notes and/or placed into UPDATING.

All ports committers are allowed to commit to this file.

20230111:
AUTHOR: [email protected]

USE_PYTHON=pep517 has been added to facilitate building using the
new format.

USE_PYTHON=pep517 takes no arguments. Operation is similar to
USE_PYTHON=distutils, although the build backend specified in
pyproject.toml shall be specified in BUILD_DEPENDS.

A usage guide and implementation primer is available at:
https://wiki.freebsd.org/Python/PEP-517

20221217:
AUTHOR: [email protected]

Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The compilation of software known as the FreeBSD Ports Collection is
distributed under the following terms:

Copyright (C) 1994-2022 The FreeBSD Project.
Copyright (C) 1994-2023 The FreeBSD Project.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
124 changes: 117 additions & 7 deletions MOVED

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Mk/Features/lto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LTO_Include_MAINTAINER= [email protected]

. if !defined(LTO_UNSAFE) || defined(LTO_DISABLE_CHECK)
. if "${ARCH}" == "powerpc64" || "${ARCH}" == "riscv64" && !defined(LTO_DISABLE_CHECK)
IGNORE= LTO is currently broken on ${ARCH}, to override set LTO_DISABLE_CHECK=yes
DEV_WARNING+= "LTO is currently broken on powerpc64 and riscv64, to override set LTO_DISABLE_CHECK=yes"
. elif defined(_INCLUDE_USES_CARGO_MK)
CARGO_ENV+= CARGO_PROFILE_RELEASE_LTO="true" \
CARGO_PROFILE_RELEASE_PANIC="abort" \
Expand Down
2 changes: 1 addition & 1 deletion Mk/Scripts/makesum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cd "${dp_DISTDIR}"
# So, we extract the content of the distinfo file minus the TIMESTAMP, if it
# contains a TIMESTAMP.
if [ -f "${dp_DISTINFO_FILE}" ] && grep -q "^TIMESTAMP " ${dp_DISTINFO_FILE}; then
grep -v "^TIMESTAMP " ${dp_DISTINFO_FILE} > ${DISTINFO_OLD}
grep -v "^TIMESTAMP " ${dp_DISTINFO_FILE} > ${DISTINFO_OLD} || true
fi

for file in ${dp_CKSUMFILES}; do
Expand Down
10 changes: 9 additions & 1 deletion Mk/Uses/cargo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ WRKSRC_crate_${_crate}= ${WRKDIR}/${_wrksrc}

CARGO_BUILDDEP?= yes
. if ${CARGO_BUILDDEP:tl} == "yes"
BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.65.0:lang/${RUST_DEFAULT}
BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.66.0:lang/${RUST_DEFAULT}
. elif ${CARGO_BUILDDEP:tl} == "any-version"
BUILD_DEPENDS+= ${RUST_DEFAULT}>=0:lang/${RUST_DEFAULT}
. endif
Expand Down Expand Up @@ -139,6 +139,11 @@ CARGO_ENV+= \
CARGO_ENV+= RUST_BACKTRACE=1
. endif

. if !defined(LTO_UNSAFE) || (defined(LTO_DISABLE_CHECK) && ${ARCH} == powerpc64) || (defined(LTO_DISABLE_CHECK) && ${ARCH} == riscv64)
_CARGO_MSG= "===> Additional optimization to port applied"
WITH_LTO= yes
. endif

# Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk
. if ${ARCH} == amd64 || ${ARCH} == i386
RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/}
Expand Down Expand Up @@ -295,6 +300,9 @@ cargo-configure:
# Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64
@${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \
${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh
. if defined(_CARGO_MSG)
@${ECHO_MSG} ${_CARGO_MSG}
. endif
@${ECHO_MSG} "===> Cargo config:"
@${MKDIR} ${WRKDIR}/.cargo
@: > ${WRKDIR}/.cargo/config.toml
Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/cmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ _INCLUDE_USES_CMAKE_MK= yes

_valid_ARGS= insource run noninja testing _internal

_CMAKE_VERSION= 3.24.3
_CMAKE_VERSION= 3.25.1

# Sanity check
. for arg in ${cmake_ARGS}
Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/firebird.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ FIREBIRD_VER= ${FIREBIRD_DEFAULT}

# When adding a version, please keep the comment in
# Mk/bsd.default-versions.mk in sync.
VALID_FIREBIRD_VER= 2.5 3.0 4.0
VALID_FIREBIRD_VER= 3.0 4.0

. if ! ${VALID_FIREBIRD_VER:M${FIREBIRD_DEFAULT}}
IGNORE= Invalid Firebird default version ${FIREBIRD_DEFAULT}; valid versions are ${VALID_FIREBIRD_VER}
Expand Down
8 changes: 4 additions & 4 deletions Mk/Uses/kde.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ KDE_PLASMA_VERSION?= 5.24.7
KDE_PLASMA_BRANCH?= stable

# Current KDE frameworks.
KDE_FRAMEWORKS_VERSION?= 5.100.0
KDE_FRAMEWORKS_VERSION?= 5.101.0
KDE_FRAMEWORKS_BRANCH?= stable

# Current KDE applications.
KDE_APPLICATIONS_VERSION?= 22.12.0
KDE_APPLICATIONS_SHLIB_VER?= 5.22.0
KDE_APPLICATIONS_VERSION?= 22.12.1
KDE_APPLICATIONS_SHLIB_VER?= 5.22.1
# G as in KDE Gear, and as in "don't make the variable name longer than required"
KDE_APPLICATIONS_SHLIB_G_VER?= 22.12.0
KDE_APPLICATIONS_SHLIB_G_VER?= 22.12.1
KDE_APPLICATIONS_BRANCH?= stable

# Extended KDE universe applications.
Expand Down
90 changes: 90 additions & 0 deletions Mk/Uses/octave.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Support for octave based ports
#
# Feature: octave
# Usage: USES=octave
# Valid ARGS: (none), env
# - env : Loads only one environmental variable OCTAVE_VERSION
# MAINTAINER: [email protected]
#
# Common code to install octave-forge packages.
# It is, in effect, a wrapper using the package handling already built
# into math/octave.

.if !defined(_INCLUDE_USES_OCTAVE_MK)
_INCLUDE_USES_OCTAVE_MK= yes

_valid_octave_ARGS= env

# Sanity check
. for arg in ${octave_ARGS}
. if empty(_valid_octave_ARGS:M${arg})
IGNORE= Incorrect 'USES+= octave:${octave_ARGS}' usage: argument [${arg}] is not recognized
. endif
. endfor

OCTAVE_VERSION= 7.3.0

. if empty(octave_ARGS:Menv)
BUILD_DEPENDS+= octave:math/octave
RUN_DEPENDS+= octave:math/octave \
${LOCALBASE}/libexec/octave/load-octave-pkg:math/octave-forge-base
LIB_DEPENDS+= libpcre.so:devel/pcre

. if ! ${USES:Mcompiler}
_USES_POST+= compiler:c++14-lang
. endif

. if ! ${USES:Mfortran}
_USES_POST+= fortran
. endif

. if ! ${USES:Mgmake}
_USES_POST+= gmake
. endif

CXXFLAGS+= -I${LOCALBASE}/include/octave-${OCTAVE_VERSION}
CFLAGS+= -I${LOCALBASE}/include/octave-${OCTAVE_VERSION}
CPPFLAGS+= -I${LOCALBASE}/include/octave-${OCTAVE_VERSION}

DIST_SUBDIR?= octave-forge
OCTAVE_PKGNAME= ${PORTNAME:S/octave-forge-//}
OCTAVE_DISTNAME= ${OCTAVE_PKGNAME}-${DISTVERSION}
OCTAVE_TARBALLS_DIR= ${LOCALBASE}/share/octave/tarballs
OCTAVE_INSTALL_TARBALLS_DIR= ${STAGEDIR}${PREFIX}/share/octave/tarballs
OCTAVE_SRC?= ${DISTNAME}
WRKSRC?= ${WRKDIR}/${OCTAVE_SRC}/src

MAKE_ENV+= PACKAGE=${OCTAVE_DISTNAME}.tar.gz
MAKE_ARGS= CC="${CC}" CXX="${CXX}" LD_CXX="${CXX}" DL_LD="${CXX}" MKOCTFILE="${LOCALBASE}/bin/mkoctfile" OCTAVE_VERSION=-${OCTAVE_VERSION}

LOAD_OCTAVE_PKG_CMD= ${LOCALBASE}/libexec/octave/load-octave-pkg

. if !target(pre-install)
pre-install: octave-pre-install
. endif # !target(pre-install)

. if !target(do-install)
do-install: octave-do-install
. endif # !target(do-install)

. if !target(post-install)
post-install: octave-post-install
. endif # !target(post-install)

octave-pre-install:
${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_SRC}

octave-do-install:
${MKDIR} ${OCTAVE_INSTALL_TARBALLS_DIR}
${INSTALL_DATA} ${WRKDIR}/${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_INSTALL_TARBALLS_DIR}/.
${LN} -s -f ${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_INSTALL_TARBALLS_DIR}/${OCTAVE_PKGNAME}.tar.gz

octave-post-install:
@${ECHO_CMD} "share/octave/tarballs/${OCTAVE_DISTNAME}.tar.gz" >> ${TMPPLIST}
@${ECHO_CMD} "share/octave/tarballs/${OCTAVE_PKGNAME}.tar.gz" >> ${TMPPLIST}
@${ECHO_CMD} "@postunexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST}
@${ECHO_CMD} "@postexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST}
. endif # empty(octave_ARGS:Menv)

.endif # !defined(_INCLUDE_USES_OCTAVE_MK)
22 changes: 2 additions & 20 deletions Mk/Uses/php.mk
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ DIST_SUBDIR= PECL

PHPBASE?= ${LOCALBASE}

_ALL_PHP_VERSIONS= 74 80 81 82
_ALL_PHP_VERSIONS= 80 81 82

# Make the already installed PHP the default one.
. if exists(${PHPBASE}/etc/php.conf)
Expand Down Expand Up @@ -164,10 +164,6 @@ FLAVOR= ${FLAVORS:[1]}
. endif
. endif

. if ${PHP_VER} == 74 && (${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) || ${ARCH} == sparc64)
USE_GCC= yes
. endif

# This variable is for dependencies lines, so you write:
# ${PHP_PKGNAMEPREFIX}foo:devel/php-foo@${PHP_FLAVOR}
PHP_FLAVOR= php${PHP_VER}
Expand All @@ -192,9 +188,6 @@ PHP_EXT_INC= hash json openssl pcre spl
. elif ${PHP_VER} == 80
PHP_EXT_DIR= 20200930
PHP_EXT_INC= hash json openssl pcre spl
. elif ${PHP_VER} == 74
PHP_EXT_DIR= 20190902
PHP_EXT_INC= hash pcre spl
. else
# (rene) default to DEFAULT_VERSIONS
PHP_EXT_DIR= 20210902
Expand Down Expand Up @@ -231,7 +224,7 @@ PECL_PKGNAMEPREFIX= php${PHP_VER}-pecl-
. if ${PHP_VER} == "${VER}"
_IGNORE_PHP_SET=
IGNORE= cannot be installed: doesn't work with lang/php${PHP_VER} port\
(doesn't support PHP ${IGNORE_WITH_PHP:C/^(7)/\1./})
(doesn't support PHP ${IGNORE_WITH_PHP:C/^(8)/\1./})
. endif
. endfor
. endif
Expand Down Expand Up @@ -391,7 +384,6 @@ _USE_PHP_ALL= bcmath bitset bz2 calendar ctype curl dba dom \
soap sockets sodium spl sqlite3 sysvmsg sysvsem sysvshm \
tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zip zlib
# version specific components
_USE_PHP_VER74= ${_USE_PHP_ALL} zephir_parser
_USE_PHP_VER80= ${_USE_PHP_ALL} zephir_parser
_USE_PHP_VER81= ${_USE_PHP_ALL} zephir_parser
_USE_PHP_VER82= ${_USE_PHP_ALL}
Expand All @@ -417,9 +409,6 @@ iconv_DEPENDS= converters/php${PHP_VER}-iconv
igbinary_DEPENDS= converters/pecl-igbinary@${PHP_FLAVOR}
imap_DEPENDS= mail/php${PHP_VER}-imap
intl_DEPENDS= devel/php${PHP_VER}-intl
. if ${PHP_VER} < 80
json_DEPENDS= devel/php${PHP_VER}-json
. endif
ldap_DEPENDS= net/php${PHP_VER}-ldap
mbstring_DEPENDS= converters/php${PHP_VER}-mbstring
mcrypt_DEPENDS= security/pecl-mcrypt@${PHP_FLAVOR}
Expand All @@ -428,9 +417,6 @@ memcached_DEPENDS= databases/pecl-memcached@${PHP_FLAVOR}
mysqli_DEPENDS= databases/php${PHP_VER}-mysqli
odbc_DEPENDS= databases/php${PHP_VER}-odbc
opcache_DEPENDS= www/php${PHP_VER}-opcache
. if ${PHP_VER} < 80
openssl_DEPENDS=security/php${PHP_VER}-openssl
. endif
pcntl_DEPENDS= devel/php${PHP_VER}-pcntl
pdo_DEPENDS= databases/php${PHP_VER}-pdo
pdo_dblib_DEPENDS= databases/php${PHP_VER}-pdo_dblib
Expand Down Expand Up @@ -461,11 +447,7 @@ tidy_DEPENDS= www/php${PHP_VER}-tidy
tokenizer_DEPENDS= devel/php${PHP_VER}-tokenizer
xml_DEPENDS= textproc/php${PHP_VER}-xml
xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader
. if ${PHP_VER} >= 80
xmlrpc_DEPENDS= net/pecl-xmlrpc@${PHP_FLAVOR}
. else
xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc
. endif
xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter
xsl_DEPENDS= textproc/php${PHP_VER}-xsl
zephir_parser_DEPENDS= textproc/pecl-zephir_parser@${PHP_FLAVOR}
Expand Down
Loading

0 comments on commit 87e8de0

Please sign in to comment.