Skip to content

Commit

Permalink
Framework: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: HardenedBSD
  • Loading branch information
fichtner committed Apr 8, 2019
1 parent 40be8d2 commit 8ece233
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 46 deletions.
3 changes: 2 additions & 1 deletion MOVED
Original file line number Diff line number Diff line change
Expand Up @@ -10776,7 +10776,6 @@ editors/manedit||2018-12-21|Has expired: Uses obsolete glib12
misc/gtkfind||2018-12-21|Has expired: Uses obsolete glib12
games/mindguard||2018-12-21|Has expired: Uses obsolete glib12
games/xbattle||2018-12-21|Has expired: Uses obsolete glib12
games/xbill||2018-12-21|Has expired: Uses obsolete glib12
games/corewars||2018-12-21|Has expired: Uses obsolete glib12
games/dopewars||2018-12-21|Has expired: Uses obsolete glib12
games/garith||2018-12-21|Has expired: Uses obsolete glib12
Expand Down Expand Up @@ -12175,3 +12174,5 @@ x11/xbelld||2019-04-04|Has expired: Depends on audio/esound
devel/mkcmd||2019-04-04|Removed, depends on expired devel/msrc0
devel/msrc0||2019-04-04|Has expired: No longer required as comms/conserver is being retired.
sysutils/curly||2019-04-04|Removed, depends on expired devel/msrc0
devel/pecl-xdebug25|devel/pecl-xdebug|2019-04-09|Has expired: Please use pecl/xdebug which uses latest version
devel/pecl-xdebug-devel|devel/pecl-xdebug|2019-04-09|Development version no longer necessary
82 changes: 43 additions & 39 deletions Mk/Uses/go.mk
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
# $FreeBSD$
#
# This file contains logic to ease porting of Go packages or binaries using
# the `go` command.
# This file contains logic to ease porting of Go binaries using the
# `go` command.
#
# Feature: go
# Usage: USES=go
# Valid ARGS: none
# Valid ARGS: (none), modules
#
# (none) Setup GOPATH and build in GOPATH mode.
# modules If the upstream uses Go modules, this can be set to build
# in modules-aware mode.
#
# You can set the following variables to control the process.
#
# GO_PKGNAME
# The name of the package. This is the directory that will be
# created in GOPATH/src and seen by the `go` command
# The name of the package. When building in GOPATH mode, this is
# the directory that will be created in GOPATH/src and seen by the
# `go` command. When building in modules-aware mode, no directories
# will be created and GO_PKGNAME value will be only used as a default
# for GO_TARGET. If not set explicitly and GH_SUBDIR is present,
# GO_PKGNAME will be inferred from GH_SUBDIR.
#
# GO_TARGET
# The names of the package(s) to build
# The names of the package(s) to build. If not set explicitly,
# defaults to GO_PKGNAME.
#
# CGO_CFLAGS
# Addional CFLAGS variables to be passed to the C compiler by the `go`
Expand All @@ -32,72 +41,67 @@
.if !defined(_INCLUDE_USES_GO_MK)
_INCLUDE_USES_GO_MK= yes

.if ${ARCH} == "i386"
GOARCH= 386
GOOBJ= 8
.else
GOARCH= amd64
GOOBJ= 6
.if !empty(go_ARGS) && ${go_ARGS:Nmodules}
IGNORE= USES=go only accepts no arguments or 'modules'
.endif

# Settable variables
GO_PKGNAME?= ${PORTNAME}
.if empty(GO_PKGNAME)
. if !empty(GH_SUBDIR)
GO_PKGNAME= ${GH_SUBDIR:S|^src/||}
. else
GO_PKGNAME= ${PORTNAME}
. endif
.endif
GO_TARGET?= ${GO_PKGNAME}
GO_BUILDFLAGS+= -v
GO_BUILDFLAGS+= -v -buildmode=exe
CGO_CFLAGS+= -I${LOCALBASE}/include
CGO_LDFLAGS+= -L${LOCALBASE}/lib

