Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkvtoolnix: update to 85.0 #45712

Merged
merged 3 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ Additional install arguments can be specified via `make_install_args`.
- `slashpackage` For packages that use the /package hierarchy and package/compile to build,
such as `daemontools` or any `djb` software.

- `qmake` For packages that use Qt4/Qt5 qmake profiles (`*.pro`), qmake arguments
- `qmake` For packages that use Qt5/Qt6 qmake profiles (`*.pro`), qmake arguments
for the configure phase can be passed in via `configure_args`, make build arguments can
be passed in via `make_build_args` and install arguments via `make_install_args`. The build
target can be overridden via `make_build_target` and the install target
Expand Down Expand Up @@ -1130,7 +1130,9 @@ It also creates the `vtargetrun` function to wrap commands in a call to
needed for cross builds and a qmake-wrapper to make `qmake` use this configuration.
This aims to fix cross-builds for when the build-style is mixed: e.g. when in a
`gnu-configure` style the configure script calls `qmake` or a `Makefile` in
`gnu-makefile` style, respectively.
`gnu-makefile` style, respectively. This is for Qt5 packages.

- `qmake6` is like `qmake` but for Qt6.

- `rust` specifies environment variables required for cross-compiling crates via cargo and
for compiling cargo -sys crates. This helper is added by default for packages that use the
Expand Down
97 changes: 97 additions & 0 deletions common/build-helper/qmake6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# This build-helper sets up qmake’s cross environment
# in cases the build-style is mixed,
# e.g. when in a gnu-configure style the configure
# script calls qmake or a makefile in a gnu-makefile style,
# respectively.

if [ "$CROSS_BUILD" ]; then
mkdir -p "${XBPS_WRAPPERDIR}/target-spec/linux-g++"
cat > "${XBPS_WRAPPERDIR}/target-spec/linux-g++/qmake.conf" <<_EOF
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib

include(/usr/lib/qt6/mkspecs/common/linux.conf)
include(/usr/lib/qt6/mkspecs/common/gcc-base-unix.conf)
include(/usr/lib/qt6/mkspecs/common/g++-unix.conf)

QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt6/mkspecs/qconfig.pri
QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt6/mkspecs/qmodule.pri
QMAKEMODULES = ${XBPS_CROSS_BASE}/usr/lib/qt6/mkspecs/modules
QMAKE_CC = ${CC}
QMAKE_CXX = ${CXX}
QMAKE_LINK = ${CXX}
QMAKE_LINK_C = ${CC}
QMAKE_LINK_SHLIB = ${CXX}

QMAKE_AR = ${XBPS_CROSS_TRIPLET}-gcc-ar cqs
QMAKE_OBJCOPY = ${OBJCOPY}
QMAKE_NM = ${NM} -P
QMAKE_STRIP = ${STRIP}

QMAKE_CFLAGS = ${CFLAGS}
QMAKE_CXXFLAGS = ${CXXFLAGS}
QMAKE_LFLAGS = ${LDFLAGS}
load(qt_config)
_EOF
echo "#include \"${XBPS_CROSS_BASE}/usr/lib/qt6/mkspecs/linux-g++/qplatformdefs.h\"" > "${XBPS_WRAPPERDIR}/target-spec/linux-g++/qplatformdefs.h"

cat > "${XBPS_WRAPPERDIR}/qt.conf" <<_EOF
[Paths]
Sysroot=${XBPS_CROSS_BASE}
Prefix=${XBPS_CROSS_BASE}/usr
ArchData=${XBPS_CROSS_BASE}/usr/lib/qt6
Data=${XBPS_CROSS_BASE}/usr/share/qt6
Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt6
Headers=${XBPS_CROSS_BASE}/usr/include/qt6
Libraries=${XBPS_CROSS_BASE}/usr/lib
LibraryExecutables=/usr/lib/qt6/libexec
Binaries=/usr/lib/qt6/bin
Tests=${XBPS_CROSS_BASE}/usr/tests
Plugins=/usr/lib/qt6/plugins
Imports=${XBPS_CROSS_BASE}/usr/lib/qt6/imports
Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt6/qml
Translations=${XBPS_CROSS_BASE}/usr/share/qt6/translations
Settings=${XBPS_CROSS_BASE}/etc/xdg
Examples=${XBPS_CROSS_BASE}/usr/lib/qt6/examples
HostPrefix=/usr
HostData=/usr/lib/qt6
HostBinaries=/usr/lib/qt6/bin
HostLibraries=/usr/lib
HostLibraryExecutables=/usr/lib/qt6/libexec
Spec=linux-g++
TargetSpec=$XBPS_WRAPPERDIR/target-spec/linux-g++
_EOF

