diff --git a/devel/generator/generate.pl b/devel/generator/generate.pl index 6292c9db..205f7293 100755 --- a/devel/generator/generate.pl +++ b/devel/generator/generate.pl @@ -41,6 +41,21 @@ unless (-d $install_directory) { exit(-1); } +# add helper to render qt5 dependencies +$mojolicious->helper(qt5deps => sub { + my $c = shift; + my $prefix = $c->stash('package_name_prefix'); + my $suffix = $c->stash('package_name_suffix'); + return join(' ', map { "'${prefix}qt5-${_}${suffix}'" } @_); +}); +$mojolicious->helper(qt5optdeps => sub { + my $c = shift; + my %d = @_; + my $prefix = $c->stash('package_name_prefix'); + my $suffix = $c->stash('package_name_suffix'); + return join(' ', map { "'${prefix}qt5-${_}${suffix}: $d{$_}'" } sort keys %d); +}); + # find templates; populate "pages" array my @pages; my $template_file_name = 'PKGBUILD.sh.ep'; @@ -93,6 +108,8 @@ for my $top_level_dir (@$top_level_dirs) { } my $package_name_prefix = $variant_prefix_part ? "$variant_prefix_part-" : ""; my $package_name_suffix = $variant_suffix_part ? "-$variant_suffix_part" : ""; + my $is_static_variant = $variant_suffix_part =~ qr/static/; + my $has_static_variant = $is_static_variant || -d "$default_package_name/$variant-static"; push(@pages, { install_path => "$default_package_name/$variant/PKGBUILD", @@ -103,13 +120,18 @@ for my $top_level_dir (@$top_level_dirs) { variant_prefix_part => $variant_prefix_part, variant_suffix_part => $variant_suffix_part, default_package_name => $default_package_name, + package_name_prefix => $package_name_prefix, + package_name_suffix => $package_name_suffix, package_name => "$package_name_prefix$default_package_name$package_name_suffix", files => $files, patch_files => $patch_files, qt_module => $qt_module, qt_module_sha256 => $qt_module_sha256, - shared_config => 1, - static_config => 1, + static_variant => $is_static_variant, + static_deps => undef, + static_makedeps => undef, + shared_config => !$is_static_variant, + static_config => $is_static_variant || !$has_static_variant, no_libraries => 0, }, ] diff --git a/devel/generator/templates/fragments/mingw-w64-qt5-executable_suffix.sh.ep b/devel/generator/templates/fragments/mingw-w64-qt5-executable_suffix.sh.ep index 7e5b4445..58c2dcb9 100644 --- a/devel/generator/templates/fragments/mingw-w64-qt5-executable_suffix.sh.ep +++ b/devel/generator/templates/fragments/mingw-w64-qt5-executable_suffix.sh.ep @@ -1,3 +1,4 @@ +% return undef if $static_variant; # make sure the executables don't conflict with their mingw-qt4 counterpart for _arch in ${_architectures}; do for exe_file in "${pkgdir}/usr/${_arch}/bin/"*.exe; do diff --git a/devel/generator/templates/fragments/mingw-w64-qt5-non_any_archs.sh.ep b/devel/generator/templates/fragments/mingw-w64-qt5-non_any_archs.sh.ep new file mode 100644 index 00000000..a02727b8 --- /dev/null +++ b/devel/generator/templates/fragments/mingw-w64-qt5-non_any_archs.sh.ep @@ -0,0 +1 @@ +<%== $static_variant ? "'any'" : "'i686' 'x86_64'" %>\ diff --git a/devel/generator/templates/layouts/mingw-w64-qt5-base.sh.ep b/devel/generator/templates/layouts/mingw-w64-qt5-base.sh.ep index da0e0261..39098a9a 100644 --- a/devel/generator/templates/layouts/mingw-w64-qt5-base.sh.ep +++ b/devel/generator/templates/layouts/mingw-w64-qt5-base.sh.ep @@ -1,4 +1,3 @@ -% my $is_static = $variant_suffix_part =~ qr/static/; % my $is_angle = $variant_suffix_part =~ qr/angle/; % my $is_dynamic = $variant_suffix_part =~ qr/dynamic/; % my $is_no_opengl = $variant_suffix_part =~ qr/noopengl/; @@ -21,6 +20,10 @@ % } # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. % if ($patch_files->size) { # All patches are managed at https://github.com/Martchus/qt<%== $qt_module %> @@ -31,17 +34,13 @@ pkgname=<%= $package_name %> pkgver=5.15.0 pkgrel=1 pkgdesc='A cross-platform application and UI framework, <%= $opengl_backend %> OpenGL backend (mingw-w64)' -% if ($is_static) { -arch=('any') -% } else { -arch=('i686' 'x86_64') -% } +arch=(<%== include 'fragments/mingw-w64-qt5-non_any_archs' %>) url='https://www.qt.io/' license=('GPL3' 'LGPL3' 'FDL' 'custom') depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite' 'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz' 'mingw-w64-pcre2') -% if ($is_static) { +% if ($static_variant) { depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers % } optdepends=('mingw-w64-mesa: use LLVMpipe software rasterizer for Qt Quick' @@ -54,7 +53,7 @@ makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector % } groups=('mingw-w64-qt5') % unless ($is_default) { -% if ($is_static) { +% if ($static_variant) { provides+=('mingw-w64-qt5-base-static') conflicts+=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-base-angle-static' 'mingw-w64-qt5-base-noopengl-static' 'mingw-w64-qt5-base-dynamic-static' 'mingw-w64-qt5-base-openql-static') @@ -196,7 +195,7 @@ build() { msg2 'Configure and build qmake' mkdir -p ../build-${_arch} && pushd ../build-${_arch} -% if ($is_static) { +% if ($static_variant) { qt_configure_args+=' -static' # configure static version to use linked OpenSSL @@ -235,7 +234,7 @@ package() { find -iname '*.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + popd -% if ($is_static) { +% if ($static_variant) { # The static release contains only the static libs itself but relies on the # shared release for the bootstrap library and tools (qmake, uic, ...). @@ -341,7 +340,7 @@ Plugins = /usr/${_arch}/lib/qt/plugins" > "${pkgdir}/usr/${_arch}/bin/qt.conf" find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:${PWD%/*}/build-${_arch}/lib:/usr/${_arch}/lib:g" {} \; # strip binaries, remove unuseful files -% if ($is_static) { +% if ($static_variant) { find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete % } else { strip --strip-all "${pkgdir}/usr/${_arch}/lib/qt/bin/"*[!.pl] diff --git a/devel/generator/templates/layouts/mingw-w64-qt5-module.sh.ep b/devel/generator/templates/layouts/mingw-w64-qt5-module.sh.ep index 739b458d..1d7506ca 100644 --- a/devel/generator/templates/layouts/mingw-w64-qt5-module.sh.ep +++ b/devel/generator/templates/layouts/mingw-w64-qt5-module.sh.ep @@ -4,7 +4,7 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. % if ($patch_files->size) { @@ -19,7 +19,7 @@ <%== content_for 'comment_header' %>\ _qt_module=qt<%== $qt_module %> -pkgname=mingw-w64-qt5-<%== $qt_module %> +pkgname=mingw-w64-qt5-<%== $qt_module %><%== $static_variant ? '-static' : '' %> <%== content %>\ options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') @@ -33,14 +33,23 @@ sha256sums=('<%== $qt_module_sha256 %>'\ _architectures='i686-w64-mingw32 x86_64-w64-mingw32' % if ($static_config) { +% if ($static_variant) { +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +% } +% else { [[ $NO_STATIC_LIBS ]] || \\ makedepends+=('mingw-w64-qt5-base-static') \\ optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \\ - _configurations+=('CONFIG+=no_smart_library_merge <%== content_for 'static_config' %>CONFIG+=static') + \ +% } +_configurations+=('CONFIG+=no_smart_library_merge <%== content_for 'static_config' %>CONFIG+=static') % } % if ($shared_config) { +% if ($shared_config && $static_config) { [[ $NO_SHARED_LIBS ]] || \\ - _configurations+=('CONFIG+=actually_a_shared_build <%== content_for 'shared_config' %>CONFIG+=shared') + \ +% } +_configurations+=('CONFIG+=actually_a_shared_build <%== content_for 'shared_config' %>CONFIG+=shared') % } <%== content_for 'helper_functions' %>\ @@ -112,10 +121,23 @@ package() { # remove '.static.prl' files find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete +% if ($static_variant) { + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + +% } find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete +% unless ($static_variant) { [ "$NO_STATIC_EXECUTABLES" -a "${_config##*=}" = static -o "$NO_EXECUTABLES" ] && \\ find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete || \\ find "${pkgdir}/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip --strip-all {} \; +% } find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \\ diff --git a/qt5-3d/mingw-w64-static/PKGBUILD b/qt5-3d/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..088c45db --- /dev/null +++ b/qt5-3d/mingw-w64-static/PKGBUILD @@ -0,0 +1,115 @@ +# Maintainer: Martchus +# Contributor: ant32 + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qt3d +pkgname=mingw-w64-qt5-3d-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="C++ and QML APIs for easy inclusion of 3D graphics (mingw-w64)" +depends=('mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-vulkan-headers') +license=('GPL3' 'LGPL3' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('61856f0c453b79e98b7a1e65ea8f59976fa78230ffa8dec959b5f4b45383dffd') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + # ensure qgltf is linked against zlib + echo 'LIBS += -L/usr/lib -lz' >> tools/qgltf/qgltf.pro +} + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + + # Search paths for host standard library (/usr/lib) and for Qt5Bootstrap (/usr/$_arch/lib) are not set correctly by qmake + # hence we need insert those paths manually + make qmake_all + find ./tools -type f -iname 'Makefile' -exec sed -i "s|-lQt5Bootstrap|-L/usr/$_arch/lib -lQt5Bootstrap|g" {} \; + + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-3d/mingw-w64-static/PKGBUILD.sh.ep b/qt5-3d/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-3d/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-3d/mingw-w64-static/qt3d-sha256.txt b/qt5-3d/mingw-w64-static/qt3d-sha256.txt new file mode 100644 index 00000000..91175483 --- /dev/null +++ b/qt5-3d/mingw-w64-static/qt3d-sha256.txt @@ -0,0 +1 @@ +61856f0c453b79e98b7a1e65ea8f59976fa78230ffa8dec959b5f4b45383dffd diff --git a/qt5-3d/mingw-w64/PKGBUILD b/qt5-3d/mingw-w64/PKGBUILD index 9ad53fcf..b29e43fb 100644 --- a/qt5-3d/mingw-w64/PKGBUILD +++ b/qt5-3d/mingw-w64/PKGBUILD @@ -4,13 +4,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qt3d pkgname=mingw-w64-qt5-3d pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('61856f0c453b79e98b7a1e65ea8f59976fa78230ffa8dec959b5f4b45383dffd') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') prepare() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-3d/mingw-w64/PKGBUILD.sh.ep b/qt5-3d/mingw-w64/PKGBUILD.sh.ep index d69d261c..d0af5d40 100644 --- a/qt5-3d/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-3d/mingw-w64/PKGBUILD.sh.ep @@ -6,9 +6,9 @@ \ pkgver=5.15.0 pkgrel=1 -arch=('i686' 'x86_64') +arch=(<%== include 'fragments/mingw-w64-qt5-non_any_archs' %>) pkgdesc="C++ and QML APIs for easy inclusion of 3D graphics (mingw-w64)" -depends=('mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-vulkan-headers') license=('GPL3' 'LGPL3' 'FDL' 'custom') \ diff --git a/qt5-activeqt/mingw-w64/PKGBUILD b/qt5-activeqt/mingw-w64/PKGBUILD index 1f06c4a3..da5e4cc3 100644 --- a/qt5-activeqt/mingw-w64/PKGBUILD +++ b/qt5-activeqt/mingw-w64/PKGBUILD @@ -4,7 +4,7 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. diff --git a/qt5-activeqt/mingw-w64/PKGBUILD.sh.ep b/qt5-activeqt/mingw-w64/PKGBUILD.sh.ep index 7950612e..d3ac6d0f 100644 --- a/qt5-activeqt/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-activeqt/mingw-w64/PKGBUILD.sh.ep @@ -14,7 +14,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="ActiveX integration framework (mingw-w64)" -depends=('mingw-w64-qt5-base') +depends=(<%== qt5deps qw(base) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'python') license=('GPL3' 'LGPL3' 'LGPL2.1' 'FDL' 'custom') \ diff --git a/qt5-base/mingw-w64-angle/PKGBUILD b/qt5-base/mingw-w64-angle/PKGBUILD index 45bc19d9..856a17a3 100644 --- a/qt5-base/mingw-w64-angle/PKGBUILD +++ b/qt5-base/mingw-w64-angle/PKGBUILD @@ -11,6 +11,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + # All patches are managed at https://github.com/Martchus/qtbase _qt_module=qtbase diff --git a/qt5-base/mingw-w64-dynamic/PKGBUILD b/qt5-base/mingw-w64-dynamic/PKGBUILD index 895eba7b..e68da77d 100644 --- a/qt5-base/mingw-w64-dynamic/PKGBUILD +++ b/qt5-base/mingw-w64-dynamic/PKGBUILD @@ -11,6 +11,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + # All patches are managed at https://github.com/Martchus/qtbase _qt_module=qtbase diff --git a/qt5-base/mingw-w64-static/PKGBUILD b/qt5-base/mingw-w64-static/PKGBUILD index bb3a6971..72d78fb7 100644 --- a/qt5-base/mingw-w64-static/PKGBUILD +++ b/qt5-base/mingw-w64-static/PKGBUILD @@ -9,6 +9,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + # All patches are managed at https://github.com/Martchus/qtbase _qt_module=qtbase diff --git a/qt5-base/mingw-w64/PKGBUILD b/qt5-base/mingw-w64/PKGBUILD index c66181ff..3b079a94 100644 --- a/qt5-base/mingw-w64/PKGBUILD +++ b/qt5-base/mingw-w64/PKGBUILD @@ -9,6 +9,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + # All patches are managed at https://github.com/Martchus/qtbase _qt_module=qtbase diff --git a/qt5-canvas3d/mingw-w64-static/PKGBUILD b/qt5-canvas3d/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..fb8bbc06 --- /dev/null +++ b/qt5-canvas3d/mingw-w64-static/PKGBUILD @@ -0,0 +1,106 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtcanvas3d +pkgname=mingw-w64-qt5-canvas3d-static +pkgver=5.12.3 +pkgrel=1 +arch=('any') +pkgdesc="A JavaScript 3D rendering API for Qt Quick (mingw-w64)" +depends=('mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('c0821f1232c6bcd00648af9a5d1eade8e0397c6bfff60621e0fcdfc75561baea') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # ensure to get the import lib, too + [[ "${_config##*=}" == 'shared' ]] && + install -Dm755 qml/QtCanvas3D/*.dll -t "${pkgdir}/usr/${_arch}/bin" && + install -Dm644 qml/QtCanvas3D/*.dll.a -t "${pkgdir}/usr/${_arch}/lib" + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-canvas3d/mingw-w64-static/PKGBUILD.sh.ep b/qt5-canvas3d/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-canvas3d/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-canvas3d/mingw-w64-static/qtcanvas3d-sha256.txt b/qt5-canvas3d/mingw-w64-static/qtcanvas3d-sha256.txt new file mode 100644 index 00000000..5705190c --- /dev/null +++ b/qt5-canvas3d/mingw-w64-static/qtcanvas3d-sha256.txt @@ -0,0 +1 @@ +c0821f1232c6bcd00648af9a5d1eade8e0397c6bfff60621e0fcdfc75561baea diff --git a/qt5-canvas3d/mingw-w64/PKGBUILD b/qt5-canvas3d/mingw-w64/PKGBUILD index e05c4407..be6af017 100644 --- a/qt5-canvas3d/mingw-w64/PKGBUILD +++ b/qt5-canvas3d/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtcanvas3d pkgname=mingw-w64-qt5-canvas3d pkgver=5.12.3 @@ -28,12 +25,7 @@ sha256sums=('c0821f1232c6bcd00648af9a5d1eade8e0397c6bfff60621e0fcdfc75561baea') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-canvas3d/mingw-w64/PKGBUILD.sh.ep b/qt5-canvas3d/mingw-w64/PKGBUILD.sh.ep index eb3014ae..81781636 100644 --- a/qt5-canvas3d/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-canvas3d/mingw-w64/PKGBUILD.sh.ep @@ -4,7 +4,7 @@ pkgver=5.12.3 pkgrel=1 arch=('any') pkgdesc="A JavaScript 3D rendering API for Qt Quick (mingw-w64)" -depends=('mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') \ diff --git a/qt5-charts/mingw-w64-static/PKGBUILD b/qt5-charts/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..ea61e436 --- /dev/null +++ b/qt5-charts/mingw-w64-static/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtcharts +pkgname=mingw-w64-qt5-charts-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Provides a set of easy to use chart components (mingw-w64)" +depends=('mingw-w64-qt5-base-static' 'mingw-w64-pkg-config') +optdepends=('mingw-w64-qt5-declarative-static: QML bindings') +makedepends=('mingw-w64-gcc' 'mingw-w64-qt5-declarative-static') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('44a24fc16abcaf9ae97ecf3215f6f3b44ebdb3b73bcb4ed3549a51519e4883a7') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-charts/mingw-w64-static/PKGBUILD.sh.ep b/qt5-charts/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-charts/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-charts/mingw-w64-static/qtcharts-sha256.txt b/qt5-charts/mingw-w64-static/qtcharts-sha256.txt new file mode 100644 index 00000000..57f7c633 --- /dev/null +++ b/qt5-charts/mingw-w64-static/qtcharts-sha256.txt @@ -0,0 +1 @@ +44a24fc16abcaf9ae97ecf3215f6f3b44ebdb3b73bcb4ed3549a51519e4883a7 diff --git a/qt5-charts/mingw-w64/PKGBUILD b/qt5-charts/mingw-w64/PKGBUILD index 1cf8da4a..6f7d99ed 100644 --- a/qt5-charts/mingw-w64/PKGBUILD +++ b/qt5-charts/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtcharts pkgname=mingw-w64-qt5-charts pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('44a24fc16abcaf9ae97ecf3215f6f3b44ebdb3b73bcb4ed3549a51519e4883a7') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-charts/mingw-w64/PKGBUILD.sh.ep b/qt5-charts/mingw-w64/PKGBUILD.sh.ep index bd23b4e4..49aa6af8 100644 --- a/qt5-charts/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-charts/mingw-w64/PKGBUILD.sh.ep @@ -4,7 +4,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Provides a set of easy to use chart components (mingw-w64)" -depends=('mingw-w64-qt5-base' 'mingw-w64-pkg-config') -optdepends=('mingw-w64-qt5-declarative: QML bindings') -makedepends=('mingw-w64-gcc' 'mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(base) %> 'mingw-w64-pkg-config') +optdepends=(<%== qt5optdeps declarative => 'QML bindings' %>) +makedepends=('mingw-w64-gcc' <%== qt5deps qw(declarative) %>) license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-connectivity/mingw-w64-static/PKGBUILD b/qt5-connectivity/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..e1a7c4e1 --- /dev/null +++ b/qt5-connectivity/mingw-w64-static/PKGBUILD @@ -0,0 +1,101 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtconnectivity +pkgname=mingw-w64-qt5-connectivity-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Provides access to Bluetooth hardware (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-qt5-declarative-static') +license=('GPL3' 'LGPL3' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('f911fb8f8bf3a9958785d0378d25ced8989047938b7138d619854a94fa0b27dd') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-connectivity/mingw-w64-static/PKGBUILD.sh.ep b/qt5-connectivity/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-connectivity/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-connectivity/mingw-w64-static/qtconnectivity-sha256.txt b/qt5-connectivity/mingw-w64-static/qtconnectivity-sha256.txt new file mode 100644 index 00000000..8e861a12 --- /dev/null +++ b/qt5-connectivity/mingw-w64-static/qtconnectivity-sha256.txt @@ -0,0 +1 @@ +f911fb8f8bf3a9958785d0378d25ced8989047938b7138d619854a94fa0b27dd diff --git a/qt5-connectivity/mingw-w64/PKGBUILD b/qt5-connectivity/mingw-w64/PKGBUILD index 7913c87f..3ee17df0 100644 --- a/qt5-connectivity/mingw-w64/PKGBUILD +++ b/qt5-connectivity/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtconnectivity pkgname=mingw-w64-qt5-connectivity pkgver=5.15.0 @@ -28,12 +25,7 @@ sha256sums=('f911fb8f8bf3a9958785d0378d25ced8989047938b7138d619854a94fa0b27dd') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-connectivity/mingw-w64/PKGBUILD.sh.ep b/qt5-connectivity/mingw-w64/PKGBUILD.sh.ep index 332c21ad..8aafd8bc 100644 --- a/qt5-connectivity/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-connectivity/mingw-w64/PKGBUILD.sh.ep @@ -4,6 +4,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Provides access to Bluetooth hardware (mingw-w64)" -depends=('mingw-w64-qt5-base') -makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(base) %>) +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' <%== qt5deps qw(declarative) %>) license=('GPL3' 'LGPL3' 'FDL' 'custom') diff --git a/qt5-datavis3d/mingw-w64-static/PKGBUILD b/qt5-datavis3d/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..eb3a3ff1 --- /dev/null +++ b/qt5-datavis3d/mingw-w64-static/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtdatavis3d +pkgname=mingw-w64-qt5-datavis3d-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Qt Data Visualization module (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +optdepends=('mingw-w64-qt5-declarative-static: QML bindings') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-qt5-declarative-static') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('8f07747f371f7c515c667240a795105c89aa83c08d88ee92fa1ef7efccea10a3') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-datavis3d/mingw-w64-static/PKGBUILD.sh.ep b/qt5-datavis3d/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-datavis3d/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-datavis3d/mingw-w64-static/qtdatavis3d-sha256.txt b/qt5-datavis3d/mingw-w64-static/qtdatavis3d-sha256.txt new file mode 100644 index 00000000..b3428a6c --- /dev/null +++ b/qt5-datavis3d/mingw-w64-static/qtdatavis3d-sha256.txt @@ -0,0 +1 @@ +8f07747f371f7c515c667240a795105c89aa83c08d88ee92fa1ef7efccea10a3 diff --git a/qt5-datavis3d/mingw-w64/PKGBUILD b/qt5-datavis3d/mingw-w64/PKGBUILD index d22c127f..e6b9a98f 100644 --- a/qt5-datavis3d/mingw-w64/PKGBUILD +++ b/qt5-datavis3d/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtdatavis3d pkgname=mingw-w64-qt5-datavis3d pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('8f07747f371f7c515c667240a795105c89aa83c08d88ee92fa1ef7efccea10a3') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-datavis3d/mingw-w64/PKGBUILD.sh.ep b/qt5-datavis3d/mingw-w64/PKGBUILD.sh.ep index 4c8755a9..66508ddd 100644 --- a/qt5-datavis3d/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-datavis3d/mingw-w64/PKGBUILD.sh.ep @@ -4,7 +4,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Qt Data Visualization module (mingw-w64)" -depends=('mingw-w64-qt5-base') -optdepends=('mingw-w64-qt5-declarative: QML bindings') -makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(base) %>) +optdepends=(<%== qt5optdeps declarative => 'QML bindings' %>) +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' <%== qt5deps qw(declarative) %>) license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch b/qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch new file mode 100644 index 00000000..364d4df0 --- /dev/null +++ b/qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch @@ -0,0 +1,23 @@ +From 0ac71a10df126230e54db3b65b605678d00bb1ac Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Sun, 23 Oct 2016 01:18:13 +0200 +Subject: [PATCH 1/2] Ensure static plugins are exported + +--- + src/qml/Qt5QmlConfigExtras.cmake.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/qml/Qt5QmlConfigExtras.cmake.in b/src/qml/Qt5QmlConfigExtras.cmake.in +index 4242143bca..bccb7b3146 100644 +--- a/src/qml/Qt5QmlConfigExtras.cmake.in ++++ b/src/qml/Qt5QmlConfigExtras.cmake.in +@@ -1,5 +1,5 @@ + if(QT5_STRICT_PLUGIN_GLOB OR Qt5Qml_STRICT_PLUGIN_GLOB) +- file(GLOB _qt5qml_other_plugins "${CMAKE_CURRENT_LIST_DIR}/Qt5Qml_*Factory.cmake") ++ file(GLOB _qt5qml_other_plugins "${CMAKE_CURRENT_LIST_DIR}/*Qt5Qml_*Factory.cmake") + + foreach(_other_plugin ${_qt5qml_other_plugins}) + include(${_other_plugin} OPTIONAL) +-- +2.26.2 + diff --git a/qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch b/qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch new file mode 100644 index 00000000..ca23bd52 --- /dev/null +++ b/qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch @@ -0,0 +1,37 @@ +From 1aca21342b43a16c9c1cc6af0514e9dc2b28917a Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Sat, 4 Feb 2017 01:59:59 +0100 +Subject: [PATCH 2/2] Prevent exporting QML parser symbols on static build + +--- + src/qml/parser/qqmljsglobal_p.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/qml/parser/qqmljsglobal_p.h b/src/qml/parser/qqmljsglobal_p.h +index bf8155c6ec..2bfa230bcc 100644 +--- a/src/qml/parser/qqmljsglobal_p.h ++++ b/src/qml/parser/qqmljsglobal_p.h +@@ -54,9 +54,9 @@ + + #ifdef QT_CREATOR + +-# ifdef QDECLARATIVEJS_BUILD_DIR ++# if defined(QDECLARATIVEJS_BUILD_DIR) && !defined(QT_STATIC) + # define QML_PARSER_EXPORT Q_DECL_EXPORT +-# elif QML_BUILD_STATIC_LIB ++# elif defined(QML_BUILD_STATIC_LIB) || defined(QT_STATIC) + # define QML_PARSER_EXPORT + # else + # define QML_PARSER_EXPORT Q_DECL_IMPORT +@@ -64,7 +64,7 @@ + + #else // !QT_CREATOR + # ifndef QT_STATIC +-# if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) ++# if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) || defined(QT_STATIC) + // QmlDevTools is a static library + # define QML_PARSER_EXPORT + # elif defined(QT_BUILD_QML_LIB) +-- +2.26.2 + diff --git a/qt5-declarative/mingw-w64-static/PKGBUILD b/qt5-declarative/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..326dfd7f --- /dev/null +++ b/qt5-declarative/mingw-w64-static/PKGBUILD @@ -0,0 +1,123 @@ +# Maintainer: Martchus +# Contributor: ant32 +# Contributor: Filip Brcic +# Contributor: ohmyarch + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +# All patches are managed at https://github.com/Martchus/qtdeclarative + +_qt_module=qtdeclarative +pkgname=mingw-w64-qt5-declarative-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc='Classes for QML and JavaScript languages (mingw-w64)' +depends=('mingw-w64-qt5-base-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'python') +license=('GPL3' 'LGPL3' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" + '0001-Ensure-static-plugins-are-exported.patch' + '0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch') +sha256sums=('9c3c93fb7d340b2f7d738d12408c047318c78973cb45bfc5ff6b3a57e1fef699' + '4af477df8c06dfd9fd5a8a34ec5b79e175e87187a040d7081bd5eaa809c7d81d' + 'f3463ab91e8b6b12b4dd210ae012203ef83f90a2ce59a2f324daf0a98ed3f0b5') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + patch -p1 -i "$patch" + done +} + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # strip native static libraries + find "${pkgdir}/usr/${_arch}" -name 'libQt5QmlDevTools.a' -exec strip -g {} \; + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done + +} + diff --git a/qt5-declarative/mingw-w64-static/PKGBUILD.sh.ep b/qt5-declarative/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-declarative/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-declarative/mingw-w64-static/qtdeclarative-sha256.txt b/qt5-declarative/mingw-w64-static/qtdeclarative-sha256.txt new file mode 100644 index 00000000..07703522 --- /dev/null +++ b/qt5-declarative/mingw-w64-static/qtdeclarative-sha256.txt @@ -0,0 +1 @@ +9c3c93fb7d340b2f7d738d12408c047318c78973cb45bfc5ff6b3a57e1fef699 diff --git a/qt5-declarative/mingw-w64/PKGBUILD b/qt5-declarative/mingw-w64/PKGBUILD index fd835d67..72f20b92 100755 --- a/qt5-declarative/mingw-w64/PKGBUILD +++ b/qt5-declarative/mingw-w64/PKGBUILD @@ -6,15 +6,12 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. # All patches are managed at https://github.com/Martchus/qtdeclarative -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtdeclarative pkgname=mingw-w64-qt5-declarative pkgver=5.15.0 @@ -37,12 +34,7 @@ sha256sums=('9c3c93fb7d340b2f7d738d12408c047318c78973cb45bfc5ff6b3a57e1fef699' _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') prepare() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-declarative/mingw-w64/PKGBUILD.sh.ep b/qt5-declarative/mingw-w64/PKGBUILD.sh.ep index 23c45dfd..c12506a3 100644 --- a/qt5-declarative/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-declarative/mingw-w64/PKGBUILD.sh.ep @@ -8,9 +8,9 @@ \ pkgver=5.15.0 pkgrel=1 -arch=('i686' 'x86_64') +arch=(<%== include 'fragments/mingw-w64-qt5-non_any_archs' %>) pkgdesc='Classes for QML and JavaScript languages (mingw-w64)' -depends=('mingw-w64-qt5-base') +depends=(<%== qt5deps qw(base) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'python') license=('GPL3' 'LGPL3' 'FDL' 'custom') \ diff --git a/qt5-gamepad/mingw-w64-static/PKGBUILD b/qt5-gamepad/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..0fab87c5 --- /dev/null +++ b/qt5-gamepad/mingw-w64-static/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtgamepad +pkgname=mingw-w64-qt5-gamepad-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Adds support for getting events from gamepad devices (mingw-w64)" +depends=('mingw-w64-qt5-base-static' 'mingw-w64-sdl2') +optdepends=('mingw-w64-qt5-declarative-static: QML bindings') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-qt5-declarative-static') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('dda54d9f90897944bed5e6af48a904a677fd97eb6f57ab08a2b232c431caf31a') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-gamepad/mingw-w64-static/PKGBUILD.sh.ep b/qt5-gamepad/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-gamepad/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-gamepad/mingw-w64-static/qtgamepad-sha256.txt b/qt5-gamepad/mingw-w64-static/qtgamepad-sha256.txt new file mode 100644 index 00000000..3289b699 --- /dev/null +++ b/qt5-gamepad/mingw-w64-static/qtgamepad-sha256.txt @@ -0,0 +1 @@ +dda54d9f90897944bed5e6af48a904a677fd97eb6f57ab08a2b232c431caf31a diff --git a/qt5-gamepad/mingw-w64/PKGBUILD b/qt5-gamepad/mingw-w64/PKGBUILD index 6c42b7c1..f6784123 100644 --- a/qt5-gamepad/mingw-w64/PKGBUILD +++ b/qt5-gamepad/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtgamepad pkgname=mingw-w64-qt5-gamepad pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('dda54d9f90897944bed5e6af48a904a677fd97eb6f57ab08a2b232c431caf31a') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-gamepad/mingw-w64/PKGBUILD.sh.ep b/qt5-gamepad/mingw-w64/PKGBUILD.sh.ep index f4f88108..4d5777f5 100644 --- a/qt5-gamepad/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-gamepad/mingw-w64/PKGBUILD.sh.ep @@ -4,7 +4,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Adds support for getting events from gamepad devices (mingw-w64)" -depends=('mingw-w64-qt5-base' 'mingw-w64-sdl2') -optdepends=('mingw-w64-qt5-declarative: QML bindings') -makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(base) %> 'mingw-w64-sdl2') +optdepends=(<%== qt5optdeps declarative => 'QML bindings' %>) +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' <%== qt5deps qw(declarative) %>) license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-graphicaleffects/mingw-w64-static/PKGBUILD b/qt5-graphicaleffects/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..000cada7 --- /dev/null +++ b/qt5-graphicaleffects/mingw-w64-static/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer: Martchus +# Contributor: ant32 +# Contributor: Filip Brcic + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtgraphicaleffects +pkgname=mingw-w64-qt5-graphicaleffects-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Graphical effects for use with Qt Quick 2 (mingw-w64)" +depends=('mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('0d2ea4bc73b9df13a4b739dcbc1e3c7b298c7e682f7f9252b232e3bde7b63eda') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-graphicaleffects/mingw-w64-static/PKGBUILD.sh.ep b/qt5-graphicaleffects/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-graphicaleffects/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-graphicaleffects/mingw-w64-static/qtgraphicaleffects-sha256.txt b/qt5-graphicaleffects/mingw-w64-static/qtgraphicaleffects-sha256.txt new file mode 100644 index 00000000..993fb1c5 --- /dev/null +++ b/qt5-graphicaleffects/mingw-w64-static/qtgraphicaleffects-sha256.txt @@ -0,0 +1 @@ +0d2ea4bc73b9df13a4b739dcbc1e3c7b298c7e682f7f9252b232e3bde7b63eda diff --git a/qt5-graphicaleffects/mingw-w64/PKGBUILD b/qt5-graphicaleffects/mingw-w64/PKGBUILD index 540a6796..464acc6b 100644 --- a/qt5-graphicaleffects/mingw-w64/PKGBUILD +++ b/qt5-graphicaleffects/mingw-w64/PKGBUILD @@ -5,13 +5,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtgraphicaleffects pkgname=mingw-w64-qt5-graphicaleffects pkgver=5.15.0 @@ -30,12 +27,7 @@ sha256sums=('0d2ea4bc73b9df13a4b739dcbc1e3c7b298c7e682f7f9252b232e3bde7b63eda') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-graphicaleffects/mingw-w64/PKGBUILD.sh.ep b/qt5-graphicaleffects/mingw-w64/PKGBUILD.sh.ep index 43e83400..5748ccba 100644 --- a/qt5-graphicaleffects/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-graphicaleffects/mingw-w64/PKGBUILD.sh.ep @@ -9,6 +9,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Graphical effects for use with Qt Quick 2 (mingw-w64)" -depends=('mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-imageformats/mingw-w64-static/PKGBUILD b/qt5-imageformats/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..b8c63ec6 --- /dev/null +++ b/qt5-imageformats/mingw-w64-static/PKGBUILD @@ -0,0 +1,107 @@ +# Maintainer: Martchus +# Contributor: ant32 +# Contributor: Filip Brcic + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtimageformats +pkgname=mingw-w64-qt5-imageformats-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Plugins for additional image formats: TIFF, MNG, TGA, WBMP (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +# these dependencies will enable further functionality +#depends+=('mingw-w64-jasper') # for JPEG-2000 Part-1 +#depends+=('mingw-w64-libmng') # for MNG +#depends+=('mingw-w64-libwebp') # for WebP +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('83f32101b1a898fcb8ed6f11a657d1125484ac0c2223014b61849d9010efebc8') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-imageformats/mingw-w64-static/PKGBUILD.sh.ep b/qt5-imageformats/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-imageformats/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-imageformats/mingw-w64-static/qtimageformats-sha256.txt b/qt5-imageformats/mingw-w64-static/qtimageformats-sha256.txt new file mode 100644 index 00000000..1ddd5f4d --- /dev/null +++ b/qt5-imageformats/mingw-w64-static/qtimageformats-sha256.txt @@ -0,0 +1 @@ +83f32101b1a898fcb8ed6f11a657d1125484ac0c2223014b61849d9010efebc8 diff --git a/qt5-imageformats/mingw-w64/PKGBUILD b/qt5-imageformats/mingw-w64/PKGBUILD index 2d9310c0..fb525222 100644 --- a/qt5-imageformats/mingw-w64/PKGBUILD +++ b/qt5-imageformats/mingw-w64/PKGBUILD @@ -5,13 +5,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtimageformats pkgname=mingw-w64-qt5-imageformats pkgver=5.15.0 @@ -34,12 +31,7 @@ sha256sums=('83f32101b1a898fcb8ed6f11a657d1125484ac0c2223014b61849d9010efebc8') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-imageformats/mingw-w64/PKGBUILD.sh.ep b/qt5-imageformats/mingw-w64/PKGBUILD.sh.ep index 04450bc5..c8ec2e18 100644 --- a/qt5-imageformats/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-imageformats/mingw-w64/PKGBUILD.sh.ep @@ -9,7 +9,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Plugins for additional image formats: TIFF, MNG, TGA, WBMP (mingw-w64)" -depends=('mingw-w64-qt5-base') +depends=(<%== qt5deps qw(base) %>) # these dependencies will enable further functionality #depends+=('mingw-w64-jasper') # for JPEG-2000 Part-1 #depends+=('mingw-w64-libmng') # for MNG diff --git a/qt5-location/mingw-w64-static/0001-Ensure-static-3rdparty-libs-are-linked-correctly.patch b/qt5-location/mingw-w64-static/0001-Ensure-static-3rdparty-libs-are-linked-correctly.patch new file mode 100644 index 00000000..55b0d3f8 --- /dev/null +++ b/qt5-location/mingw-w64-static/0001-Ensure-static-3rdparty-libs-are-linked-correctly.patch @@ -0,0 +1,27 @@ +From 1e8b3cfb7b54ceda75d5bc346abbdf080eda97f5 Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Thu, 22 Dec 2016 22:30:59 +0100 +Subject: [PATCH] Ensure static 3rdparty libs are linked correctly + +Not sure whether this is still required in Qt 5.9.0 +--- + src/imports/location/location.pro | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/imports/location/location.pro b/src/imports/location/location.pro +index 40605806..fa82a012 100644 +--- a/src/imports/location/location.pro ++++ b/src/imports/location/location.pro +@@ -5,6 +5,9 @@ SOURCES += \ + + load(qml_plugin) + ++LIBS_PRIVATE += -L$$MODULE_BASE_OUTDIR/lib -lclip2tri$$qtPlatformTargetSuffix() -lclipper$$qtPlatformTargetSuffix() -lpoly2tri$$qtPlatformTargetSuffix() ++QMAKE_LIBS_PRIVATE += -lclip2tri$$qtPlatformTargetSuffix() -lclipper$$qtPlatformTargetSuffix() -lpoly2tri$$qtPlatformTargetSuffix() ++ + OTHER_FILES += \ + plugin.json \ + qmldir +-- +2.26.2 + diff --git a/qt5-location/mingw-w64-static/PKGBUILD b/qt5-location/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..96c348b1 --- /dev/null +++ b/qt5-location/mingw-w64-static/PKGBUILD @@ -0,0 +1,120 @@ +# Maintainer: Martchus +# Contributor: ant32 + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +# All patches are managed at https://github.com/Martchus/qtlocation + +# Skip building mapbox and mapboxgl; that decreases the compile time significantly and +# likely not a lot of people actually using it; if you need it, just remove the corresponding +# qmake flags: +_additional_qmake_args+='-- -no-feature-geoservices_mapbox -no-feature-geoservices_mapboxgl' + +_qt_module=qtlocation +pkgname=mingw-w64-qt5-location-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc='Provides access to position, satellite and area monitoring classes (mingw-w64)' +depends=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" + '0001-Ensure-static-3rdparty-libs-are-linked-correctly.patch') +sha256sums=('c68b0778a521e5522641c41b1778999dd408ebfda1e0de166a83743268be5f3f' + '986e6bf33dfb3e85fa7b46cdcb954899e4c66345dcb18008c5cf748660c797b3') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + patch -p1 -i "$patch" + done +} + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-location/mingw-w64-static/PKGBUILD.sh.ep b/qt5-location/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-location/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-location/mingw-w64-static/qtlocation-sha256.txt b/qt5-location/mingw-w64-static/qtlocation-sha256.txt new file mode 100644 index 00000000..e25d843c --- /dev/null +++ b/qt5-location/mingw-w64-static/qtlocation-sha256.txt @@ -0,0 +1 @@ +c68b0778a521e5522641c41b1778999dd408ebfda1e0de166a83743268be5f3f diff --git a/qt5-location/mingw-w64/PKGBUILD b/qt5-location/mingw-w64/PKGBUILD index cca561c1..8304d04e 100644 --- a/qt5-location/mingw-w64/PKGBUILD +++ b/qt5-location/mingw-w64/PKGBUILD @@ -4,15 +4,12 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. # All patches are managed at https://github.com/Martchus/qtlocation -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - # Skip building mapbox and mapboxgl; that decreases the compile time significantly and # likely not a lot of people actually using it; if you need it, just remove the corresponding # qmake flags: @@ -38,12 +35,7 @@ sha256sums=('c68b0778a521e5522641c41b1778999dd408ebfda1e0de166a83743268be5f3f' _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') prepare() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-location/mingw-w64/PKGBUILD.sh.ep b/qt5-location/mingw-w64/PKGBUILD.sh.ep index f2c0a0cf..0ef9310c 100644 --- a/qt5-location/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-location/mingw-w64/PKGBUILD.sh.ep @@ -16,6 +16,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc='Provides access to position, satellite and area monitoring classes (mingw-w64)' -depends=('mingw-w64-qt5-base' 'mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(base declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-multimedia/mingw-w64-static/0001-Recorder-includes-to-prevent-conflict-with-vsnprintf.patch b/qt5-multimedia/mingw-w64-static/0001-Recorder-includes-to-prevent-conflict-with-vsnprintf.patch new file mode 100644 index 00000000..635394d7 --- /dev/null +++ b/qt5-multimedia/mingw-w64-static/0001-Recorder-includes-to-prevent-conflict-with-vsnprintf.patch @@ -0,0 +1,41 @@ +From 37467666ee75f39bd9b4811f6b539194377c8c46 Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Sun, 25 Sep 2016 21:36:56 +0200 +Subject: [PATCH 1/3] Recorder includes to prevent conflict with vsnprintf + +Some files #include +This is a C header which also #include's stdio.h which adds a #define vsnprintf +This #define vsnprint conflicts with QtCore/qstring.h so reorder the includes +a bit to prevent this situation +--- + src/multimedia/video/qvideosurfaceformat.h | 1 + + src/plugins/directshow/common/directshowglobal.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/multimedia/video/qvideosurfaceformat.h b/src/multimedia/video/qvideosurfaceformat.h +index 1d1990c7..8ddffa03 100644 +--- a/src/multimedia/video/qvideosurfaceformat.h ++++ b/src/multimedia/video/qvideosurfaceformat.h +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/src/plugins/directshow/common/directshowglobal.h b/src/plugins/directshow/common/directshowglobal.h +index 12693e4f..f759a8f2 100644 +--- a/src/plugins/directshow/common/directshowglobal.h ++++ b/src/plugins/directshow/common/directshowglobal.h +@@ -43,6 +43,7 @@ + #include + + #include ++#include + #include + + QT_BEGIN_NAMESPACE +-- +2.26.2 + diff --git a/qt5-multimedia/mingw-w64-static/0002-Fix-build-with-ANGLE.patch b/qt5-multimedia/mingw-w64-static/0002-Fix-build-with-ANGLE.patch new file mode 100644 index 00000000..ccb1fb61 --- /dev/null +++ b/qt5-multimedia/mingw-w64-static/0002-Fix-build-with-ANGLE.patch @@ -0,0 +1,29 @@ +From 13781a67c9ee7ccaa861ebba110ac740446c6edc Mon Sep 17 00:00:00 2001 +From: Jose Santiago +Date: Thu, 3 Nov 2016 14:36:10 -0500 +Subject: [PATCH 2/3] Fix build with ANGLE + +--- + src/plugins/common/evr/evrd3dpresentengine.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/plugins/common/evr/evrd3dpresentengine.cpp b/src/plugins/common/evr/evrd3dpresentengine.cpp +index d8e2da6d..41ef4d96 100644 +--- a/src/plugins/common/evr/evrd3dpresentengine.cpp ++++ b/src/plugins/common/evr/evrd3dpresentengine.cpp +@@ -50,9 +50,9 @@ + #include + + #ifdef MAYBE_ANGLE +-# include +-# include +-# include ++# include ++# include ++# include + # include + #endif + +-- +2.26.2 + diff --git a/qt5-multimedia/mingw-w64-static/0003-Workaround-multiple-definition-errors-with-amstrmid-.patch b/qt5-multimedia/mingw-w64-static/0003-Workaround-multiple-definition-errors-with-amstrmid-.patch new file mode 100644 index 00000000..d464da61 --- /dev/null +++ b/qt5-multimedia/mingw-w64-static/0003-Workaround-multiple-definition-errors-with-amstrmid-.patch @@ -0,0 +1,30 @@ +From 901bf854204cb2f9a4df9b9771183971f3c2f609 Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Sat, 23 May 2020 15:43:20 +0200 +Subject: [PATCH 3/3] Workaround "multiple definition" errors with + amstrmid/strmiids + +--- + src/plugins/directshow/directshow.pro | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/directshow/directshow.pro b/src/plugins/directshow/directshow.pro +index 27bb3abb..0cce6f20 100644 +--- a/src/plugins/directshow/directshow.pro ++++ b/src/plugins/directshow/directshow.pro +@@ -16,8 +16,11 @@ mingw { + DEFINES += NO_DSHOW_STRSAFE + } + ++# Link against amstrmid for IID_IMFVideoDeviceID, IID_IMFVideoPresenter, IID_IMFTopologyServiceLookupClient ++# and IID_IMFTopologyServiceLookupClient; add -Wl,--allow-multiple-definition to workaround conflicts with ++# strmiids which contains symbols also required but not provided by amstrmid + mingw { +- LIBS_PRIVATE += -lamstrmid ++ LIBS_PRIVATE += -Wl,--allow-multiple-definition -lamstrmid + } + + include(common/common.pri) +-- +2.26.2 + diff --git a/qt5-multimedia/mingw-w64-static/PKGBUILD b/qt5-multimedia/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..8e508f2d --- /dev/null +++ b/qt5-multimedia/mingw-w64-static/PKGBUILD @@ -0,0 +1,119 @@ +# Maintainer: Martchus +# Contributor: ant32 + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +# All patches are managed at https://github.com/Martchus/qtmultimedia + +_qt_module=qtmultimedia +pkgname=mingw-w64-qt5-multimedia-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc='Classes for audio, video, radio and camera functionality (mingw-w64)' +depends=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" + '0001-Recorder-includes-to-prevent-conflict-with-vsnprintf.patch' + '0002-Fix-build-with-ANGLE.patch' + '0003-Workaround-multiple-definition-errors-with-amstrmid-.patch') +sha256sums=('0708d867697f392dd3600c5c1c88f5c61b772a5250a4d059dca67b844af0fbd7' + '805b5885d64ad1fa545683a30e82c44d6302903565c2b865d2f6dfe4e1cea5a3' + 'dcaf467022057ea8020f758d483031df825c36497023cdab2b1ea31833e0a421' + '6d627ffda55528876f92052528ab19f327486efafbb0c5a792191d216ade36ba') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + patch -p1 -i "$patch" + done +} + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-multimedia/mingw-w64-static/PKGBUILD.sh.ep b/qt5-multimedia/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-multimedia/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-multimedia/mingw-w64-static/qtmultimedia-sha256.txt b/qt5-multimedia/mingw-w64-static/qtmultimedia-sha256.txt new file mode 100644 index 00000000..ff78cfbd --- /dev/null +++ b/qt5-multimedia/mingw-w64-static/qtmultimedia-sha256.txt @@ -0,0 +1 @@ +0708d867697f392dd3600c5c1c88f5c61b772a5250a4d059dca67b844af0fbd7 diff --git a/qt5-multimedia/mingw-w64/PKGBUILD b/qt5-multimedia/mingw-w64/PKGBUILD index 20f58be4..0ef1c9da 100644 --- a/qt5-multimedia/mingw-w64/PKGBUILD +++ b/qt5-multimedia/mingw-w64/PKGBUILD @@ -4,15 +4,12 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. # All patches are managed at https://github.com/Martchus/qtmultimedia -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtmultimedia pkgname=mingw-w64-qt5-multimedia pkgver=5.15.0 @@ -37,12 +34,7 @@ sha256sums=('0708d867697f392dd3600c5c1c88f5c61b772a5250a4d059dca67b844af0fbd7' _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') prepare() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-multimedia/mingw-w64/PKGBUILD.sh.ep b/qt5-multimedia/mingw-w64/PKGBUILD.sh.ep index 2e7b0b53..750533b4 100644 --- a/qt5-multimedia/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-multimedia/mingw-w64/PKGBUILD.sh.ep @@ -8,6 +8,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc='Classes for audio, video, radio and camera functionality (mingw-w64)' -depends=('mingw-w64-qt5-base' 'mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(base declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-networkauth/mingw-w64-static/PKGBUILD b/qt5-networkauth/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..c6425b1a --- /dev/null +++ b/qt5-networkauth/mingw-w64-static/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer: Martchus +# Contributor: ant32 + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtnetworkauth +pkgname=mingw-w64-qt5-networkauth-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Network authentication module (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +optdepends=() +makedepends=('mingw-w64-gcc') +license=('GPL3' 'LGPL3' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('96c6107f6e85662a05f114c5b9bd3503a3100bd940e1494c73a99e77f9e7cf85') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-networkauth/mingw-w64-static/PKGBUILD.sh.ep b/qt5-networkauth/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-networkauth/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-networkauth/mingw-w64-static/qtnetworkauth-sha256.txt b/qt5-networkauth/mingw-w64-static/qtnetworkauth-sha256.txt new file mode 100644 index 00000000..aeb37edd --- /dev/null +++ b/qt5-networkauth/mingw-w64-static/qtnetworkauth-sha256.txt @@ -0,0 +1 @@ +96c6107f6e85662a05f114c5b9bd3503a3100bd940e1494c73a99e77f9e7cf85 diff --git a/qt5-networkauth/mingw-w64/PKGBUILD b/qt5-networkauth/mingw-w64/PKGBUILD index 0e264605..d1b95706 100644 --- a/qt5-networkauth/mingw-w64/PKGBUILD +++ b/qt5-networkauth/mingw-w64/PKGBUILD @@ -4,13 +4,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtnetworkauth pkgname=mingw-w64-qt5-networkauth pkgver=5.15.0 @@ -30,12 +27,7 @@ sha256sums=('96c6107f6e85662a05f114c5b9bd3503a3100bd940e1494c73a99e77f9e7cf85') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-networkauth/mingw-w64/PKGBUILD.sh.ep b/qt5-networkauth/mingw-w64/PKGBUILD.sh.ep index 1e997fa3..35437cf4 100644 --- a/qt5-networkauth/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-networkauth/mingw-w64/PKGBUILD.sh.ep @@ -8,7 +8,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Network authentication module (mingw-w64)" -depends=('mingw-w64-qt5-base') +depends=(<%== qt5deps qw(base) %>) optdepends=() makedepends=('mingw-w64-gcc') license=('GPL3' 'LGPL3' 'FDL' 'custom') diff --git a/qt5-quickcontrols/mingw-w64-static/PKGBUILD b/qt5-quickcontrols/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..979faac2 --- /dev/null +++ b/qt5-quickcontrols/mingw-w64-static/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer: Martchus +# Contributor: ant32 +# Contributor: Filip Brcic + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtquickcontrols +pkgname=mingw-w64-qt5-quickcontrols-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Reusable Qt Quick based UI controls to create classic desktop-style user interfaces (mingw-w64)" +depends=('mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('7072cf4cd27e9f18b36b1c48dec7c79608cf87ba847d3fc3de133f220ec1acee') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-quickcontrols/mingw-w64-static/PKGBUILD.sh.ep b/qt5-quickcontrols/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-quickcontrols/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-quickcontrols/mingw-w64-static/qtquickcontrols-sha256.txt b/qt5-quickcontrols/mingw-w64-static/qtquickcontrols-sha256.txt new file mode 100644 index 00000000..2dbfcd0c --- /dev/null +++ b/qt5-quickcontrols/mingw-w64-static/qtquickcontrols-sha256.txt @@ -0,0 +1 @@ +7072cf4cd27e9f18b36b1c48dec7c79608cf87ba847d3fc3de133f220ec1acee diff --git a/qt5-quickcontrols/mingw-w64/PKGBUILD b/qt5-quickcontrols/mingw-w64/PKGBUILD index 41c5cfb2..1d9b535c 100644 --- a/qt5-quickcontrols/mingw-w64/PKGBUILD +++ b/qt5-quickcontrols/mingw-w64/PKGBUILD @@ -5,13 +5,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtquickcontrols pkgname=mingw-w64-qt5-quickcontrols pkgver=5.15.0 @@ -30,12 +27,7 @@ sha256sums=('7072cf4cd27e9f18b36b1c48dec7c79608cf87ba847d3fc3de133f220ec1acee') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-quickcontrols/mingw-w64/PKGBUILD.sh.ep b/qt5-quickcontrols/mingw-w64/PKGBUILD.sh.ep index e0b8e367..ca98546d 100644 --- a/qt5-quickcontrols/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-quickcontrols/mingw-w64/PKGBUILD.sh.ep @@ -9,6 +9,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Reusable Qt Quick based UI controls to create classic desktop-style user interfaces (mingw-w64)" -depends=('mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-quickcontrols2/mingw-w64-static/PKGBUILD b/qt5-quickcontrols2/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..703c1eae --- /dev/null +++ b/qt5-quickcontrols2/mingw-w64-static/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer: Martchus +# Contributor: ant32 +# Contributor: Filip Brcic + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtquickcontrols2 +pkgname=mingw-w64-qt5-quickcontrols2-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Reusable Qt Quick based UI controls to create classic desktop-style user interfaces (mingw-w64)" +depends=('mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('839abda9b58cd8656b2e5f46afbb484e63df466481ace43318c4c2022684648f') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-quickcontrols2/mingw-w64-static/PKGBUILD.sh.ep b/qt5-quickcontrols2/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-quickcontrols2/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-quickcontrols2/mingw-w64-static/qtquickcontrols2-sha256.txt b/qt5-quickcontrols2/mingw-w64-static/qtquickcontrols2-sha256.txt new file mode 100644 index 00000000..754b45a0 --- /dev/null +++ b/qt5-quickcontrols2/mingw-w64-static/qtquickcontrols2-sha256.txt @@ -0,0 +1 @@ +839abda9b58cd8656b2e5f46afbb484e63df466481ace43318c4c2022684648f diff --git a/qt5-quickcontrols2/mingw-w64/PKGBUILD b/qt5-quickcontrols2/mingw-w64/PKGBUILD index acdfd92b..6353af0f 100644 --- a/qt5-quickcontrols2/mingw-w64/PKGBUILD +++ b/qt5-quickcontrols2/mingw-w64/PKGBUILD @@ -5,13 +5,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtquickcontrols2 pkgname=mingw-w64-qt5-quickcontrols2 pkgver=5.15.0 @@ -30,12 +27,7 @@ sha256sums=('839abda9b58cd8656b2e5f46afbb484e63df466481ace43318c4c2022684648f') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-quickcontrols2/mingw-w64/PKGBUILD.sh.ep b/qt5-quickcontrols2/mingw-w64/PKGBUILD.sh.ep index e0b8e367..ca98546d 100644 --- a/qt5-quickcontrols2/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-quickcontrols2/mingw-w64/PKGBUILD.sh.ep @@ -9,6 +9,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Reusable Qt Quick based UI controls to create classic desktop-style user interfaces (mingw-w64)" -depends=('mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-remoteobjects/mingw-w64-static/PKGBUILD b/qt5-remoteobjects/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..cf452cbc --- /dev/null +++ b/qt5-remoteobjects/mingw-w64-static/PKGBUILD @@ -0,0 +1,111 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtremoteobjects +pkgname=mingw-w64-qt5-remoteobjects-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Inter-process communication (IPC) module developed for Qt (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +optdepends=('mingw-w64-qt5-declarative-static: QML bindings') +makedepends=('mingw-w64-gcc' 'mingw-w64-qt5-declarative-static') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('86fcfdce77f13c7babdec4dc1d0c4b7b6b02e40120a4250dc59e911c53c08abf') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + + # search paths for host standard library (/usr/lib) and for Qt5Bootstrap (/usr/$_arch/lib) are not set correctly by qmake + # hence we need insert those paths manually + make qmake_all + find . -type f -iname 'Makefile' -exec sed -i "s|-L/usr/$_arch/lib -lQt5QmlDevTools -lQt5Bootstrap|-L/usr/lib /usr/$_arch/lib/libQt5QmlDevTools.a /usr/$_arch/lib/libQt5Bootstrap.so|g" {} \; + find . -type f -iname 'Makefile' -exec sed -i "s|-L/usr/$_arch/lib -lQt5QmlDevTools|-L/usr/lib /usr/$_arch/lib/libQt5QmlDevTools.a|g" {} \; + find . -type f -iname 'Makefile' -exec sed -i "s|-L/usr/$_arch/lib -lQt5Bootstrap|-L/usr/lib /usr/$_arch/lib/libQt5Bootstrap.so|g" {} \; + find . -type f -iname 'Makefile' -exec sed -i "s|-lQt5Bootstrap ||g" {} \; + + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-remoteobjects/mingw-w64-static/PKGBUILD.sh.ep b/qt5-remoteobjects/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-remoteobjects/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-remoteobjects/mingw-w64-static/qtremoteobjects-sha256.txt b/qt5-remoteobjects/mingw-w64-static/qtremoteobjects-sha256.txt new file mode 100644 index 00000000..ab4544f5 --- /dev/null +++ b/qt5-remoteobjects/mingw-w64-static/qtremoteobjects-sha256.txt @@ -0,0 +1 @@ +86fcfdce77f13c7babdec4dc1d0c4b7b6b02e40120a4250dc59e911c53c08abf diff --git a/qt5-remoteobjects/mingw-w64/PKGBUILD b/qt5-remoteobjects/mingw-w64/PKGBUILD index f2ef444e..b32ebf76 100644 --- a/qt5-remoteobjects/mingw-w64/PKGBUILD +++ b/qt5-remoteobjects/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtremoteobjects pkgname=mingw-w64-qt5-remoteobjects pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('86fcfdce77f13c7babdec4dc1d0c4b7b6b02e40120a4250dc59e911c53c08abf') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-remoteobjects/mingw-w64/PKGBUILD.sh.ep b/qt5-remoteobjects/mingw-w64/PKGBUILD.sh.ep index a516d533..5d4317c7 100644 --- a/qt5-remoteobjects/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-remoteobjects/mingw-w64/PKGBUILD.sh.ep @@ -2,11 +2,11 @@ \ pkgver=5.15.0 pkgrel=1 -arch=('i686' 'x86_64') +arch=(<%== include 'fragments/mingw-w64-qt5-non_any_archs' %>) pkgdesc="Inter-process communication (IPC) module developed for Qt (mingw-w64)" -depends=('mingw-w64-qt5-base') -optdepends=('mingw-w64-qt5-declarative: QML bindings') -makedepends=('mingw-w64-gcc' 'mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(base) %>) +optdepends=(<%== qt5optdeps declarative => 'QML bindings' %>) +makedepends=('mingw-w64-gcc' <%== qt5deps qw(declarative) %>) license=('GPL3' 'LGPL' 'FDL' 'custom') \ % content_for build_config_before_make => begin diff --git a/qt5-script/mingw-w64-static/PKGBUILD b/qt5-script/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..562a37ad --- /dev/null +++ b/qt5-script/mingw-w64-static/PKGBUILD @@ -0,0 +1,105 @@ +# Maintainer: Martchus +# Contributor: ant32 +# Contributor: Filip Brcic + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtscript +pkgname=mingw-w64-qt5-script-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Classes for making Qt applications scriptable. Provided for Qt 4.x compatibility (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('02dc21b309621876a89671be27cea86a58e74a96aa28da65fe1b37a3aad29373') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-script/mingw-w64-static/PKGBUILD.sh.ep b/qt5-script/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-script/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-script/mingw-w64-static/qtscript-sha256.txt b/qt5-script/mingw-w64-static/qtscript-sha256.txt new file mode 100644 index 00000000..bb26a105 --- /dev/null +++ b/qt5-script/mingw-w64-static/qtscript-sha256.txt @@ -0,0 +1 @@ +02dc21b309621876a89671be27cea86a58e74a96aa28da65fe1b37a3aad29373 diff --git a/qt5-script/mingw-w64/PKGBUILD b/qt5-script/mingw-w64/PKGBUILD index 348f9edd..a151b8a7 100644 --- a/qt5-script/mingw-w64/PKGBUILD +++ b/qt5-script/mingw-w64/PKGBUILD @@ -5,13 +5,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtscript pkgname=mingw-w64-qt5-script pkgver=5.15.0 @@ -32,12 +29,7 @@ sha256sums=('02dc21b309621876a89671be27cea86a58e74a96aa28da65fe1b37a3aad29373') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-script/mingw-w64/PKGBUILD.sh.ep b/qt5-script/mingw-w64/PKGBUILD.sh.ep index cb08082d..d1b4996e 100644 --- a/qt5-script/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-script/mingw-w64/PKGBUILD.sh.ep @@ -9,7 +9,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Classes for making Qt applications scriptable. Provided for Qt 4.x compatibility (mingw-w64)" -depends=('mingw-w64-qt5-base') +depends=(<%== qt5deps qw(base) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') diff --git a/qt5-scxml/mingw-w64-static/PKGBUILD b/qt5-scxml/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..4e618079 --- /dev/null +++ b/qt5-scxml/mingw-w64-static/PKGBUILD @@ -0,0 +1,107 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtscxml +pkgname=mingw-w64-qt5-scxml-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Static and runtime integration of SCXML models into Qt code (mingw-w64)" +depends=('mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL3' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('9c3a72bf5ebd07553b0049cc1943f04cff93b7e53bde8c81d652422dbf12ff72') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + + # Search paths for host standard library (/usr/lib) and for Qt5Bootstrap (/usr/$_arch/lib) are not set correctly by qmake + # hence we need insert those paths manually + make qmake_all + find . -type f -iname 'Makefile' -exec sed -i "s|-L/usr/$_arch/lib -lQt5Bootstrap|-L/usr/lib -L/usr/$_arch/lib -lQt5Bootstrap|g" {} \; + + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-scxml/mingw-w64-static/PKGBUILD.sh.ep b/qt5-scxml/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-scxml/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-scxml/mingw-w64-static/qtscxml-sha256.txt b/qt5-scxml/mingw-w64-static/qtscxml-sha256.txt new file mode 100644 index 00000000..bfddbf81 --- /dev/null +++ b/qt5-scxml/mingw-w64-static/qtscxml-sha256.txt @@ -0,0 +1 @@ +9c3a72bf5ebd07553b0049cc1943f04cff93b7e53bde8c81d652422dbf12ff72 diff --git a/qt5-scxml/mingw-w64/PKGBUILD b/qt5-scxml/mingw-w64/PKGBUILD index 60c3220a..b59254b3 100644 --- a/qt5-scxml/mingw-w64/PKGBUILD +++ b/qt5-scxml/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtscxml pkgname=mingw-w64-qt5-scxml pkgver=5.15.0 @@ -28,12 +25,7 @@ sha256sums=('9c3a72bf5ebd07553b0049cc1943f04cff93b7e53bde8c81d652422dbf12ff72') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-scxml/mingw-w64/PKGBUILD.sh.ep b/qt5-scxml/mingw-w64/PKGBUILD.sh.ep index bc7a721c..e9a3e44a 100644 --- a/qt5-scxml/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-scxml/mingw-w64/PKGBUILD.sh.ep @@ -2,9 +2,9 @@ \ pkgver=5.15.0 pkgrel=1 -arch=('i686' 'x86_64') +arch=(<%== include 'fragments/mingw-w64-qt5-non_any_archs' %>) pkgdesc="Static and runtime integration of SCXML models into Qt code (mingw-w64)" -depends=('mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL3' 'FDL' 'custom') \ diff --git a/qt5-sensors/mingw-w64-static/PKGBUILD b/qt5-sensors/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..eae27b12 --- /dev/null +++ b/qt5-sensors/mingw-w64-static/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer: Martchus +# Contributor: ant32 +# Contributor: Filip Brcic + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtsensors +pkgname=mingw-w64-qt5-sensors-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Provides access to sensor hardware and motion gesture recognition (mingw-w64)" +depends=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('12b17ed6cbe6c49c8ab71958bc5d8ad1c42bf20e2fa72613ede11001e98144da') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-sensors/mingw-w64-static/PKGBUILD.sh.ep b/qt5-sensors/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-sensors/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-sensors/mingw-w64-static/qtsensors-sha256.txt b/qt5-sensors/mingw-w64-static/qtsensors-sha256.txt new file mode 100644 index 00000000..91a50614 --- /dev/null +++ b/qt5-sensors/mingw-w64-static/qtsensors-sha256.txt @@ -0,0 +1 @@ +12b17ed6cbe6c49c8ab71958bc5d8ad1c42bf20e2fa72613ede11001e98144da diff --git a/qt5-sensors/mingw-w64/PKGBUILD b/qt5-sensors/mingw-w64/PKGBUILD index 78c42856..661a2300 100644 --- a/qt5-sensors/mingw-w64/PKGBUILD +++ b/qt5-sensors/mingw-w64/PKGBUILD @@ -5,13 +5,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtsensors pkgname=mingw-w64-qt5-sensors pkgver=5.15.0 @@ -30,12 +27,7 @@ sha256sums=('12b17ed6cbe6c49c8ab71958bc5d8ad1c42bf20e2fa72613ede11001e98144da') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-sensors/mingw-w64/PKGBUILD.sh.ep b/qt5-sensors/mingw-w64/PKGBUILD.sh.ep index 82e80847..cafdef96 100644 --- a/qt5-sensors/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-sensors/mingw-w64/PKGBUILD.sh.ep @@ -9,6 +9,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Provides access to sensor hardware and motion gesture recognition (mingw-w64)" -depends=('mingw-w64-qt5-base' 'mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(base declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-serialport/mingw-w64-static/PKGBUILD b/qt5-serialport/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..c3d0de60 --- /dev/null +++ b/qt5-serialport/mingw-w64-static/PKGBUILD @@ -0,0 +1,109 @@ +# Maintainer: Martchus +# Contributor: ant32 + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtserialport +pkgname=mingw-w64-qt5-serialport-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Provides access to hardware and virtual serial ports (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL3' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('ba19369069a707dffddca8d9c477bb2bb4aa26630dfee6792254c4bf9bd57a67') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + # don't build examples or tests + sed -i 's/ examples tests//' qtserialport.pro +} + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-serialport/mingw-w64-static/PKGBUILD.sh.ep b/qt5-serialport/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-serialport/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-serialport/mingw-w64-static/qtserialport-sha256.txt b/qt5-serialport/mingw-w64-static/qtserialport-sha256.txt new file mode 100644 index 00000000..a470ac9e --- /dev/null +++ b/qt5-serialport/mingw-w64-static/qtserialport-sha256.txt @@ -0,0 +1 @@ +ba19369069a707dffddca8d9c477bb2bb4aa26630dfee6792254c4bf9bd57a67 diff --git a/qt5-serialport/mingw-w64/PKGBUILD b/qt5-serialport/mingw-w64/PKGBUILD index 8689a211..bc155875 100644 --- a/qt5-serialport/mingw-w64/PKGBUILD +++ b/qt5-serialport/mingw-w64/PKGBUILD @@ -4,13 +4,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtserialport pkgname=mingw-w64-qt5-serialport pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('ba19369069a707dffddca8d9c477bb2bb4aa26630dfee6792254c4bf9bd57a67') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') prepare() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-serialport/mingw-w64/PKGBUILD.sh.ep b/qt5-serialport/mingw-w64/PKGBUILD.sh.ep index 0d6c26f5..b3b124bb 100644 --- a/qt5-serialport/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-serialport/mingw-w64/PKGBUILD.sh.ep @@ -8,7 +8,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Provides access to hardware and virtual serial ports (mingw-w64)" -depends=('mingw-w64-qt5-base') +depends=(<%== qt5deps qw(base) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL3' 'FDL' 'custom') \ diff --git a/qt5-speech/mingw-w64-static/PKGBUILD b/qt5-speech/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..19d9e2d1 --- /dev/null +++ b/qt5-speech/mingw-w64-static/PKGBUILD @@ -0,0 +1,105 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtspeech +pkgname=mingw-w64-qt5-speech-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Qt module to make text to speech and speech recognition easy (mingw-w64)" +depends=('mingw-w64-qt5-multimedia-static') +optdepends=() +makedepends=('mingw-w64-gcc') +# mingw-w64-flite and mingw-w64-speech-dispatcher are currently not available +#optdepends=('mingw-w64-flite: flite TTS backend' 'mingw-w64-speech-dispatcher: speech-dispatcher TTS backend') +#makedepends=('mingw-w64-gcc' 'mingw-w64-flite' 'mingw-w64-speech-dispatcher') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('7219a878c14a24d0ca18d52df1717361b13aee96ac9790baf9ad2b383492dd61') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-speech/mingw-w64-static/PKGBUILD.sh.ep b/qt5-speech/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-speech/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-speech/mingw-w64-static/qtspeech-sha256.txt b/qt5-speech/mingw-w64-static/qtspeech-sha256.txt new file mode 100644 index 00000000..060b66b4 --- /dev/null +++ b/qt5-speech/mingw-w64-static/qtspeech-sha256.txt @@ -0,0 +1 @@ +7219a878c14a24d0ca18d52df1717361b13aee96ac9790baf9ad2b383492dd61 diff --git a/qt5-speech/mingw-w64/PKGBUILD b/qt5-speech/mingw-w64/PKGBUILD index c36071f4..bca44c6e 100644 --- a/qt5-speech/mingw-w64/PKGBUILD +++ b/qt5-speech/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtspeech pkgname=mingw-w64-qt5-speech pkgver=5.15.0 @@ -32,12 +29,7 @@ sha256sums=('7219a878c14a24d0ca18d52df1717361b13aee96ac9790baf9ad2b383492dd61') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-speech/mingw-w64/PKGBUILD.sh.ep b/qt5-speech/mingw-w64/PKGBUILD.sh.ep index 16fefba5..c57647dc 100644 --- a/qt5-speech/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-speech/mingw-w64/PKGBUILD.sh.ep @@ -4,7 +4,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Qt module to make text to speech and speech recognition easy (mingw-w64)" -depends=('mingw-w64-qt5-multimedia') +depends=(<%== qt5deps qw(multimedia) %>) optdepends=() makedepends=('mingw-w64-gcc') # mingw-w64-flite and mingw-w64-speech-dispatcher are currently not available diff --git a/qt5-svg/mingw-w64-static/PKGBUILD b/qt5-svg/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..55cf405c --- /dev/null +++ b/qt5-svg/mingw-w64-static/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Martchus +# Contributor: ant32 + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtsvg +pkgname=mingw-w64-qt5-svg-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Classes for displaying the contents of SVG files (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('ee4d287e2e205ca8c08921b9cbe0fc58bf46be080b5359ad4d7fbdee44aeee0d') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-svg/mingw-w64-static/PKGBUILD.sh.ep b/qt5-svg/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-svg/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-svg/mingw-w64-static/qtsvg-sha256.txt b/qt5-svg/mingw-w64-static/qtsvg-sha256.txt new file mode 100644 index 00000000..6493e3fb --- /dev/null +++ b/qt5-svg/mingw-w64-static/qtsvg-sha256.txt @@ -0,0 +1 @@ +ee4d287e2e205ca8c08921b9cbe0fc58bf46be080b5359ad4d7fbdee44aeee0d diff --git a/qt5-svg/mingw-w64/PKGBUILD b/qt5-svg/mingw-w64/PKGBUILD index 98598809..c252802a 100644 --- a/qt5-svg/mingw-w64/PKGBUILD +++ b/qt5-svg/mingw-w64/PKGBUILD @@ -4,13 +4,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtsvg pkgname=mingw-w64-qt5-svg pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('ee4d287e2e205ca8c08921b9cbe0fc58bf46be080b5359ad4d7fbdee44aeee0d') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-svg/mingw-w64/PKGBUILD.sh.ep b/qt5-svg/mingw-w64/PKGBUILD.sh.ep index 56818d1c..7d9f0bf6 100644 --- a/qt5-svg/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-svg/mingw-w64/PKGBUILD.sh.ep @@ -8,6 +8,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Classes for displaying the contents of SVG files (mingw-w64)" -depends=('mingw-w64-qt5-base') +depends=(<%== qt5deps qw(base) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch b/qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch new file mode 100644 index 00000000..b47e4280 --- /dev/null +++ b/qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch @@ -0,0 +1,42 @@ +From 9d961ddca0caefbc9a218bb40fbf7f27b7b03a2e Mon Sep 17 00:00:00 2001 +From: Martchus +Date: Sun, 25 Sep 2016 21:44:42 +0200 +Subject: [PATCH] Fix linguist macro + +- Prevent CMake appending extra 'Qt5::lupdate'/'Qt5::lrelease' to + command line when invoking lupdate/lrelease +- Achieved by resolveing the IMPORTED_LOCATION manually +--- + src/linguist/Qt5LinguistToolsMacros.cmake | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake +index ab271d56..f54c99c4 100644 +--- a/src/linguist/Qt5LinguistToolsMacros.cmake ++++ b/src/linguist/Qt5LinguistToolsMacros.cmake +@@ -71,8 +71,10 @@ function(QT5_CREATE_TRANSLATION _qm_files) + + file(WRITE ${_ts_lst_file} "${_lst_file_srcs}") + endif() ++ ++ get_target_property(LUPDATE_LOC ${Qt5_LUPDATE_EXECUTABLE} IMPORTED_LOCATION) + add_custom_command(OUTPUT ${_ts_file} +- COMMAND ${Qt5_LUPDATE_EXECUTABLE} ++ COMMAND ${LUPDATE_LOC} + ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file} + DEPENDS ${_my_sources} + BYPRODUCTS ${_ts_lst_file} VERBATIM) +@@ -114,8 +116,9 @@ function(QT5_ADD_TRANSLATION _qm_files) + set(qm "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.qm") + endif() + ++ get_target_property(LRELEASE_LOC ${Qt5_LRELEASE_EXECUTABLE} IMPORTED_LOCATION) + add_custom_command(OUTPUT ${qm} +- COMMAND ${Qt5_LRELEASE_EXECUTABLE} ++ COMMAND ${LRELEASE_LOC} + ARGS ${_LRELEASE_OPTIONS} ${_abs_FILE} -qm ${qm} + DEPENDS ${_abs_FILE} VERBATIM + ) +-- +2.26.2 + diff --git a/qt5-tools/mingw-w64-static/PKGBUILD b/qt5-tools/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..ace6feca --- /dev/null +++ b/qt5-tools/mingw-w64-static/PKGBUILD @@ -0,0 +1,139 @@ +# Maintainer: Martchus +# Contributor: ant32 +# Contributor: Filip Brcic + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +# All patches are managed at https://github.com/Martchus/qttools + +# For QQuickWidgetPlugin, add mingw-w64-qt5-declarative to dependencies (already present by default) +# For QWebViewPlugin, add mingw-w64-qt5-webkit to dependencies (mingw-w64-qt5-webkit is no longer updated) +# For QAxWidgetPlugin, add mingw-w64-qt5-activeqt to dependencies + +# Note that static MySQL and PostgreSQL plugins are disabled because mariadb-connector-c and posgresql come with their own pthread +# implementation which has conflicting symbols with the pthread library Qt uses leading to errors like: +# /usr/lib/gcc/i686-w64-mingw32/8.2.0/../../../../i686-w64-mingw32/bin/ld: /usr/i686-w64-mingw32/lib/libpthread.a(libwinpthread_la-mutex.o): +# in function `pthread_mutex_lock': /build/mingw-w64-winpthreads/src/mingw-w64-v6.0.0/mingw-w64-libraries/winpthreads/src/mutex.c:187: +# multiple definition of `pthread_mutex_lock'; /usr/i686-w64-mingw32/lib/libpq.a(pthread-win32.o):(.text+0x70): first defined here + +_qt_module=qttools +pkgname=mingw-w64-qt5-tools-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="A cross-platform application and UI framework (Development Tools, QtHelp; mingw-w64)" +depends=('mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c' 'mingw-w64-vulkan-headers') +license=('GPL3' 'LGPL3' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" + '0001-Fix-linguist-macro.patch') +sha256sums=('ddbcb49aab3a2e3672582c6e2e7bec0058feff790f67472343c79e2895e0e437' + 'ca4cdea138d38a8f55a20f4821d35138035115dd1c61ae1b28156d90aa75b38a') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=no_smart_library_merge QTPLUGIN.sqldrivers=qsqlite QTPLUGIN.sqldrivers+=qsqlodbc CONFIG+=static') + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + patch -p1 -i "$patch" + done +} + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + + # create symlinks for tools + mkdir -p "${pkgdir}/usr/bin" + for tool in lconvert lupdate lrelease windeployqt; do + ln -sf "../${_arch}/lib/qt/bin/${tool}" "${pkgdir}/usr/bin/${_arch}-$tool-qt5" + done + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done + + # make sure the executables don't conflict with their mingw-qt4 counterpart + for _arch in ${_architectures}; do + for exe_file in "${pkgdir}/usr/${_arch}/bin/"*.exe; do + [[ -f $exe_file ]] && mv "${exe_file}" "${exe_file%.exe}-qt5.exe" + done + # Fix the path to executables in cmake config files + sed -i "s|lib/qt/bin/qcollectiongenerator|bin/qcollectiongenerator-qt5.exe|g" "${pkgdir}"/usr/${_arch}/lib/cmake/Qt5Help/Qt5HelpConfigExtras.cmake + sed -i "s|lib/qt/bin/qhelpgenerator|bin/qhelpgenerator-qt5.exe|g" "${pkgdir}"/usr/${_arch}/lib/cmake/Qt5Help/Qt5HelpConfigExtras.cmake + done +} + diff --git a/qt5-tools/mingw-w64-static/PKGBUILD.sh.ep b/qt5-tools/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-tools/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-tools/mingw-w64-static/qttools-sha256.txt b/qt5-tools/mingw-w64-static/qttools-sha256.txt new file mode 100644 index 00000000..c14ded30 --- /dev/null +++ b/qt5-tools/mingw-w64-static/qttools-sha256.txt @@ -0,0 +1 @@ +ddbcb49aab3a2e3672582c6e2e7bec0058feff790f67472343c79e2895e0e437 diff --git a/qt5-tools/mingw-w64/PKGBUILD b/qt5-tools/mingw-w64/PKGBUILD index 060d7d89..85306e97 100755 --- a/qt5-tools/mingw-w64/PKGBUILD +++ b/qt5-tools/mingw-w64/PKGBUILD @@ -5,15 +5,12 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. # All patches are managed at https://github.com/Martchus/qttools -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - # For QQuickWidgetPlugin, add mingw-w64-qt5-declarative to dependencies (already present by default) # For QWebViewPlugin, add mingw-w64-qt5-webkit to dependencies (mingw-w64-qt5-webkit is no longer updated) # For QAxWidgetPlugin, add mingw-w64-qt5-activeqt to dependencies @@ -44,12 +41,7 @@ sha256sums=('ddbcb49aab3a2e3672582c6e2e7bec0058feff790f67472343c79e2895e0e437' _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=no_smart_library_merge QTPLUGIN.sqldrivers=qsqlite QTPLUGIN.sqldrivers+=qsqlodbc CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') prepare() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-tools/mingw-w64/PKGBUILD.sh.ep b/qt5-tools/mingw-w64/PKGBUILD.sh.ep index 9fc0f7e8..3cfb9dfc 100644 --- a/qt5-tools/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-tools/mingw-w64/PKGBUILD.sh.ep @@ -20,9 +20,9 @@ \ pkgver=5.15.0 pkgrel=1 -arch=('i686' 'x86_64') +arch=(<%== include 'fragments/mingw-w64-qt5-non_any_archs' %>) pkgdesc="A cross-platform application and UI framework (Development Tools, QtHelp; mingw-w64)" -depends=('mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c' 'mingw-w64-vulkan-headers') license=('GPL3' 'LGPL3' 'FDL' 'custom') \ diff --git a/qt5-translations/mingw-w64/PKGBUILD b/qt5-translations/mingw-w64/PKGBUILD index b4bdd121..e6376375 100644 --- a/qt5-translations/mingw-w64/PKGBUILD +++ b/qt5-translations/mingw-w64/PKGBUILD @@ -5,7 +5,7 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. @@ -27,8 +27,7 @@ sha256sums=('45c43268d9df50784d4d8ca345fce9288a1055fd074ac0ef508097f7aeba22fe') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-translations/mingw-w64/PKGBUILD.sh.ep b/qt5-translations/mingw-w64/PKGBUILD.sh.ep index f2453632..cf598e63 100644 --- a/qt5-translations/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-translations/mingw-w64/PKGBUILD.sh.ep @@ -9,6 +9,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="A cross-platform application and UI framework (translations, mingw-w64)" -depends=('mingw-w64-qt5-base') -makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-qt5-tools') +depends=(<%== qt5deps qw(base) %>) +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' <%== qt5deps qw(tools) %>) license=('GPL3' 'LGPL3' 'FDL' 'custom') diff --git a/qt5-virtualkeyboard/mingw-w64-static/PKGBUILD b/qt5-virtualkeyboard/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..e7ba64ee --- /dev/null +++ b/qt5-virtualkeyboard/mingw-w64-static/PKGBUILD @@ -0,0 +1,115 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtvirtualkeyboard +pkgname=mingw-w64-qt5-virtualkeyboard-static +#_fix_deps_of_static_3rdparty_libs='s:\(-L\/.*\/lib.*\.a\) \(\/.*\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\2\3\4 \1 \5:g' # -L is used (pre Qt 5.13) +_fix_deps_of_static_3rdparty_libs='s:\(LIBS *= *\)\(.*\)\(\/build\/.*\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\1 \3\4\5 \2 \6:g' # absolute paths are used (Qt 5.13 and above) +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Virtual keyboard framework (translations, mingw-w64)" +depends=('mingw-w64-pkg-config' 'mingw-w64-qt5-declarative-static' 'mingw-w64-qt5-svg-static') +makedepends=('mingw-w64-gcc') +license=('GPL3') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('f22f9204ab65578d9c8aa832a8a39108f826e00a7d391c7884ff490c587f34be') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + + # fix dependency order for libqtopenwnn and other static 3rdparty libraries which depend Qt5Core and hence need + # it subsequent on the linker line + # (Not sure why qmake isn't smart enough to put it in the right order itself. It also appears that in Qt 5.12 + # the order is messed in a different way than in Qt 5.11. Now it also seems to update the Makefile again unless + # touched to a date in the future.) + make qmake_all + find . \( -type f -name 'Makefile*' -o -name '*.prl' \) -exec sed -i "$_fix_deps_of_static_3rdparty_libs" {} \; -exec touch -d 300101 {} \; + + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # apply the fix for the dependency order like in build + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "$_fix_deps_of_static_3rdparty_libs" {} \; + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-virtualkeyboard/mingw-w64-static/PKGBUILD.sh.ep b/qt5-virtualkeyboard/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-virtualkeyboard/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-virtualkeyboard/mingw-w64-static/qtvirtualkeyboard-sha256.txt b/qt5-virtualkeyboard/mingw-w64-static/qtvirtualkeyboard-sha256.txt new file mode 100644 index 00000000..1e6b3d2c --- /dev/null +++ b/qt5-virtualkeyboard/mingw-w64-static/qtvirtualkeyboard-sha256.txt @@ -0,0 +1 @@ +f22f9204ab65578d9c8aa832a8a39108f826e00a7d391c7884ff490c587f34be diff --git a/qt5-virtualkeyboard/mingw-w64/PKGBUILD b/qt5-virtualkeyboard/mingw-w64/PKGBUILD index 042c49c8..ae5574eb 100644 --- a/qt5-virtualkeyboard/mingw-w64/PKGBUILD +++ b/qt5-virtualkeyboard/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtvirtualkeyboard pkgname=mingw-w64-qt5-virtualkeyboard #_fix_deps_of_static_3rdparty_libs='s:\(-L\/.*\/lib.*\.a\) \(\/.*\/libqt\)\(openwnn\|pinyin\|tcime\)\(d*\.a\)\(.*\):\2\3\4 \1 \5:g' # -L is used (pre Qt 5.13) @@ -18,7 +15,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Virtual keyboard framework (translations, mingw-w64)" -depends=('mingw-w64-qt5-declarative' 'mingw-w64-pkg-config' 'mingw-w64-qt5-svg') +depends=('mingw-w64-pkg-config' 'mingw-w64-qt5-declarative' 'mingw-w64-qt5-svg') makedepends=('mingw-w64-gcc') license=('GPL3') options=('!strip' '!buildflags' 'staticlibs') @@ -30,12 +27,7 @@ sha256sums=('f22f9204ab65578d9c8aa832a8a39108f826e00a7d391c7884ff490c587f34be') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-virtualkeyboard/mingw-w64/PKGBUILD.sh.ep b/qt5-virtualkeyboard/mingw-w64/PKGBUILD.sh.ep index a239068e..6fea82b6 100644 --- a/qt5-virtualkeyboard/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-virtualkeyboard/mingw-w64/PKGBUILD.sh.ep @@ -6,7 +6,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Virtual keyboard framework (translations, mingw-w64)" -depends=('mingw-w64-qt5-declarative' 'mingw-w64-pkg-config' 'mingw-w64-qt5-svg') +depends=('mingw-w64-pkg-config' <%== qt5deps qw(declarative svg) %>) makedepends=('mingw-w64-gcc') license=('GPL3') \ diff --git a/qt5-webchannel/mingw-w64-static/PKGBUILD b/qt5-webchannel/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..46c6e831 --- /dev/null +++ b/qt5-webchannel/mingw-w64-static/PKGBUILD @@ -0,0 +1,101 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtwebchannel +pkgname=mingw-w64-qt5-webchannel-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc='Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients (mingw-w64)' +depends=('mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('ea80510b363e6f92ce99932f06d176e43459c4a5159fe97b5ef96fcfbab5ed4f') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-webchannel/mingw-w64-static/PKGBUILD.sh.ep b/qt5-webchannel/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-webchannel/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-webchannel/mingw-w64-static/qtwebchannel-sha256.txt b/qt5-webchannel/mingw-w64-static/qtwebchannel-sha256.txt new file mode 100644 index 00000000..10d8f78e --- /dev/null +++ b/qt5-webchannel/mingw-w64-static/qtwebchannel-sha256.txt @@ -0,0 +1 @@ +ea80510b363e6f92ce99932f06d176e43459c4a5159fe97b5ef96fcfbab5ed4f diff --git a/qt5-webchannel/mingw-w64/PKGBUILD b/qt5-webchannel/mingw-w64/PKGBUILD index ce22e0ba..d15e052e 100644 --- a/qt5-webchannel/mingw-w64/PKGBUILD +++ b/qt5-webchannel/mingw-w64/PKGBUILD @@ -3,13 +3,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtwebchannel pkgname=mingw-w64-qt5-webchannel pkgver=5.15.0 @@ -28,12 +25,7 @@ sha256sums=('ea80510b363e6f92ce99932f06d176e43459c4a5159fe97b5ef96fcfbab5ed4f') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-webchannel/mingw-w64/PKGBUILD.sh.ep b/qt5-webchannel/mingw-w64/PKGBUILD.sh.ep index 62a8118e..92ffac77 100644 --- a/qt5-webchannel/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-webchannel/mingw-w64/PKGBUILD.sh.ep @@ -4,6 +4,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc='Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients (mingw-w64)' -depends=('mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-webengine/mingw-w64-static/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch b/qt5-webengine/mingw-w64-static/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch new file mode 100644 index 00000000..0ee3e6be --- /dev/null +++ b/qt5-webengine/mingw-w64-static/0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch @@ -0,0 +1,12 @@ +diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtwebengine/tools/qmake/mkspecs/features/functions.prf qt-everywhere-opensource-src-5.5.0/qtwebengine/tools/qmake/mkspecs/features/functions.prf +--- qt-everywhere-opensource-src-5.5.0.orig/qtwebengine/tools/qmake/mkspecs/features/functions.prf 2015-08-26 14:34:22.019269600 +0100 ++++ qt-everywhere-opensource-src-5.5.0/qtwebengine/tools/qmake/mkspecs/features/functions.prf 2015-08-26 15:34:44.547516900 +0100 +@@ -14,7 +14,7 @@ + + linux-g++*:!isGCCVersionSupported(): return(false) + !isPythonVersionSupported(): return(false) +- linux-g++*|win32-msvc2013|macx-clang: return(true) ++ linux-g++*|win32-*|macx-clang: return(true) + boot2qt: return(true) + + skipBuild("Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation.") diff --git a/qt5-webengine/mingw-w64-static/PKGBUILD b/qt5-webengine/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..b1b2f649 --- /dev/null +++ b/qt5-webengine/mingw-w64-static/PKGBUILD @@ -0,0 +1,130 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +# All patches are managed at https://github.com/Martchus/qtwebengine + +# DOES NOT WORK YET (win32-g++ is currently not supported by Qt WebEngine) + +_qt_module=qtwebengine +pkgname=mingw-w64-qt5-webengine-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc='Provides support for web applications using the Chromium browser project (mingw-w64)' +depends=('mingw-w64-qt5-webchannel-static' 'mingw-w64-qt5-location-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'git' 'python2' 'gperf' 'ruby') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +license=('LGPL3' 'LGPL2.1' 'BSD') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" + '0044-qt-5.4.0-win32-g++-enable-qtwebengine-build.patch') +sha256sums=('TODO' + '7d7a99ff45c6ae4f39be663d52bafc125970787f364e84593117e6a7d79f7eae') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + patch -p1 -i "$patch" + done + + # use python2 for Python 2.x + find . -name '*.py' -exec sed -i \ + 's|#![ ]*/usr/bin/python$|&2|;s|#![ ]*/usr/bin/env python$|&2|' {} + + + # in qtwebengine there are still a lot of relative calls which need a workaround + mkdir "${srcdir}"/python2-path + ln -s /usr/bin/python2 "${srcdir}"/python2-path/python +} + +build() { + cd "${srcdir}/${_pkgfqn}" + + + # python2 workaround + export PATH="${srcdir}/python2-path:$PATH" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-webengine/mingw-w64-static/PKGBUILD.sh.ep b/qt5-webengine/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-webengine/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-webengine/mingw-w64-static/qtwebengine-sha256.txt b/qt5-webengine/mingw-w64-static/qtwebengine-sha256.txt new file mode 100644 index 00000000..1333ed77 --- /dev/null +++ b/qt5-webengine/mingw-w64-static/qtwebengine-sha256.txt @@ -0,0 +1 @@ +TODO diff --git a/qt5-webengine/mingw-w64/PKGBUILD b/qt5-webengine/mingw-w64/PKGBUILD index 888677a8..973b9cd7 100644 --- a/qt5-webengine/mingw-w64/PKGBUILD +++ b/qt5-webengine/mingw-w64/PKGBUILD @@ -3,15 +3,12 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. # All patches are managed at https://github.com/Martchus/qtwebengine -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - # DOES NOT WORK YET (win32-g++ is currently not supported by Qt WebEngine) _qt_module=qtwebengine @@ -36,12 +33,7 @@ sha256sums=('TODO' _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') prepare() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-webengine/mingw-w64/PKGBUILD.sh.ep b/qt5-webengine/mingw-w64/PKGBUILD.sh.ep index 9b92aec7..cbdd3362 100644 --- a/qt5-webengine/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-webengine/mingw-w64/PKGBUILD.sh.ep @@ -9,7 +9,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc='Provides support for web applications using the Chromium browser project (mingw-w64)' -depends=('mingw-w64-qt5-webchannel' 'mingw-w64-qt5-location') +depends=(<%== qt5deps qw(webchannel location) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'git' 'python2' 'gperf' 'ruby') options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') diff --git a/qt5-webglplugin/mingw-w64-static/0001-Hardcode-linker-flags-for-platform-plugin.patch b/qt5-webglplugin/mingw-w64-static/0001-Hardcode-linker-flags-for-platform-plugin.patch new file mode 100644 index 00000000..101e3a4f --- /dev/null +++ b/qt5-webglplugin/mingw-w64-static/0001-Hardcode-linker-flags-for-platform-plugin.patch @@ -0,0 +1,46 @@ +From 4da196f53569e9d95c272a96f54d3f6a641bd069 Mon Sep 17 00:00:00 2001 +From: Marius Kittler +Date: Wed, 12 Dec 2018 18:16:54 +0100 +Subject: [PATCH] Hardcode linker flags for platform plugin + +Otherwise incorrect order of libs leads to errors +when building libqwebgl.dll + +This is the same workaround as for the platform plugins +in qtbase. +--- + src/plugins/platforms/webgl/webgl.pro | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/src/plugins/platforms/webgl/webgl.pro b/src/plugins/platforms/webgl/webgl.pro +index 7f7227c..45f8f66 100644 +--- a/src/plugins/platforms/webgl/webgl.pro ++++ b/src/plugins/platforms/webgl/webgl.pro +@@ -1,10 +1,20 @@ + TARGET = qwebgl + QT += \ + websockets \ +- gui-private \ +- eventdispatcher_support-private \ +- fontdatabase_support-private \ +- theme_support-private ++ gui-private ++ ++# Fix linker error when building libqwebgl.dll by specifying linker flags forer flags for ++# required modules manually (otherwise order is messed) ++LIBS += \ ++ -lQt5EventDispatcherSupport \ ++ -lQt5FontDatabaseSupport \ ++ -lQt5ThemeSupport \ ++ -lfreetype -lole32 -lgdi32 -ldwmapi -luuid ++# However, this workaround leads to the necessity of specifying include dirs manually ++INCLUDEPATH += \} \ ++ $$QT_INSTALL_PREFIX/include/qt/QtEventDispatcherSupport/$${QT_VERSION} \ ++ $$QT_INSTALL_PREFIX/include/qt/QtFontDatabaseSupport/$${QT_VERSION} \ ++ $$QT_INSTALL_PREFIX/include/qt/QtThemeSupport/$${QT_VERSION} + + qtHaveModule(quick) { + QT += quick +-- +2.26.2 + diff --git a/qt5-webglplugin/mingw-w64-static/PKGBUILD b/qt5-webglplugin/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..f2c9b7af --- /dev/null +++ b/qt5-webglplugin/mingw-w64-static/PKGBUILD @@ -0,0 +1,115 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +# All patches are managed at https://github.com/Martchus/qtwebglplugin + +_qt_module=qtwebglplugin +pkgname=mingw-w64-qt5-webglplugin-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="QPA plugin for running an application via a browser using streamed WebGL commands (mingw-w64)" +depends=('mingw-w64-qt5-declarative-static' 'mingw-w64-qt5-websockets-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL3' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" + '0001-Hardcode-linker-flags-for-platform-plugin.patch') +sha256sums=('f7b81f25ddf7b3a0046daa7224bc1e18c8b754b00b1a33775f30f827a5cdca15' + '4a6e18d8269a3716e7d31b02e520925022fab51956a033fd6ad5abda5df4a351') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + patch -p1 -i "$patch" + done +} + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + _additional_qmake_args=QT_INSTALL_PREFIX=/usr/${_arch} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-webglplugin/mingw-w64-static/PKGBUILD.sh.ep b/qt5-webglplugin/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-webglplugin/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-webglplugin/mingw-w64-static/qtwebglplugin-sha256.txt b/qt5-webglplugin/mingw-w64-static/qtwebglplugin-sha256.txt new file mode 100644 index 00000000..8b65abd5 --- /dev/null +++ b/qt5-webglplugin/mingw-w64-static/qtwebglplugin-sha256.txt @@ -0,0 +1 @@ +f7b81f25ddf7b3a0046daa7224bc1e18c8b754b00b1a33775f30f827a5cdca15 diff --git a/qt5-webglplugin/mingw-w64/PKGBUILD b/qt5-webglplugin/mingw-w64/PKGBUILD index 814ea7d9..e7df8312 100644 --- a/qt5-webglplugin/mingw-w64/PKGBUILD +++ b/qt5-webglplugin/mingw-w64/PKGBUILD @@ -3,15 +3,12 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. # All patches are managed at https://github.com/Martchus/qtwebglplugin -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtwebglplugin pkgname=mingw-w64-qt5-webglplugin pkgver=5.15.0 @@ -32,12 +29,7 @@ sha256sums=('f7b81f25ddf7b3a0046daa7224bc1e18c8b754b00b1a33775f30f827a5cdca15' _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') prepare() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-webglplugin/mingw-w64/PKGBUILD.sh.ep b/qt5-webglplugin/mingw-w64/PKGBUILD.sh.ep index 8f5b419d..082d31cb 100644 --- a/qt5-webglplugin/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-webglplugin/mingw-w64/PKGBUILD.sh.ep @@ -4,7 +4,7 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="QPA plugin for running an application via a browser using streamed WebGL commands (mingw-w64)" -depends=('mingw-w64-qt5-declarative' 'mingw-w64-qt5-websockets') +depends=(<%== qt5deps qw(declarative websockets) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL3' 'FDL' 'custom') \ diff --git a/qt5-websockets/mingw-w64-static/PKGBUILD b/qt5-websockets/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..dca1586a --- /dev/null +++ b/qt5-websockets/mingw-w64-static/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Martchus +# Contributor: ant32 + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtwebsockets +pkgname=mingw-w64-qt5-websockets-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Provides WebSocket communication compliant with RFC 6455 (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('87c2f6542778f9b65b3f208740c1d0db643fd0bede21404b9abb265355da5092') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-websockets/mingw-w64-static/PKGBUILD.sh.ep b/qt5-websockets/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-websockets/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-websockets/mingw-w64-static/qtwebsockets-sha256.txt b/qt5-websockets/mingw-w64-static/qtwebsockets-sha256.txt new file mode 100644 index 00000000..eee2bdda --- /dev/null +++ b/qt5-websockets/mingw-w64-static/qtwebsockets-sha256.txt @@ -0,0 +1 @@ +87c2f6542778f9b65b3f208740c1d0db643fd0bede21404b9abb265355da5092 diff --git a/qt5-websockets/mingw-w64/PKGBUILD b/qt5-websockets/mingw-w64/PKGBUILD index 7f803429..bc116df9 100644 --- a/qt5-websockets/mingw-w64/PKGBUILD +++ b/qt5-websockets/mingw-w64/PKGBUILD @@ -4,13 +4,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtwebsockets pkgname=mingw-w64-qt5-websockets pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('87c2f6542778f9b65b3f208740c1d0db643fd0bede21404b9abb265355da5092') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-websockets/mingw-w64/PKGBUILD.sh.ep b/qt5-websockets/mingw-w64/PKGBUILD.sh.ep index c91592f3..1600701a 100644 --- a/qt5-websockets/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-websockets/mingw-w64/PKGBUILD.sh.ep @@ -8,6 +8,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Provides WebSocket communication compliant with RFC 6455 (mingw-w64)" -depends=('mingw-w64-qt5-base') +depends=(<%== qt5deps qw(base) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') diff --git a/qt5-winextras/mingw-w64-static/PKGBUILD b/qt5-winextras/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..3fc3aa72 --- /dev/null +++ b/qt5-winextras/mingw-w64-static/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Martchus +# Contributor: ant32 + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtwinextras +pkgname=mingw-w64-qt5-winextras-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Classes and functions that enable you to use Windows-specific functions (mingw-w64)" +depends=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-declarative-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL3' 'LGPL2.1' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('d77f2cb2ce83bdbfd0a970bc8d7d11c96b2df16befc257d6594f79dfd92abff0') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-winextras/mingw-w64-static/PKGBUILD.sh.ep b/qt5-winextras/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-winextras/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-winextras/mingw-w64-static/qtwinextras-sha256.txt b/qt5-winextras/mingw-w64-static/qtwinextras-sha256.txt new file mode 100644 index 00000000..94d72e1a --- /dev/null +++ b/qt5-winextras/mingw-w64-static/qtwinextras-sha256.txt @@ -0,0 +1 @@ +d77f2cb2ce83bdbfd0a970bc8d7d11c96b2df16befc257d6594f79dfd92abff0 diff --git a/qt5-winextras/mingw-w64/PKGBUILD b/qt5-winextras/mingw-w64/PKGBUILD index 924e571d..bfa11119 100644 --- a/qt5-winextras/mingw-w64/PKGBUILD +++ b/qt5-winextras/mingw-w64/PKGBUILD @@ -4,13 +4,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtwinextras pkgname=mingw-w64-qt5-winextras pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('d77f2cb2ce83bdbfd0a970bc8d7d11c96b2df16befc257d6594f79dfd92abff0') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-winextras/mingw-w64/PKGBUILD.sh.ep b/qt5-winextras/mingw-w64/PKGBUILD.sh.ep index 2ad579f5..1be652ee 100644 --- a/qt5-winextras/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-winextras/mingw-w64/PKGBUILD.sh.ep @@ -8,6 +8,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Classes and functions that enable you to use Windows-specific functions (mingw-w64)" -depends=('mingw-w64-qt5-base' 'mingw-w64-qt5-declarative') +depends=(<%== qt5deps qw(base declarative) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL3' 'LGPL2.1' 'FDL' 'custom') diff --git a/qt5-xmlpatterns/mingw-w64-static/PKGBUILD b/qt5-xmlpatterns/mingw-w64-static/PKGBUILD new file mode 100644 index 00000000..fd41ed84 --- /dev/null +++ b/qt5-xmlpatterns/mingw-w64-static/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Martchus +# Contributor: ant32 + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. +# Do not edit it manually! See README.md in the repository's root directory +# for more information. + +_qt_module=qtxmlpatterns +pkgname=mingw-w64-qt5-xmlpatterns-static +pkgver=5.15.0 +pkgrel=1 +arch=('any') +pkgdesc="Support for XPath, XQuery, XSLT and XML schema validation (mingw-w64)" +depends=('mingw-w64-qt5-base-static') +makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') +license=('GPL3' 'LGPL3' 'FDL' 'custom') +options=('!strip' '!buildflags' 'staticlibs') +groups=('mingw-w64-qt5') +url='https://www.qt.io/' +_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") +sha256sums=('2752cf2aa25ebfda89c3736457e27b3d0c7c7ed290dcfd52c209f9f905998507') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers +_configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') + +build() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + msg2 "Building ${_config##*=} version for ${_arch}" + mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=} + ${_arch}-qmake-qt5 ../${_qt_module}.pro ${_config} ${_additional_qmake_args} + make + popd + done + done +} + +package() { + cd "${srcdir}/${_pkgfqn}" + + for _arch in ${_architectures}; do + for _config in "${_configurations[@]}"; do + pushd build-${_arch}-${_config##*=} + + make INSTALL_ROOT="$pkgdir" install + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + if [[ -d 'lib' ]]; then + pushd 'lib' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + fi + if [[ -d 'plugins' ]]; then + pushd 'plugins' + find -iname '*.static.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:$PWD/lib:/usr/$_arch/lib:g" {} \; + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # remove '.static.prl' files + find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete + + # delete duplicate files that are in the shared package + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + for shared_path in "${pkgdir}/usr/${_arch}/"{include,share} "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}; do + [[ -d $shared_path ]] && rm -fR "$shared_path" + done + for file in $(find "$pkgdir/usr/$_arch/lib"); do + [[ -f "${file##$pkgdir}" ]] && rm "$file" + done + + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name '*.dll' -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \ + find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \; + find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \; + popd + done + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + done +} + diff --git a/qt5-xmlpatterns/mingw-w64-static/PKGBUILD.sh.ep b/qt5-xmlpatterns/mingw-w64-static/PKGBUILD.sh.ep new file mode 100644 index 00000000..87756da4 --- /dev/null +++ b/qt5-xmlpatterns/mingw-w64-static/PKGBUILD.sh.ep @@ -0,0 +1 @@ +%= include "$default_package_name/mingw-w64/PKGBUILD"; diff --git a/qt5-xmlpatterns/mingw-w64-static/qtxmlpatterns-sha256.txt b/qt5-xmlpatterns/mingw-w64-static/qtxmlpatterns-sha256.txt new file mode 100644 index 00000000..5b62524b --- /dev/null +++ b/qt5-xmlpatterns/mingw-w64-static/qtxmlpatterns-sha256.txt @@ -0,0 +1 @@ +2752cf2aa25ebfda89c3736457e27b3d0c7c7ed290dcfd52c209f9f905998507 diff --git a/qt5-xmlpatterns/mingw-w64/PKGBUILD b/qt5-xmlpatterns/mingw-w64/PKGBUILD index 41f6f36d..de792111 100644 --- a/qt5-xmlpatterns/mingw-w64/PKGBUILD +++ b/qt5-xmlpatterns/mingw-w64/PKGBUILD @@ -4,13 +4,10 @@ # All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where # you also find the URL of a binary repository. -# This file is created from PKGBUILD.sh.in contained by the mentioned repository. +# This file is created from PKGBUILD.sh.ep contained by the mentioned repository. # Do not edit it manually! See README.md in the repository's root directory # for more information. -# Includes dynamic and static versions; if only one version is requried, just -# set $NO_STATIC_LIBS or $NO_SHARED_LIBS. - _qt_module=qtxmlpatterns pkgname=mingw-w64-qt5-xmlpatterns pkgver=5.15.0 @@ -29,12 +26,7 @@ sha256sums=('2752cf2aa25ebfda89c3736457e27b3d0c7c7ed290dcfd52c209f9f905998507') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' -[[ $NO_STATIC_LIBS ]] || \ - makedepends+=('mingw-w64-qt5-base-static') \ - optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \ - _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') -[[ $NO_SHARED_LIBS ]] || \ - _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +_configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-xmlpatterns/mingw-w64/PKGBUILD.sh.ep b/qt5-xmlpatterns/mingw-w64/PKGBUILD.sh.ep index 7b8d43d4..4150a79d 100644 --- a/qt5-xmlpatterns/mingw-w64/PKGBUILD.sh.ep +++ b/qt5-xmlpatterns/mingw-w64/PKGBUILD.sh.ep @@ -8,6 +8,6 @@ pkgver=5.15.0 pkgrel=1 arch=('any') pkgdesc="Support for XPath, XQuery, XSLT and XML schema validation (mingw-w64)" -depends=('mingw-w64-qt5-base') +depends=(<%== qt5deps qw(base) %>) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL3' 'FDL' 'custom')