2024-02-28 19:36:48 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Patrick J. Volkerding, Sebeka, MN, USA
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use of this script, with or without modification, is
|
|
|
|
# permitted provided that the following conditions are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of this script must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
|
|
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
# Merged some ideas from Alex Sarmardzic's script for qt4 at SlackBuilds.org
|
|
|
|
# ^^ Modified by Robby Workman <rworkman@slackware.com> for QT4 & KDE4
|
|
|
|
#
|
|
|
|
# Modifications 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2023 Eric Hameleers, Eindhoven, NL
|
|
|
|
# Modifications for qt 5.2.0 2013 by Michael James, AU
|
|
|
|
# Modifications for qt 5.x by Eric Hameleers, Eindhoven, NL
|
|
|
|
# Modifications for qt 6.x 2023, 2024 by Eric Hameleers, Eindhoven, NL
|
|
|
|
|
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
|
|
|
PKGNAM=qt6
|
|
|
|
VERSION=$(ls qt-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
|
2024-11-10 21:38:31 +01:00
|
|
|
BUILD=${BUILD:-1}
|
2024-02-28 19:36:48 +01:00
|
|
|
PKGSRC=$(echo $VERSION | cut -d - -f 1)
|
|
|
|
PKGVER=$(echo $VERSION | tr - _)
|
|
|
|
|
|
|
|
USE_CODECS=${USE_CODECS:-YES}
|
|
|
|
SYSTEM_FFMPEG=${SYSTEM_FFMPEG:-YES}
|
|
|
|
|
|
|
|
# Automatically determine the architecture we're building on:
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$(uname -m)" in
|
2024-05-22 20:57:13 +02:00
|
|
|
i?86) ARCH=i686 ;;
|
2024-02-28 19:36:48 +01:00
|
|
|
arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
|
|
|
|
# Unless $ARCH is already set, use uname -m for all other archs:
|
|
|
|
*) ARCH=$(uname -m) ;;
|
|
|
|
esac
|
|
|
|
export ARCH
|
|
|
|
fi
|
|
|
|
|
|
|
|
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
|
|
|
# the name of the created package would be, and then exit. This information
|
|
|
|
# could be useful to other scripts.
|
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
|
|
echo "$PKGNAM-${PKGVER}-${ARCH}-${BUILD}${TAG}.txz"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2024-08-30 19:52:19 +02:00
|
|
|
# Since this could be needed twice...
|
|
|
|
OPTS32="-O2 -march=pentium4 -mtune=generic"
|
|
|
|
|
2024-08-07 06:03:09 +02:00
|
|
|
if [ "$ARCH" = "i686" ]; then
|
2024-08-30 19:52:19 +02:00
|
|
|
SLKCFLAGS="$OPTS32"
|
2024-05-22 20:57:13 +02:00
|
|
|
SLKLDFLAGS=""
|
|
|
|
LIBDIRSUFFIX=""
|
2024-02-28 19:36:48 +01:00
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
Tue Jul 23 18:54:25 UTC 2024
Hey folks, we got a new glibc and are beginning the process of baking the new
default compile flags into the toolchain, the graphics stack, and whatever else
happens along. Enjoy! :-)
a/aaa_glibc-solibs-2.40-x86_64-1.txz: Upgraded.
a/libblockdev-3.1.1_1-x86_64-2.txz: Rebuilt.
Fix build against recent ext2fs.h. Thanks to shipujin.
a/xfsprogs-6.9.0-x86_64-1.txz: Upgraded.
ap/rpm-4.19.1.1-x86_64-3.txz: Rebuilt.
ap/slackpkg-15.0.10-noarch-4.txz: Rebuilt.
Prefer gpg1 again. Going with the modern gpg with more dependencies was
a mistake in this case. (now we know why gnupg-1 is still around :-)
Thanks to Petri Kaukasoina.
d/binutils-2.42-x86_64-3.txz: Rebuilt.
d/cargo-vendor-filterer-0.5.14-x86_64-2.txz: Rebuilt.
d/cbindgen-0.26.0-x86_64-2.txz: Rebuilt.
d/ccache-4.10.2-x86_64-1.txz: Upgraded.
d/cmake-3.30.1-x86_64-2.txz: Rebuilt.
d/gcc-14.1.0-x86_64-2.txz: Rebuilt.
d/gcc-g++-14.1.0-x86_64-2.txz: Rebuilt.
d/gcc-gdc-14.1.0-x86_64-2.txz: Rebuilt.
d/gcc-gfortran-14.1.0-x86_64-2.txz: Rebuilt.
d/gcc-gm2-14.1.0-x86_64-2.txz: Rebuilt.
d/gcc-gnat-14.1.0-x86_64-2.txz: Rebuilt.
d/gcc-go-14.1.0-x86_64-2.txz: Rebuilt.
d/gcc-objc-14.1.0-x86_64-2.txz: Rebuilt.
d/libgccjit-14.1.0-x86_64-2.txz: Rebuilt.
d/libtool-2.4.7-x86_64-8.txz: Rebuilt.
d/parallel-20240722-noarch-1.txz: Upgraded.
d/pkg-config-0.29.2-x86_64-5.txz: Rebuilt.
d/python-setuptools-71.1.0-x86_64-1.txz: Upgraded.
d/ruby-3.3.4-x86_64-2.txz: Rebuilt.
d/rust-bindgen-0.69.4-x86_64-2.txz: Rebuilt.
d/strace-6.10-x86_64-1.txz: Upgraded.
d/subversion-1.14.3-x86_64-3.txz: Rebuilt.
e/emacs-29.4-x86_64-2.txz: Rebuilt.
l/PyQt-builder-1.16.4-x86_64-2.txz: Rebuilt.
l/PyQt5-5.15.11-x86_64-1.txz: Upgraded.
l/PyQt5_sip-12.15.0-x86_64-2.txz: Rebuilt.
l/argon2-20190702-x86_64-6.txz: Rebuilt.
l/ffmpeg-6.1.1-x86_64-5.txz: Rebuilt.
l/glibc-2.40-x86_64-1.txz: Upgraded.
This update fixes security issues:
nscd: Stack-based buffer overflow in netgroup cache.
nscd: Null pointer crash after notfound response.
nscd: netgroup cache may terminate daemon on memory allocation failure.
nscd: netgroup cache assumes NSS callback uses in-buffer strings.
These vulnerabilities were only present in the nscd binary.
For more information, see:
https://www.cve.org/CVERecord?id=CVE-2024-33599
https://www.cve.org/CVERecord?id=CVE-2024-33600
https://www.cve.org/CVERecord?id=CVE-2024-33601
https://www.cve.org/CVERecord?id=CVE-2024-33602
(* Security fix *)
l/glibc-i18n-2.40-x86_64-1.txz: Upgraded.
l/glibc-profile-2.40-x86_64-1.txz: Upgraded.
l/gst-plugins-good-1.24.5-x86_64-2.txz: Rebuilt.
l/libcdio-paranoia-10.2+2.0.2-x86_64-1.txz: Upgraded.
l/libclc-18.1.8-x86_64-3.txz: Rebuilt.
l/libproxy-0.5.8-x86_64-1.txz: Upgraded.
l/lz4-1.10.0-x86_64-1.txz: Upgraded.
l/poppler-24.07.0-x86_64-2.txz: Rebuilt.
l/python-importlib_metadata-8.1.0-x86_64-1.txz: Upgraded.
l/python-sphinx-7.4.7-x86_64-1.txz: Upgraded.
l/qt5-5.15.14_20240716_ae0c8451-x86_64-1.txz: Upgraded.
l/qt5-webkit-5.212.0_alpha4-x86_64-13.txz: Rebuilt.
l/qt6-6.7.2_20240610_3f005f1e-x86_64-3.txz: Rebuilt.
l/sip-6.8.6-x86_64-2.txz: Rebuilt.
l/spirv-llvm-translator-18.1.2-x86_64-2.txz: Rebuilt.
l/v4l-utils-1.28.0-x86_64-1.txz: Upgraded.
n/bind-9.18.28-x86_64-1.txz: Upgraded.
This update fixes security issues:
Remove SIG(0) support from named as a countermeasure for CVE-2024-1975.
qctx-zversion was not being cleared when it should have been leading to
an assertion failure if it needed to be reused.
An excessively large number of rrtypes per owner can slow down database query
processing, so a limit has been placed on the number of rrtypes that can be
stored per owner (node) in a cache or zone database. This is configured with
the new "max-rrtypes-per-name" option, and defaults to 100.
Excessively large rdatasets can slow down database query processing, so a
limit has been placed on the number of records that can be stored per
rdataset in a cache or zone database. This is configured with the new
"max-records-per-type" option, and defaults to 100.
Malicious DNS client that sends many queries over TCP but never reads
responses can cause server to respond slowly or not respond at all for other
clients.
For more information, see:
https://www.cve.org/CVERecord?id=CVE-2024-1975
https://www.cve.org/CVERecord?id=CVE-2024-4076
https://www.cve.org/CVERecord?id=CVE-2024-1737
https://www.cve.org/CVERecord?id=CVE-2024-0760
(* Security fix *)
n/fetchmail-6.4.39-x86_64-1.txz: Upgraded.
n/obexftp-0.24.2-x86_64-13.txz: Rebuilt.
n/pinentry-1.3.1-x86_64-2.txz: Rebuilt.
n/wpa_supplicant-2.11-x86_64-1.txz: Upgraded.
x/fcitx5-qt-5.1.6-x86_64-3.txz: Rebuilt.
x/ibus-m17n-1.4.30-x86_64-1.txz: Upgraded.
x/libdrm-2.4.122-x86_64-2.txz: Rebuilt.
x/marisa-0.2.6-x86_64-10.txz: Rebuilt.
x/mesa-24.1.4-x86_64-2.txz: Rebuilt.
x/vulkan-sdk-1.3.275.0-x86_64-3.txz: Rebuilt.
xap/audacious-4.4-x86_64-2.txz: Rebuilt.
xap/audacious-plugins-4.4-x86_64-2.txz: Rebuilt.
xap/mozilla-thunderbird-128.0.1esr-x86_64-1.txz: Upgraded.
This is a bugfix release.
For more information, see:
https://www.mozilla.org/en-US/thunderbird/128.0.1esr/releasenotes/
xap/xaos-4.3.2-x86_64-2.txz: Rebuilt.
extra/emacs-regular-build/emacs-29.4-x86_64-2_regular.txz: Rebuilt.
2024-07-23 20:54:25 +02:00
|
|
|
SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC"
|
2024-02-28 19:36:48 +01:00
|
|
|
SLKLDFLAGS="-L/usr/lib64"
|
|
|
|
LIBDIRSUFFIX="64"
|
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
SLKLDFLAGS=""
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
fi
|
|
|
|
|
2024-06-05 21:06:36 +02:00
|
|
|
# GCC 14 "fix":
|
2024-08-07 06:03:09 +02:00
|
|
|
# It seems this flag doesn't carry through to qtwebengine where most of the
|
|
|
|
# warnings are, but we'll leave it here anyway.
|
2024-06-05 21:06:36 +02:00
|
|
|
SLKCFLAGS="$SLKCFLAGS -Wno-error=template-id-cdtor"
|
|
|
|
|
2024-02-28 19:36:48 +01:00
|
|
|
case "$ARCH" in
|
|
|
|
arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
|
|
|
|
*) TARGET=$ARCH-slackware-linux ;;
|
|
|
|
esac
|
|
|
|
|
2024-06-05 21:06:36 +02:00
|
|
|
# For cross-compiling from x86_64:
|
2024-11-28 22:47:57 +01:00
|
|
|
if [ "$(uname -m)" = "x86_64" -a "$(file -L /usr/bin/gcc | grep 386 | grep 32-bit)" != "" ]; then
|
2024-06-05 21:06:36 +02:00
|
|
|
ARCH=i686
|
2024-08-30 19:52:19 +02:00
|
|
|
SLKCFLAGS="$OPTS32"
|
2024-06-05 21:06:36 +02:00
|
|
|
SLKLDFLAGS=""
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
fi
|
|
|
|
|
2024-02-28 19:36:48 +01:00
|
|
|
NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "}
|
|
|
|
NINJAJOBS=${NINJAJOBS:-"$(echo $NUMJOBS | cut -f 2 -d j | tr -d ' ')"}
|
|
|
|
export NINJAJOBS
|
|
|
|
|
|
|
|
TMP=${TMP:-/tmp}
|
|
|
|
PKG=$TMP/package-${PKGNAM}
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG
|
|
|
|
cd $TMP
|
|
|
|
rm -rf qt-everywhere-src-$VERSION
|
|
|
|
echo "Extracting qt-everywhere-src-$VERSION"
|
|
|
|
tar xf $CWD/qt-everywhere-src-$VERSION.tar.?z* || exit 1
|
|
|
|
cd qt-everywhere-src-$PKGSRC || exit 1
|
|
|
|
|
|
|
|
chown -R root:root .
|
|
|
|
find . \
|
|
|
|
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
|
|
|
-exec chmod 755 {} \+ -o \
|
|
|
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
|
|
|
-exec chmod 644 {} \+
|
|
|
|
|
|
|
|
# If we build our own Qt, unset the QT-related environment variables,
|
|
|
|
# so that a pre-existing Qt will not be picked up and create errors later:
|
|
|
|
unset QTDIR
|
|
|
|
unset QT6DIR
|
|
|
|
NEWPATH="/usr/lib${LIBDIRSUFFIX}/${PKGNAM}/bin"
|
|
|
|
for elem in $(echo $PATH | cut -d: --output-delimiter=' ' -f1-) ; do
|
|
|
|
if ! $(echo "$elem"| grep -q /qt) ; then
|
|
|
|
NEWPATH="$NEWPATH:$elem"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
export PATH="$NEWPATH"
|
|
|
|
|
|
|
|
# Fix path to mysql header:
|
|
|
|
cat $CWD/patches/qt5.mysql.h.diff | patch -p1 --verbose || exit 1
|
|
|
|
|
|
|
|
# If PulseAudio is not found, use the _alsa $TAG and disable it in the build:
|
|
|
|
if ! pkg-config --exists libpulse 2>/dev/null ; then
|
|
|
|
USE_PULSEAUDIO=${USE_PULSEAUDIO:-"OFF"}
|
|
|
|
TAG="${TAG}_alsa"
|
|
|
|
else
|
|
|
|
USE_PULSEAUDIO=${USE_PULSEAUDIO:-"ON"}
|
|
|
|
TAG=${TAG:-""}
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Re-add support for 32bit architectures - Google no longer supports it:
|
|
|
|
sed -i qtwebengine/src/3rdparty/chromium/BUILD.gn \
|
|
|
|
-e 's/target_os != "linux" || /target_os == "linux" || /'
|
|
|
|
pushd qtwebengine
|
|
|
|
# Thanks Debian! See https://salsa.debian.org/qt-kde-team/qt6/qt6-webengine/-/tree/master/debian/patches
|
|
|
|
cat $CWD/patches/qt6-webengine_32bit_compressing_files.patch | patch -p1 --verbose || exit 1
|
|
|
|
popd
|
|
|
|
cat $CWD/patches/nodejs-allow-32bit.patch | patch -p1 --verbose || exit 1
|
|
|
|
|
2024-05-22 20:57:13 +02:00
|
|
|
# Patch header issue that causes the compile to fail with "x11 not defined"
|
|
|
|
pushd qtwebengine
|
|
|
|
cat $CWD/patches/qtwebengine-6.7.0-displaykey-header.patch | patch -p1 --verbose || exit 1
|
|
|
|
popd
|
2024-02-28 19:36:48 +01:00
|
|
|
|
2024-03-26 23:24:59 +01:00
|
|
|
# Previously we didn't have a protobuf package in Slackware.
|
|
|
|
# Now that we do, it's apparently too new to use with Qt6, so let's just
|
|
|
|
# disable it to get the same features that we previously did.
|
|
|
|
# Patches would be accepted here. :-)
|
2024-05-22 20:57:13 +02:00
|
|
|
#PROTOBUF="-DQT_FEATURE_qtprotobufgen=OFF"
|
2024-03-26 23:24:59 +01:00
|
|
|
|
2024-02-28 19:36:48 +01:00
|
|
|
# The qtquick3dphysics only compiles on a limited set of architectures:
|
|
|
|
case "${ARCH}" in
|
|
|
|
i?86 | arm | s390) DO_PHYSX3D="OFF" ;;
|
|
|
|
*) DO_PHYSX3D="ON" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Use our custom compiler and linker flags:
|
|
|
|
sed -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${SLKCFLAGS}|" \
|
|
|
|
-i qtbase/mkspecs/common/gcc-base.conf || exit 1
|
|
|
|
sed -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${SLKLDFLAGS}|" \
|
|
|
|
-i qtbase/mkspecs/common/g++-unix.conf || exit 1
|
|
|
|
|
2024-12-03 05:33:44 +01:00
|
|
|
# As SBOM generation is failing with 6.8.1 (and was newly changed to be ON by
|
|
|
|
# default, we'll turn it OFF. But we should test in the future to see if it
|
|
|
|
# starts to work.
|
|
|
|
|
2024-02-28 19:36:48 +01:00
|
|
|
export CFLAGS="$SLKCFLAGS"
|
|
|
|
export CXXFLAGS="$SLKCFLAGS"
|
|
|
|
export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
|
|
|
|
export QTDIR="${TMP}/qt-everywhere-src-${PKGSRC}"
|
|
|
|
export LD_LIBRARY_PATH="${QTDIR}/qtbase/lib:${QTDIR}/qttools/lib:${LD_LIBRARY_PATH}"
|
|
|
|
export QT_PLUGIN_PATH="${QTDIR}/qtbase/plugins"
|
|
|
|
cmake -S $(pwd) -B build-${PKGNAM} \
|
|
|
|
-G Ninja \
|
|
|
|
-Wno-dev \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
|
|
|
|
-DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
|
|
|
|
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
|
|
|
-DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DBUILD_qtquick3dphysics:BOOL=${DO_PHYSX3D} \
|
|
|
|
-DINSTALL_BINDIR=/usr/lib${LIBDIRSUFFIX}/qt6/bin \
|
|
|
|
-DINSTALL_PUBLICBINDIR=usr/bin \
|
|
|
|
-DINSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
|
2024-03-03 21:50:24 +01:00
|
|
|
-DINSTALL_LIBEXECDIR=/usr/lib${LIBDIRSUFFIX}/qt6/bin \
|
2024-02-28 19:36:48 +01:00
|
|
|
-DINSTALL_ARCHDATADIR=/usr/lib${LIBDIRSUFFIX}/qt6 \
|
|
|
|
-DINSTALL_DATADIR=/usr/share/qt6 \
|
|
|
|
-DINSTALL_INCLUDEDIR=/usr/include/qt6 \
|
2024-06-09 20:41:17 +02:00
|
|
|
-DINSTALL_MKSPECSDIR=lib${LIBDIRSUFFIX}/qt6/mkspecs \
|
2024-02-28 19:36:48 +01:00
|
|
|
-DINSTALL_DOCDIR=/usr/doc/qt6-${PKGVER} \
|
|
|
|
-DINSTALL_EXAMPLESDIR=/usr/doc/qt6-${PKGVER}/examples \
|
|
|
|
-DFEATURE_libproxy=ON \
|
|
|
|
-DFEATURE_no_direct_extern_access=ON \
|
|
|
|
-DFEATURE_openssl_linked=ON \
|
|
|
|
-DFEATURE_pulseaudio="${USE_PULSEAUDIO}" \
|
|
|
|
-DFEATURE_system_sqlite=ON \
|
|
|
|
-DFEATURE_system_xcb_xinput=ON \
|
|
|
|
-DFEATURE_use_gold_linker=ON \
|
|
|
|
-DFEATURE_webengine_proprietary_codecs="${USE_CODECS}" \
|
|
|
|
-DFEATURE_webengine_system_ffmpeg="${SYSTEM_FFMPEG}" \
|
|
|
|
-DFEATURE_webengine_system_pulseaudio="${USE_PULSEAUDIO}" \
|
|
|
|
-DFEATURE_webengine_webrtc_pipewire=ON \
|
2024-11-10 21:38:31 +01:00
|
|
|
-DFEATURE_quick3dxr_openxr:BOOL=OFF \
|
|
|
|
-DFEATURE_system_openxr:BOOL=OFF \
|
2024-03-26 23:24:59 +01:00
|
|
|
$PROTOBUF \
|
2024-12-03 05:33:44 +01:00
|
|
|
-DQT_GENERATE_SBOM=OFF \
|
2024-02-28 19:36:48 +01:00
|
|
|
-DQT_BUILD_EXAMPLES=OFF || exit 1
|
2024-03-26 23:24:59 +01:00
|
|
|
#cmake --build build-${PKGNAM} --parallel $NINJAJOBS || cmake --build build-${PKGNAM} || exit 1
|
|
|
|
# Don't try again non-parallel... it just makes you wait a long time to see
|
|
|
|
# what the error was.
|
|
|
|
cmake --build build-${PKGNAM} --parallel $NINJAJOBS || exit 1
|
2024-02-28 19:36:48 +01:00
|
|
|
DESTDIR=$PKG cmake --install build-${PKGNAM} || exit 1
|
|
|
|
|
|
|
|
# Strip binaries:
|
|
|
|
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
|
|
|
|
|
|
|
# Remove rpaths:
|
|
|
|
for file in $(find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : 2> /dev/null) ; do
|
|
|
|
if [ ! "$(patchelf --print-rpath $file 2> /dev/null)" = "" ]; then
|
|
|
|
patchelf --remove-rpath $file
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Fix the path in prl files:
|
|
|
|
find "$PKG/usr/lib${LIBDIRSUFFIX}" -type f -name '*.prl' \
|
|
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
|
|
|
|
|
|
|
|
# Install symlinks to the Qt6 binaries in the $PATH:
|
|
|
|
mkdir -p $PKG/usr/bin
|
|
|
|
pushd $PKG
|
|
|
|
# Setting INSTALL_PUBLICBINDIR creates user_facing_tool_links.txt files:
|
|
|
|
find $TMP/qt-everywhere-src-$PKGSRC/build-${PKGNAM} \
|
|
|
|
-mindepth 1 -maxdepth 2 -name user_facing_tool_links.txt \
|
|
|
|
| xargs cat | sort | uniq \
|
|
|
|
| while read MYINP ; do ln -s $MYINP ; done
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Set the QT6DIR variable in the environment:
|
|
|
|
mkdir -p $PKG/etc/profile.d
|
|
|
|
sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" $CWD/profile.d/$PKGNAM.sh \
|
|
|
|
> $PKG/etc/profile.d/$PKGNAM.sh
|
|
|
|
sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" $CWD/profile.d/$PKGNAM.csh \
|
|
|
|
> $PKG/etc/profile.d/$PKGNAM.csh
|
|
|
|
chmod 0755 $PKG/etc/profile.d/*
|
|
|
|
|
|
|
|
# Add menu entries for all those hidden but great Qt applications:
|
|
|
|
# Qt6 logo:
|
|
|
|
mkdir -p $PKG/usr/share/icons/hicolor/{48x48,128x128}/apps
|
|
|
|
convert qtdoc/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt6-logo.png
|
|
|
|
convert qtdoc/doc/src/images/qt-logo.png -resize 128x128 $PKG/usr/share/icons/hicolor/128x128/apps/qt6-logo.png
|
|
|
|
# Assistant icons
|
|
|
|
install -p -m644 -D qttools/src/assistant/assistant/images/assistant.png $PKG/usr/share/icons/hicolor/32x32/apps/qt6-assistant.png
|
|
|
|
install -p -m644 -D qttools/src/assistant/assistant/images/assistant-128.png $PKG/usr/share/icons/hicolor/128x128/apps/qt6-assistant.png
|
|
|
|
# Designer icon
|
|
|
|
install -p -m644 -D qttools/src/designer/src/designer/images/designer.png $PKG/usr/share/icons/hicolor/128x128/apps/qt6-designer.png
|
|
|
|
# QDbusViewer icons
|
|
|
|
install -p -m644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer.png $PKG/usr/share/icons/hicolor/32x32/apps/qt6-qdbusviewer.png
|
|
|
|
install -p -m644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png $PKG/usr/share/icons/hicolor/128x128/apps/qt6-qdbusviewer.png
|
|
|
|
# Linguist icons
|
|
|
|
for icon in qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do
|
|
|
|
size=$(echo $(basename ${icon}) | cut -d- -f2)
|
|
|
|
install -p -m644 -D ${icon} $PKG/usr/share/icons/hicolor/${size}x${size}/apps/qt6-linguist.png
|
|
|
|
done
|
|
|
|
|
|
|
|
# And the .desktop files too:
|
|
|
|
mkdir -p $PKG/usr/share/applications
|
|
|
|
cat <<EOF > $PKG/usr/share/applications/qt6-designer.desktop
|
|
|
|
[Desktop Entry]
|
|
|
|
Name=Qt6 Designer
|
|
|
|
GenericName=Interface Designer
|
|
|
|
Comment=Design GUIs for Qt6 applications
|
|
|
|
Exec=designer6
|
|
|
|
Icon=qt6-designer
|
|
|
|
MimeType=application/x-designer;
|
|
|
|
Terminal=false
|
|
|
|
Encoding=UTF-8
|
|
|
|
Type=Application
|
|
|
|
Categories=Qt;Development;
|
|
|
|
EOF
|
|
|
|
cat <<EOF > $PKG/usr/share/applications/qt6-assistant.desktop
|
|
|
|
[Desktop Entry]
|
|
|
|
Name=Qt6 Assistant
|
|
|
|
Comment=Shows Qt6 documentation and examples
|
|
|
|
Exec=assistant6
|
|
|
|
Icon=qt6-assistant
|
|
|
|
Terminal=false
|
|
|
|
Encoding=UTF-8
|
|
|
|
Type=Application
|
|
|
|
Categories=Qt;Development;Documentation;
|
|
|
|
EOF
|
|
|
|
cat <<EOF > $PKG/usr/share/applications/qt6-linguist.desktop
|
|
|
|
[Desktop Entry]
|
|
|
|
Name=Qt6 Linguist
|
|
|
|
Comment=Add translations to Qt6 applications
|
|
|
|
Exec=linguist6
|
|
|
|
Icon=qt6-linguist
|
|
|
|
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
|
|
|
|
Terminal=false
|
|
|
|
Encoding=UTF-8
|
|
|
|
Type=Application
|
|
|
|
Categories=Qt;Development;
|
|
|
|
EOF
|
|
|
|
cat <<EOF > $PKG/usr/share/applications/qt6-qdbusviewer.desktop
|
|
|
|
[Desktop Entry]
|
|
|
|
Name=Qt6 QDbusViewer
|
|
|
|
GenericName=Qt6 D-Bus Debugger
|
|
|
|
Comment=Debug D-Bus applications
|
|
|
|
Exec=qdbusviewer6
|
|
|
|
Icon=qt6-qdbusviewer
|
|
|
|
Terminal=false
|
|
|
|
Type=Application
|
|
|
|
Categories=Qt;Development;Debugger;
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# Add a documentation directory:
|
|
|
|
mkdir -p $PKG/usr/doc/$PKGNAM-$PKGVER
|
|
|
|
cp -a \
|
|
|
|
README* LICENSE.* \
|
|
|
|
qtwebengine/{CHROMIUM_VERSION,LICENSE.Chromium} \
|
|
|
|
$PKG/usr/doc/$PKGNAM-$PKGVER
|
|
|
|
find -maxdepth 2 -name LICENSES \
|
|
|
|
| xargs -I{} cp -ia --parents {} $PKG/usr/doc/$PKGNAM-$PKGVER/
|
|
|
|
if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/qt6/doc/html ]; then
|
|
|
|
( cd $PKG/usr/doc/$PKGNAM-$PKGVER
|
|
|
|
ln -sf /usr/lib${LIBDIRSUFFIX}/qt6/doc/html .
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$PKGVER-$ARCH-${BUILD}${TAG}.txz
|