# Read-only variables
GO_CMD= ${LOCALBASE}/bin/go
LOCAL_GOPATH= ${LOCALBASE}/share/go
GO_LIBDIR= share/go/pkg/${OPSYS:tl}_${GOARCH}
GO_SRCDIR= share/go/src
GO_WRKSRC= ${GO_WRKDIR_SRC}/${GO_PKGNAME}
GO_WRKDIR_BIN= ${WRKDIR}/bin

GO_ENV+= CGO_CFLAGS="${CGO_CFLAGS}" \
CGO_LDFLAGS="${CGO_LDFLAGS}"

.if ${go_ARGS:Mmodules}
GO_BUILDFLAGS+= -mod=vendor
GO_WRKSRC= ${WRKSRC}
GO_ENV+= GOPATH="" \
GOBIN="${GO_WRKDIR_BIN}"
.else
GO_WRKDIR_SRC= ${WRKDIR}/src
GO_WRKDIR_PKG= ${WRKDIR}/pkg/${OPSYS:tl}_${GOARCH}
GO_WRKSRC= ${GO_WRKDIR_SRC}/${GO_PKGNAME}
GO_ENV+= GOPATH="${WRKDIR}" \
GOBIN=""
.endif

BUILD_DEPENDS+= ${GO_CMD}:lang/go
GO_ENV+= GOPATH="${WRKDIR}:${LOCAL_GOPATH}" \
CGO_CFLAGS="${CGO_CFLAGS}" \
CGO_LDFLAGS="${CGO_LDFLAGS}" \
GOBIN=""
PLIST_SUB+= GO_LIBDIR=${GO_LIBDIR} \
GO_SRCDIR=${GO_SRCDIR} \
GO_PKGNAME=${GO_PKGNAME}
PLIST_SUB+= GO_PKGNAME=${GO_PKGNAME}

_USES_POST+= go
.endif # !defined(_INCLUDE_USES_GO_MK)

.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GO_POST_MK)
_INCLUDE_USES_GO_POST_MK= yes

.if !target(post-extract)
.if !target(post-extract) && empty(go_ARGS)
post-extract:
@${MKDIR} ${GO_WRKSRC:H}
@${LN} -sf ${WRKSRC} ${GO_WRKSRC}
.endif

