Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/qt-dist.mk
Show All 22 Lines | |||||
# Supported distribution arguments | # Supported distribution arguments | ||||
_QT5_DISTS= 3d activeqt androidextras base charts connectivity datavis3d \ | _QT5_DISTS= 3d activeqt androidextras base charts connectivity datavis3d \ | ||||
declarative doc gamepad graphicaleffects imageformats location \ | declarative doc gamepad graphicaleffects imageformats location \ | ||||
lottie macextras multimedia networkauth purchasing quick3d quickcontrols \ | lottie macextras multimedia networkauth purchasing quick3d quickcontrols \ | ||||
quickcontrols2 quicktimeline remoteobjects script scxml sensors serialbus \ | quickcontrols2 quicktimeline remoteobjects script scxml sensors serialbus \ | ||||
serialport speech svg tools translations virtualkeyboard wayland \ | serialport speech svg tools translations virtualkeyboard wayland \ | ||||
webchannel webengine webglplugin websockets webview winextras \ | webchannel webengine webglplugin websockets webview winextras \ | ||||
x11extras xmlpatterns | x11extras xmlpatterns | ||||
_QT6_DISTS= 3d 5compat base declarative doc imageformats quick3d quickcontrols2 \ | |||||
quicktimeline networkauth shadertools svg tools translations webengine wayland | |||||
_QT_DISTS= ${_QT${_QT_VER}_DISTS} | _QT_DISTS= ${_QT${_QT_VER}_DISTS} | ||||
# We only accept one item as an argument. The fetch target further below works | # We only accept one item as an argument. The fetch target further below works | ||||
# around this. | # around this. | ||||
_QT_DIST= # empty | _QT_DIST= # empty | ||||
. for dist in ${_QT_DISTS:O:u} | . for dist in ${_QT_DISTS:O:u} | ||||
. if ${qt-dist_ARGS:M${dist}} | . if ${qt-dist_ARGS:M${dist}} | ||||
. if empty(_QT_DIST) | . if empty(_QT_DIST) | ||||
_QT_DIST= ${dist} | _QT_DIST= ${dist} | ||||
. else | . else | ||||
IGNORE= cannot be installed: different Qt dists specified via qt-dist:[${qt-dist_ARGS:S/ /,/g}] | IGNORE= cannot be installed: different Qt dists specified via qt-dist:[${qt-dist_ARGS:S/ /,/g}] | ||||
. endif | . endif | ||||
. endif | . endif | ||||
. endfor | . endfor | ||||
# Fall back to sensible defaults for _QT_DIST | # Fall back to sensible defaults for _QT_DIST | ||||
tcbernerAuthorUnsubmitted Done Inline Actionstcberner: ```_QT_DIST?=${PORTNAME}``` | |||||
. if empty(_QT_DIST) | . if empty(_QT_DIST) | ||||
. if ${_QT_VER:M5} | |||||
_QT_DIST= ${PORTNAME} # don't force qt-dist to be set for Qt5 ports which 75% of time are ${PORTNAME} | _QT_DIST= ${PORTNAME} # don't force qt-dist to be set for Qt5 ports which 75% of time are ${PORTNAME} | ||||
. endif | . endif | ||||
. endif | |||||
# Check validitiy | # Check validitiy | ||||
. if empty(_QT_DISTS:M${_QT_DIST}) | . if empty(_QT_DISTS:M${_QT_DIST}) | ||||
IGNORE= Unsupported qt-dist ${_QT_DIST} for qt:${_QT_VER} | IGNORE= Unsupported qt-dist ${_QT_DIST} for qt:${_QT_VER} | ||||
. endif | . endif | ||||
################################################################################ | ################################################################################ | ||||
# Set standard bsd.port.mk variables | # Set standard bsd.port.mk variables. | ||||
LICENSE?= LGPL21 | LICENSE?= LGPL21 | ||||
. if !exists(${PKGDIR}/pkg-descr) | . if !exists(${PKGDIR}/pkg-descr) | ||||
DESCR?= ${PORTSDIR}/devel/${_QT_RELNAME}/pkg-descr | DESCR?= ${PORTSDIR}/devel/${_QT_RELNAME}/pkg-descr | ||||
Done Inline Actions^ remove comment tcberner: ^ remove comment | |||||
. endif | . endif | ||||
# Stage support. | # Stage support. | ||||
DESTDIRNAME= INSTALL_ROOT | _QT5_DESTDIRNAME= INSTALL_ROOT | ||||
_QT6_DESTDIRNAME= DESTDIR | |||||
DESTDIRNAME= ${_QT${_QT_VER}_DESTDIRNAME} | |||||
. if ${_QT_VER:M5} | # Qt's tarballs are xz compressed. | ||||
. if empty(USES:Mtar) | |||||
EXTRACT_SUFX?= .tar.xz | |||||
. endif | |||||
# Qt5 specific master sites | |||||
_QT5_MASTER_SITES_kde= LOCAL | |||||
_QT5_MASTER_SITE_SUBDIR_kde= tcberner/KDE/Qt/${_QT_VERSION} | |||||
_QT5_MASTER_SITES= ${MASTER_SITE_QT} | |||||
_QT5_MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/ | |||||
# Qt6 specific master sites | |||||
Done Inline Actions^ maybe do this declaratively ala _MASTER_SITES_qt5=... _MASTER_SITES_qt6=... MASTER_SITES=${_MASTER_SITES_${_QT_RELNAME}} tcberner: ^ maybe do this declaratively ala
```
_MASTER_SITES_qt5=...
_MASTER_SITES_qt6=... | |||||
Done Inline Actions# Qt5 specific master sites _QT5_MASTER_SITES_kde= LOCAL _QT5_MASTER_SITE_SUBDIR_kde= tcberner/KDE/Qt/${_QT_VERSION} _QT5_MASTER_SITES= ${MASTER_SITE_QT} _QT5_MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/ # Qt6 specific master sites _QT6_MASTER_SITES= ${MASTER_SITE_QT} _QT6_MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules \ official_releases/additional_libraries/${_QT_VERSION:R}/${_QT_VERSION}/ # Qt5 specific distnames _QT5_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} _QT5_DISTNAME_kde= ${_QT_DIST:S,^,kde-qt,:S,$,-${DISTVERSION},} # Qt6 specific distnames _QT6_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} # Effective master sites and disfile valus MASTER_SITES= ${_QT${_QT_VER}_MASTER_SITES${_KDE_${_QT_DIST}:D_kde}} MASTER_SITE_SUBDIR= ${_QT${_QT_VER}_MASTER_SITE_SUBDIR${_KDE_${_QT_DIST}:D_kde}} DISTNAME= ${_QT${_QT_VER}_DISTNAME${_KDE_${_QT_DIST}:D_kde}} DISTFILES= ${DISTNAME:S,$,${EXTRACT_SUFX},} DIST_SUBDIR= KDE/Qt/${_QT_VERSION} this makes these values way more easier to spot, without digging throu 50 line long .if's tcberner: ```
# Qt5 specific master sites
_QT5_MASTER_SITES_kde= LOCAL… | |||||
_QT6_MASTER_SITES= ${MASTER_SITE_QT} | |||||
_QT6_MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules \ | |||||
official_releases/additional_libraries/${_QT_VERSION:R}/${_QT_VERSION}/ | |||||
# Qt5 specific distnames | |||||
_QT5_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} | |||||
_QT5_DISTNAME_kde= ${_QT_DIST:S,^,kde-qt,:S,$,-${DISTVERSION},} | |||||
# Qt6 specific distnames | |||||
_QT6_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} | |||||
# Effective master sites and disfile valus | |||||
MASTER_SITES= ${_QT${_QT_VER}_MASTER_SITES${_KDE_${_QT_DIST}:D_kde}} | |||||
MASTER_SITE_SUBDIR= ${_QT${_QT_VER}_MASTER_SITE_SUBDIR${_KDE_${_QT_DIST}:D_kde}} | |||||
DISTNAME= ${_QT${_QT_VER}_DISTNAME${_KDE_${_QT_DIST}:D_kde}} | |||||
DISTFILES= ${DISTNAME:S,$,${EXTRACT_SUFX},} | |||||
DIST_SUBDIR= KDE/Qt/${_QT_VERSION} | |||||
. if ${_QT_VER:M5} | |||||
# KDE maintains a repository with a patched Qt5 distribution. | # KDE maintains a repository with a patched Qt5 distribution. | ||||
_KDE_3d= 15 | _KDE_3d= 15 | ||||
_KDE_base= 165 | _KDE_base= 165 | ||||
_KDE_charts= 1 | _KDE_charts= 1 | ||||
_KDE_connectivity= 5 | _KDE_connectivity= 5 | ||||
_KDE_datavis3d= 0 | _KDE_datavis3d= 0 | ||||
_KDE_declarative= 19 | _KDE_declarative= 19 | ||||
_KDE_gamepad= 0 | _KDE_gamepad= 0 | ||||
Show All 21 Lines | |||||
_KDE_virtualkeyboard= 3 | _KDE_virtualkeyboard= 3 | ||||
_KDE_wayland= 39 | _KDE_wayland= 39 | ||||
_KDE_webchannel= 3 | _KDE_webchannel= 3 | ||||
_KDE_webglplugin= 0 | _KDE_webglplugin= 0 | ||||
_KDE_websockets= 3 | _KDE_websockets= 3 | ||||
_KDE_webview= 0 | _KDE_webview= 0 | ||||
_KDE_x11extras= 0 | _KDE_x11extras= 0 | ||||
_KDE_xmlpatterns= 0 | _KDE_xmlpatterns= 0 | ||||
. if defined(_KDE_${_QT_DIST}) | . if defined(_KDE_${_QT_DIST}) | ||||
# KDE patched Qt parts | |||||
QT5_KDE_PATCH= p${_KDE_${_QT_DIST}} | QT5_KDE_PATCH= p${_KDE_${_QT_DIST}} | ||||
_KDE_${_QT_DIST}_VERSION?= ${_QT_VERSION} | _KDE_${_QT_DIST}_VERSION?= ${_QT_VERSION} | ||||
_KDE_${_QT_DIST}_ORIGIN_TAG?= v${_KDE_${_QT_DIST}_VERSION}-lts-lgpl | _KDE_${_QT_DIST}_ORIGIN_TAG?= v${_KDE_${_QT_DIST}_VERSION}-lts-lgpl | ||||
MASTER_SITES= LOCAL/tcberner/KDE/Qt/${_QT_VERSION} | |||||
DISTNAME= ${_QT_DIST:S,^,kde-qt,:S,$,-${DISTVERSION},} | |||||
COMMENT+= (KDE patched) | COMMENT+= (KDE patched) | ||||
. else | . else | ||||
# non KDE patched Qt parts | |||||
QT5_KDE_PATCH= # | QT5_KDE_PATCH= # | ||||
MASTER_SITES= ${MASTER_SITE_QT} | |||||
MASTER_SITE_SUBDIR?= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/ | |||||
DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} | |||||
. endif | . endif | ||||
. endif # ${_QT_VER:M5} | |||||
DISTFILES= ${DISTNAME:S,$,${EXTRACT_SUFX},} | # Environment setup for Qt5 | ||||
DIST_SUBDIR= KDE/Qt/${_QT_VERSION} | . if ${_QT_VER:M5} | ||||
# Qt (at least when used with qmake) has a tendency to overlink: some libraries | # Qt (at least when used with qmake) has a tendency to overlink: some libraries | ||||
# have dependencies on others in the mkspec configurations and the latter are | # have dependencies on others in the mkspec configurations and the latter are | ||||
# always passed to the linker even if they are not actually used. By passing | # always passed to the linker even if they are not actually used. By passing | ||||
# --as-needed to the linker by default when building the Qt ports we do not | # --as-needed to the linker by default when building the Qt ports we do not | ||||
# have to declare a lot of unnecessary dependencies in USE_QT5. | # have to declare a lot of unnecessary dependencies in USE_QT5. | ||||
LDFLAGS+= -Wl,--as-needed | LDFLAGS+= -Wl,--as-needed | ||||
. if ${.TARGETS:Mmakesum} || ${.TARGETS:Mfetch} && \ | |||||
defined(DISABLE_SIZE) && defined(NO_CHECKSUM) | |||||
# Ensure that the "makesum" target (with its inner "fetch" one) uses | |||||
# devel/qt*/distinfo for every port. | |||||
. endif | |||||
# Qt5's tarballs are xz compressed. | |||||
. if empty(USES:Mtar) | |||||
EXTRACT_SUFX?= .tar.xz | |||||
. endif | |||||
. if ${_QT_DIST} == "base" && ${PORTNAME} != "qmake" | . if ${_QT_DIST} == "base" && ${PORTNAME} != "qmake" | ||||
# Qt configure requires pkg-config to detect dependencies. | # Qt configure requires pkg-config to detect dependencies. | ||||
.include "${USESDIR}/pkgconfig.mk" | .include "${USESDIR}/pkgconfig.mk" | ||||
. endif | . endif | ||||
# -nomake is only used by qtbase's configure script. | # -nomake is only used by qtbase's configure script. | ||||
# Other ports from other Qt modules will automatically build examples and | # Other ports from other Qt modules will automatically build examples and | ||||
# tests if the directories exist because of mkspecs/features/qt_parts.prf. | # tests if the directories exist because of mkspecs/features/qt_parts.prf. | ||||
EXTRACT_AFTER_ARGS?= ${DISTNAME:S,$,/examples,:S,^,--exclude ,} \ | EXTRACT_AFTER_ARGS?= ${DISTNAME:S,$,/examples,:S,^,--exclude ,} \ | ||||
${DISTNAME:S,$,/tests,:S,^,--exclude ,} \ | ${DISTNAME:S,$,/tests,:S,^,--exclude ,} \ | ||||
--no-same-owner --no-same-permissions | --no-same-owner --no-same-permissions | ||||
. endif # ! ${_QT_VER:M5} | . endif # ! ${_QT_VER:M5} | ||||
# Build setup for Qt6 | |||||
. if ${_QT_VER:M6} | |||||
CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX=${PREFIX} \ | |||||
-DINSTALL_BINDIR=${PREFIX}/${QT_BINDIR_REL} \ | |||||
-DINSTALL_PUBLICBINDIR=${PREFIX}/bin \ | |||||
-DINSTALL_LIBDIR=${PREFIX}/${QT_LIBDIR_REL} \ | |||||
-DINSTALL_LIBEXECDIR=${PREFIX}/${QT_LIBEXECDIR_REL} \ | |||||
-DINSTALL_DOCDIR=${PREFIX}/${QT_DOCDIR_REL} \ | |||||
-DINSTALL_ARCHDATADIR=${PREFIX}/${QT_ARCHDIR_REL} \ | |||||
-DINSTALL_DATADIR=${PREFIX}/${QT_DATADIR_REL} \ | |||||
-DINSTALL_INCLUDEDIR=${PREFIX}/${QT_INCDIR_REL} \ | |||||
-DINSTALL_MKSPECSDIR=${PREFIX}/${QT_MKSPECDIR_REL} \ | |||||
-DINSTALL_EXAMPLESDIR=${PREFIX}/${QT_EXAMPLEDIR_REL} \ | |||||
-DINSTALL_DESCRIPTIONSDIR=${PREFIX}/${QT_DESCRIPTIONSDIR_REL} \ | |||||
-DQT_QMAKE_TARGET_MKSPEC:String=freebsd-clang \ | |||||
Done Inline Actions^ get rid of --log-level=TRACE tcberner: ^ get rid of `--log-level=TRACE` | |||||
--log-level=TRACE | |||||
. endif | |||||
# Build setup for Qt5 | |||||
. if ${_QT_VER:M5} | |||||
CONFIGURE_ENV+= MAKE="${MAKE:T}" | CONFIGURE_ENV+= MAKE="${MAKE:T}" | ||||
CONFIGURE_ARGS+= -opensource -confirm-license \ | CONFIGURE_ARGS+= -opensource -confirm-license \ | ||||
-no-pch \ | -no-pch \ | ||||
-prefix ${PREFIX} \ | -prefix ${PREFIX} \ | ||||
-bindir ${PREFIX}/${QT_BINDIR_REL} \ | -bindir ${PREFIX}/${QT_BINDIR_REL} \ | ||||
-headerdir ${PREFIX}/${QT_INCDIR_REL} \ | -headerdir ${PREFIX}/${QT_INCDIR_REL} \ | ||||
-libdir ${PREFIX}/${QT_LIBDIR_REL} \ | -libdir ${PREFIX}/${QT_LIBDIR_REL} \ | ||||
-plugindir ${PREFIX}/${QT_PLUGINDIR_REL} \ | -plugindir ${PREFIX}/${QT_PLUGINDIR_REL} \ | ||||
-importdir ${PREFIX}/${QT_IMPORTDIR_REL} \ | -importdir ${PREFIX}/${QT_IMPORTDIR_REL} \ | ||||
-datadir ${PREFIX}/${QT_DATADIR_REL} \ | -datadir ${PREFIX}/${QT_DATADIR_REL} \ | ||||
-docdir ${PREFIX}/${QT_DOCDIR_REL} \ | -docdir ${PREFIX}/${QT_DOCDIR_REL} \ | ||||
-translationdir ${PREFIX}/${QT_L10NDIR_REL} \ | -translationdir ${PREFIX}/${QT_L10NDIR_REL} \ | ||||
-sysconfdir ${PREFIX}/${QT_ETCDIR_REL} | -sysconfdir ${PREFIX}/${QT_ETCDIR_REL} \ | ||||
-nomake examples -nomake tests \ | |||||
. if ${_QT_VER:M5} | |||||
CONFIGURE_ARGS+= -nomake examples -nomake tests \ | |||||
-platform ${QMAKESPECNAME} \ | -platform ${QMAKESPECNAME} \ | ||||
-archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \ | -archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \ | ||||
-libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \ | -libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \ | ||||
-qmldir ${PREFIX}/${QT_QMLDIR_REL} \ | -qmldir ${PREFIX}/${QT_QMLDIR_REL} \ | ||||
-examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL} \ | -examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL} \ | ||||
-testsdir ${PREFIX}/${QT_TESTDIR_REL} | -testsdir ${PREFIX}/${QT_TESTDIR_REL} | ||||
. if ${ARCH} == i386 && empty(MACHINE_CPU:Msse2) | . if ${ARCH} == i386 && empty(MACHINE_CPU:Msse2) | ||||
Show All 35 Lines | _EXTRA_PATCHES_QT5+= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_g++-base.conf \ | ||||
${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base.conf \ | ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base.conf \ | ||||
${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-g++_qmake.conf | ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-g++_qmake.conf | ||||
USE_GCC= yes | USE_GCC= yes | ||||
. elif ${ARCH} == armv7 || ${ARCH} == powerpc | . elif ${ARCH} == armv7 || ${ARCH} == powerpc | ||||
_EXTRA_PATCHES_QT5+= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_g++-base.conf \ | _EXTRA_PATCHES_QT5+= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_g++-base.conf \ | ||||
${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base.conf \ | ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base.conf \ | ||||
${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-g++_qmake.conf | ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-g++_qmake.conf | ||||
. endif | . endif | ||||
. if ${_QT_VER:M5} | |||||
EXTRA_PATCHES?= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-configure \ | EXTRA_PATCHES?= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-configure \ | ||||
Done Inline Actions^ again declaratively _EXTRA_PATCHES_qt5=... EXTRA_PATCHES=... ? tcberner: ^ again declaratively
```
_EXTRA_PATCHES_qt5=...
EXTRA_PATCHES=...
```
? | |||||
${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-sync.profiles \ | ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-sync.profiles \ | ||||
${_EXTRA_PATCHES_QT5} | ${_EXTRA_PATCHES_QT5} | ||||
. endif # ${_QT_VER:M5} | |||||
. endif # ${_QT_DIST} == "base" | . endif # ${_QT_DIST} == "base" | ||||
# Override settings installed in qconfig.h and *.pri files. The flags will be | # Override settings installed in qconfig.h and *.pri files. The flags will be | ||||
# installed along with the port, but have to be passed as arguments while | # installed along with the port, but have to be passed as arguments while | ||||
# building the port itself. Flags prefixed with "-" (e.g., "-CUPS" and "-cups") | # building the port itself. Flags prefixed with "-" (e.g., "-CUPS" and "-cups") | ||||
# are needed to disable some features. | # are needed to disable some features. | ||||
. if !defined(${QT_MODNAME}) || empty(${QT_MODNAME}) | . if !defined(${QT_MODNAME}) || empty(${QT_MODNAME}) | ||||
# Used for both qconfig-*.h and qt_config_*.pri; it can't be empty. | # Used for both qconfig-*.h and qt_config_*.pri; it can't be empty. | ||||
▲ Show 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | |||||
qt-create-kde-distfile: | qt-create-kde-distfile: | ||||
${SH} ${PORTSDIR}/devel/${_QT_RELNAME}/files/create_kde-qt_release.sh \ | ${SH} ${PORTSDIR}/devel/${_QT_RELNAME}/files/create_kde-qt_release.sh \ | ||||
${_QT_DIST} \ | ${_QT_DIST} \ | ||||
${DISTDIR}/${DIST_SUBDIR} \ | ${DISTDIR}/${DIST_SUBDIR} \ | ||||
${_KDE_${_QT_DIST}_VERSION} \ | ${_KDE_${_QT_DIST}_VERSION} \ | ||||
${_KDE_${_QT_DIST}_ORIGIN_TAG} | ${_KDE_${_QT_DIST}_ORIGIN_TAG} | ||||
.endif # defined(_QT_DIST_MK_INCLUDED) | .endif # defined(_QT_DIST_MK_INCLUDED) | ||||