Framework: sync with upstream

Taken from: FreeBSD
This commit is contained in:
Franco Fichtner 2022-10-26 21:00:12 +02:00
parent b68c0402c7
commit d0dc8d85c9
10 changed files with 70 additions and 17 deletions

10
CHANGES
View File

@ -10,6 +10,16 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
20221026:
AUTHOR: bapt@FreeBSD.org
3 new features are available now: PIE, RELRO, BIND_NOW, each port can
specify the inability to support any via <feature>_UNSAFE
All 3 are off by default, the intent is to activate following the freebsd
base activation of the same features.
End users can activate/deactivate globally via WITH_/WITHOUT_ <feature>
20221014:
AUTHOR: adamw@FreeBSD.org

1
MOVED
View File

@ -17604,3 +17604,4 @@ misc/orion||2022-10-16|Dead upstream and fails to build with mpv-0.35
devel/msgpack|devel/msgpack-c|2022-10-16|MsgPack now separates C and C++ versions
games/arttime|deskutils/arttime|2022-10-18|Moved to a better category
security/nextcloud-twofactor_totp|www/nextcloud|2022-10-21|Twofactor TOTP provider bundled with Nextcloud 25
x11-toolkits/wxgtk31|x11-toolkits/wxgtk32|2022-10-25|Remove obsoleted port. Use x11-toolkits/wxgtk32 instead

10
Mk/Features/bind_now.mk Normal file
View File

@ -0,0 +1,10 @@
# BIND_NOW Support
.if !defined(_BIND_NOW_MK_INCLUDED)
_BIND_NOW_MK_INCLUDED= yes
BIND_NOW_Include_MAINTAINER= portmgr@FreeBSD.org
. if !defined(BIND_NOW_UNSAFE)
LDFLAGS+= -Wl,-znow
. endif
.endif

14
Mk/Features/pie.mk Normal file
View File

@ -0,0 +1,14 @@
# PIE Support
.if !defined(_PIE_MK_INCLUDED)
_PIE_MK_INCLUDED= yes
PIE_Include_MAINTAINER= portmgr@FreeBSD.org
. if !defined(PIE_UNSAFE)
PIE_CFLAGS?= -fPIE -fPIC
CFLAGS+= ${PIE_CFLAGS}
CXXFLAGS+= ${PIE_CFLAGS}
LDFLAGS+= -pie
. endif
.endif

10
Mk/Features/relro.mk Normal file
View File

@ -0,0 +1,10 @@
# RELRO Support
.if !defined(_RELRO_MK_INCLUDED)
_RELRO_MK_INCLUDED= yes
RELRO_Include_MAINTAINER= portmgr@FreeBSD.org
. if !defined(RELRO_UNSAFE)
LDFLAGS+= -Wl,-zrelro
. endif
.endif

View File

@ -90,7 +90,12 @@ GO_PKGNAME= ${PORTNAME}
GO_TARGET?= ${GO_PKGNAME}
GO_TESTTARGET?= ./...
GO_BUILDFLAGS+= -v -buildmode=exe -trimpath
.if !defined(PIE_UNSAFE) && defined(WITH_PIE)
GO_BUILDFLAGS+= -buildmode=pie
.else
GO_BUILDFLAGS+= -buildmode=exe
.endif
GO_BUILDFLAGS+= -v -trimpath
. if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*)
GO_BUILDFLAGS+= -ldflags=-s
. endif

View File

