2022-03-07 10:50:48 +01:00
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
# set the web view provider: either webkit, webengine, auto or none
_webview_provider = ${ TAGEDITOR_WEBVIEW_PROVIDER :- none }
# set the JavaScript provider: either script, qml, auto or none
2022-05-02 21:10:21 +02:00
_js_provider = ${ TAGEDITOR_JS_PROVIDER :- qml }
2022-03-07 10:50:48 +01:00
# whether the Qt GUI is enabled: ON or OFF
2022-05-02 21:10:21 +02:00
_qt_gui = ${ TAGEDITOR_QT_GUI :- ON }
2022-03-07 10:50:48 +01:00
# whether the experimental JSON export is enabled: ON or OFF
_json_export = ${ TAGEDITOR_JSON_EXPORT :- OFF }
_reponame = tageditor
pkgname = static-compat-tageditor
2022-05-02 21:10:21 +02:00
_name = ${ pkgname #static-compat- }
2023-08-10 09:20:43 +02:00
pkgver = 3.9.0
2022-03-07 10:50:48 +01:00
pkgrel = 1
arch = ( 'i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64' )
pkgdesc = 'A tag editor with Qt GUI and command-line interface supporting MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska'
license = ( 'GPL' )
[ [ $_webview_provider = = none ] ] && [ [ $_js_provider = = none ] ] && [ [ $_qt_gui = = ON ] ] && depends += ( 'static-compat-qt6-base' )
[ [ $_webview_provider = = webkit ] ] && depends += ( 'static-compat-qt6-webkit' )
[ [ $_webview_provider = = webengine ] ] && depends += ( 'static-compat-qt6-webengine' )
[ [ $_js_provider = = script ] ] && depends += ( 'static-compat-qt6-script' )
[ [ $_js_provider = = qml ] ] && depends += ( 'qt6-declarative' )
makedepends = ( 'static-compat-cmake' 'static-compat-tagparser' 'ninja' )
[ [ $_json_export = = ON ] ] && makedepends += ( 'reflective-rapidjson' )
2022-05-02 21:10:21 +02:00
[ [ $_qt_gui = = ON ] ] && makedepends += ( 'static-compat-qtutilities' 'static-compat-qt6-svg' 'static-compat-qt6-wayland' 'static-compat-qt6-tools' 'static-compat-qt6-translations' 'breeze-icons' 'numix-icon-theme-git' 'clang' )
2022-03-07 10:50:48 +01:00
checkdepends = ( 'static-compat-cppunit' 'jq' )
url = " https://github.com/Martchus/ ${ _reponame } "
source = ( " ${ _name } - ${ pkgver } .tar.gz::https://github.com/Martchus/ ${ _reponame } /archive/v ${ pkgver } .tar.gz " )
2023-08-10 09:20:43 +02:00
sha256sums = ( 'ebafac24ab7c3833a018b5848b32d9fa2cfa01cafeff1b1ec1a6e30eb7415b1b' )
2022-03-07 10:50:48 +01:00
build( ) {
check_buildoption ccache y && ccache_args = '
-DCMAKE_C_COMPILER_LAUNCHER= ccache
-DCMAKE_CXX_COMPILER_LAUNCHER= ccache'
2022-05-02 21:10:21 +02:00
export CXXFLAGS += ' -static-libgcc -static-libstdc++'
export LDFLAGS += ' -static-libgcc -static-libstdc++'
2022-03-07 10:50:48 +01:00
source static-compat-environment
2022-05-02 21:10:21 +02:00
export PATH = $PWD :$PATH
printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config
chmod +x pkg-config
2022-03-07 10:50:48 +01:00
cd " $srcdir / ${ PROJECT_DIR_NAME :- $_reponame - $pkgver } "
2022-05-02 21:10:21 +02:00
static-compat-cmake -G Ninja \
$ccache_args \
-DCMAKE_SKIP_INSTALL_RPATH= ON \
-DQT_PACKAGE_PREFIX:STRING= 'Qt6' \
2022-03-07 10:50:48 +01:00
-DBUILTIN_TRANSLATIONS:BOOL= ON \
-DBUILTIN_TRANSLATIONS_OF_QT:BOOL= ON \
-DWEBVIEW_PROVIDER= " ${ _webview_provider } " \
-DJS_PROVIDER= " ${ _js_provider } " \
2022-05-02 21:10:21 +02:00
-DBUILTIN_ICON_THEMES:STRING= 'breeze;breeze-dark;Numix' \
-DIMAGE_FORMAT_SUPPORT:STRING= 'Gif;ICO;Jpeg' \
-DSVG_SUPPORT:BOOL= ON \
-DSVG_ICON_SUPPORT:BOOL= ON \
-DBoost_USE_STATIC_RUNTIME:BOOL= ON \
-DGLIB2_USE_PKG_CONFIG:BOOL= ON \
-DWAYLAND_USE_PKG_CONFIG:BOOL= ON \
-DCMAKE_DISABLE_FIND_PACKAGE_harfbuzz= TRUE \
2022-03-07 10:50:48 +01:00
.
ninja
}
check( ) {
source static-compat-environment
cd " $srcdir / ${ PROJECT_DIR_NAME :- $_reponame - $pkgver } "
if [ [ $TEST_FILE_PATH ] ] ; then
ninja check
else
msg2 'Skipping execution of testsuite because the environment variable TEST_FILE_PATH is not set.'
fi
}
package( ) {
source static-compat-environment
cd " $srcdir / ${ PROJECT_DIR_NAME :- $_reponame - $pkgver } "
DESTDIR = " ${ pkgdir } " ninja install
}