.if !target(do-build)
do-build:
@(cd ${GO_WRKSRC}; \
(cd ${GO_WRKSRC}; \
${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install ${GO_BUILDFLAGS} ${GO_TARGET})
.endif

.if !target(do-install)
do-install:
.for _TARGET in ${GO_TARGET}
@if [ -e "${GO_WRKDIR_PKG}/${_TARGET}.a" ]; then \
_TARGET_LIBDIR="${STAGEDIR}/${PREFIX}/${GO_LIBDIR}/${_TARGET:H}"; \
${MKDIR} $${_TARGET_LIBDIR}; \
${INSTALL_DATA} ${GO_WRKDIR_PKG}/${_TARGET}.a $${_TARGET_LIBDIR}; \
_TARGET_SRCDIR="${STAGEDIR}/${PREFIX}/${GO_SRCDIR}/${_TARGET}"; \
${MKDIR} $${_TARGET_SRCDIR}; \
(cd ${GO_WRKDIR_SRC}/${_TARGET}/ && ${COPYTREE_SHARE} \* $${_TARGET_SRCDIR}); \
fi; \
if [ -e "${GO_WRKDIR_BIN}/${_TARGET:T}" ]; then \
${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${_TARGET:T} ${STAGEDIR}/${LOCALBASE}/bin; \
fi;
${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${_TARGET:T} ${STAGEDIR}${PREFIX}/bin
.endfor
.endif

Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/readline.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ readline_ARGS= port
.endif

.if ${readline_ARGS} == port
LIB_DEPENDS+= libreadline.so.7:devel/readline
LIB_DEPENDS+= libreadline.so.8:devel/readline
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.endif
Expand Down
2 changes: 1 addition & 1 deletion Mk/bsd.default-versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ PGSQL_DEFAULT?= 9.5
# Possible values: 7.1, 7.2, 7.3
PHP_DEFAULT?= 7.2
# Possible values: 2.7, 3.5, 3.6, 3.7
PYTHON_DEFAULT?= 2.7
PYTHON_DEFAULT?= 3.6
# Possible values: 2.7
PYTHON2_DEFAULT?= 2.7
# Possible values: 3.5, 3.6, 3.7
Expand Down
8 changes: 6 additions & 2 deletions Mk/bsd.gecko.mk
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ BUILD_DEPENDS+= rust-cbindgen>=0.6.8:devel/rust-cbindgen \
MOZ_OPTIONS+= --enable-pie
.endif

.if ${MOZILLA_VER:R:R} >= 65
# Let vendor add -fstack-protector-strong on all architectures
SSP_UNSAFE= yes
.endif

MOZILLA_SUFX?= none
MOZSRC?= ${WRKSRC}
PLISTF?= ${WRKDIR}/plist_files
Expand All @@ -138,8 +143,7 @@ MOZ_PKGCONFIG_FILES?= ${MOZILLA}-gtkmozembed ${MOZILLA}-js \

MOZ_EXPORT+= ${CONFIGURE_ENV} \
RUSTFLAGS="${RUSTFLAGS}" \
PERL="${PERL}" \
ac_cv_clock_monotonic=
PERL="${PERL}"
MOZ_OPTIONS+= --prefix="${PREFIX}"
MOZ_MK_OPTIONS+=MOZ_OBJDIR="${BUILD_WRKSRC}"

Expand Down
4 changes: 2 additions & 2 deletions Mk/bsd.ruby.mk
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ RUBY?= ${LOCALBASE}/bin/${RUBY_NAME}
# Ruby 2.4
#
RUBY_RELVERSION= 2.4.5
RUBY_PORTREVISION= 1
RUBY_PORTREVISION= 2
RUBY_PORTEPOCH= 1
RUBY_PATCHLEVEL= 0
RUBY24= "" # PLIST_SUB helpers
Expand All @@ -165,7 +165,7 @@ RUBY24= "" # PLIST_SUB helpers
# Ruby 2.5
#
RUBY_RELVERSION= 2.5.5
RUBY_PORTREVISION= 0
RUBY_PORTREVISION= 1
RUBY_PORTEPOCH= 1
RUBY_PATCHLEVEL= 0
RUBY25= "" # PLIST_SUB helpers
Expand Down
17 changes: 17 additions & 0 deletions UPDATING
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.

20190410:
AFFECTS: users of python
AUTHOR: [email protected]

Default version of python was switched to 3.6.

For ports users wanting to keep version 2.7 as default,
add DEFAULT_VERSIONS+= python=2.7 to make.conf

20190328:
AFFECTS: www/firefox-i18n, www/firefox-esr-i18n, mail/thunderbird-i18n, www/seamonkey-i18n
AUTHOR: [email protected]
Expand Down Expand Up @@ -142,6 +151,14 @@ you update your ports collection, before attempting any port upgrades.
any configuration files within /etc/urbackup, these should be relocated to
${PREFIX}/etc/urbackup.

20190130:
AFFECTS: users of sysutils/password-store
AUTHOR: [email protected]

password-store now stores plugins in ${PREFIX}/libexec instead of ${PREFIX}/lib.
Ensure to move your own extensions there too and update your scripts to avoid
breakage.

20190124:
AFFECTS: users of sysutils/rubygem-fluentd, sysutils/fluent-bit
AUTHOR: [email protected]
Expand Down

0 comments on commit 8ece233

Please sign in to comment.