diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh index 104d4d48006f..20d1e296dd5c 100644 --- a/Mk/Scripts/qa.sh +++ b/Mk/Scripts/qa.sh @@ -1,1039 +1,1042 @@ #!/bin/sh # MAINTAINER: portmgr@FreeBSD.org set -o pipefail if [ -z "${STAGEDIR}" -o -z "${PREFIX}" -o -z "${LOCALBASE}" ]; then echo "STAGEDIR, PREFIX, LOCALBASE required in environment." >&2 exit 1 fi [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_QA}" ] && set -x LF=$(printf '\nX') LF=${LF%X} notice() { echo "Notice: $*" >&2 } warn() { echo "Warning: $*" >&2 } err() { echo "Error: $*" >&2 } list_stagedir_elfs() { cd ${STAGEDIR} && find -s . -type f \( -perm +111 -o -name '*.so*' \) "$@" } shebangonefile() { local f interp interparg badinterp rc f="$*" rc=0 # whitelist some files case "${f}" in *.pm|*.pod|*.txt|${STAGEDIR}${LINUXBASE}/*) return 0 ;; esac interp=$(sed -n -e '1s/^#![[:space:]]*\([^[:space:]]*\).*/\1/p;2q' "${f}") badinterp="" case "${interp}" in "") ;; /bin/rc) # whitelist some interpreters ;; ${LOCALBASE}/bin/python|${PREFIX}/bin/python|${LOCALBASE}/bin/python2|${PREFIX}/bin/python2|${LOCALBASE}/bin/python3|${PREFIX}/bin/python3) badinterp="${interp}" ;; ${LINUXBASE}/*) ;; ${LOCALBASE}/bin/perl5.* | ${PREFIX}/bin/perl5.*) # lang/perl5* are allowed to have these shebangs. if ! expr ${PKGORIGIN} : '^lang/perl5.*' > /dev/null; then err "'${interp}' is an invalid shebang for '${f#${STAGEDIR}${PREFIX}/}' you must use ${LOCALBASE}/bin/perl." err "Either pass \${PERL} to the build or use USES=shebangfix" rc=1 fi ;; ${LOCALBASE}/*) ;; ${PREFIX}/*) ;; /bin/csh) ;; /bin/sh) ;; /bin/tcsh) ;; /usr/bin/awk) ;; /usr/bin/env) interparg=$(sed -n -e '1s/^#![[:space:]]*[^[:space:]]*[[:space:]]*\([^[:space:]]*\).*/\1/p;2q' "${f}") case "${interparg}" in python|python2|python3) badinterp="${interp} ${interparg}" ;; esac ;; /usr/bin/nawk) ;; /usr/bin/sed) ;; /usr/sbin/dtrace) ;; /usr/bin/make) ;; /usr/libexec/atf-sh) ;; *) badinterp="${interp}" ;; esac if [ -n "${badinterp}" ]; then err "'${badinterp}' is an invalid shebang you need USES=shebangfix for '${f#${STAGEDIR}${PREFIX}/}'" rc=1 fi return ${rc} } shebang() { local f l link rc rc=0 while read -r f; do # No results presents a blank line from heredoc. [ -z "${f}" ] && continue shebangonefile "${f}" || rc=1 # Use heredoc to avoid losing rc from find|while subshell done <<-EOF $(find ${STAGEDIR}${PREFIX} \ -type f -perm +111 2>/dev/null) EOF return ${rc} } baselibs() { local rc local found_openssl local file [ "${PKGBASE}" = "pkg" -o "${PKGBASE}" = "pkg-devel" ] && return while read -r f; do case ${f} in File:\ .*) file=${f#File: .} ;; *NEEDED*\[libarchive.so.[56]]) err "Bad linking on ${f##* } for ${file} please add USES=libarchive" rc=1 ;; *NEEDED*\[libedit.so.7]) err "Bad linking on ${f##* } for ${file} please add USES=libedit" rc=1 ;; *NEEDED*\[libcrypto.so.*]|*NEEDED*\[libssl.so.*]) found_openssl=1 ;; esac done <<-EOF $(list_stagedir_elfs -exec readelf -d {} + 2>/dev/null) EOF if [ -z "${USESSSL}" -a -n "${found_openssl}" ]; then warn "you need USES=ssl" elif [ -n "${USESSSL}" -a -z "${found_openssl}" ]; then warn "you may not need USES=ssl" fi return ${rc} } symlinks() { local rc rc=0 # Split stat(1) result into 2 lines and read each line separately to # retain spaces in filenames. while read -r l; do # No results presents a blank line from heredoc. [ -z "${l}" ] && continue read -r link case "${link}" in ${STAGEDIR}*) err "Bad symlink '${l#${STAGEDIR}${PREFIX}/}' pointing inside the stage directory" rc=1 ;; /*) # Only warn for symlinks within the package. if [ -e "${STAGEDIR}${link}" ]; then warn "Bad symlink '${l#${STAGEDIR}}' pointing to an absolute pathname '${link}'" fi # Also warn if the symlink exists nowhere. if [ ! -e "${STAGEDIR}${link}" -a ! -e "${link}" ]; then warn "Symlink '${l#${STAGEDIR}}' pointing to '${link}' which does not exist in the stage directory or in localbase" fi ;; esac # Use heredoc to avoid losing rc from find|while subshell. done <<-EOF $(find ${STAGEDIR} -type l -exec stat -f "%N${LF}%Y" {} +) EOF return ${rc} } paths() { local rc rc=0 while read -r f; do # No results presents a blank line from heredoc. [ -z "${f}" ] && continue # Ignore false-positive/harmless files case "${f}" in */lib/ruby/gems/*) continue ;; */share/texmf-var/web2c/*/*.fmt) continue ;; */share/texmf-var/web2c/*/*.log) continue ;; esac err "'${f#${STAGEDIR}${PREFIX}/}' is referring to ${STAGEDIR}" rc=1 # Use heredoc to avoid losing rc from find|while subshell done <<-EOF $(find ${TMPPLIST} ${STAGEDIR} -type f -exec grep -l "${STAGEDIR}" {} +) EOF return ${rc} } # For now do not raise an error, just warnings stripped() { [ -x /usr/bin/file ] || return # this is fatal [ -n "${STRIP}" ] || return 0 # Split file and result into 2 lines and read separately to ensure # files with spaces are kept intact. # Using readelf -h ... /ELF Header:/ will match on all ELF files. find ${STAGEDIR} -type f ! -name '*.a' ! -name '*.o' \ -exec sh -c 'readelf -S -- /dev/null "$@" || :' -- {} + 2>/dev/null | awk ' /File:/ {sub(/File: /, "", $0); file=$0} /[[:space:]]\.debug_info[[:space:]]*PROGBITS/ {print file}' | while read -r f; do warn "'${f#${STAGEDIR}${PREFIX}/}' is not stripped consider trying INSTALL_TARGET=install-strip or using \${STRIP_CMD}" done } desktopfileutils() { if [ -z "${USESDESKTOPFILEUTILS}" ]; then grep -q MimeType= ${STAGEDIR}${PREFIX}/share/applications/*.desktop 2>/dev/null && warn "you need USES=desktop-file-utils" else grep -q MimeType= ${STAGEDIR}${PREFIX}/share/applications/*.desktop 2>/dev/null || warn "you may not need USES=desktop-file-utils" fi return 0 } sharedmimeinfo() { local f found found=0 for f in ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml; do [ "${f}" = "${STAGEDIR}${PREFIX}/share/mime/packages/*.xml" ] && break #no matches [ "${f}" = "${STAGEDIR}${PREFIX}/share/mime/packages/freedesktop.org.xml" ] && continue found=1 break done if [ -z "${USESSHAREDMIMEINFO}" -a ${found} -eq 1 ]; then warn "you need USES=shared-mime-info" elif [ -n "${USESSHAREDMIMEINFO}" -a ${found} -eq 0 ]; then warn "you may not need USES=shared-mime-info" fi return 0 } suidfiles() { local filelist filelist=$(find ${STAGEDIR} -type f \ \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ \( -perm -u+s -or -perm -g+s \)) if [ -n "${filelist}" ]; then warn "setuid files in the stage directory (are these necessary?):" ls -liTd ${filelist} fi return 0 } libtool() { if [ -z "${USESLIBTOOL}" ]; then find ${STAGEDIR} -name '*.la' | while read -r f; do if grep -q 'libtool library' "${f}"; then err ".la libraries found, port needs USES=libtool" return 1 fi done # The return above continues here. fi } libperl() { local has_some_libperl_so files found if [ -n "${SITE_ARCH_REL}" -a -d "${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}" ]; then has_some_libperl_so=0 files=0 while read -r f; do # No results presents a blank line from heredoc. [ -z "${f}" ] && continue files=$((files+1)) found=$(readelf -d ${f} | awk "BEGIN {libperl=1} /NEEDED.*${LIBPERL}/ { libperl = 0 } END {print libperl} ") case "${found}" in 1) warn "${f} is not linked with ${LIBPERL}, not respecting lddlflags?" ;; 0) has_some_libperl_so=1 ;; esac # Use heredoc to avoid losing rc from find|while subshell done <<-EOT $(find ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL} -name '*.so') EOT if [ ${files} -gt 0 -a ${has_some_libperl_so} -eq 0 ]; then err "None of the ${files} .so in ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL} are linked with ${LIBPERL}, see above for the full list." return 1 else return 0 fi fi } prefixvar() { if [ ${PREFIX} != ${LINUXBASE} -a -d ${STAGEDIR}${PREFIX}/var ]; then warn "port uses ${PREFIX}/var instead of /var" fi } terminfo() { local f found for f in ${STAGEDIR}${PREFIX}/share/misc/*.terminfo; do [ "${f}" = "${STAGEDIR}${PREFIX}/share/misc/*.terminfo" ] && break #no matches found=1 break done for f in ${STAGEDIR}${PREFIX}/share/misc/terminfo.db*; do [ "${f}" = "${STAGEDIR}${PREFIX}/share/misc/terminfo.db*" ] && break #no matches found=1 break done if [ -z "${USESTERMINFO}" -a -n "${found}" ]; then warn "you need USES=terminfo" elif [ -n "${USESTERMINFO}" -a -z "${found}" ]; then warn "you may not need USES=terminfo" fi return 0 } listcontains() { local str lst elt str=$1 lst=$2 for elt in ${lst} ; do if [ ${elt} = ${str} ]; then return 0 fi done return 1 } proxydeps_suggest_uses() { local pkg=$1 local lib_file=$2 # miscellaneous USE clauses if [ ${pkg} = 'devel/gettext-runtime' ]; then warn "you need USES+=gettext-runtime" elif [ ${pkg} = 'databases/sqlite3' ]; then warn "you need USES+=sqlite" elif [ ${pkg} = 'databases/sqlite2' ]; then warn "you need USES+=sqlite:2" # Gnome -> same as port # grep LIB_DEPENDS= Mk/Uses/gnome.mk |sed -e 's|\(.*\)_LIB_DEPENDS.*:\(.*\)\/\(.*\)|[ "\1" = "\3" ] \&\& echo "\\${pkg} = \\\"\2/\3\\\" -o \\\\"|'|sort|sh elif [ ${pkg} = "accessibility/atk" -o \ ${pkg} = "accessibility/atkmm" -o \ ${pkg} = "graphics/cairo" -o \ ${pkg} = "graphics/cairomm" -o \ ${pkg} = "devel/dconf" -o \ ${pkg} = "devel/gconf2" -o \ ${pkg} = "devel/gconfmm26" -o \ ${pkg} = "devel/glib20" -o \ ${pkg} = "devel/glibmm" -o \ ${pkg} = "audio/gsound" -o \ ${pkg} = "x11-toolkits/gtk20" -o \ ${pkg} = "x11-toolkits/gtk30" -o \ ${pkg} = "www/gtkhtml4" -o \ ${pkg} = "x11-toolkits/gtkmm20" -o \ ${pkg} = "x11-toolkits/gtkmm24" -o \ ${pkg} = "x11-toolkits/gtkmm30" -o \ ${pkg} = "x11-toolkits/gtksourceview2" -o \ ${pkg} = "x11-toolkits/gtksourceview3" -o \ ${pkg} = "x11-toolkits/gtksourceviewmm3" -o \ ${pkg} = "databases/libgda5" -o \ ${pkg} = "databases/libgda5-ui" -o \ ${pkg} = "databases/libgdamm5" -o \ ${pkg} = "devel/libglade2" -o \ ${pkg} = "graphics/libgnomecanvas" -o \ ${pkg} = "x11/libgnomekbd" -o \ ${pkg} = "devel/libgsf" -o \ ${pkg} = "graphics/librsvg2" -o \ ${pkg} = "devel/libsigc++12" -o \ ${pkg} = "devel/libsigc++20" -o \ ${pkg} = "x11-toolkits/libwnck" -o \ ${pkg} = "x11-toolkits/libwnck3" -o \ ${pkg} = "textproc/libxml++26" -o \ ${pkg} = "textproc/libxml2" -o \ ${pkg} = "textproc/libxslt" -o \ ${pkg} = "x11-wm/metacity" -o \ ${pkg} = "x11-toolkits/pango" -o \ ${pkg} = "x11-toolkits/pangomm" -o \ ${pkg} = "x11-toolkits/pangox-compat" -o \ ${pkg} = "x11-toolkits/vte" -o \ ${pkg} = "x11-toolkits/vte3" ]; then warn "you need USE_GNOME+=${pkg#*/}" # Gnome different as port # grep LIB_DEPENDS= Mk/Uses/gnome.mk |sed -e 's|\(.*\)_LIB_DEPENDS.*:\(.*\)\/\(.*\)|[ "\1" = "\3" ] \|\| echo "elif [ \\${pkg} = \\\"\2/\3\\\" ]; then; warn \\\"you need USE_GNOME+=\1\\\""|'|sort|sh elif [ ${pkg} = "databases/evolution-data-server" ]; then warn "you need USE_GNOME+=evolutiondataserver3" elif [ ${pkg} = "graphics/gdk-pixbuf" ]; then warn "you need USE_GNOME+=gdkpixbuf" elif [ ${pkg} = "graphics/gdk-pixbuf2" ]; then warn "you need USE_GNOME+=gdkpixbuf2" elif [ ${pkg} = "x11/gnome-desktop" ]; then warn "you need USE_GNOME+=gnomedesktop3" elif [ ${pkg} = "devel/gobject-introspection" ]; then warn "you need USE_GNOME+=introspection" elif [ ${pkg} = "graphics/libart_lgpl" ]; then warn "you need USE_GNOME+=libartlgpl2" elif [ ${pkg} = "devel/libIDL" ]; then warn "you need USE_GNOME+=libidl" elif [ ${pkg} = "x11-fm/nautilus" ]; then warn "you need USE_GNOME+=nautilus3" elif [ ${pkg} = "graphics/librsvg2-rust" ]; then warn "you need USE_GNOME+=librsvg2" # mate # grep LIB_DEPENDS= Mk/Uses/mate.mk |sed -e 's|\(.*\)_LIB_DEPENDS.*:\(.*\)\/\(.*\)|elif [ ${pkg} = "\2/\3" ]; then warn "you need USE_MATE+=\1"|' elif [ ${pkg} = "x11-fm/caja" ]; then warn "you need USE_MATE+=caja" elif [ ${pkg} = "sysutils/mate-control-center" ]; then warn "you need USE_MATE+=controlcenter" elif [ ${pkg} = "x11/mate-desktop" ]; then warn "you need USE_MATE+=desktop" elif [ ${pkg} = "x11/libmatekbd" ]; then warn "you need USE_MATE+=libmatekbd" elif [ ${pkg} = "net/libmateweather" ]; then warn "you need USE_MATE+=libmateweather" elif [ ${pkg} = "x11-wm/marco" ]; then warn "you need USE_MATE+=marco" elif [ ${pkg} = "x11/mate-menus" ]; then warn "you need USE_MATE+=menus" elif [ ${pkg} = "x11/mate-panel" ]; then warn "you need USE_MATE+=panel" elif [ ${pkg} = "sysutils/mate-polkit" ]; then warn "you need USE_MATE+=polkit" # KDE # grep -B1 _LIB= Mk/Uses/kde.mk | grep _PORT=|sed -e 's/^kde-\(.*\)_PORT=[[:space:]]*\([^[:space:]]*\).*/elif [ ${pkg} = "\2" ]; then warn "you need to use USE_KDE+=\1"/' # KDE Applications elif [ ${pkg} = "net/akonadi-contacts" ]; then warn "you need to use USE_KDE+=akonadicontacts" elif [ ${pkg} = "deskutils/akonadi-import-wizard" ]; then warn "you need to use USE_KDE+=akonadiimportwizard" elif [ ${pkg} = "net/akonadi-mime" ]; then warn "you need to use USE_KDE+=akonadimime" elif [ ${pkg} = "net/akonadi-notes" ]; then warn "you need to use USE_KDE+=akonadinotes" elif [ ${pkg} = "net/akonadi-calendar" ]; then warn "you need to use USE_KDE+=akonadicalendar" elif [ ${pkg} = "net/akonadi-search" ]; then warn "you need to use USE_KDE+=akonadisearch" elif [ ${pkg} = "net/calendarsupport" ]; then warn "you need to use USE_KDE+=calendarsupport" elif [ ${pkg} = "net/kcalcore" ]; then warn "you need to use USE_KDE+=calendarcore" elif [ ${pkg} = "net/kcalutils" ]; then warn "you need to use USE_KDE+=calendarutils" elif [ ${pkg} = "net/kcontacts" ]; then warn "you need to use USE_KDE+=contacts" elif [ ${pkg} = "net/eventviews" ]; then warn "you need to use USE_KDE+=eventviews" elif [ ${pkg} = "net/libkgapi" ]; then warn "you need to use USE_KDE+=gapi" elif [ ${pkg} = "deskutils/grantleetheme" ]; then warn "you need to use USE_KDE+=grantleetheme" elif [ ${pkg} = "net/libgravatar" ]; then warn "you need to use USE_KDE+=gravatar" elif [ ${pkg} = "net/kidentitymanagement" ]; then warn "you need to use USE_KDE+=identitymanagement" elif [ ${pkg} = "net/kimap" ]; then warn "you need to use USE_KDE+=imap" elif [ ${pkg} = "net/incidenceeditor" ]; then warn "you need to use USE_KDE+=incidenceeditor" elif [ ${pkg} = "deskutils/kdepim-apps-libs" ]; then warn "you need to use USE_KDE+=kdepim-apps-libs" elif [ ${pkg} = "net/kitinerary" ]; then warn "you need to use USE_KDE+=kitinerary" elif [ ${pkg} = "net/kontactinterface" ]; then warn "you need to use USE_KDE+=kontactinterface" elif [ ${pkg} = "net/kf5-kdav" ]; then warn "you need to use USE_KDE+=kdav" elif [ ${pkg} = "security/kpkpass" ]; then warn "you need to use USE_KDE+=kpkpass" elif [ ${pkg} = "net/ksmtp" ]; then warn "you need to use USE_KDE+=ksmtp" elif [ ${pkg} = "net/kldap" ]; then warn "you need to use USE_KDE+=ldap" elif [ ${pkg} = "deskutils/libkdepim" ]; then warn "you need to use USE_KDE+=libkdepim" elif [ ${pkg} = "security/libkleo" ]; then warn "you need to use USE_KDE+=libkleo" elif [ ${pkg} = "net/libksieve" ]; then warn "you need to use USE_KDE+=libksieve" elif [ ${pkg} = "net/mailcommon" ]; then warn "you need to use USE_KDE+=mailcommon" elif [ ${pkg} = "net/mailimporter" ]; then warn "you need to use USE_KDE+=mailimporter" elif [ ${pkg} = "net/kmailtransport" ]; then warn "you need to use USE_KDE+=mailtransport" elif [ ${pkg} = "net/kmbox" ]; then warn "you need to use USE_KDE+=mbox" elif [ ${pkg} = "net/messagelib" ]; then warn "you need to use USE_KDE+=messagelib" elif [ ${pkg} = "net/kmime" ]; then warn "you need to use USE_KDE+=mime" elif [ ${pkg} = "net/pimcommon" ]; then warn "you need to use USE_KDE+=pimcommon" elif [ ${pkg} = "net/kpimtextedit" ]; then warn "you need to use USE_KDE+=pimtextedit" elif [ ${pkg} = "net/ktnef" ]; then warn "you need to use USE_KDE+=tnef" elif [ ${pkg} = "databases/akonadi" ]; then warn "you need to use USE_KDE+=akonadi" elif [ ${pkg} = "sysutils/baloo-widgets" ]; then warn "you need to use USE_KDE+=baloo-widgets" elif [ ${pkg} = "audio/libkcddb" ]; then warn "you need to use USE_KDE+=libkcddb" elif [ ${pkg} = "audio/libkcompactdisc" ]; then warn "you need to use USE_KDE+=libkcompactdisc" elif [ ${pkg} = "graphics/libkdcraw" ]; then warn "you need to use USE_KDE+=libkdcraw" elif [ ${pkg} = "games/libkdegames" ]; then warn "you need to use USE_KDE+=libkdegames" elif [ ${pkg} = "misc/libkeduvocdocument" ]; then warn "you need to use USE_KDE+=libkeduvocdocument" elif [ ${pkg} = "graphics/libkexiv2" ]; then warn "you need to use USE_KDE+=libkexiv2" elif [ ${pkg} = "graphics/libkipi" ]; then warn "you need to use USE_KDE+=libkipi" elif [ ${pkg} = "graphics/libksane" ]; then warn "you need to use USE_KDE+=libksane" elif [ ${pkg} = "astro/marble" ]; then warn "you need to use USE_KDE+=marble" elif [ ${pkg} = "graphics/okular" ]; then warn "you need to use USE_KDE+=okular" # KDE Plasma elif [ ${pkg} = "x11/plasma5-kactivitymanagerd" ]; then warn "you need to use USE_KDE+=activitymanagerd" elif [ ${pkg} = "x11-wm/plasma5-kdecoration" ]; then warn "you need to use USE_KDE+=decoration" elif [ ${pkg} = "devel/plasma5-khotkeys" ]; then warn "you need to use USE_KDE+=hotkeys" elif [ ${pkg} = "sysutils/plasma5-kmenuedit" ]; then warn "you need to use USE_KDE+=kmenuedit" elif [ ${pkg} = "security/plasma5-kscreenlocker" ]; then warn "you need to use USE_KDE+=kscreenlocker" elif [ ${pkg} = "x11/plasma5-libkscreen" ]; then warn "you need to use USE_KDE+=libkscreen" elif [ ${pkg} = "sysutils/plasma5-libksysguard" ]; then warn "you need to use USE_KDE+=libksysguard" elif [ ${pkg} = "deskutils/plasma5-milou" ]; then warn "you need to use USE_KDE+=milou" elif [ ${pkg} = "x11-themes/plasma5-oxygen" ]; then warn "you need to use USE_KDE+=oxygen" elif [ ${pkg} = "x11/plasma5-plasma-workspace" ]; then warn "you need to use USE_KDE+=plasma-workspace" elif [ ${pkg} = "sysutils/plasma5-powerdevil" ]; then warn "you need to use USE_KDE+=powerdevil" # KDE Frameworks elif [ ${pkg} = "x11-toolkits/kf5-attica" ]; then warn "you need to use USE_KDE+=attica" elif [ ${pkg} = "sysutils/kf5-baloo" ]; then warn "you need to use USE_KDE+=baloo" elif [ ${pkg} = "x11/kf5-frameworkintegration" ]; then warn "you need to use USE_KDE+=frameworkintegration" elif [ ${pkg} = "devel/kf5-kcmutils" ]; then warn "you need to use USE_KDE+=kcmutils" elif [ ${pkg} = "devel/kf5-kdeclarative" ]; then warn "you need to use USE_KDE+=kdeclarative" elif [ ${pkg} = "x11/kf5-kded" ]; then warn "you need to use USE_KDE+=kded" elif [ ${pkg} = "x11/kf5-kdelibs4support" ]; then warn "you need to use USE_KDE+=kdelibs4support" elif [ ${pkg} = "security/kf5-kdesu" ]; then warn "you need to use USE_KDE+=kdesu" elif [ ${pkg} = "www/kf5-kdewebkit" ]; then warn "you need to use USE_KDE+=kdewebkit" elif [ ${pkg} = "www/kf5-khtml" ]; then warn "you need to use USE_KDE+=khtml" elif [ ${pkg} = "devel/kf5-kio" ]; then warn "you need to use USE_KDE+=kio" elif [ ${pkg} = "lang/kf5-kross" ]; then warn "you need to use USE_KDE+=kross" elif [ ${pkg} = "x11/kf5-plasma-framework" ]; then warn "you need to use USE_KDE+=plasma-framework" elif [ ${pkg} = "graphics/kf5-prison" ]; then warn "you need to use USE_KDE+=prison" elif [ ${pkg} = "misc/kf5-purpose" ]; then warn "you need to use USE_KDE+=purpose" elif [ ${pkg} = "devel/kf5-solid" ]; then warn "you need to use USE_KDE+=solid" elif [ ${pkg} = "textproc/kf5-sonnet" ]; then warn "you need to use USE_KDE+=sonnet" elif [ ${pkg} = "net/kf5-syndication" ]; then warn "you need to use USE_KDE+=syndication" elif [ ${pkg} = "textproc/kf5-syntax-highlighting" ]; then warn "you need to use USE_KDE+=syntaxhighlighting" elif [ ${pkg} = "devel/kf5-threadweaver" ]; then warn "you need to use USE_KDE+=threadweaver" elif expr ${pkg} : '.*/kf5-.*' > /dev/null; then warn "you need USE_KDE+=$(echo ${pkg} | sed -E 's|.*/kf5-k||')" # GStreamer 0.10 elif [ ${pkg} = "multimedia/gstreamer" ]; then warn "you need to use USE_GSTREAMER+=yes" elif [ ${pkg} = "multimedia/gstreamer-plugins" ]; then warn "you need to use USE_GSTREAMER+=yes" elif [ ${pkg} = "multimedia/gstreamer-plugins-bad" ]; then warn "you need to use USE_GSTREAMER+=bad" # GStreamer 1 elif [ ${pkg} = "multimedia/gstreamer1" ]; then warn "you need to use USE_GSTREAMER1+=yes" elif [ ${pkg} = "multimedia/gstreamer1-plugins" ]; then warn "you need to use USE_GSTREAMER1+=yes" elif [ ${pkg} = "multimedia/gstreamer1-plugins-bad" ]; then warn "you need to use USE_GSTREAMER1+=bad" # boost related elif [ ${pkg} = "devel/boost-python-libs" ]; then warn "you need to add LIB_DEPENDS+=\${PY_BOOST} and maybe USES+=python" # sdl-related elif [ ${pkg} = 'devel/sdl12' ]; then warn "you need USE_SDL+=sdl" elif echo ${pkg} | grep -E '/sdl_(console|gfx|image|mixer|mm|net|pango|sound|ttf)$' > /dev/null; then warn "you need USE_SDL+=$(echo ${pkg} | sed -E 's|.*/sdl_||')" elif [ ${pkg} = 'devel/sdl20' ]; then warn "you need USE_SDL+=sdl2" elif echo ${pkg} | grep -E '/sdl2_(gfx|image|mixer|net|ttf)$' > /dev/null; then warn "you need USE_SDL+=$(echo ${pkg} | sed -E 's|.*/sdl2_||')2" # gl-related elif expr ${lib_file} : "${LOCALBASE}/lib/libGL.so.*$" > /dev/null; then warn "you need USE_GL+=gl" elif expr ${lib_file} : "${LOCALBASE}/lib/libGLX.so.*$" > /dev/null; then warn "you need USE_GL+=gl" elif expr ${lib_file} : "${LOCALBASE}/lib/libgbm.so.*$" > /dev/null; then warn "you need USE_GL+=gbm" elif expr ${lib_file} : "${LOCALBASE}/lib/libGLESv2.so.*$" > /dev/null; then warn "you need USE_GL+=glesv2" elif expr ${lib_file} : "${LOCALBASE}/lib/libEGL.so.*$" > /dev/null; then warn "you need USE_GL+=egl" elif expr ${lib_file} : "${LOCALBASE}/lib/libOpenGL.so.*$" > /dev/null; then warn "you need USE_GL+=opengl" elif [ ${pkg} = 'graphics/glew' ]; then warn "you need USE_GL+=glew" elif [ ${pkg} = 'graphics/libGLU' ]; then warn "you need USE_GL+=glu" elif [ ${pkg} = 'graphics/libGLw' ]; then warn "you need USE_GL+=glw" elif [ ${pkg} = 'graphics/freeglut' ]; then warn "you need USE_GL+=glut" # Xorg-libraries: this should be by XORG_MODULES @ bsd.xorg.mk elif echo ${pkg} | grep -E '/lib(X11|Xau|Xdmcp|Xext|SM|ICE|Xfixes|Xft|Xdamage|Xcomposite|Xcursor|Xinerama|Xmu|Xmuu|Xpm|Xt|Xtst|Xi|Xrandr|Xrender|Xres|XScrnSaver|Xv|Xxf86vm|Xxf86dga|Xxf86misc|xcb)$' > /dev/null; then warn "you need USE_XORG+=$(echo ${pkg} | sed -E 's|.*/lib||' | tr '[:upper:]' '[:lower:]')" elif [ ${pkg} = 'x11/pixman' ]; then warn "you need USE_XORG+=pixman" # Qt5 elif expr ${pkg} : '.*/qt5-.*' > /dev/null; then warn "you need USES=qt:5 and USE_QT+=$(echo ${pkg} | sed -E 's|.*/qt5-||')" # MySQL elif expr ${lib_file} : "${LOCALBASE}/lib/mysql/[^/]*$" > /dev/null; then warn "you need USES+=mysql" # postgresql elif expr ${pkg} : "^databases/postgresql.*-client" > /dev/null; then warn "you need USES+=pgsql" # bdb elif expr ${pkg} : "^databases/db[456]" > /dev/null; then warn "you need USES+=bdb" # fam/gamin elif [ ${pkg} = "devel/fam" -o ${pkg} = "devel/gamin" ]; then warn "you need USES+=fam" # firebird elif [ ${pkg} = "databases/firebird25-client" ]; then warn "you need USES+=firebird" # fuse elif [ ${pkg} = "sysutils/fusefs-libs" ]; then warn "you need USES+=fuse" # gnustep elif [ ${pkg} = "lang/gnustep-base" ]; then warn "you need USES+=gnustep and USE_GNUSTEP+=base" elif [ ${pkg} = "x11-toolkits/gnustep-gui" ]; then warn "you need USES+=gnustep and USE_GNUSTEP+=gui" # iconv elif [ ${pkg} = "converters/libiconv" ]; then warn "you need USES+=iconv, USES+=iconv:wchar_t, or USES+=iconv:translit depending on needs" # jpeg elif [ ${pkg} = "graphics/jpeg-turbo" ]; then warn "you need USES+=jpeg" # libarchive elif [ ${pkg} = "archivers/libarchive" ]; then warn "you need USES+=libarchive" elif [ ${pkg} = "devel/libedit" ]; then warn "you need USES+=libedit" # lua elif expr ${pkg} : "^lang/lua" > /dev/null; then warn "you need USES+=lua" # magick elif [ ${pkg} = "graphics/ImageMagick6" ] ; then warn "you need USES=magick:6" elif [ ${pkg} = "graphics/ImageMagick6-nox11" ] ; then warn "you need USES=magick:6,nox11" elif [ ${pkg} = "graphics/ImageMagick7" ] ; then warn "you need USES=magick:7" elif [ ${pkg} = "graphics/ImageMagick7-nox11" ] ; then warn "you need USES=magick:7,nox11" # motif elif [ ${pkg} = "x11-toolkits/lesstif" -o ${pkg} = "x11-toolkits/open-motif" ]; then warn "you need USES+=motif" # ncurses elif [ ${pkg} = "devel/ncurses" ]; then warn "you need USES+=ncurses" # objc elif [ ${pkg} = "lang/libobjc2" ]; then warn "you need USES+=objc" # openal elif [ ${pkg} = "audio/openal" -o ${pkg} = "audio/openal-soft" -o ${pkg} = "audio/freealut" ]; then warn "you need USES+=openal" # readline elif [ ${pkg} = "devel/readline" ]; then warn "you need USES+=readline" # ssl elif [ ${pkg} = "security/openssl" -o ${pkg} = "security/openssl111" \ -o ${pkg} = "security/libressl" -o ${pkg} = "security/libressl-devel" \ ]; then warn "you need USES=ssl" # Tcl elif expr ${pkg} : "^lang/tcl" > /dev/null; then warn "you need USES+=tcl" # Tk elif expr ${pkg} : "^x11-toolkits/tk" > /dev/null; then warn "you need USES+=tk" # Xfce # grep LIB_DEPENDS= Mk/Uses/xfce.mk |sed -e 's|\(.*\)_LIB_DEPENDS.*:\(.*\)\/\(.*\)|elif [ ${pkg} = "\2/\3" ]; then warn "you need USE_XFCE+=\1"|' elif [ ${pkg} = "sysutils/garcon" ]; then warn "you need USE_XFCE+=garcon" elif [ ${pkg} = "x11/libexo" ]; then warn "you need USE_XFCE+=libexo" elif [ ${pkg} = "x11-toolkits/libxfce4gui" ]; then warn "you need USE_XFCE+=libgui" elif [ ${pkg} = "x11/libxfce4menu" ]; then warn "you need USE_XFCE+=libmenu" elif [ ${pkg} = "x11/libxfce4util" ]; then warn "you need USE_XFCE+=libutil" elif [ ${pkg} = "x11-wm/xfce4-panel" ]; then warn "you need USE_XFCE+=panel" elif [ ${pkg} = "x11-fm/thunar" ]; then warn "you need USE_XFCE+=thunar" elif [ ${pkg} = "x11/xfce4-conf" ]; then warn "you need USE_XFCE+=xfconf" # default elif expr ${lib_file} : "${LOCALBASE}/lib/[^/]*$" > /dev/null; then lib_file=${lib_file#${LOCALBASE}/lib/} lib_file=${lib_file%.so*}.so warn "you need LIB_DEPENDS+=${lib_file}:${pkg}" fi } proxydeps() { local file dep_file dep_file_pkg already rc rc=0 # Check all dynamicaly linked ELF files # Some .so are not executable, but we want to check them too. while read -r file; do # No results presents a blank line from heredoc. [ -z "${file}" ] && continue while read -r dep_file; do # No results presents a blank line from heredoc. [ -z "${dep_file}" ] && continue # Skip files we already checked. if listcontains ${dep_file} "${already}"; then continue fi if pkg which -q ${dep_file} > /dev/null 2>&1; then dep_file_pkg=$(pkg which -qo ${dep_file}) # Check that the .so we need has a SONAME if [ "${dep_file_pkg}" != "${PKGORIGIN}" ]; then # When grep -q finds a match it will close the pipe immediately. # This may cause the test to fail when pipefail is turned on. set +o pipefail if ! readelf -d "${dep_file}" | grep -q SONAME; then err "${file} is linked to ${dep_file} which does not have a SONAME. ${dep_file_pkg} needs to be fixed." fi set -o pipefail fi # If we don't already depend on it, and we don't provide it if ! listcontains ${dep_file_pkg} "${LIB_RUN_DEPENDS} ${PKGORIGIN}"; then # If the package has a flavor, check that the dependency is not on that particular flavor. flavor=$(pkg annotate -q -S "$(pkg which -q "${dep_file}")" flavor) if [ -n "${flavor}" ]; then if listcontains ${dep_file_pkg}@${flavor} "${LIB_RUN_DEPENDS} ${PKGORIGIN}"; then continue fi fi err "${file} is linked to ${dep_file} from ${dep_file_pkg} but it is not declared as a dependency" proxydeps_suggest_uses ${dep_file_pkg} ${dep_file} rc=1 fi else err "${file} is linked to ${dep_file} that does not belong to any package" rc=1 fi already="${already} ${dep_file}" done <<-EOT $(env LD_LIBMAP_DISABLE=1 ldd -a "${STAGEDIR}${file}" | \ awk ' BEGIN {section=0} /^\// {section++} !/^\// && section<=1 && ($3 ~ "^'${PREFIX}'" || $3 ~ "^'${LOCALBASE}'") {print $3}') EOT done <<-EOT $(list_stagedir_elfs | \ file -F $'\1' -f - | \ grep -a 'ELF.*FreeBSD.*dynamically linked' | \ cut -f 1 -d $'\1'| \ sed -e 's/^\.//') EOT [ -z "${PROXYDEPS_FATAL}" ] && return 0 return ${rc} } sonames() { [ ! -d ${STAGEDIR}${PREFIX}/lib -o -n "${BUNDLE_LIBS}" ] && return 0 while read -r f; do # No results presents a blank line from heredoc. [ -z "${f}" ] && continue # Ignore symlinks [ -f "${f}" -a ! -L "${f}" ] || continue if ! readelf -d ${f} | grep -q SONAME; then warn "${f} doesn't have a SONAME." warn "pkg(8) will not register it as being provided by the port." warn "If another port depend on it, pkg will not be able to know where it comes from." case "${f}" in ${STAGEDIR}${PREFIX}/lib/*/*) warn "It is in a subdirectory, it may not be used in another port." ;; *) warn "It is directly in ${PREFIX}/lib, it is probably used by other ports." ;; esac fi # Use heredoc to avoid losing rc from find|while subshell done <<-EOT $(find ${STAGEDIR}${PREFIX}/lib -name '*.so.*') EOT } perlcore_port_module_mapping() { case "$1" in Net) echo "Net::Config" ;; libwww) echo "LWP" ;; *) echo "$1" | sed -e 's/-/::/g' ;; esac } perlcore() { local portname version module gotsome [ -x "${LOCALBASE}/bin/corelist" ] || return 0 for dep in ${UNIFIED_DEPENDS}; do portname=$(expr "${dep}" : ".*/p5-\(.*\)") if [ -n "${portname}" ]; then gotsome=1 module=$(perlcore_port_module_mapping "${portname}") version=$(expr "${dep}" : ".*>=*\([^:<]*\)") while read -r l; do case "${l}" in *was\ not\ in\ CORE*) # This never was with Perl # CORE, so nothing to do here ;; *and\ removed*) # This was in Perl CORE but has # been removed since. warn "${dep##*:} was in Perl CORE. Check with \`corelist ${module} ${version}\` and \`corelist -a ${module}\` if it should be conditionally added depending on PERL_LEVEL" ;; *deprecated*in*) # This is in Perl CORE but is # deprecated. warn "${dep##*:} is in Perl CORE but deprecated. Check with \`corelist ${module} ${version}\` and \`corelist -a ${module}\` if the dependency is really needed or if it should be conditionally added depending on PERL_LEVEL" ;; *was\ first\ released*) # This is in Perl CORE and is # maybe not needed. warn "${dep##*:} is present in Perl CORE. Check with \`corelist ${module} ${version}\` and \`corelist -a ${module}\` if the dependency is really needed or if it should be conditionally added depending on PERL_LEVEL" ;; *) err "This line is not handled: \"${l}\"" esac done <<-EOT $(${LOCALBASE}/bin/corelist "${module}"|tail -1) EOT fi done if [ -n "${gotsome}" ] && ! pkg info -e devel/p5-Module-CoreList; then notice "You have some Perl modules as dependencies but you do not have devel/p5-Module-CoreList installed, the perlcore QA check gets better results when using it, especially with older Perl versions." fi } no_arch() { [ -z "$NO_ARCH" ] && return rc=0 while read -r f; do [ -z "$f" ] && continue if [ -n "$NO_ARCH_IGNORE" ]; then skip= for blacklist in $NO_ARCH_IGNORE; do case $f in *$blacklist) skip=1; break;; esac done [ "$skip" ] && continue fi err "'${f#.}' is a architecture specific binary file and you have set NO_ARCH. Either remove NO_ARCH or add '$(basename $f)' to NO_ARCH_IGNORE." rc=1 done <<-EOF $(list_stagedir_elfs \ | file -F $'\1' -f - -N \ | grep -aE 'ELF .* [LM]SB .*, .*, version [0-9]+ \(FreeBSD\)' \ | cut -f 1 -d $'\1') EOF return $rc } gemdeps() { rc=0 if [ "${PKGBASE%%-*}" = "rubygem" ]; then # shellcheck disable=SC2153 # In the heredoc, ${PORTNAME} comes from the environment, not # to be confused with ${portname} while read -r l; do if [ -n "${l}" ]; then name=${l%% *} vers=${l#* } while read -r v; do if ! while read -r p; do ${LOCALBASE}/bin/ruby -e "puts 'OK' if Gem::Dependency.new('${name}','${v}').match?('${name}','${p}')" done | grep -qFx OK; then err RubyGem dependency ${name} ${v} is not satisfied. rc=1 fi <<-EOF $(${LOCALBASE}/bin/gem list -e "${name}" \ | sed "s|.*(\(.*\))|\1|" \ | tr -d ' ' \ | tr , '\n') EOF done <<-EOF $(while echo "${vers}" | grep -q '"'; do echo "${vers}" | cut -d '"' -f2 vers=$(echo "${vers}"|cut -d '"' -f3-) done) EOF fi done <<-EOF $(grep -a 's.add_runtime_dependency' ${STAGEDIR}${PREFIX}/lib/ruby/gems/*/specifications/${PORTNAME}-*.gemspec \ | sed 's|.*<\(.*\)>.*\[\(.*\)\])|\1 \2|' \ | sort -u) EOF fi return $rc } # If an non rubygem-port has a 'Gemfile' file # it is checked with bundle to be sure # all dependencies are satisfied. # Without the check missing/wrong dependencies # are just found when executing the application gemfiledeps() { # skip check if port does not use ruby at all if [ -z "$USE_RUBY" ]; then return 0 fi # skip check if port is a rubygem-* one; they have no Gemfiles if [ "${PKGBASE%%-*}" = "rubygem" ]; then return 0 fi # advise install of bundler if its not present for check if ! type bundle > /dev/null 2>&1; then notice "Please install sysutils/rubygem-bundler for additional Gemfile-checks" return 0 fi # locate the Gemfile(s) while read -r f; do # no results presents a blank line from heredoc [ -z "$f" ] && continue # if there is no Gemfile everything is fine - stop here [ ! -f "$f" ] && return 0; # use bundle to check if Gemfile is satisfied # if bundle returns 1 the Gemfile is not satisfied # and so stage-qa isn't also if ! bundle check --dry-run --gemfile $f > /dev/null 2>&1; then warn "Dependencies defined in ${f} are not satisfied" fi done <<-EOF $(find ${STAGEDIR} -name Gemfile) EOF return 0 } flavors() { local rc pkgnames uniques rc=0 if [ -n "${FLAVOR}" ]; then pkgnames=$(make -C "${CURDIR}" flavors-package-names|sort) uniques=$(echo "${pkgnames}"|uniq) if [ "$pkgnames" != "${uniques}" ]; then err "Package names are not unique with flavors:" make -C "${CURDIR}" pretty-flavors-package-names >&2 err "maybe use _PKGNAMEPREFIX/SUFFIX". rc=1 fi fi return ${rc} } license() { local lic autoaccept pkgmirror #distsell distmirror pkgsell if [ -n "$DISABLE_LICENSES" ]; then warn "You have disabled the licenses framework with DISABLE_LICENSES, unable to run checks" elif [ -n "$LICENSE" ]; then for lic in $LICENSE_PERMS; do case "$lic" in auto-accept) autoaccept=1 ;; #dist-mirror) distmirror=1 ;; #dist-sell) distsell=1 ;; pkg-mirror) pkgmirror=1 ;; #pkg-sell) pkgsell=1 ;; esac done if [ -z "$autoaccept" ]; then warn "License is not auto-accepted, packages will not be built, ports depending on this one will be ignored." fi if [ -z "$pkgmirror" ]; then warn "License does not allow package to be distributed, ports depending on this one will be ignored" fi fi return 0 } # This is to prevent adding dependencies to meta ports that are only there to # improve the end user experience. depends_blacklist() { local dep rc instead rc=0 for dep in ${UNIFIED_DEPENDS}; do origin=$(expr "${dep}" : ".*:\([^@]*\)") instead="" case "$origin" in lang/python|lang/python2|lang/python3) # lang/python depends on lang/pythonX, but it's # ok, it is also in the blacklist. if [ ${PKGORIGIN} != lang/python ]; then instead="USES=python:xy with a specific version" fi ;; lang/gcc) instead="USE_GCC" ;; + lang/go) + instead="USES=go" + ;; lang/julia) instead="a dependency on lang/julia\${JULIA_DEFAULT:S/.//}" ;; devel/llvm) instead="a dependency on devel/llvm\${LLVM_DEFAULT}" ;; www/py-django) instead="one of the www/py-djangoXYZ port" ;; esac if [ -n "${instead}" ]; then err "$origin should not be depended upon. Instead, use $instead." rc=1 fi done return $rc } pkgmessage() { for message in ${PKGMESSAGES}; do if [ -f "${message}" ]; then if ! head -1 "${message}" | grep -q '^\['; then warn "${message} not in UCL format, will be shown on initial install only." warn "See https://docs.freebsd.org/en/books/porters-handbook/pkg-files/#porting-message" fi fi done return 0 } reinplace() { if [ -f ${REWARNFILE} ]; then warn "Possible REINPLACE_CMD issues:" cat ${REWARNFILE} fi } checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo" checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo" checks="$checks proxydeps sonames perlcore no_arch gemdeps gemfiledeps flavors" checks="$checks license depends_blacklist pkgmessage reinplace" ret=0 cd ${STAGEDIR} || exit 1 for check in ${checks}; do eval check_test="\$IGNORE_QA_$check" if [ -z "${check_test}" ]; then ${check} || ret=1 else warn "Ignoring $check QA test" fi done exit ${ret} diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index 39585e0c9946..c18b8fcc4000 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -1,278 +1,285 @@ # This file contains logic to ease porting of Go binaries using the # `go` command. # # Feature: go # Usage: USES=go -# Valid ARGS: (none), modules, no_targets, run +# Valid ARGS: (none), N.NN, N.NN-devel, modules, no_targets, run # -# (none) Setup GOPATH and build in GOPATH mode. +# (none) Setup GOPATH and build in GOPATH mode using default Go version. +# N.NN[-devel] Specify Go version # modules If the upstream uses Go modules, this can be set to build # in modules-aware mode. # no_targets Indicates that Go is needed at build time as a part of # make/CMake build. This will setup build environment like # GO_ENV, GO_BUILDFLAGS but will not create post-extract and # do-{build,install,test} targets. # run Indicates that Go is needed at run time and adds it to # RUN_DEPENDS. # # 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_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_TESTFLAGS # Additional build arguments to be passed to the `go test` command # -# GO_PORT -# The Go port to use. By default this is lang/go but can be set -# to lang/go-devel in make.conf for testing with future Go versions. -# -# This variable must not be set by individual ports! -# # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_GO_MK) _INCLUDE_USES_GO_MK= yes -. if !empty(go_ARGS:Nmodules:Nno_targets:Nrun) -IGNORE= USES=go has invalid arguments: ${go_ARGS:Nmodules:Nno_targets:Nrun} +# When adding a version, please keep the comment in +# Mk/bsd.default-versions.mk in sync. +GO_VALID_VERSIONS= 1.17 1.18 1.19-devel + +# Check arguments sanity +. if !empty(go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun) +IGNORE= USES=go has invalid arguments: ${go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun} . endif -# Settable variables +# Parse Go version +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 +GO_SUFFIX= ${GO_VERSION:S/.//:C/.*-devel/-devel/} +GO_PORT= lang/go${GO_SUFFIX} -GO_PORT?= lang/go +# 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?= ./... GO_BUILDFLAGS+= -v -buildmode=exe -trimpath . if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*) GO_BUILDFLAGS+= -ldflags=-s . endif GO_TESTFLAGS+= -v -. if ${GO_PORT} != lang/go117 +. if ${GO_VERSION} != 1.17 GO_BUILDFLAGS+= -buildvcs=false GO_TESTFLAGS+= -buildvcs=false . endif 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_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}" \ GOARM=${GOARM} . 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 MASTER_SITES+= ${GO_GOPROXY}/${GO_MODNAME:C/([A-Z])/!\1/g:tl}/@v/ DISTFILES+= ${GO_MODFILE} ${GO_DISTFILE} WRKSRC= ${WRKDIR}/${GO_MODNAME}@${GO_MODVERSION} . endif EXTRACT_ONLY+= ${DISTFILES:N*.mod\:*:N*.mod:C/:.*//} DIST_SUBDIR= go/${PKGORIGIN:S,/,_,g}/${DISTNAME} FETCH_DEPENDS+= ${GO_CMD}:${GO_PORT} \ ca_root_nss>0:security/ca_root_nss 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; \ ${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all) . endif _USES_extract+= 800:go-post-extract . if empty(go_ARGS) # 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} . elif ${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}; ${SETENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod tidy -e) @${ECHO_MSG} "===> Vendoring ${GO_MODNAME} dependencies"; @(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod vendor -e) . 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}"; \ ${SETENV} ${MAKE_ENV} ${GO_ENV} 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}"; \ ${SETENV} ${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" @${SETENV} ${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}; ${SETENV} ${GO_ENV} ${GO_CMD} mod vendor; \ [ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt gomod-vendor-diff: gomod-vendor-deps patch @cd ${WRKSRC}; ${SETENV} ${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 974442a6a356..660b85418d3e 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -1,169 +1,171 @@ # 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=2.7 .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK) _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes LOCALBASE?= /usr/local . for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT GL \ IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MYSQL NINJA NODEJS PERL5 \ PGSQL PHP PYTHON PYTHON2 PYTHON3 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?= 2 # Possible_values: full canna nox devel_full devel_nox #EMACS_DEFAULT?= let the flavor be the default if not explicitly set # Possible values: 2.5, 3.0, 4.0 FIREBIRD_DEFAULT?= 2.5 # Possible values: flang (experimental), gfortran FORTRAN_DEFAULT?= gfortran # Possible values: 3.2.2 FPC_DEFAULT?= 3.2.2 # Possible values: 8 (last to support powerpcspe), 9, 10, 11, 12 # (Any other version is completely unsupported and not meant for general use.) . if ${ARCH} == "powerpcspe" GCC_DEFAULT?= 8 . else GCC_DEFAULT?= 10 . endif # Possible values: mesa-libs, mesa-devel GL_DEFAULT?= mesa-libs # Possible values: 7, 8, 9, agpl GHOSTSCRIPT_DEFAULT?= agpl +# Possible values: 1.17, 1.18, 1.19-devel +GO_DEFAULT?= 1.18 # Possible values: 6, 6-nox11, 7, 7-nox11 IMAGEMAGICK_DEFAULT?= 7 # Possible values: 7, 8, 11, 17, 18 JAVA_DEFAULT?= 8 # Possible values: 2.2.0, 2.3.0 . if !defined(WANT_LAZARUS_DEVEL) LAZARUS_DEFAULT?= 2.2.0 . else LAZARUS_DEFAULT?= 2.3.0 . endif # Possible values: rust, legacy . if empty(ARCH:Naarch64:Narmv6:Narmv7:Namd64:Ni386:Npowerpc64:Npowerpc64le:Npowerpc) LIBRSVG2_DEFAULT?= rust . else LIBRSVG2_DEFAULT?= legacy . endif # Possible values: c7 LINUX_DEFAULT?= c7 # Possible values: 70, 80, 90, 10, 11, 12, 13, 14, -devel (to be used when non-base compiler is required) # Please give notice to the Graphics Team (x11@FreeBSD.org) in advance before # bumping the LLVM version. . if ${ARCH} == powerpc LLVM_DEFAULT?= 10 . else LLVM_DEFAULT?= 90 . endif # Possible values: 5.1, 5.2, 5.3, 5.4 LUA_DEFAULT?= 5.2 # Possible values: 5.10, 5.20, 6.8 MONO_DEFAULT= 5.10 # Possible values: 5.5, 5.6, 5.7, 8.0, 10.3m, 10.4m, 10.5m, 5.5p, 5.6p, 5.7p, 5.6w, 5.7w MYSQL_DEFAULT?= 5.7 # Possible values: ninja, samurai NINJA_DEFAULT?= ninja # Possible values: 5.32, 5.34, 5.36, devel . if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ defined(PACKAGE_BUILDING)) PERL5_DEFAULT?= 5.32 . 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: 10, 11, 12, 13, 14, 15 PGSQL_DEFAULT?= 13 # Possible values: 7.4, 8.0, 8.1 PHP_DEFAULT?= 8.0 # Possible values: 2.7, 3.7, 3.8, 3.9, 3.10, 3.11 PYTHON_DEFAULT?= 3.8 # Possible values: 2.7 PYTHON2_DEFAULT?= 2.7 # Possible values: 3.7, 3.8, 3.9, 3.10, 3.11 PYTHON3_DEFAULT?= 3.8 # Possible values: 2.7, 3.0, 3.1, 3.2 RUBY_DEFAULT?= 3.0 # Possible values: rust, rust-nightly RUST_DEFAULT?= rust # Possible values: 4.12, 4.13 SAMBA_DEFAULT?= 4.12 # Possible values: base, openssl, 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: 8.5, 8.6, 8.7 TCLTK_DEFAULT?= 8.6 # Possible values: 4, 6 VARNISH_DEFAULT?= 4 # Possible value: 14, 16, 18, lts, current NODEJS_DEFAULT?= lts .endif diff --git a/lang/Makefile b/lang/Makefile index 5b6f13b15ffe..7563ad7a7cd6 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -1,370 +1,371 @@ COMMENT = Programming languages SUBDIR += J SUBDIR += abcl SUBDIR += alchemist.el SUBDIR += algol68g SUBDIR += angelscript SUBDIR += apache-commons-jelly SUBDIR += asn1c SUBDIR += atlast SUBDIR += awka SUBDIR += bas2tap SUBDIR += basic256 SUBDIR += bsh SUBDIR += bwbasic SUBDIR += c SUBDIR += cbmbasic SUBDIR += ccl SUBDIR += ceylon SUBDIR += cfortran SUBDIR += chaiscript SUBDIR += chez-scheme SUBDIR += chibi-scheme SUBDIR += chicken5 SUBDIR += cim SUBDIR += cjs SUBDIR += cling SUBDIR += clips SUBDIR += clisp SUBDIR += clojure SUBDIR += clojure-mode.el SUBDIR += clover SUBDIR += cmucl SUBDIR += cmucl-extra SUBDIR += cocor SUBDIR += coffeescript SUBDIR += cparser SUBDIR += crystal SUBDIR += csharp-mode.el SUBDIR += cython SUBDIR += cython-devel SUBDIR += dlang-tools SUBDIR += dlv SUBDIR += duktape SUBDIR += duktape-lib SUBDIR += ecl SUBDIR += eisl SUBDIR += elixir SUBDIR += elixir-devel SUBDIR += elixir-mode.el SUBDIR += elk SUBDIR += elm SUBDIR += emacs-lisp-intro SUBDIR += erlang SUBDIR += erlang-doc SUBDIR += erlang-java SUBDIR += erlang-man SUBDIR += erlang-runtime21 SUBDIR += erlang-runtime22 SUBDIR += erlang-runtime23 SUBDIR += erlang-runtime24 SUBDIR += erlang-runtime25 SUBDIR += erlang-wx SUBDIR += execline SUBDIR += expect SUBDIR += f2c SUBDIR += fasm SUBDIR += fennel SUBDIR += ferite SUBDIR += ficl SUBDIR += fpc SUBDIR += fpc-base SUBDIR += fpc-docs SUBDIR += fpc-lua SUBDIR += fpc-pastojs SUBDIR += fpc-rexx SUBDIR += fpc-rtl-console SUBDIR += fpc-rtl-extra SUBDIR += fpc-rtl-generics SUBDIR += fpc-rtl-objpas SUBDIR += fpc-rtl-unicode SUBDIR += fpc-source SUBDIR += fpc-units SUBDIR += fpc-utils SUBDIR += fsharp SUBDIR += fth SUBDIR += gambit-c SUBDIR += gauche SUBDIR += gawk SUBDIR += gcc SUBDIR += gcc-ecj45 SUBDIR += gcc10 SUBDIR += gcc11 SUBDIR += gcc11-devel SUBDIR += gcc12 SUBDIR += gcc12-devel SUBDIR += gcc13-devel SUBDIR += gcc48 SUBDIR += gcc6-aux SUBDIR += gcc8 SUBDIR += gcc9 SUBDIR += gforth SUBDIR += ghc SUBDIR += gjs SUBDIR += gleam 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 += go-devel SUBDIR += go117 + SUBDIR += go118 SUBDIR += gomacro SUBDIR += gprolog SUBDIR += gravity SUBDIR += groovy SUBDIR += gscheme SUBDIR += guile SUBDIR += guile1 SUBDIR += guile2 SUBDIR += halide SUBDIR += harec SUBDIR += haskell-mode.el SUBDIR += hermes SUBDIR += hla SUBDIR += hs-brainfuck SUBDIR += hs-unlambda SUBDIR += huc SUBDIR += icc 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 += kf5-kross SUBDIR += kotlin SUBDIR += kross-interpreters SUBDIR += kturtle SUBDIR += lafontaine SUBDIR += lci SUBDIR += ldc SUBDIR += lfe SUBDIR += libhx SUBDIR += libobjc2 SUBDIR += librep SUBDIR += libstdc++_stldoc_4.2.2 SUBDIR += linux-c7-tcl85 SUBDIR += linux-dotnet-cli SUBDIR += linux-dotnet-runtime SUBDIR += linux-dotnet-sdk SUBDIR += linux-dotnet10-runtime SUBDIR += linux-dotnet11-runtime SUBDIR += linux-dotnet11-sdk SUBDIR += linux-j SUBDIR += lua51 SUBDIR += lua52 SUBDIR += lua53 SUBDIR += lua54 SUBDIR += luajit SUBDIR += luajit-devel SUBDIR += luajit-openresty SUBDIR += malbolge SUBDIR += maude SUBDIR += mawk SUBDIR += mdk SUBDIR += mecrisp-stellaris SUBDIR += micropython SUBDIR += mit-scheme SUBDIR += mixal 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 += neko SUBDIR += nesasm SUBDIR += newlisp SUBDIR += nhc98 SUBDIR += nickle SUBDIR += nim SUBDIR += njs SUBDIR += nqc SUBDIR += nwcc SUBDIR += nx SUBDIR += nyan SUBDIR += ocaml SUBDIR += ocaml-autoconf SUBDIR += ocaml-camlidl SUBDIR += ocaml-nox11 SUBDIR += onyx SUBDIR += oo2c SUBDIR += opencoarrays 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-SpiderMonkey 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 += parrot SUBDIR += pbasic SUBDIR += pcc SUBDIR += perl5-devel SUBDIR += perl5.32 SUBDIR += perl5.34 SUBDIR += perl5.36 SUBDIR += petite-chez SUBDIR += pfe SUBDIR += pharo SUBDIR += php-mode.el SUBDIR += php74 SUBDIR += php74-extensions SUBDIR += php80 SUBDIR += php80-extensions SUBDIR += php81 SUBDIR += php81-extensions SUBDIR += picoc SUBDIR += plexil SUBDIR += pocl SUBDIR += polyml SUBDIR += ponyc SUBDIR += ptoc SUBDIR += purescript SUBDIR += py-hy SUBDIR += py-lupa SUBDIR += py-textX SUBDIR += python SUBDIR += python-doc-html SUBDIR += python-doc-pdf-a4 SUBDIR += python-doc-pdf-letter SUBDIR += python-doc-text SUBDIR += python-mode.el SUBDIR += python-tools SUBDIR += python2 SUBDIR += python27 SUBDIR += python3 SUBDIR += python310 SUBDIR += python311 SUBDIR += python37 SUBDIR += python38 SUBDIR += python39 SUBDIR += qmasm SUBDIR += qscheme SUBDIR += quickjs 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 += ruby27 SUBDIR += ruby30 SUBDIR += ruby31 SUBDIR += ruby32 SUBDIR += rubygem-ruby_language_server SUBDIR += runawk SUBDIR += rust SUBDIR += rust-bootstrap SUBDIR += rust-nightly SUBDIR += sagittarius-scheme SUBDIR += sather-specification SUBDIR += sather-tutorial SUBDIR += sbcl SUBDIR += scala SUBDIR += scheme48 SUBDIR += scm SUBDIR += sdcc SUBDIR += see SUBDIR += seed7 SUBDIR += silq SUBDIR += siod SUBDIR += sisc SUBDIR += sketchy SUBDIR += slib SUBDIR += slib-guile SUBDIR += slib-guile1 SUBDIR += slib-guile2 SUBDIR += slisp SUBDIR += smalltalk SUBDIR += smlnj SUBDIR += snobol4 SUBDIR += solidity SUBDIR += spidermonkey17 SUBDIR += spidermonkey78 SUBDIR += spidermonkey91 SUBDIR += spl SUBDIR += squeak SUBDIR += squirrel SUBDIR += swi-pl SUBDIR += tauthon SUBDIR += tcbasic SUBDIR += tcc SUBDIR += tcl-manual SUBDIR += tcl-wrapper SUBDIR += tcl85 SUBDIR += tcl86 SUBDIR += tcl87 SUBDIR += tclX SUBDIR += tolua SUBDIR += tolua++ SUBDIR += tuareg-mode.el SUBDIR += twelf SUBDIR += ucc SUBDIR += urweb SUBDIR += v SUBDIR += v8 SUBDIR += v8-beta SUBDIR += vala SUBDIR += visualworks SUBDIR += voc SUBDIR += yabasic SUBDIR += yap SUBDIR += yorick SUBDIR += ypsilon SUBDIR += zig SUBDIR += zig-devel .include diff --git a/lang/go-devel/Makefile b/lang/go-devel/Makefile index f310c8e597cc..28116dcebbb3 100644 --- a/lang/go-devel/Makefile +++ b/lang/go-devel/Makefile @@ -1,30 +1,129 @@ # Created by: Devon H. O'Dell -PORTVERSION= g20220319 -# Always set PORTREVISION and PORTEPOCH explicitly as otherwise they are inherited from lang/go -PORTREVISION= 0 -PORTEPOCH= 0 -MASTER_SITES= https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \ +PORTNAME= go +DISTVERSION?= g20220319 +PORTREVISION?= 0 +CATEGORIES= lang +MASTER_SITES?= https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \ LOCAL/dmgk:bootstrap -PKGNAMESUFFIX= -devel -DISTFILES= go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap +PKGNAMESUFFIX= ${DISTVERSION:C/^g[0-9]+/-devel/:C/^([0-9]+)\.([0-9]+).*/\1\2/} +DISTFILES?= go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap -# Avoid conflicting patch files -PATCHFILES= +MAINTAINER= ygy@FreeBSD.org +COMMENT?= Go programming language (development version) -COMMENT= Go programming language (development version) +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE +.ifdef QEMU_EMULATING +IGNORE= fails to build with qemu-user-static +.endif + +ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 + +RUN_DEPENDS= ${RUN_DEPENDS_${ARCH}} +# ld.bfd from devel/binutils is needed for working cgo on aarch64 +RUN_DEPENDS_aarch64= binutils>0:devel/binutils + +TEST_DEPENDS= ${TEST_DEPENDS_${ARCH}} +# ld.bfd from devel/binutils is needed for working cgo on aarch64 +TEST_DEPENDS_aarch64= binutils>0:devel/binutils + +USES= cpe shebangfix + +CPE_VENDOR= golang + +.ifndef MASTERDIR USE_GITHUB= yes GH_ACCOUNT= golang GH_TAGNAME= 4aa1efed4853ea067d665a952eee77c52faac774 +.endif + +SHEBANG_FILES= misc/wasm/go_js_wasm_exec \ + src/net/http/cgi/testdata/test.cgi +SHEBANG_GLOB= *.bash *.pl *.sh + +# Upstream archive contains files with UTF-8 names +EXTRACT_CMD= ${SETENV} LC_ALL=en_US.UTF-8 ${TAR} -CONFLICTS_INSTALL= go +.ifndef GH_TAGNAME +.endif -MASTERDIR= ${.CURDIR}/../go -PATCHDIR= ${.CURDIR}/files -DISTINFO_FILE= ${.CURDIR}/distinfo +OPTIONS_DEFINE_i386= SOFTFLOAT +SOFTFLOAT_DESC= Use soft float on non-SSE2 processors (Pentium 4 and older) +SOFTFLOAT_VARS= GO386=softfloat + +BOOTSTRAP_TAG= go1.17.9 +GO_SUFFIX= ${PKGNAMESUFFIX} + +GOARCH_aarch64= arm64 +GOARCH_amd64= amd64 +GOARCH_armv6= arm +GOARCH_armv7= arm +GOARCH_i386= 386 +GOARM_armv6= 6 +GOARM_armv7= 7 post-extract: - @[ -f ${WRKSRC}/VERSION ] || ${ECHO_CMD} "devel +${GH_TAGNAME}" > ${WRKSRC}/VERSION + @[ -z "${GH_TAGNAME}" ] || \ + ${ECHO_CMD} "devel ${DISTVERSION}-${GH_TAGNAME} ${OPSYS:tl}/${GOARCH_${ARCH}}" > ${WRKSRC}/VERSION + +post-patch: + @${REINPLACE_CMD} -e 's|type -ap |type |' ${WRKSRC}/src/make.bash + @${REINPLACE_CMD} -e 's|^if ulimit -T|false \&\& &|' ${WRKSRC}/src/run.bash + +pre-build: + # Check that the running kernel has COMPAT_FREEBSD11 required by lang/go{,-devel} post-ino64 + @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ + ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh + +do-build: + cd ${WRKSRC}/src ; ${SETENV} \ + XDG_CACHE_HOME=${WRKDIR} \ + GOROOT_BOOTSTRAP=${WRKDIR}/go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-bootstrap \ + GOROOT=${WRKSRC} \ + GOROOT_FINAL=${PREFIX}/go${GO_SUFFIX} \ + GOBIN= \ + GOOS=${OPSYS:tl} \ + GOARCH=${GOARCH_${ARCH}} \ + GO386=${GO386} \ + GOARM=${GOARM_${ARCH}} \ + CC=${CC} \ + ${SH} make.bash -v + +do-install: + @cd ${WRKSRC} ; \ + ${RM} -r .gitattributes .gitignore .github favicon.ico robots.txt \ + pkg/obj pkg/bootstrap pkg/${OPSYS:tl}_${GOARCH_${ARCH}}/cmd + @${MKDIR} ${STAGEDIR}${PREFIX}/go${GO_SUFFIX} + @${CP} -a ${WRKSRC}/* ${STAGEDIR}${PREFIX}/go${GO_SUFFIX} +.for f in go gofmt + ${LN} -sf ../go${GO_SUFFIX}/bin/${f} ${STAGEDIR}${PREFIX}/bin/${f}${GO_SUFFIX} + @${ECHO_CMD} bin/${f}${GO_SUFFIX} >> ${TMPPLIST} +.endfor + @cd ${STAGEDIR}${PREFIX} && ${FIND} go${GO_SUFFIX} -type f >> ${TMPPLIST} + +do-test: + cd ${WRKSRC}/src && ${SETENV} \ + GOROOT=${WRKSRC} \ + PATH=${WRKSRC}/bin:${PATH} \ + GOOS=${OPSYS:tl} \ + GOARCH=${GOARCH_${ARCH}} \ + GO386=${GO386} \ + GOARM=${GOARM_${ARCH}} \ + CC=${CC} \ + ${SH} run.bash -no-rebuild + +.if !defined(_GO_MAKESUM_GUARD) +makesum: + ${MAKE} -D_GO_MAKESUM_GUARD makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp +.for arch in ${ONLY_FOR_ARCHS:O:[2..-1]} + ${MAKE} -D_GO_MAKESUM_GUARD makesum ARCH=${arch} DISTINFO_FILE=${DISTINFO_FILE}.${arch} + ${SED} 1d ${DISTINFO_FILE}.${arch} >> ${DISTINFO_FILE}.tmp + ${RM} ${DISTINFO_FILE}.${arch} +.endfor + ${AWK} '!seen[$$0]++' ${DISTINFO_FILE}.tmp > ${DISTINFO_FILE} + ${RM} ${DISTINFO_FILE}.tmp +.endif -.include "${MASTERDIR}/Makefile" +.include diff --git a/lang/go/pkg-descr b/lang/go-devel/pkg-descr similarity index 100% copy from lang/go/pkg-descr copy to lang/go-devel/pkg-descr diff --git a/lang/go/Makefile b/lang/go/Makefile index a507e20f9a2a..d41b2832c22b 100644 --- a/lang/go/Makefile +++ b/lang/go/Makefile @@ -1,125 +1,25 @@ -# Created by: Devon H. O'Dell - PORTNAME= go -PORTVERSION?= 1.18.2 -PORTREVISION?= 0 -PORTEPOCH?= 1 +DISTVERSION= ${GO_DEFAULT} +PORTEPOCH= 2 CATEGORIES= lang -MASTER_SITES?= https://golang.org/dl/ \ - https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \ - LOCAL/dmgk:bootstrap -DISTFILES?= go${PORTVERSION}.src.tar.gz \ - go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap - -MAINTAINER= ygy@FreeBSD.org -COMMENT?= Go programming language - -LICENSE= BSD3CLAUSE -LICENSE_FILE= ${WRKSRC}/LICENSE - -.ifdef QEMU_EMULATING -IGNORE= fails to build with qemu-user-static -.endif - -ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 - -RUN_DEPENDS= ${RUN_DEPENDS_${ARCH}} -# ld.bfd from devel/binutils is needed for working cgo on aarch64 -RUN_DEPENDS_aarch64= binutils>0:devel/binutils - -TEST_DEPENDS= ${TEST_DEPENDS_${ARCH}} -TEST_DEPENDS_aarch64= binutils>0:devel/binutils - -USES= cpe shebangfix - -CPE_VENDOR= golang - -SHEBANG_FILES= misc/wasm/go_js_wasm_exec \ - src/net/http/cgi/testdata/test.cgi -SHEBANG_GLOB= *.bash *.pl *.sh +MASTER_SITES= # not applicable +DISTFILES= # not applicable -CONFLICTS_INSTALL?= go-devel +MAINTAINER= dmgk@FreeBSD.org +COMMENT= Meta-port for the default version of the Go programming language -# Upstream archive contains files with UTF-8 names -EXTRACT_CMD= ${SETENV} LC_ALL=en_US.UTF-8 ${TAR} +RUN_DEPENDS= go${GO_SUFFIX}:lang/go${GO_SUFFIX} -.ifndef MASTERDIR -WRKSRC= ${WRKDIR}/go -.endif +NO_ARCH= yes +NO_BUILD= yes -OPTIONS_DEFINE_i386= SOFTFLOAT +PLIST_FILES= bin/go bin/gofmt -SOFTFLOAT_DESC= Use soft float on non-SSE2 processors (Pentium 4 and older) - -SOFTFLOAT_VARS= GO386=softfloat - -BINARIES= go gofmt -BOOTSTRAP_TAG= go1.17.9 - -GOARCH_aarch64= arm64 -GOARCH_amd64= amd64 -GOARCH_armv6= arm -GOARCH_armv7= arm -GOARCH_i386= 386 - -GOARM_armv6= 6 -GOARM_armv7= 7 - -post-patch: - @${REINPLACE_CMD} -e 's|^if ulimit -T|false \&\& &|' ${WRKSRC}/src/run.bash - -pre-build: - # Check that the running kernel has COMPAT_FREEBSD11 required by lang/go{,-devel} post-ino64 - @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ - ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh - -do-build: - cd ${WRKSRC}/src ; ${SETENV} \ - XDG_CACHE_HOME=${WRKDIR} \ - GOROOT_BOOTSTRAP=${WRKDIR}/go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-bootstrap \ - GOROOT=${WRKSRC} \ - GOROOT_FINAL=${PREFIX}/go \ - GOBIN= \ - GOOS=${OPSYS:tl} \ - GOARCH=${GOARCH_${ARCH}} \ - GO386=${GO386} \ - GOARM=${GOARM_${ARCH}} \ - CC=${CC} \ - ${SH} make.bash -v +GO_SUFFIX= ${GO_DEFAULT:S/.//:C/.*-devel/-devel/} do-install: - @cd ${WRKSRC} ; \ - ${RM} -r .gitattributes .gitignore .github favicon.ico robots.txt \ - pkg/obj pkg/bootstrap pkg/${OPSYS:tl}_${GOARCH_${ARCH}}/cmd - @${MKDIR} ${STAGEDIR}${PREFIX}/go - @${CP} -a ${WRKSRC}/* ${STAGEDIR}${PREFIX}/go -.for file in ${BINARIES} - @${LN} -sf ../go/bin/${file} ${STAGEDIR}${PREFIX}/bin/${file} - @${ECHO_CMD} bin/${file} >> ${TMPPLIST} -.endfor - @cd ${STAGEDIR}${PREFIX} && ${FIND} go -type f >> ${TMPPLIST} - -do-test: - cd ${WRKSRC}/src && ${SETENV} \ - GOROOT=${WRKSRC} \ - PATH=${WRKSRC}/bin:${PATH} \ - GOOS=${OPSYS:tl} \ - GOARCH=${GOARCH_${ARCH}} \ - GO386=${GO386} \ - GOARM=${GOARM_${ARCH}} \ - CC=${CC} \ - ${SH} run.bash -no-rebuild - -.if !defined(_GO_MAKESUM_GUARD) -makesum: - ${MAKE} -D_GO_MAKESUM_GUARD makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp -.for arch in ${ONLY_FOR_ARCHS:O:[2..-1]} - ${MAKE} -D_GO_MAKESUM_GUARD makesum ARCH=${arch} DISTINFO_FILE=${DISTINFO_FILE}.${arch} - ${SED} 1d ${DISTINFO_FILE}.${arch} >> ${DISTINFO_FILE}.tmp - ${RM} ${DISTINFO_FILE}.${arch} +.for f in go gofmt + @${LN} -sf ${f}${GO_SUFFIX} ${STAGEDIR}${PREFIX}/bin/${f} .endfor - ${AWK} '!seen[$$0]++' ${DISTINFO_FILE}.tmp > ${DISTINFO_FILE} - ${RM} ${DISTINFO_FILE}.tmp -.endif .include diff --git a/lang/go/pkg-descr b/lang/go/pkg-descr index fbb088ea81a7..4393206e82fa 100644 --- a/lang/go/pkg-descr +++ b/lang/go/pkg-descr @@ -1,4 +1,7 @@ Go is an open source programming environment that makes it easy to build simple, reliable, and efficient software. +This is a meta port for the default version of Go, it provides symbolic links +called go and gofmt. + WWW: https://golang.org diff --git a/lang/go117/Makefile b/lang/go117/Makefile index 33548aad50d9..dcbe9d635a1a 100644 --- a/lang/go117/Makefile +++ b/lang/go117/Makefile @@ -1,28 +1,22 @@ -PORTVERSION= 1.17.10 -# Always set PORTREVISION and PORTEPOCH explicitly as otherwise they are inherited from lang/go +# Created by: Devon H. O'Dell + +DISTVERSION= 1.17.10 +# Always set PORTREVISION explicitly as otherwise they are inherited from lang/go-devel PORTREVISION= 0 -PORTEPOCH= 0 -MASTER_SITES= https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \ +MASTER_SITES= https://golang.org/dl/ \ + https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \ LOCAL/dmgk:bootstrap -PKGNAMESUFFIX= 117 -DISTFILES= go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap +DISTFILES= go${DISTVERSION}.src.tar.gz \ + go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap # Avoid conflicting patch files PATCHFILES= -COMMENT= Go programming language (development version) - -USE_GITHUB= yes -GH_ACCOUNT= golang -GH_TAGNAME= 7dd10d4ce20e64d96a10cb67794851a58d96a2aa +COMMENT= Go programming language -CONFLICTS_INSTALL= go - -MASTERDIR= ${.CURDIR}/../go +MASTERDIR= ${.CURDIR}/../go-devel PATCHDIR= ${.CURDIR}/files +WRKSRC= ${WRKDIR}/go DISTINFO_FILE= ${.CURDIR}/distinfo -post-extract: - @[ -f ${WRKSRC}/VERSION ] || ${ECHO_CMD} "${PORTVERSION} +${GH_TAGNAME}" > ${WRKSRC}/VERSION - .include "${MASTERDIR}/Makefile" diff --git a/lang/go117/distinfo b/lang/go117/distinfo index 4a70920d679d..87296aeb8c0d 100644 --- a/lang/go117/distinfo +++ b/lang/go117/distinfo @@ -1,13 +1,13 @@ -TIMESTAMP = 1652618409 +TIMESTAMP = 1653843983 +SHA256 (go1.17.10.src.tar.gz) = 299e55af30f15691b015d8dcf8ecae72412412569e5b2ece20361753a456f2f9 +SIZE (go1.17.10.src.tar.gz) = 22196380 SHA256 (go-freebsd-arm64-go1.17.9.tar.xz) = d9e9180bdc5ad0eec1654679a50084ebb31ecbe9bef24f0bd8ba917db8d1830c SIZE (go-freebsd-arm64-go1.17.9.tar.xz) = 38572776 -SHA256 (golang-go-1.17.10-7dd10d4ce20e64d96a10cb67794851a58d96a2aa_GH0.tar.gz) = 903cb4363af9a1c9a6c9d08ea0525983634862a5cb1f893b0b6156e3b99f847c -SIZE (golang-go-1.17.10-7dd10d4ce20e64d96a10cb67794851a58d96a2aa_GH0.tar.gz) = 22176903 SHA256 (go-freebsd-amd64-go1.17.9.tar.xz) = fd439ad091ed57d0ad728c05fc60465aad2e46e98da96e2d5b60b0c470f2efec SIZE (go-freebsd-amd64-go1.17.9.tar.xz) = 41951936 SHA256 (go-freebsd-arm6-go1.17.9.tar.xz) = ba24590b8cec761207eafc5a39c71b5b5041320c6fb0c95d35c123f6054f8d1c SIZE (go-freebsd-arm6-go1.17.9.tar.xz) = 38938596 SHA256 (go-freebsd-arm7-go1.17.9.tar.xz) = 9dc039278e174757962d100a227959037d4d7af18094af6433fa4d57cfa57e5f SIZE (go-freebsd-arm7-go1.17.9.tar.xz) = 38862156 SHA256 (go-freebsd-386-go1.17.9.tar.xz) = 74854fd9e7d596c6abb1ecd55707c58a2f4d6ee875376e26bb5519889507291b SIZE (go-freebsd-386-go1.17.9.tar.xz) = 40566908 diff --git a/lang/go118/Makefile b/lang/go118/Makefile new file mode 100644 index 000000000000..84d442ea9e56 --- /dev/null +++ b/lang/go118/Makefile @@ -0,0 +1,22 @@ +# Created by: Devon H. O'Dell + +DISTVERSION= 1.18.2 +# Always set PORTREVISION explicitly as otherwise they are inherited from lang/go-devel +PORTREVISION= 0 +MASTER_SITES= https://golang.org/dl/ \ + https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \ + LOCAL/dmgk:bootstrap +DISTFILES= go${DISTVERSION}.src.tar.gz \ + go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap + +# Avoid conflicting patch files +PATCHFILES= + +COMMENT= Go programming language + +MASTERDIR= ${.CURDIR}/../go-devel +PATCHDIR= ${.CURDIR}/files +WRKSRC= ${WRKDIR}/go +DISTINFO_FILE= ${.CURDIR}/distinfo + +.include "${MASTERDIR}/Makefile" diff --git a/lang/go/distinfo b/lang/go118/distinfo similarity index 97% rename from lang/go/distinfo rename to lang/go118/distinfo index ae1efb41ca12..d6c48fb08a52 100644 --- a/lang/go/distinfo +++ b/lang/go118/distinfo @@ -1,13 +1,13 @@ -TIMESTAMP = 1652618333 +TIMESTAMP = 1653843300 SHA256 (go1.18.2.src.tar.gz) = 2c44d03ea2c34092137ab919ba602f2c261a038d08eb468528a3f3a28e5667e2 SIZE (go1.18.2.src.tar.gz) = 22837686 SHA256 (go-freebsd-arm64-go1.17.9.tar.xz) = d9e9180bdc5ad0eec1654679a50084ebb31ecbe9bef24f0bd8ba917db8d1830c SIZE (go-freebsd-arm64-go1.17.9.tar.xz) = 38572776 SHA256 (go-freebsd-amd64-go1.17.9.tar.xz) = fd439ad091ed57d0ad728c05fc60465aad2e46e98da96e2d5b60b0c470f2efec SIZE (go-freebsd-amd64-go1.17.9.tar.xz) = 41951936 SHA256 (go-freebsd-arm6-go1.17.9.tar.xz) = ba24590b8cec761207eafc5a39c71b5b5041320c6fb0c95d35c123f6054f8d1c SIZE (go-freebsd-arm6-go1.17.9.tar.xz) = 38938596 SHA256 (go-freebsd-arm7-go1.17.9.tar.xz) = 9dc039278e174757962d100a227959037d4d7af18094af6433fa4d57cfa57e5f SIZE (go-freebsd-arm7-go1.17.9.tar.xz) = 38862156 SHA256 (go-freebsd-386-go1.17.9.tar.xz) = 74854fd9e7d596c6abb1ecd55707c58a2f4d6ee875376e26bb5519889507291b SIZE (go-freebsd-386-go1.17.9.tar.xz) = 40566908 diff --git a/lang/go/files/patch-src_cmd_go_internal_modload_vendor.go b/lang/go118/files/patch-src_cmd_go_internal_modload_vendor.go similarity index 100% rename from lang/go/files/patch-src_cmd_go_internal_modload_vendor.go rename to lang/go118/files/patch-src_cmd_go_internal_modload_vendor.go