aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2019-07-10 14:40:02 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2019-07-10 14:40:02 +0000
commit7003875294fc8b811ffe452c376f66a855494f60 (patch)
tree9754e52797ffd2ab1caf7b83b3fa360ba5db8a85
parentb3ec6fb0fe1868f49bc3ae82909a818a4d043678 (diff)
downloadports-7003875294fc8b811ffe452c376f66a855494f60.tar.gz
ports-7003875294fc8b811ffe452c376f66a855494f60.zip
On amd64 adding DEFAULT_VERSIONS+=linux=c6 to /etc/make.conf made Linux
infrastructure ports (linux_base-c6 and linux-c6*) install i386 CentOS 6 packages. Using c6_64 instead of c6 made them install mixed amd64/i386 CentOS 6 packages and allowed Linux application ports to install amd64 binaries when available. The i386-only configuration was only useful for users of x11/nvidia-driver* which didn't provide Linux amd64 emulation until recently. With x11/nvidia-driver* now supporting Linux amd64 there's no longer a need for i386-only Linux on amd64. Let DEFAULT_VERSIONS+=linux=c6 make Linux infrastructure ports install mixed amd64/i386 CentOS 6 packages, like c6_64 before, and remove support for c6_64 as a value. Replace LINUX_ARCH with ARCH everywhere because they are always the same now.
Notes
Notes: svn path=/head/; revision=506352
-rw-r--r--Mk/Uses/linux.mk37
-rw-r--r--Mk/bsd.default-versions.mk7
-rw-r--r--UPDATING36
-rw-r--r--benchmarks/linux-vdbench/Makefile16
-rw-r--r--benchmarks/linux-vdbench/pkg-plist3
-rw-r--r--devel/fb-adb/Makefile4
-rw-r--r--devel/linux-c6-devtools/Makefile6
-rw-r--r--devel/linux-c7-devtools/Makefile6
-rw-r--r--emulators/linux-c7/Makefile6
-rw-r--r--emulators/linux_base-c6/Makefile10
-rw-r--r--emulators/linux_base-c7/Makefile14
-rw-r--r--games/linux-worldofgoo-demo/Makefile6
-rw-r--r--graphics/linux-c7-dri/Makefile6
-rw-r--r--java/linux-oracle-jre18/Makefile2
-rw-r--r--print/epson-inkjet-printer-201401w/Makefile8
-rw-r--r--print/epson-inkjet-printer-201601w/Makefile8
-rw-r--r--x11/nvidia-driver/Makefile26
17 files changed, 105 insertions, 96 deletions
diff --git a/Mk/Uses/linux.mk b/Mk/Uses/linux.mk
index b801f1cff9ee..4aab7e4fa368 100644
--- a/Mk/Uses/linux.mk
+++ b/Mk/Uses/linux.mk
@@ -32,34 +32,23 @@ linux_ARGS= c6
.elif exists(${LINUXBASE}/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7)
linux_ARGS= c7
.else
-linux_ARGS= ${LINUX_DEFAULT:S/_64//}
+linux_ARGS= ${LINUX_DEFAULT}
.endif
.endif
.if ${linux_ARGS} == c6
LINUX_DIST_VER?= 6.10
-.if ${ARCH} == amd64 && ${LINUX_DEFAULT} != c6
-LINUX_ARCH= x86_64
-.elif ${ARCH} == amd64 || ${ARCH} == i386
-LINUX_ARCH= i386
-.else
-LINUX_ARCH= ${ARCH}
-IGNORE= Linux CentOS ${LINUX_DIST_VER} is unsupported on ${ARCH}
-.endif
.elif ${linux_ARGS} == c7
LINUX_DIST_VER?= 7.6.1810
-.if ${ARCH} == amd64
-LINUX_ARCH= x86_64
-.elif ${ARCH} == i386
-LINUX_ARCH= i386
-.else
-LINUX_ARCH= ${ARCH}
-IGNORE= Linux CentOS ${LINUX_DIST_VER} is unsupported on ${ARCH}
-.endif
.else
IGNORE= Invalid Linux distribution: ${linux_ARGS}
.endif
+.ifndef ONLY_FOR_ARCHS
+ONLY_FOR_ARCHS= amd64 i386
+ONLY_FOR_ARCHS_REASON= Linux compatibility is only available on amd64 and i386
+.endif
+
linux_allegro_DEP= linux-${linux_ARGS}-allegro>0:devel/linux-${linux_ARGS}-allegro
linux_alsa-plugins-oss_DEP= linux-${linux_ARGS}-alsa-plugins-oss>0:audio/linux-${linux_ARGS}-alsa-plugins-oss
linux_alsa-plugins-pulseaudio_DEP=linux-${linux_ARGS}-alsa-plugins-pulseaudio>0:audio/linux-${linux_ARGS}-alsa-plugins-pulseaudio
@@ -266,7 +255,7 @@ EXTRACT_AFTER_ARGS= | ${TAR} xf - --no-same-owner --no-same-permissions
.endif
.if ${USE_LINUX_RPM} != noarch
-PLIST?= ${PKGDIR}/pkg-plist.${LINUX_ARCH:S/x86_64/amd64/}
+PLIST?= ${PKGDIR}/pkg-plist.${ARCH}
.endif
.if !target(do-install)
@@ -299,21 +288,13 @@ DISTFILES_i386?= ${DISTNAME_i386}${EXTRACT_SUFX}
_ALL_DISTFILES= ${DISTFILES_amd64} ${DISTFILES_i386}
DISTFILES= ${_ALL_DISTFILES:O:u}
.else
-DISTFILES= ${DISTFILES_${LINUX_ARCH:S/x86_64/amd64/}}
+DISTFILES= ${DISTFILES_${ARCH}}
.endif
-EXTRACT_ONLY?= ${DISTFILES_${LINUX_ARCH:S/x86_64/amd64/}:C/:[^:]+$//}
+EXTRACT_ONLY?= ${DISTFILES_${ARCH}:C/:[^:]+$//}
.endif
.endif
.if !empty(SRC_DISTFILES) && (make(makesum) || defined(PACKAGE_BUILDING))
DISTFILES+= ${SRC_DISTFILES}
.endif
-# This triggers on amd64 with DEFAULT_VERSIONS+=linux=c6 (i386 Linux) and
-# ports with ONLY_FOR_ARCHS=amd64 or NOT_FOR_ARCHS=i386. It may be removed
-# when c6 becomes an alias for c6_64 on amd64 (after FreeBSD 10.3 EoL).
-.if (defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:M${LINUX_ARCH:S/x86_64/amd64/})) \
- || !empty(NOT_FOR_ARCHS:M${LINUX_ARCH:S/x86_64/amd64/})
-IGNORE= does not run on Linux/${LINUX_ARCH}
-.endif
-
.endif # _POSTMKINCLUDED && ! _INCLUDE_USES_LINUX_POST_MK
diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk
index 28a0511e4458..161aeed861c1 100644
--- a/Mk/bsd.default-versions.mk
+++ b/Mk/bsd.default-versions.mk
@@ -51,13 +51,8 @@ GHOSTSCRIPT_DEFAULT?= agpl
JULIA_DEFAULT?= 1.0
# Possible values: 2.0.0
LAZARUS_DEFAULT?= 2.0.0
-.if ${ARCH} == amd64
-# Possible values: c6, c6_64, c7
-LINUX_DEFAULT?= c6_64
-.else
-# Possible values: c6
+# Possible values: c6, c7
LINUX_DEFAULT?= c6
-.endif
# Possible values: 60, 70, 80, -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.
diff --git a/UPDATING b/UPDATING
index b8b8a3365fe8..03f525ad3aeb 100644
--- a/UPDATING
+++ b/UPDATING
@@ -6,6 +6,42 @@ You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20190710:
+ AFFECTS: users with DEFAULT_VERSIONS+=linux=c6 or c6_64 in /etc/make.conf
+ AUTHOR: tij@FreeBSD.org
+
+ On amd64 adding DEFAULT_VERSIONS+=linux=c6 to /etc/make.conf made Linux
+ infrastructure ports (linux_base-c6 and linux-c6*) install i386 CentOS 6
+ packages. Using c6_64 instead of c6 made them install mixed amd64/i386
+ CentOS 6 packages and allowed Linux application ports to install amd64
+ binaries when available. The i386-only configuration was only useful for
+ users of x11/nvidia-driver* which didn't provide Linux amd64 emulation
+ until recently.
+
+ With x11/nvidia-driver* now supporting Linux amd64 there's no longer a
+ need for i386-only Linux on amd64 so DEFAULT_VERSIONS+=linux=c6 has been
+ changed to make Linux infrastructure ports install mixed amd64/i386
+ CentOS 6 packages, like c6_64 before, and support for c6_64 has been
+ removed.
+
+ Users with DEFAULT_VERSIONS+=linux=c6 should reinstall linux_base-c6 and
+ all packages that depend on it. A list of dependent packages can be
+ obtained with the following command:
+
+ pkg info -r linux_base-c6
+
+ Users with DEFAULT_VERSIONS+=linux=c6_64 only need to replace c6_64 with
+ c6 in /etc/make.conf.
+
+ Users of x11/nvidia-driver* should upgrade to FreeBSD 11.3 or 12.0 if
+ they want to run Linux amd64 OpenGL programs. If you are running an
+ older version you may want to postpone installing or updating Linux
+ application ports until you find the time to upgrade because application
+ ports may install amd64 binaries now. Infrastructure ports are safe to
+ reinstall, and so is x11/nvidia-driver*.
+
+ On i386 nothing has changed.
+
20190707:
AFFECTS: users of www/gitlab-ce
AUTHOR: mfechner@FreeBSD.org
diff --git a/benchmarks/linux-vdbench/Makefile b/benchmarks/linux-vdbench/Makefile
index f8a9a5a0af65..010628f4d1aa 100644
--- a/benchmarks/linux-vdbench/Makefile
+++ b/benchmarks/linux-vdbench/Makefile
@@ -25,6 +25,7 @@ EXTRACT_AFTER_ARGS= -d ${WRKSRC}
JAVA_VERSION= 1.7+
JAVA_OS= linux
NO_BUILD= yes
+PLIST_SUB= LINUX_ARCH=${LINUX_ARCH}
SHEBANG_FILES= ${PORTNAME} linux/config.sh
bash_CMD= ${SH}
@@ -38,12 +39,12 @@ DOWNLOAD_URL= https://www.oracle.com/technetwork/server-storage/vdbench-download
IGNORE=You must manually download ${DISTFILES} from ${DOWNLOAD_URL} and place it in ${DISTDIR} then run make again
.endif
-.if ${LINUX_ARCH} == "i386"
-PLIST_SUB+= LINUX_ARCH_32="" LINUX_ARCH_64="@comment "
+.if ${ARCH} == i386
+LINUX_ARCH= 32
.endif
-.if ${LINUX_ARCH} == "x86_64"
-PLIST_SUB+= LINUX_ARCH_32="@comment " LINUX_ARCH_64=""
+.if ${ARCH} == amd64
+LINUX_ARCH= 64
.endif
post-patch:
@@ -59,12 +60,7 @@ do-install:
for f in vdbench.jar build_sds.txt swatcharts.txt; do \
${INSTALL_DATA} ${WRKSRC}/$${f} ${STAGEDIR}${DATADIR}; \
done
-.if ${LINUX_ARCH} == "i386"
- ${INSTALL_DATA} ${WRKSRC}/linux/linux32.so ${STAGEDIR}${DATADIR}/linux
-.endif
-.if ${LINUX_ARCH} == "x86_64"
- ${INSTALL_DATA} ${WRKSRC}/linux/linux64.so ${STAGEDIR}${DATADIR}/linux
-.endif
+ ${INSTALL_DATA} ${WRKSRC}/linux/linux${LINUX_ARCH}.so ${STAGEDIR}${DATADIR}/linux
${INSTALL_SCRIPT} ${WRKSRC}/linux/config.sh ${STAGEDIR}${DATADIR}/linux
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${DATADIR}
${RLN} ../${DATADIR_REL}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PKGNAMEPREFIX}${PORTNAME}
diff --git a/benchmarks/linux-vdbench/pkg-plist b/benchmarks/linux-vdbench/pkg-plist
index 193fb021d9bc..74d9e5a87185 100644
--- a/benchmarks/linux-vdbench/pkg-plist
+++ b/benchmarks/linux-vdbench/pkg-plist
@@ -39,8 +39,7 @@ bin/linux-vdbench
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/examples/raw/seq_write_xfersizes
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/examples/raw/tpcc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/examples/readme.txt
-%%LINUX_ARCH_32%%%%DATADIR%%/linux/linux32.so
-%%LINUX_ARCH_64%%%%DATADIR%%/linux/linux64.so
+%%DATADIR%%/linux/linux%%LINUX_ARCH%%.so
%%DATADIR%%/build_sds.txt
%%DATADIR%%/linux/config.sh
%%DATADIR%%/swatcharts.txt
diff --git a/devel/fb-adb/Makefile b/devel/fb-adb/Makefile
index 287a0da6cf96..cc8a8914cd5a 100644
--- a/devel/fb-adb/Makefile
+++ b/devel/fb-adb/Makefile
@@ -65,9 +65,9 @@ NDK_MASTER_SITES= https://dl.google.com/android/ndk/:7z \
# Prefer NDK from environment
WRKSRC_ndk= ${ANDROID_NDK}
.else
-NDK_DISTFILES= ${NDK_DISTFILES_${LINUX_ARCH}}
+NDK_DISTFILES= ${NDK_DISTFILES_${ARCH}}
NDK_DISTFILES_i386= android-ndk-r10e-linux-x86.bin:7z
-NDK_DISTFILES_x86_64= android-ndk-r12b-linux-x86_64.zip:zip
+NDK_DISTFILES_amd64= android-ndk-r12b-linux-x86_64.zip:zip
WRKSRC_ndk= ${WRKDIR}/${NDK_DISTFILES:R:C/(-[^-]+){2}$//}
.endif
NDK_USES= 7z:partial linux
diff --git a/devel/linux-c6-devtools/Makefile b/devel/linux-c6-devtools/Makefile
index 48f88be0d06e..97e336cd272f 100644
--- a/devel/linux-c6-devtools/Makefile
+++ b/devel/linux-c6-devtools/Makefile
@@ -37,10 +37,10 @@ SRC_DISTFILES= binutils-2.20.51.0.2-5.48.el6_10.1${SRC_SUFX}:SOURCE \
OPTIONS_DEFINE= DOCS NLS
OPTIONS_SUB= yes
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
post-install:
-.if ${LINUX_ARCH} == x86_64
+.if ${ARCH} == amd64
${LN} -sfh ../../../../lib64/libgcc_s.so.1 \
${STAGEDIR}${PREFIX}/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgcc_s.so
@@ -51,4 +51,4 @@ post-install:
${STAGEDIR}${PREFIX}/usr/lib/gcc/i686-redhat-linux/4.4.4/libgcc_s.so
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/linux-c7-devtools/Makefile b/devel/linux-c7-devtools/Makefile
index 78404bf662ff..510203d7a9f8 100644
--- a/devel/linux-c7-devtools/Makefile
+++ b/devel/linux-c7-devtools/Makefile
@@ -47,11 +47,11 @@ CONFLICTS= linux-c6-${PORTNAME}-[0-9]*
OPTIONS_DEFINE= DOCS NLS
OPTIONS_SUB= yes
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
post-install:
${LN} -sf ld.bfd ${STAGEDIR}${PREFIX}/usr/bin/ld
-.if ${LINUX_ARCH} == x86_64
+.if ${ARCH} == amd64
${LN} -sfh ../../../../lib64/libgcc_s.so.1 \
${STAGEDIR}${PREFIX}/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libgcc_s.so
@@ -62,4 +62,4 @@ post-install:
${STAGEDIR}${PREFIX}/usr/lib/gcc/i686-redhat-linux/4.8.2/libgcc_s.so
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/emulators/linux-c7/Makefile b/emulators/linux-c7/Makefile
index fbcac1c6059f..d785691af64c 100644
--- a/emulators/linux-c7/Makefile
+++ b/emulators/linux-c7/Makefile
@@ -69,9 +69,9 @@ RUN_DEPENDS= linux-c7-libasyncns>0:dns/linux-c7-libasyncns \
USES= linux:c7 metaport
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if ${LINUX_ARCH} == x86_64
+.if ${ARCH} == amd64
RUN_DEPENDS+= linux-c7-sdl_image>0:graphics/linux-c7-sdl_image \
linux-c7-openal-soft>0:audio/linux-c7-openal-soft \
linux-c7-sdl20>0:devel/linux-c7-sdl20 \
@@ -80,4 +80,4 @@ RUN_DEPENDS+= linux-c7-sdl_image>0:graphics/linux-c7-sdl_image \
linux-c7-qtwebkit>0:www/linux-c7-qtwebkit
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/emulators/linux_base-c6/Makefile b/emulators/linux_base-c6/Makefile
index 1c3db80ff1d4..9da76b6ee37a 100644
--- a/emulators/linux_base-c6/Makefile
+++ b/emulators/linux_base-c6/Makefile
@@ -121,9 +121,9 @@ REMOVE_DIRS= boot home media mnt proc root sys tmp var/log var/run var/tmp
REMOVE_FILES= bin/df bin/su etc/exports etc/group etc/gshadow etc/motd \
etc/passwd etc/printcap etc/protocols etc/services etc/shadow
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if ${LINUX_ARCH} == x86_64
+.if ${ARCH} == amd64
SYSCTLMIB= kern.features.linux64
.else
SYSCTLMIB= compat.linux.osrelease
@@ -135,7 +135,7 @@ post-patch:
@${FIND} ${WRKSRC}/lib -type d -empty -delete
@${FIND} ${WRKSRC}/usr -type d -empty -delete
@${BRANDELF} -t Linux ${WRKSRC}/lib/ld-2.12.so
-.if ${LINUX_ARCH} == x86_64
+.if ${ARCH} == amd64
@${FIND} ${WRKSRC}/lib64 -type d -empty -delete
@${BRANDELF} -t Linux ${WRKSRC}/lib64/ld-2.12.so
.endif
@@ -155,8 +155,8 @@ post-install:
${LN} -sf usr/bin ${STAGEDIR}${PREFIX}
${LN} -sf usr/lib ${STAGEDIR}${PREFIX}
${LN} -sf usr/sbin ${STAGEDIR}${PREFIX}
-.if ${LINUX_ARCH} == x86_64
+.if ${ARCH} == amd64
${LN} -sf usr/lib64 ${STAGEDIR}${PREFIX}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/emulators/linux_base-c7/Makefile b/emulators/linux_base-c7/Makefile
index 2dd4f3f4f626..e1deeae7145f 100644
--- a/emulators/linux_base-c7/Makefile
+++ b/emulators/linux_base-c7/Makefile
@@ -131,9 +131,9 @@ REMOVE_DIRS= boot home media mnt proc root run sys tmp var/log var/tmp
REMOVE_FILES= bin/su etc/exports etc/group etc/gshadow etc/motd \
etc/passwd etc/printcap etc/protocols etc/services etc/shadow
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if ${LINUX_ARCH} == x86_64
+.if ${ARCH} == amd64
SYSCTLMIB= kern.features.linux64
.else
SYSCTLMIB= compat.linux.osrelease
@@ -148,11 +148,11 @@ post-extract:
${FIND} ${d} | ${CPIO} -dumpl --quiet usr && ${RM} -r ${d}; fi)
.endfor
@(cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
- ${DISTDIR}/${DIST_SUBDIR}/filesystem-3.2-25.el7${EXTRACT_SUFX_${LINUX_ARCH:S/x86_64/amd64/}} \
+ ${DISTDIR}/${DIST_SUBDIR}/filesystem-3.2-25.el7${EXTRACT_SUFX_${ARCH}} \
${EXTRACT_AFTER_ARGS})
-.if ${LINUX_ARCH} == i386
+.if ${ARCH} == i386
@${CHMOD} u+w ${WRKSRC}/usr/lib/pm-utils
-.elif ${LINUX_ARCH} == x86_64
+.elif ${ARCH} == amd64
@${CHMOD} u+w ${WRKSRC}/usr/lib64/pm-utils
.endif
@@ -161,7 +161,7 @@ post-patch:
@${RM} ${REMOVE_FILES:S|^|${WRKSRC}/|}
@${FIND} ${WRKSRC}/usr -type d -empty -not -path '*/lib*/gio/*' -delete
@${BRANDELF} -t Linux ${WRKSRC}/usr/lib/ld-2.17.so
-.if ${LINUX_ARCH} == x86_64
+.if ${ARCH} == amd64
@${BRANDELF} -t Linux ${WRKSRC}/usr/lib64/ld-2.17.so
.endif
@@ -177,4 +177,4 @@ post-install:
${LN} -sf /var/run ${STAGEDIR}${PREFIX}/run
${LN} -sf /var/tmp ${STAGEDIR}${PREFIX}/usr/tmp
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/games/linux-worldofgoo-demo/Makefile b/games/linux-worldofgoo-demo/Makefile
index 9a10b7d8e101..248a41d0ac15 100644
--- a/games/linux-worldofgoo-demo/Makefile
+++ b/games/linux-worldofgoo-demo/Makefile
@@ -23,9 +23,9 @@ DOCSDIR= ${PREFIX}/share/doc/WorldOfGoo
OPTIONS_DEFINE= DOCS
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if ${LINUX_ARCH} == "i386"
+.if ${ARCH} == i386
TARGET_BIN= WorldOfGoo.bin32
.else
TARGET_BIN= WorldOfGoo.bin64
@@ -54,4 +54,4 @@ do-install:
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/linux-c7-dri/Makefile b/graphics/linux-c7-dri/Makefile
index 2d9275e89e44..ae0831e905c5 100644
--- a/graphics/linux-c7-dri/Makefile
+++ b/graphics/linux-c7-dri/Makefile
@@ -41,14 +41,14 @@ CONFLICTS= linux-c6-${PORTNAME}-[0-9]*
OPTIONS_DEFINE= DOCS
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
post-install:
${LN} -sf libGLX_mesa.so.0 \
${STAGEDIR}${PREFIX}/usr/lib/libGLX_system.so.0
-.if ${LINUX_ARCH} == x86_64
+.if ${ARCH} == amd64
${LN} -sf libGLX_mesa.so.0 \
${STAGEDIR}${PREFIX}/usr/lib64/libGLX_system.so.0
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/java/linux-oracle-jre18/Makefile b/java/linux-oracle-jre18/Makefile
index 914fe9342f98..1b83e09a0ba3 100644
--- a/java/linux-oracle-jre18/Makefile
+++ b/java/linux-oracle-jre18/Makefile
@@ -46,7 +46,7 @@ bash_CMD= ${SH}
.include <bsd.port.pre.mk>
-.if ${LINUX_ARCH} == "i386"
+.if ${ARCH} == i386
PLIST_SUB+= JAVA_ARCHLIBDIR="i386" \
I386_ONLY="" \
AMD64_ONLY="@comment "
diff --git a/print/epson-inkjet-printer-201401w/Makefile b/print/epson-inkjet-printer-201401w/Makefile
index cfcdeb923ba2..95b9c066a5be 100644
--- a/print/epson-inkjet-printer-201401w/Makefile
+++ b/print/epson-inkjet-printer-201401w/Makefile
@@ -29,11 +29,11 @@ PLIST_SUB= LINUXBASE=${LINUXBASE} \
USES= linux
USE_LINUX= cups-libs jpeg
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if ${LINUX_ARCH} == i386
+.if ${ARCH} == i386
PLIST_SUB+= LIBDIR=lib
-.elif ${LINUX_ARCH} == x86_64
+.elif ${ARCH} == amd64
PLIST_SUB+= LIBDIR=lib64
.endif
@@ -50,4 +50,4 @@ do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/share/cups/model/
${LN} -sf ${LINUXBASE}/opt/${PORTNAME}/ppds/Epson ${STAGEDIR}${PREFIX}/share/cups/model/Epson-201401w
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/print/epson-inkjet-printer-201601w/Makefile b/print/epson-inkjet-printer-201601w/Makefile
index 2ee6aa38cef6..c4ef71a8c575 100644
--- a/print/epson-inkjet-printer-201601w/Makefile
+++ b/print/epson-inkjet-printer-201601w/Makefile
@@ -29,11 +29,11 @@ PLIST_SUB= LINUXBASE=${LINUXBASE} \
USES= linux
USE_LINUX= cups-libs jpeg
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if ${LINUX_ARCH} == i386
+.if ${ARCH} == i386
PLIST_SUB+= LIBDIR=lib
-.elif ${LINUX_ARCH} == x86_64
+.elif ${ARCH} == amd64
PLIST_SUB+= LIBDIR=lib64
.endif
@@ -50,4 +50,4 @@ do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/share/cups/model/
${LN} -sf ${LINUXBASE}/opt/${PORTNAME}/ppds/Epson ${STAGEDIR}${PREFIX}/share/cups/model/Epson-201601w
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index eabec88d15f2..11828a6c3ebf 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -101,14 +101,13 @@ OPTIONS_DEFINE+= FREEBSD_AGP
FREEBSD_AGP_DESC= Use FreeBSD AGP GART driver
.endif
-LINUX_MASTER_SITES=NVIDIA/XFree86/Linux-${LINUX_ARCH_SUFX}/${DISTVERSION}/:linux
-LINUX_DISTFILES=NVIDIA-Linux-${LINUX_ARCH_SUFX}-${DISTVERSION}.run:linux
+LINUX_MASTER_SITES=NVIDIA/XFree86/Linux-${ARCH_SUFX}/${DISTVERSION}/:linux
+LINUX_DISTFILES=NVIDIA-Linux-${ARCH_SUFX}-${DISTVERSION}.run:linux
LINUX_USES= linux
LINUX_USE= LINUX=xorglibs
-LINUX_ARCH_SUFX=${LINUX_ARCH:S/i386/x86/}
-LINUX_LIBDIR= /usr/lib${LINUX_ARCH:S/i386//:S/x86_64/64/}
-LINUX_WRKSRC= ${WRKDIR}/NVIDIA-Linux-${LINUX_ARCH_SUFX}-${DISTVERSION}
+LINUX_LIBDIR= /usr/lib${ARCH:S/i386//:S/amd//}
+LINUX_WRKSRC= ${WRKDIR}/NVIDIA-Linux-${ARCH_SUFX}-${DISTVERSION}
LINUX_LIBS= libcuda.so.${PORTVERSION} \
libnvcuvid.so.${PORTVERSION} \
@@ -394,27 +393,30 @@ PLIST_RE+= '\,${LINUXBASE}.*libGLdispatch\.so,d' \
'\,${LINUXBASE}.*libOpenGL\.so,d'
.endif
.endif # ${NVVERSION} >= 390.042 && ${LINUX_DEFAULT:S/_64//} == c7
-.endif # ${PORT_OPTIONS:MLINUX}
-
-.include <bsd.port.pre.mk>
+.if ${ARCH} == amd64
.if ${NVVERSION} >= 310.014
LINUX32_LIBS+= libnvcuvid.so.${PORTVERSION}
LINUX32_LINKS+= libnvcuvid.so.${PORTVERSION} libnvcuvid.so.1 \
libnvcuvid.so.${PORTVERSION} libnvcuvid.so
-.elif "${LINUX_ARCH}" == "x86_64"
+.else
PLIST_RE+= '\,${LINUXBASE}/usr/lib/libnvcuvid\.so,d'
.endif
+.endif
+.endif # ${PORT_OPTIONS:MLINUX}
-.if "${LINUX_ARCH}" == "x86_64"
+.if ${PORT_OPTIONS:MLINUX} && ${ARCH} == amd64
PLIST_SUB+= LINUX32=""
.else
PLIST_SUB+= LINUX32="@comment "
.endif
+# XXX Only needed to obtain PORTVERSION.
+.include <bsd.port.pre.mk>
+
post-extract-LINUX-on:
@(cd ${WRKDIR} && ${SH} \
- ${DISTDIR}/NVIDIA-Linux-${LINUX_ARCH_SUFX}-${DISTVERSION}.run \
+ ${DISTDIR}/NVIDIA-Linux-${ARCH_SUFX}-${DISTVERSION}.run \
--extract-only > /dev/null)
pre-patch:
@@ -615,7 +617,7 @@ post-install-LINUX-on:
${RLN} ${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/${s} \
${STAGEDIR}${LINUXBASE}${LINUX_LIBDIR}/${t}
.endfor
-.if "${LINUX_ARCH}" == "x86_64"
+.if ${ARCH} == amd64
${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/lib/tls
${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/lib/vdpau
.for l in ${LINUX32_LIBS}