@ -21,7 +21,7 @@ IGNORE= USES=samba has invalid arguments: ${samba_ARGS:Nbuild:Nenv:Nlib:Nrun}
SAMBAPORT= net/samba${SAMBA_DEFAULT:S/.//}
SAMBAINCLUDES= ${LOCALBASE}/include/samba4
. if ${SAMBA_DEFAULT} == 4.12 || ${SAMBA_DEFAULT} == 4.13
. if ${SAMBA_DEFAULT} == 4.13 || ${SAMBA_DEFAULT} == 4.16
SAMBALIBS= ${LOCALBASE}/lib/samba4
. else
IGNORE= Invalid version of samba: ${SAMBA_DEFAULT}

View File

@ -130,8 +130,8 @@ PYTHON3_DEFAULT?= 3.9
RUBY_DEFAULT?= 3.0
# Possible values: rust, rust-nightly
RUST_DEFAULT?= rust
# Possible values: 4.12, 4.13
SAMBA_DEFAULT?= 4.12
# Possible values: 4.13, 4.16
SAMBA_DEFAULT?= 4.13
# Possible values: base, openssl, libressl, libressl-devel
. if !defined(SSL_DEFAULT)
# If no preference was set, check for an installed base version

View File

@ -339,6 +339,11 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# can be used in Makefiles by port maintainers
# if a port breaks with it (it should be
# extremely rare).
# PIE_CFLAGS - Defaults to -fPIE -fPIC. This value
# is added to CFLAGS and the necessary flags
# are added to LDFLAGS. Note that PIE_UNSAFE
# can be used in Makefiles by port maintainers
# if a port breaks with it.
##
# USE_LOCALE - LANG and LC_ALL are set to the value of this variable in
# CONFIGURE_ENV and MAKE_ENV. Example: USE_LOCALE=en_US.UTF-8
@ -1012,7 +1017,7 @@ LC_ALL= C
# These need to be absolute since we don't know how deep in the ports
# tree we are and thus can't go relative. They can, of course, be overridden
# by individual Makefiles or local system make configuration.
_LIST_OF_WITH_FEATURES= debug lto ssp
_LIST_OF_WITH_FEATURES= debug lto ssp pie relro bind_now
_DEFAULT_WITH_FEATURES= ssp
PORTSDIR?= /usr/ports
LOCALBASE?= /usr/local
@ -1776,8 +1781,6 @@ CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//}
. endif
. endfor
# XXX PIE support to be added here
MAKE_ENV+= NO_PIE=yes
# We will control debug files. Don't let builds that use /usr/share/mk
# split out debug symbols since the plist won't know to expect it.
MAKE_ENV+= MK_DEBUG_FILES=no

View File

@ -91,7 +91,7 @@
# USE_WX_NOT= 2.8
#
WX_Include_MAINTAINER= ports@FreeBSD.org
WX_Include_MAINTAINER= desktop@FreeBSD.org
#
# Global definitions.
@ -111,9 +111,9 @@ _WX_Definitions_Done= yes
_WX_COMPS_ALL= wx contrib python
_WX_DEP_TYPES_ALL= build lib run
_WX_VERS_ALL= 2.8 3.0 3.1
_WX_VERS_UC_ALL= 2.8 3.0 3.1
_WX_VERS_SKIP= 3.0 3.1
_WX_VERS_ALL= 2.8 3.0 3.2
_WX_VERS_UC_ALL= 2.8 3.0 3.2
_WX_VERS_SKIP= 3.0 3.2
_WX_VERS_LISTS= WANT_WX_VER WITH_WX_VER _WX_VER_INSTALLED
#
@ -136,12 +136,12 @@ _WX_LIB_contrib_2.8= wx_gtk2${_WX_UC}_fl-2.8
_WX_PORT_wx_3.0= x11-toolkits/wxgtk30@${_GTKFLAVOR}
_WX_LIB_wx_3.0= wx_baseu-3.0
_WX_PORT_python_3.1= x11-toolkits/py-wxPython4@${PY_FLAVOR}
_WX_FILE_python_3.1= ${PYTHON_SITELIBDIR}/wx/__init__.py
_WX_PORT_python_3.2= x11-toolkits/py-wxPython4@${PY_FLAVOR}
_WX_FILE_python_3.2= ${PYTHON_SITELIBDIR}/wx/__init__.py
# wxgtk 3.1
_WX_PORT_wx_3.1= x11-toolkits/wxgtk31
_WX_LIB_wx_3.1= wx_baseu-3.1
# wxgtk 3.2
_WX_PORT_wx_3.2= x11-toolkits/wxgtk32
_WX_LIB_wx_3.2= wx_baseu-3.2
# Set _WX_SHVER_comp_ver to 0 and _WX_FILE_comp_ver for libs appropriately.
# Set _WX_DEPTYPE_comp_ver for "python" to "run", and others to "lib".
@ -406,7 +406,7 @@ _WX_VER= ${ver}
# Set variables.
#
. if ${_WX_VER} == 3.1
. if ${_WX_VER} == 3.2
_GTKVER= 3
. elif ${_WX_VER} == 3.0
_GTKVER= ${WANT_WXGTK_VER:U3}