# create the qmake-wrapper here because it only
# makes sense together with the qmake build-helper
# and not to interfere with e.g. the qmake build-style
#
# + base flags will be picked up from QMAKE_{C,CXX,LD}FLAGS
# + hardening flags will be picked up from environment variables
cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF
#!/bin/sh
exec /usr/lib/qt6/bin/qmake "\$@" -qtconf "${XBPS_WRAPPERDIR}/qt.conf" \\
QMAKE_CFLAGS+="\${CFLAGS}" \\
QMAKE_CXXFLAGS+="\${CXXFLAGS}" \\
QMAKE_LFLAGS+="\${LDFLAGS}"
_EOF
else
cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF
#!/bin/sh
exec /usr/lib/qt6/bin/qmake \
"\$@" \
PREFIX=/usr \
QT_INSTALL_PREFIX=/usr \
LIB=/usr/lib \
QMAKE_CC="$CC" QMAKE_CXX="$CXX" \
QMAKE_LINK="$CXX" QMAKE_LINK_C="$CC" \
QMAKE_CFLAGS+="\${CFLAGS}" \
QMAKE_CXXFLAGS+="\${CXXFLAGS}" \
QMAKE_LFLAGS+="\${LDFLAGS}" \
CONFIG+=no_qt_rpath
_EOF
fi
chmod 755 ${XBPS_WRAPPERDIR}/qmake
cp -p ${XBPS_WRAPPERDIR}/qmake{,-qt6}
cp -p ${XBPS_WRAPPERDIR}/qmake{,6}
22 changes: 12 additions & 10 deletions srcpkgs/mkvtoolnix/template
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Template file for 'mkvtoolnix'
pkgname=mkvtoolnix
version=78.0
revision=3
version=85.0
revision=1
build_style=gnu-configure
build_helper=qmake
configure_args="--with-docbook-xsl-root=/usr/share/xsl/docbook --enable-qt
--disable-update-check"
hostmakedepends="autoconf docbook-xsl gettext libxslt pkg-config qt5-tools-devel ruby"
build_helper="qmake6"
configure_args="--with-docbook-xsl-root=/usr/share/xsl/docbook --disable-update-check"
hostmakedepends="autoconf docbook-xsl gettext libxslt pkg-config po4a qt6-base qt6-tools ruby"
makedepends="boost-devel cmark-devel file-devel fmt-devel gmp-devel json-c++
libdvdread-devel libflac-devel libmatroska-devel libvorbis-devel pcre2-devel
pugixml-devel qt5-multimedia-devel qt5-svg-devel qt5-tools-devel"
pugixml-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-tools-devel"
checkdepends="gtest-devel"
short_desc="Create, alter and inspect Matroska videos"
maintainer="Matthias von Faber <[email protected]>"
license="GPL-2.0-only"
homepage="https://mkvtoolnix.download"
changelog="https://mkvtoolnix.download/doc/NEWS.md"
distfiles="https://mkvtoolnix.download/sources/mkvtoolnix-${version}.tar.xz"
checksum=6a50fce8c66c55410e0df2a6952f0bab7a3c92914db7feb285b9f1bb03fcd0d3
checksum=702442c80706c7c770ac04f7b4eed7a57e9e03ead6c5e6e90b9655dd84c8d829

if [ "$CROSS_BUILD" ]; then
configure_args+=" --with-boost=${XBPS_CROSS_BASE}/usr"
Expand All @@ -43,16 +42,19 @@ do_install() {

mkvtoolnix-gui_package() {
short_desc+=" - Qt GUI"
depends="${sourcepkg}-${version}_${revision}"
depends="${sourcepkg}-${version}_${revision} qt6-svg"
pkg_install() {
vmove usr/bin/mkvtoolnix-gui
vmove usr/share/applications
for file in "${DESTDIR}"/usr/share/icons/hicolor/*/apps/mkvtoolnix-gui.png; do
vmove "${file/${DESTDIR}\//}"
done
for file in "${DESTDIR}"/usr/share/man/*/man1/mkvtoolnix-gui.1; do
vmove "${file/${DESTDIR}\//}"
done
vmove usr/share/man/man1/mkvtoolnix-gui.1
vmove usr/share/metainfo
vmove usr/share/mime/packages
vmove usr/share/mkvtoolnix/sounds
vmove usr/share/mkvtoolnix
}
}