diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index 164251563177..a0d12572d0fd 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -1,376 +1,376 @@ # This file contains logic to ease porting of Go binaries using the # `go` command. # # Feature: go # Usage: USES=go or USES=go:[,,...] # Valid ARGS: (none), N.NN+, N.NN, modules, no_targets, run # # (none) Build in GOPATH mode using default Go version. # N.NN+ Specify minimum Go version # N.NN Specify exact Go version (should be avoided) # modules Build in native, modules-aware mode (most Go ports use this) # no_targets Use this when an app has its own make/cmake files that call Go. # Sets up the build environment (GO_ENV, GO_BUILDFLAGS, etc.) but # does not create make(1) targets (post-extract, do-build, # do-install, do-test, etc.). # run Adds the Go compiler to RUN_DEPENDS. Rarely needed; Go-based # applications are compiled and only need Go at build time. # # Note about Go version specifiers (i.e. USES=go:1.20+): # Try to use a range (USES=go:1.20+) rather than a single-version pin # (USES=go:1.20) when possible. # # When you pin to a single version, you're saying that it only builds with # that one version and nothing else. Go minors have a one-year lifecycle, # so a single version pin creates a dependency that must be resolved next # year. If your port really does need that, please let the Go team know so # that we can work out how to support your port. # # When go.mod says "go 1.20", it's usually fine to say USES=go:1.20+. # # === RESOURCES === # Further documentation about porting Go-based applications: # - https://docs.freebsd.org/en/books/porters-handbook/special/#using-go # - https://docs.freebsd.org/en/books/porters-handbook/uses/#uses-go # An explanation of why we accept ports only for Go-based applications, not # libraries: # - https://docs.freebsd.org/en/books/porters-handbook/special/#go-libs # # === REACHING OUT === # For questions or assistance, reach out on mailing lists. The Go team # monitors the FreeBSD-Go mailing list, but the FreeBSD-Ports list is far # more active. # - For help with porting, including Go apps (freebsd-ports@FreeBSD.org): # https://lists.freebsd.org/subscription/freebsd-ports # - For questions about the Go framework itself (freebsd-go@FreeBSD.org): # https://lists.freebsd.org/subscription/freebsd-go # # === DOCUMENTATION ON USES=go === # You can set the following variables to control the process. # # GO_MODULE # The name of the module as specified by "module" directive in go.mod. # In most cases, this is the only required variable for ports that # use Go modules. # # GO_MOD_DIST # The location to download the go.mod file if GO_MODULE is used. # The default is empty, so it is loaded from GO_PROXY. # Set it to "gitlab" and make sure GL_PROJECT is defined to download # the "go.mod" from gitlab. # Set it to "github" and make sure GH_PROJECT is defined to download # the "go.mod" from github. # You can also set it completely manually a URI without go.mod in it, # is attached automatically to the URI. # # GO_PKGNAME # The name of the package when building in GOPATH mode. This # is the directory that will be created in ${GOPATH}/src. If not set # explicitly and GH_SUBDIR or GL_SUBDIR is present, GO_PKGNAME will # be inferred from it. # It is not needed when building in modules-aware mode. # # GO_TARGET # The packages to build. The default value is ${GO_PKGNAME}. # GO_TARGET can also be a tuple in the form package:path where path can be # either a simple filename or a full path starting with ${PREFIX}. # # GO_TESTTARGET # The packages to test. The default value is `./...` (the current package # and all subpackages). # # CGO_CFLAGS # Additional CFLAGS variables to be passed to the C compiler by the `go` # command # # CGO_LDFLAGS # Additional LDFLAGS variables to be passed to the C compiler by the `go` # command # # GO_BUILDFLAGS # Additional build arguments to be passed to the `go build` command # # GO_LDFLAGS # Additional LDFLAGS variables to be passed to the `go build` command # # GO_TESTFLAGS # Additional build arguments to be passed to the `go test` command # # MAINTAINER: go@FreeBSD.org .if !defined(_INCLUDE_USES_GO_MK) _INCLUDE_USES_GO_MK= yes # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -GO_VALID_VERSIONS= 1.25 1.26 +GO_VALID_VERSIONS= 1.25 1.26 1.27 # Check arguments sanity . if !empty(go_ARGS:N[1-9].[0-9][0-9]+:N[1-9].[0-9][0-9]:Nmodules:Nno_targets:Nrun) IGNORE= USES=go has invalid arguments: ${go_ARGS:N[1-9].[0-9][0-9]+:N[1-9].[0-9][0-9]:Nmodules:Nno_targets:Nrun} . endif # Parse Go version . if !empty(go_ARGS:M*+) GO_MIN_VERSION= ${go_ARGS:M*+:S/+//} . for version in ${GO_VALID_VERSIONS:[-1..1]} . if empty(GO_VERSION) . if ${version} == ${GO_DEFAULT} || ${version} == ${GO_MIN_VERSION} GO_VERSION:= ${version} . endif . endif . endfor . else GO_VERSION:= ${go_ARGS:Nmodules:Nno_targets:Nrun:C/^$/${GO_DEFAULT}/} . if empty(GO_VALID_VERSIONS:M${GO_VERSION}) IGNORE?= USES=go has invalid version number: ${GO_VERSION} . endif . endif GO_SUFFIX= ${GO_VERSION:S/.//} GO_PORT= lang/go${GO_SUFFIX} # Settable variables . if empty(GO_PKGNAME) . if !empty(GH_SUBDIR) GO_PKGNAME= ${GH_SUBDIR:S|^src/||} . elif !empty(GL_SUBDIR) GO_PKGNAME= ${GL_SUBDIR:S|^src/||} . else GO_PKGNAME= ${PORTNAME} . endif . endif GO_TARGET?= ${GO_PKGNAME} GO_TESTTARGET?= ./... . if !defined(PIE_UNSAFE) && defined(WITH_PIE) && ${ARCH} == amd64 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 ${GO_LDFLAGS}' . endif GO_BUILDFLAGS+= -buildvcs=false GO_TESTFLAGS+= -v -buildvcs=false CGO_ENABLED?= 1 CGO_CFLAGS+= -I${LOCALBASE}/include CGO_LDFLAGS+= -L${LOCALBASE}/lib . if ${ARCH} == armv6 || ${ARCH} == armv7 GOARM?= ${ARCH:C/armv//} . endif GO_GOPROXY?= https://proxy.golang.org GO_GOSUMDB?= sum.golang.org # Read-only variables GO_CMD= ${LOCALBASE}/bin/go${GO_SUFFIX} GO_WRKDIR_BIN= ${WRKDIR}/bin GO_ENV+= CGO_ENABLED=${CGO_ENABLED} \ CGO_CFLAGS="${CGO_CFLAGS}" \ CGO_LDFLAGS="${CGO_LDFLAGS}" \ GOAMD64=${GOAMD64} \ GOARM=${GOARM} \ GOTMPDIR="${WRKDIR}" . if ${go_ARGS:Mmodules} GO_BUILDFLAGS+= -mod=vendor GO_TESTFLAGS+= -mod=vendor GO_GOPATH= ${DISTDIR}/go/${PKGORIGIN:S,/,_,g} GO_MODCACHE= file://${GO_GOPATH}/pkg/mod/cache/download GO_WRKSRC= ${WRKSRC} GO_ENV+= GOPATH="${GO_GOPATH}" \ GOBIN="${GO_WRKDIR_BIN}" \ GO111MODULE=on \ GOFLAGS=-modcacherw \ GOSUMDB=${GO_GOSUMDB} . if defined(GO_MODULE) GO_MODNAME= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\1/} . if empty(DISTFILES:Mgo.mod\:*) && empty(DISTFILES:Mgo.mod) # Unless already setup for download by other means, # arrange to pull go.mod and distribution archive from GOPROXY. GO_MODVERSION= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\2/:M@*:S/^@//:S/^$/${DISTVERSIONFULL}/} GO_MODFILE= ${GO_MODVERSION}.mod GO_DISTFILE= ${GO_MODVERSION}.zip # If GO_MOD_DIST is gitlab, download the go.mod from gitlab by the defined GL_ACCOUNT and GL_PROJECT/PORTNAME . if defined(GO_MOD_DIST) && "${GO_MOD_DIST}" == "gitlab" MASTER_SITES+= https://gitlab.com/${GL_ACCOUNT}/${GL_PROJECT}/-/raw/${GO_MODVERSION}/${WRKSRC_SUBDIR:?${WRKSRC_SUBDIR}/:} DISTFILES+= go.mod # If GO_MOD_DIST is github, download the go.mod from github by the defined GH_ACCOUNT and GH_PROJECT/PORTNAME . elif defined(GO_MOD_DIST) && "${GO_MOD_DIST}" == "github" MASTER_SITES+= https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${GO_MODVERSION}/${WRKSRC_SUBDIR:?${WRKSRC_SUBDIR}/:} DISTFILES+= go.mod # Manually defined GO_MOD_DIST . elifdef(GO_MOD_DIST) MASTER_SITES+= ${GO_MOD_DIST} DISTFILES+= go.mod # Fallback to default GO_PROXY . else # `GOPROXY` presents sources via the proxy service and in the downloaded # `WRKSRC` differently as of v2.x versions of projects. Support this different # directory/REST API scheme: https://go.dev/ref/mod#major-version-suffixes . # GO_MODVERSION_MAJOR= ${GO_MODVERSION:C/^v//g:C/\..+//g} # .if ${GO_MODVERSION_MAJOR} > 1 # WRKSRC= ${WRKDIR}/${GO_MODNAME}/v${GO_MODVERSION_MAJOR}@${GO_MODVERSION} # MASTER_SITES+= ${GO_GOPROXY}/${GO_MODNAME:C/([A-Z])/!\1/g:tl}/v${GO_MODVERSION_MAJOR}/@v/ # .else # WRKSRC= ${WRKDIR}/${GO_MODNAME}@${GO_MODVERSION} MASTER_SITES+= ${GO_GOPROXY}/${GO_MODNAME:C/([A-Z])/!\1/g:tl}/@v/ # .endif DISTFILES+= ${GO_MODFILE} ${GO_DISTFILE} WRKSRC= ${WRKDIR}/${GO_MODNAME}@${GO_MODVERSION} . endif . endif EXTRACT_ONLY?= ${DISTFILES:N*.mod\:*:N*.mod:C/:.*//} DIST_SUBDIR= go/${PKGORIGIN:S,/,_,g}/${DISTNAME} FETCH_DEPENDS+= ${GO_CMD}:${GO_PORT} USES+= zip . else GO_ENV+= GO_NO_VENDOR_CHECKS=1 . endif . else GO_GOPATH= ${WRKDIR} GO_WRKSRC= ${WRKDIR}/src/${GO_PKGNAME} GO_ENV+= GOPATH="${GO_GOPATH}" \ GOBIN="" \ GO111MODULE=off . endif BUILD_DEPENDS+= ${GO_CMD}:${GO_PORT} BINARY_ALIAS+= go=go${GO_SUFFIX} gofmt=gofmt${GO_SUFFIX} . if ${go_ARGS:Mrun} RUN_DEPENDS+= ${GO_CMD}:${GO_PORT} . endif _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 ${go_ARGS:Mmodules} && defined(GO_MODULE) _USES_fetch+= 200:go-pre-fetch 800:go-post-fetch # Check that pkg can be installed or is already available, # otherwise it will be impossible to install go and fetch dependencies. go-pre-fetch: . if defined(CLEAN_FETCH_ENV) && !exists(${PKG_BIN}) @${ECHO_MSG} "===> CLEAN_FETCH_ENV is defined, cannot download Go modules (pkg and go are required)"; \ exit 1 . endif # Download all required build dependencies to GOMODCACHE. go-post-fetch: @${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies"; @(cd ${DISTDIR}/${DIST_SUBDIR}; \ [ -e go.mod ] || ${RLN} ${GO_MODFILE} go.mod; \ ${SETENVI} ${WRK_ENV} \ ${HTTP_PROXY:DHTTP_PROXY=${HTTP_PROXY:Q}} \ ${http_proxy:Dhttp_proxy=${http_proxy:Q}} \ ${HTTPS_PROXY:DHTTPS_PROXY=${HTTPS_PROXY:Q}} \ ${https_proxy:Dhttps_proxy=${https_proxy:Q}} \ ${NO_PROXY:DNO_PROXY=${NO_PROXY:Q}} \ ${no_proxy:Dno_proxy=${no_proxy:Q}} \ ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all) . endif _USES_extract+= 800:go-post-extract . if ${go_ARGS:Mmodules} && defined(GO_MODULE) # Module-aware build mode. Although not strictly necessary (all build dependencies should be # already in MODCACHE), vendor them so we can patch them if needed. go-post-extract: @${ECHO_MSG} "===> Tidying ${GO_MODNAME} dependencies"; @(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod tidy -e) @${ECHO_MSG} "===> Vendoring ${GO_MODNAME} dependencies"; @(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod vendor -e) . else # Legacy (GOPATH) build mode, setup directory structure expected by Go for the main module. go-post-extract: @${MKDIR} ${GO_WRKSRC:H} @${LN} -sf ${WRKSRC} ${GO_WRKSRC} . endif . if !target(do-build) && empty(go_ARGS:Mno_targets) do-build: (cd ${GO_WRKSRC}; \ for t in ${GO_TARGET}; do \ out=$$(${BASENAME} $$(${ECHO_CMD} $${t} | \ ${SED} -Ee 's/^[^:]*:([^:]+).*$$/\1/' -e 's/^\.$$/${PORTNAME}/')); \ pkg=$$(${ECHO_CMD} $${t} | \ ${SED} -Ee 's/^([^:]*).*$$/\1/' -e 's/^${PORTNAME}$$/./'); \ ${ECHO_MSG} "===> Building $${out} from $${pkg}"; \ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOMAXPROCS=${MAKE_JOBS_NUMBER} GOPROXY=off ${GO_CMD} build ${GO_BUILDFLAGS} \ -o ${GO_WRKDIR_BIN}/$${out} \ $${pkg}; \ done) . endif . if !target(do-install) && empty(go_ARGS:Mno_targets) do-install: for t in ${GO_TARGET}; do \ dst=$$(${ECHO_CMD} $${t} | \ ${SED} -Ee 's/^[^:]*:([^:]+).*$$/\1/' -e 's/^\.$$/${PORTNAME}/'); \ src=$$(${BASENAME} $${dst}); \ case $${dst} in \ /*) dst=${STAGEDIR}$${dst}; ${MKDIR} $$(${DIRNAME} $${dst}) ;; \ *) dst=${STAGEDIR}${PREFIX}/bin/$${src} ;; \ esac; \ ${ECHO_MSG} "===> Installing $${src} as $${dst}"; \ ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/$${src} $${dst}; \ done . endif . if !target(do-test) && empty(go_ARGS:Mno_targets) do-test: (cd ${GO_WRKSRC}; \ for t in ${GO_TESTTARGET}; do \ ${ECHO_MSG} "===> Testing $${t}"; \ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \ done) . endif . if ${go_ARGS:Mmodules} && defined(GO_MODULE) gomod-clean: . if exists(${GO_CMD}) @${ECHO_MSG} "===> Cleaning Go module cache" @${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} clean -modcache . else @${ECHO_MSG} "===> Skipping since ${GO_CMD} is not installed" . endif # Hook up to distclean . if !target(post-clean) && !make(clean) post-clean: gomod-clean @${RM} -r ${GO_GOPATH} . endif . endif # Helper targets for port maintainers . if ${go_ARGS:Mmodules} && !defined(GO_MODULE) _MODULES2TUPLE_CMD= modules2tuple gomod-vendor-deps: @if ! type ${GO_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"${GO_PORT}\""; exit 1; \ fi; \ if ! type ${_MODULES2TUPLE_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"ports-mgmt/modules2tuple\""; exit 1; \ fi gomod-vendor: gomod-vendor-deps patch @cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} mod vendor; \ [ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt gomod-vendor-diff: gomod-vendor-deps patch @cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} mod vendor; \ [ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt | ${SED} 's|GH_TUPLE=| |; s| \\$$||' | ${GREP} -v ' \\' > ${WRKDIR}/GH_TUPLE-new.txt && \ echo ${GH_TUPLE} | ${TR} -s " " "\n" | ${SED} "s|^| |" > ${WRKDIR}/GH_TUPLE-old.txt && \ ${DIFF} ${WRKDIR}/GH_TUPLE-old.txt ${WRKDIR}/GH_TUPLE-new.txt || exit 0 . endif .endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GO_POST_MK) diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk index 62a517d33c6e..871b53173ac3 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -1,209 +1,209 @@ # MAINTAINER: ports@FreeBSD.org # # Note: before committing to this file, contact portmgr to arrange for an # experimental ports run. Untested commits may be backed out at portmgr's # discretion. # # Provide default versions for ports with multiple versions selectable # by the user. # # Users who want to override these defaults can easily do so by defining # DEFAULT_VERSIONS in their make.conf as follows: # # DEFAULT_VERSIONS= perl5=5.20 ruby=3.1 .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK) _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes LOCALBASE?= /usr/local . for lang in APACHE BDB COROSYNC EBUR128 EMACS FIREBIRD FORTRAN FPC GCC \ GHOSTSCRIPT GL GO GUILE IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM \ LUA LUAJIT MONO MYSQL NINJA NODEJS OPENLDAP PERL5 PGSQL PHP \ PYCRYPTOGRAPHY PYTHON PYTHON2 RUBY RUST SAMBA SSL TCLTK VARNISH . if defined(${lang}_DEFAULT) ERROR+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf" . endif #.undef ${lang}_DEFAULT . endfor . for lang in ${DEFAULT_VERSIONS} _l= ${lang:C/=.*//g} ${_l:tu}_DEFAULT= ${lang:C/.*=//g} . endfor # Possible values: 2.4 APACHE_DEFAULT?= 2.4 # Possible values: 5, 18 BDB_DEFAULT?= 5 # Possible values: 2, 3 COROSYNC_DEFAULT?= 3 # Possible values: rust, legacy . if empty(ARCH:Naarch64:Namd64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64) EBUR128_DEFAULT?= rust . else EBUR128_DEFAULT?= legacy . endif # Possible values: full canna nox wayland devel_full devel_nox (default: nox) #EMACS_DEFAULT?= nox # Possible values: 3.0, 4.0 . if ${ARCH} == powerpc64le FIREBIRD_DEFAULT?= 4.0 . else FIREBIRD_DEFAULT?= 3.0 . endif # Possible values: gfortran FORTRAN_DEFAULT?= gfortran # Possible values: 3.2.3, 3.3.1 . if (defined(WANT_FPC_DEVEL) && !empty(WANT_FPC_DEVEL)) || ${ARCH:Maarch64} || ${ARCH:Mpowerpc*} FPC_DEFAULT?= 3.3.1 . else FPC_DEFAULT?= 3.2.3 . endif # Possible values: 12, 13, 14, 15, 16, 17 # (Any other version is completely unsupported and not meant for general use.) GCC_DEFAULT?= 14 # Possible values: 10 GHOSTSCRIPT_DEFAULT?= 10 # Possible values: mesa-libs, mesa-devel GL_DEFAULT?= mesa-libs -# Possible values: 1.25, 1.26 +# Possible values: 1.25, 1.26, 1.27 GO_DEFAULT?= 1.26 # Possible values: 1.8, 2.2, 3.0 GUILE_DEFAULT?= 2.2 # Possible versions: 6, 7 # Possible flavors: x11, nox11 # (defaults to x11 when not specified) # Format: version[-flavor] # Examples: 6-nox11, 7 IMAGEMAGICK_DEFAULT?= 7 # Possible values: 8, 11, 17, 21, 25 . if ${ARCH:Marmv*} || ${ARCH} == powerpc JAVA_DEFAULT?= 11 . elif ${ARCH:Mi386} JAVA_DEFAULT?= 21 . else JAVA_DEFAULT?= 25 . endif # Possible values: 4.8, 4.99 . if (defined(WANT_LAZARUS_DEVEL) && !empty(WANT_LAZARUS_DEVEL)) || ${ARCH:Maarch64} || ${ARCH:Mpowerpc*} LAZARUS_DEFAULT?= 4.99 . else LAZARUS_DEFAULT?= 4.8 . endif # Possible values: rust, legacy . if empty(ARCH:Naarch64:Namd64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64) LIBRSVG2_DEFAULT?= rust . else LIBRSVG2_DEFAULT?= legacy . endif # Possible values: c7 rl9 . if ${ARCH:Mi386} LINUX_DEFAULT?= c7 . else LINUX_DEFAULT?= rl9 . endif # Possible values: 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -devel (to be used when non-base compiler is required) LLVM_DEFAULT?= 19 # Possible values: 5.1, 5.2, 5.3, 5.4, 5.5 LUA_DEFAULT?= 5.4 # Possible values: luajit, luajit-openresty . if ${ARCH:Mpowerpc64*} LUAJIT_DEFAULT?= luajit-openresty . else LUAJIT_DEFAULT?= luajit . endif # Possible values: 5.10, 5.20, 6.8 MONO_DEFAULT?= 5.20 # Possible values: 8.0, 8.4, 9.7, 10.11m, 11.4m, 11.8m MYSQL_DEFAULT?= 8.4 # Possible values: ninja, samurai NINJA_DEFAULT?= ninja # Possible value: 20, 22, 24, 26, current, lts (Note: current = 26 and lts = 24) NODEJS_DEFAULT?= lts # Possible value: 25, 26, 27 OPENLDAP_DEFAULT?= 26 # Possible values: 5.40, 5.42, 5.44, devel . if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ defined(PACKAGE_BUILDING)) # When changing the default here, make sure the DEPRECATED/EXPIRATION lines in # the older Perl 5 ports are uncommented at the same time. PERL5_DEFAULT?= 5.42 . elif !defined(PERL5_DEFAULT) # There's no need to replace development versions, like "5.23" with "devel" # because 1) nobody is supposed to use it outside of poudriere, and 2) it must # be set manually in /etc/make.conf in the first place, and we're never getting # in here. . if !defined(_PERL5_FROM_BIN) _PERL5_FROM_BIN!= ${LOCALBASE}/bin/perl -e 'printf "%vd\n", $$^V;' . endif _EXPORTED_VARS+= _PERL5_FROM_BIN PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R} . endif # Possible values: 13, 14, 15, 16, 17, 18 PGSQL_DEFAULT?= 18 # Possible values: 8.2, 8.3, 8.4, 8.5, 8.6 PHP_DEFAULT?= 8.4 # Possible values: rust, legacy . if empty(ARCH:Naarch64:Namd64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64) PYCRYPTOGRAPHY_DEFAULT?= rust . else PYCRYPTOGRAPHY_DEFAULT?= legacy . endif # Possible values: 3.10, 3.11, 3.12, 3.13, 3.13t, 3.14, 3.14t, 3.15 PYTHON_DEFAULT?= 3.12 # Possible values: 2.7 PYTHON2_DEFAULT?= 2.7 # Possible values: 3.3, 3.4, 4.0 RUBY_DEFAULT?= 3.4 # Possible values: rust, rust-nightly RUST_DEFAULT?= rust # Possible values: 4.16, 4.19, 4.20, 4.22, 4.23 SAMBA_DEFAULT?= 4.16 # When updating this, please also update the same list in ssl.mk and the checks # for USES=ssl in qa.sh! # Possible values: base, openssl, openssl34, openssl35, # openssl36, libressl, libressl-devel . if !defined(SSL_DEFAULT) # If no preference was set, check for an installed base version # but give an installed port preference over it. . if !defined(SSL_DEFAULT) && \ !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \ exists(${DESTDIR}/usr/include/openssl/opensslv.h) SSL_DEFAULT= base . else . if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) . if defined(PKG_BIN) # find installed port and use it for dependency . if !defined(OPENSSL_INSTALLED) . if defined(DESTDIR) PKGARGS= -c ${DESTDIR} . else PKGARGS= . endif OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || : . endif . if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED) SSL_DEFAULT:= ${OPENSSL_INSTALLED:T} WARNING+= "You have ${OPENSSL_INSTALLED} installed but do not have DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} set in your make.conf" . endif . else check-makevars:: @${ECHO_MSG} "You have a ${LOCALBASE}/lib/libcrypto.so file installed, but the framework is unable" @${ECHO_MSG} "to determine what port it comes from." @${ECHO_MSG} "Add DEFAULT_VERSIONS+=ssl= to your /etc/make.conf and try again." @${FALSE} . endif . endif . endif # Make sure we have a default in the end SSL_DEFAULT?= base . endif # Possible values: default, sssd SUDO_DEFAULT?= default # Possible values: 8.6, 9.0 TCLTK_DEFAULT?= 8.6 # Possible values: 6, 7 VARNISH_DEFAULT?= 6 .endif diff --git a/lang/Makefile b/lang/Makefile index 4f4a941ab4d8..d3bf6b3b4f04 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -1,410 +1,411 @@ COMMENT = Programming languages SUBDIR += abcl SUBDIR += alchemist.el SUBDIR += algol68g SUBDIR += amber SUBDIR += angelscript SUBDIR += antimony SUBDIR += apache-commons-jelly SUBDIR += asm-lsp SUBDIR += asmc SUBDIR += asn1c SUBDIR += atlast SUBDIR += awka SUBDIR += babashka SUBDIR += bas2tap SUBDIR += basic256 SUBDIR += bend SUBDIR += bsh SUBDIR += bun SUBDIR += bun-linux SUBDIR += bwbasic SUBDIR += c SUBDIR += c3c SUBDIR += cairo SUBDIR += cairo-language-server SUBDIR += cbmbasic SUBDIR += cbqn SUBDIR += ccl SUBDIR += ceylon SUBDIR += cfortran SUBDIR += chaiscript SUBDIR += chez-scheme SUBDIR += chibi-scheme SUBDIR += chicken SUBDIR += cim SUBDIR += cjs SUBDIR += cling SUBDIR += clips SUBDIR += clisp SUBDIR += clojure SUBDIR += clojure-mode.el SUBDIR += clx SUBDIR += cocor SUBDIR += coffeescript SUBDIR += colm SUBDIR += cparser SUBDIR += crumb SUBDIR += crystal SUBDIR += cython SUBDIR += cython0 SUBDIR += dhall SUBDIR += dlang-tools SUBDIR += dotnet SUBDIR += dotnet-devel SUBDIR += dotnet-host SUBDIR += dotnet8 SUBDIR += duktape SUBDIR += duktape-lib SUBDIR += ecl SUBDIR += eisl SUBDIR += elixir SUBDIR += elixir-devel SUBDIR += elixir-mode.el SUBDIR += elk SUBDIR += emacs-lisp-intro SUBDIR += emilua SUBDIR += erlang SUBDIR += erlang-doc SUBDIR += erlang-java SUBDIR += erlang-man SUBDIR += erlang-runtime27 SUBDIR += erlang-runtime28 SUBDIR += erlang-runtime29 SUBDIR += erlang-wx SUBDIR += execline SUBDIR += expect SUBDIR += f2c SUBDIR += fasm SUBDIR += fennel SUBDIR += ficl SUBDIR += fpc SUBDIR += fpc-devel SUBDIR += fpc-devel-source SUBDIR += fpc-docs SUBDIR += fpc-source SUBDIR += fsharp SUBDIR += fth SUBDIR += gambit-c SUBDIR += gauche SUBDIR += gawk SUBDIR += gcc SUBDIR += gcc12 SUBDIR += gcc12-devel SUBDIR += gcc13 SUBDIR += gcc13-devel SUBDIR += gcc14 SUBDIR += gcc14-devel SUBDIR += gcc15 SUBDIR += gcc15-devel SUBDIR += gcc16 SUBDIR += gcc16-devel SUBDIR += gcc17-devel SUBDIR += gcc6-aux SUBDIR += gforth SUBDIR += ghc SUBDIR += ghc910 SUBDIR += ghc96 SUBDIR += ghc98 SUBDIR += gir-to-d SUBDIR += gjs SUBDIR += gleam SUBDIR += gluon SUBDIR += gnat12 SUBDIR += gnat13 SUBDIR += gnat14 SUBDIR += gnat15 SUBDIR += gnatcross-binutils-aarch64 SUBDIR += gnatcross-sysroot-aarch64 SUBDIR += gnatdroid-binutils SUBDIR += gnatdroid-binutils-x86 SUBDIR += gnatdroid-sysroot SUBDIR += gnatdroid-sysroot-x86 SUBDIR += gnu-apl SUBDIR += gnu-cobol SUBDIR += gnustep-base SUBDIR += go SUBDIR += go125 SUBDIR += go126 + SUBDIR += go127 SUBDIR += gomacro SUBDIR += gprolog SUBDIR += gptscript SUBDIR += gravity SUBDIR += groovy SUBDIR += gscheme SUBDIR += guile SUBDIR += guile-aclocal SUBDIR += guile1 SUBDIR += guile2 SUBDIR += guile3 SUBDIR += halide SUBDIR += harec SUBDIR += haskell-mode.el SUBDIR += hermes SUBDIR += hla SUBDIR += hs-brainfuck SUBDIR += hs-futhark SUBDIR += hs-koka SUBDIR += hs-unlambda SUBDIR += huc SUBDIR += inko SUBDIR += intel-compute-runtime SUBDIR += intercal SUBDIR += io SUBDIR += io-devel SUBDIR += itcl SUBDIR += itcl4 SUBDIR += janet SUBDIR += jimtcl SUBDIR += jpm SUBDIR += jruby SUBDIR += julia SUBDIR += jython SUBDIR += kawa SUBDIR += kefir SUBDIR += kf5-kross SUBDIR += kotlin SUBDIR += kotlin22 SUBDIR += kturtle SUBDIR += lafontaine SUBDIR += lci SUBDIR += ldc SUBDIR += lfe SUBDIR += lfortran SUBDIR += libhx SUBDIR += libobjc2 SUBDIR += librep SUBDIR += libstdc++_stldoc_4.2.2 SUBDIR += linux-c7-tcl85 SUBDIR += linux-j SUBDIR += linux-rl9-python3 SUBDIR += linux-rl9-tcl86 SUBDIR += lua51 SUBDIR += lua52 SUBDIR += lua53 SUBDIR += lua54 SUBDIR += lua55 SUBDIR += luajit SUBDIR += luajit-openresty SUBDIR += malbolge SUBDIR += maude SUBDIR += mawk SUBDIR += mdk SUBDIR += mecrisp-stellaris SUBDIR += micropython SUBDIR += mit-scheme SUBDIR += mixal SUBDIR += mlkit SUBDIR += mlton SUBDIR += mmix SUBDIR += mono SUBDIR += mono-basic SUBDIR += mono5.10 SUBDIR += mono5.20 SUBDIR += mono6.8 SUBDIR += mosh SUBDIR += mosml SUBDIR += mtasc SUBDIR += mujs SUBDIR += munger SUBDIR += myrddin SUBDIR += nawk SUBDIR += nbfc SUBDIR += neocmakelsp SUBDIR += nesasm SUBDIR += newlisp SUBDIR += nickel SUBDIR += nickle SUBDIR += nim SUBDIR += njs SUBDIR += nll SUBDIR += nqc SUBDIR += numbat SUBDIR += nwcc SUBDIR += nx SUBDIR += nyan SUBDIR += ocaml SUBDIR += ocaml-autoconf SUBDIR += ocaml-camlidl SUBDIR += odin SUBDIR += oo2c SUBDIR += opencoarrays SUBDIR += opensycl SUBDIR += ott SUBDIR += owl-lisp SUBDIR += p5-Data-JavaScript SUBDIR += p5-Error SUBDIR += p5-Expect SUBDIR += p5-ExtUtils-F77 SUBDIR += p5-Interpolation SUBDIR += p5-JSAN SUBDIR += p5-JavaScript-QuickJS SUBDIR += p5-JavaScript-Squish SUBDIR += p5-JavaScript-Value-Escape SUBDIR += p5-List-MoreUtils SUBDIR += p5-List-MoreUtils-XS SUBDIR += p5-Marpa SUBDIR += p5-Marpa-PP SUBDIR += p5-Marpa-XS SUBDIR += p5-Modern-Perl SUBDIR += p5-Perl6-Subs SUBDIR += p5-Promises SUBDIR += p5-Pugs-Compiler-Rule SUBDIR += p5-Quantum-Superpositions SUBDIR += p5-Scalar-List-Utils SUBDIR += p5-Switch SUBDIR += p5-Tcl SUBDIR += p5-Test-XPath SUBDIR += p5-Try-Catch SUBDIR += p5-Try-Tiny SUBDIR += p5-Try-Tiny-Retry SUBDIR += p5-TryCatch SUBDIR += p5-ePerl SUBDIR += p5-signatures SUBDIR += p5-v6 SUBDIR += pbasic SUBDIR += pcc SUBDIR += perl-lsp SUBDIR += perl5-devel SUBDIR += perl5.40 SUBDIR += perl5.42 SUBDIR += perl5.44 SUBDIR += petite-chez SUBDIR += pfe SUBDIR += pharo SUBDIR += php-mode.el SUBDIR += php82 SUBDIR += php82-extensions SUBDIR += php83 SUBDIR += php83-extensions SUBDIR += php84 SUBDIR += php84-extensions SUBDIR += php85 SUBDIR += php85-extensions SUBDIR += php86 SUBDIR += php86-extensions SUBDIR += picoc SUBDIR += picolisp SUBDIR += pkl SUBDIR += plexil SUBDIR += pocl SUBDIR += polyml SUBDIR += pomsky SUBDIR += prql SUBDIR += ptoc SUBDIR += purescript SUBDIR += py-dhall SUBDIR += py-gherkin-official SUBDIR += py-hy SUBDIR += py-lupa SUBDIR += py-sly SUBDIR += py-textX SUBDIR += python SUBDIR += python-doc-html SUBDIR += python-doc-text SUBDIR += python-mode.el SUBDIR += python-tools SUBDIR += python2 SUBDIR += python27 SUBDIR += python3 SUBDIR += python310 SUBDIR += python311 SUBDIR += python312 SUBDIR += python313 SUBDIR += python313t SUBDIR += python314 SUBDIR += python314t SUBDIR += python315 SUBDIR += qmasm SUBDIR += quickjs SUBDIR += quickjs-ng SUBDIR += quilc SUBDIR += racket SUBDIR += racket-minimal SUBDIR += ratfor SUBDIR += referenceassemblies-pcl SUBDIR += retro12 SUBDIR += rexx-imc SUBDIR += rexx-regina SUBDIR += rexx-regutil SUBDIR += rexx-wrapper SUBDIR += rhino SUBDIR += rizin SUBDIR += rizin-cutter SUBDIR += ruby33 SUBDIR += ruby34 SUBDIR += ruby40 SUBDIR += rubygem-rb_sys SUBDIR += rubygem-ruby_language_server SUBDIR += runawk SUBDIR += rust SUBDIR += rust-bootstrap SUBDIR += rust-nightly SUBDIR += rust188 SUBDIR += rustpython SUBDIR += s7 SUBDIR += s7-nrepl SUBDIR += sagittarius-scheme SUBDIR += sather-specification SUBDIR += sather-tutorial SUBDIR += sbcl SUBDIR += scala SUBDIR += scheme48 SUBDIR += scm SUBDIR += scratch SUBDIR += scryer-prolog SUBDIR += sdcc SUBDIR += see SUBDIR += seed7 SUBDIR += silq SUBDIR += siod SUBDIR += sisc SUBDIR += sketchy SUBDIR += slib SUBDIR += slib-guile SUBDIR += slisp SUBDIR += smalltalk SUBDIR += smlnj SUBDIR += snobol4 SUBDIR += solidity SUBDIR += spidermonkey128 SUBDIR += spidermonkey140 SUBDIR += spidermonkey153 SUBDIR += squeak SUBDIR += squirrel SUBDIR += starlark-rust SUBDIR += swift510 SUBDIR += swift6 SUBDIR += swipl SUBDIR += tauthon SUBDIR += tcbasic SUBDIR += tcc SUBDIR += tcl-manual SUBDIR += tcl-wrapper SUBDIR += tcl86 SUBDIR += tcl90 SUBDIR += tclX SUBDIR += tolua SUBDIR += tolua++ SUBDIR += trealla-prolog SUBDIR += tuareg-mode.el SUBDIR += typescript-go SUBDIR += typstyle SUBDIR += ucc SUBDIR += urweb SUBDIR += v SUBDIR += v8 SUBDIR += v8-beta SUBDIR += vala SUBDIR += voc SUBDIR += yabasic SUBDIR += yap SUBDIR += yorick SUBDIR += ypsilon SUBDIR += zephir SUBDIR += zig SUBDIR += zig014 SUBDIR += zig015 .include diff --git a/lang/go127/Makefile b/lang/go127/Makefile new file mode 100644 index 000000000000..3e11a0caeb10 --- /dev/null +++ b/lang/go127/Makefile @@ -0,0 +1,4 @@ +DISTVERSION= 1.27.0 +BOOTSTRAP_VER= 1.25.14 + +.include "${.CURDIR}/../go/bsd.go.mk" diff --git a/lang/go127/distinfo b/lang/go127/distinfo new file mode 100644 index 000000000000..742673babe9d --- /dev/null +++ b/lang/go127/distinfo @@ -0,0 +1,13 @@ +TIMESTAMP = 1787159271 +SHA256 (go1.27.0.src.tar.gz) = 7002403d7cc44529ef6d26f69a44818263395ead7c16c05a5808ae047ebeb0e5 +SIZE (go1.27.0.src.tar.gz) = 35080395 +SHA256 (go1.25.14.freebsd-arm64.tar.gz) = 46a58dfa6277db1a12426f92b0928d2d1e8593a23658d6988bc4944c75c928fa +SIZE (go1.25.14.freebsd-arm64.tar.gz) = 57088475 +SHA256 (go1.25.14.freebsd-amd64.tar.gz) = e85e6530832772dc5769b42e42cd5aa488dd20149a6792a4c0e87762164a60da +SIZE (go1.25.14.freebsd-amd64.tar.gz) = 59634883 +SHA256 (go1.25.14.freebsd-arm.tar.gz) = a8cbd74c4136028716feca03753a2546b6efa9902d3233f0d8ea19d09c02c373 +SIZE (go1.25.14.freebsd-arm.tar.gz) = 58334469 +SHA256 (go1.25.14.freebsd-386.tar.gz) = 35903a0a91de85d22f79e597c7bf3fd2780db74370b937f0e5880a57fa66aca9 +SIZE (go1.25.14.freebsd-386.tar.gz) = 58308643 +SHA256 (go1.25.14.freebsd-riscv64.tar.gz) = 38c91f48802de5ddfaf6a86aea6d8d5f129c0df776edd66ad1793f8c869c44c7 +SIZE (go1.25.14.freebsd-riscv64.tar.gz) = 58188033 diff --git a/lang/go127/files/patch-src_cmd_go_internal_modload_vendor.go b/lang/go127/files/patch-src_cmd_go_internal_modload_vendor.go new file mode 100644 index 000000000000..ba3f97226624 --- /dev/null +++ b/lang/go127/files/patch-src_cmd_go_internal_modload_vendor.go @@ -0,0 +1,11 @@ +--- src/cmd/go/internal/modload/vendor.go.orig 2024-02-02 18:09:55 UTC ++++ src/cmd/go/internal/modload/vendor.go +@@ -159,7 +159,7 @@ func checkVendorConsistency(indexes []*modFileIndex, m + panic(fmt.Errorf("not in workspace mode but number of indexes is %v, not 1", len(indexes))) + } + index := indexes[0] +- if gover.Compare(index.goVersion, "1.14") < 0 { ++ if gover.Compare(index.goVersion, "1.14") < 0 || os.Getenv("GO_NO_VENDOR_CHECKS") == "1" { + // Go versions before 1.14 did not include enough information in + // vendor/modules.txt to check for consistency. + // If we know that we're on an earlier version, relax the consistency check.