From f425fbb20de04cf50bf22d054d87645f873fa919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= Date: Tue, 7 Mar 2023 17:34:17 +0100 Subject: [PATCH] qca: split into qt5/qt6 packages --- mingw-w64-qca-qt5/PKGBUILD | 81 ----------- mingw-w64-qca/PKGBUILD | 136 ++++++++++++++++++ .../cyrus_sasl_linking.patch | 0 .../qca-mingw-custom-certificates.patch | 0 .../qca-mingw-link-to-release.patch | 0 .../qca-mingw-pkg-config.patch | 0 .../qca-qt5-CLANG32.install | 0 .../qca-qt5-CLANG64.install | 0 .../qca-qt5-CLANGARM64.install | 0 .../qca-qt5-MINGW32.install | 0 .../qca-qt5-MINGW64.install | 0 .../qca-qt5-UCRT64.install | 0 mingw-w64-qca/qca-qt6-CLANG32.install | 11 ++ mingw-w64-qca/qca-qt6-CLANG64.install | 11 ++ mingw-w64-qca/qca-qt6-CLANGARM64.install | 11 ++ mingw-w64-qca/qca-qt6-MINGW32.install | 11 ++ mingw-w64-qca/qca-qt6-MINGW64.install | 11 ++ mingw-w64-qca/qca-qt6-UCRT64.install | 11 ++ .../qt5-custom-dirs.patch | 2 +- 19 files changed, 203 insertions(+), 82 deletions(-) delete mode 100644 mingw-w64-qca-qt5/PKGBUILD create mode 100644 mingw-w64-qca/PKGBUILD rename {mingw-w64-qca-qt5 => mingw-w64-qca}/cyrus_sasl_linking.patch (100%) rename {mingw-w64-qca-qt5 => mingw-w64-qca}/qca-mingw-custom-certificates.patch (100%) rename {mingw-w64-qca-qt5 => mingw-w64-qca}/qca-mingw-link-to-release.patch (100%) rename {mingw-w64-qca-qt5 => mingw-w64-qca}/qca-mingw-pkg-config.patch (100%) rename mingw-w64-qca-qt5/qca-qt5-git-CLANG32.install => mingw-w64-qca/qca-qt5-CLANG32.install (100%) rename mingw-w64-qca-qt5/qca-qt5-git-CLANG64.install => mingw-w64-qca/qca-qt5-CLANG64.install (100%) rename mingw-w64-qca-qt5/qca-qt5-git-CLANGARM64.install => mingw-w64-qca/qca-qt5-CLANGARM64.install (100%) rename mingw-w64-qca-qt5/qca-qt5-git-MINGW32.install => mingw-w64-qca/qca-qt5-MINGW32.install (100%) rename mingw-w64-qca-qt5/qca-qt5-git-MINGW64.install => mingw-w64-qca/qca-qt5-MINGW64.install (100%) rename mingw-w64-qca-qt5/qca-qt5-git-UCRT64.install => mingw-w64-qca/qca-qt5-UCRT64.install (100%) create mode 100644 mingw-w64-qca/qca-qt6-CLANG32.install create mode 100644 mingw-w64-qca/qca-qt6-CLANG64.install create mode 100644 mingw-w64-qca/qca-qt6-CLANGARM64.install create mode 100644 mingw-w64-qca/qca-qt6-MINGW32.install create mode 100644 mingw-w64-qca/qca-qt6-MINGW64.install create mode 100644 mingw-w64-qca/qca-qt6-UCRT64.install rename {mingw-w64-qca-qt5 => mingw-w64-qca}/qt5-custom-dirs.patch (92%) diff --git a/mingw-w64-qca-qt5/PKGBUILD b/mingw-w64-qca-qt5/PKGBUILD deleted file mode 100644 index dec63fa901..0000000000 --- a/mingw-w64-qca-qt5/PKGBUILD +++ /dev/null @@ -1,81 +0,0 @@ -# Maintainer: AlexWMF - -_realname=qca -pkgbase=mingw-w64-${_realname}-qt5 -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-qt5" -pkgver=2.3.5 -pkgrel=3 -pkgdesc="Qt Cryptographic Architecture (mingw-w64)" -arch=('any') -mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') -url="https://userbase.kde.org/QCA" -license=('LGPL') -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-qt5-git") -replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-qt5-git") -makedepends=("${MINGW_PACKAGE_PREFIX}-cc" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-ninja" - "${MINGW_PACKAGE_PREFIX}-pkgconf" - "${MINGW_PACKAGE_PREFIX}-doxygen") -depends=("${MINGW_PACKAGE_PREFIX}-ca-certificates" - "${MINGW_PACKAGE_PREFIX}-cyrus-sasl" - "${MINGW_PACKAGE_PREFIX}-gnupg" - "${MINGW_PACKAGE_PREFIX}-libgcrypt" - "${MINGW_PACKAGE_PREFIX}-nss" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-qt5-base") -install=${_realname}-qt5-git-${MSYSTEM}.install -source=("https://download.kde.org/stable/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.xz"{,.sig} - "cyrus_sasl_linking.patch" - "qt5-custom-dirs.patch" - "qca-mingw-pkg-config.patch" - "qca-mingw-custom-certificates.patch" - "qca-mingw-link-to-release.patch") -sha256sums=('91f7d916ab3692bf5991f0a553bf8153161bfdda14bd005d480a2b4e384362e8' - 'SKIP' - 'eadfa58299b2dd22ad7ea4b6841466effb191e24ed153485c0f4c82ff4ce00f7' - '4bf3c14bddc34ad439930dcbfac3eee6fa8fbbfd13a75bedba389be4541dcdbc' - '9107a43a7fa620d32dc78c2a7a4f58e17896fe1fc6dd695e6e49a7c65351bbfd' - '879b6e306a1a4a1887a824cde5fecef3dc43170b9f7578d968fe705d6da9f613' - '037b615f8b6f609112383b69e6050e7c939b12b0c7c0fa210a58e075c0d1c589') -validpgpkeys=('CB9387521E1EE0127DA804843FDBB55084CC5D84') # Harald Sitter - -prepare() { - cd "${srcdir}/${_realname}-${pkgver}" - patch -p1 -i ${srcdir}/cyrus_sasl_linking.patch - patch -p1 -i ${srcdir}/qt5-custom-dirs.patch - patch -p1 -i ${srcdir}/qca-mingw-pkg-config.patch - patch -p1 -i ${srcdir}/qca-mingw-custom-certificates.patch - patch -p1 -i ${srcdir}/qca-mingw-link-to-release.patch -} - -build() { - mkdir ${srcdir}/build-${MSYSTEM} && cd ${srcdir}/build-${MSYSTEM} - - declare -a _extra_config - if check_option "debug" "n"; then - _extra_config+=("-DCMAKE_BUILD_TYPE=Release") - else - _extra_config+=("-DCMAKE_BUILD_TYPE=Debug") - fi - - #QC_CERTSTORE_PATH=${MINGW_PREFIX}/ssl/certs/ca-bundle.crt - MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;DQC_CERTSTORE_PATH=" \ - ${MINGW_PREFIX}/bin/cmake \ - -G"Ninja" \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - ${_extra_config[@]} \ - -DWITH_botan_PLUGIN=OFF \ - -DBUILD_TESTS=OFF \ - -DQCA_SUFFIX=qt5 \ - -DQCA_SYSTEMSTORE_PATH=../etc/ssl/certs/ca-bundle.crt \ - -DQCA_INSTALL_IN_QT_PREFIX=ON \ - ../${_realname}-${pkgver}. - - ${MINGW_PREFIX}/bin/cmake --build . -} - -package() { - cd ${srcdir}/build-${MSYSTEM} - DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install . -} diff --git a/mingw-w64-qca/PKGBUILD b/mingw-w64-qca/PKGBUILD new file mode 100644 index 0000000000..08707557de --- /dev/null +++ b/mingw-w64-qca/PKGBUILD @@ -0,0 +1,136 @@ +# Maintainer: AlexWMF + +_realname=qca +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-qt5" + $([[ ${CARCH} == i686 ]] || echo "${MINGW_PACKAGE_PREFIX}-${_realname}-qt6")) +pkgver=2.3.5 +pkgrel=4 +pkgdesc="Qt Cryptographic Architecture (mingw-w64)" +arch=('any') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') +url="https://userbase.kde.org/QCA" +license=('spdx:LGPL-2.1') +makedepends=("${MINGW_PACKAGE_PREFIX}-cc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-ninja" + "${MINGW_PACKAGE_PREFIX}-pkgconf" + "${MINGW_PACKAGE_PREFIX}-doxygen" + "${MINGW_PACKAGE_PREFIX}-qt5-base" + $([[ ${CARCH} == i686 ]] || echo \ + "${MINGW_PACKAGE_PREFIX}-qt6-base" \ + "${MINGW_PACKAGE_PREFIX}-qt6-5compat")) +depends=("${MINGW_PACKAGE_PREFIX}-ca-certificates" + "${MINGW_PACKAGE_PREFIX}-cyrus-sasl" + "${MINGW_PACKAGE_PREFIX}-gnupg" + "${MINGW_PACKAGE_PREFIX}-libgcrypt" + "${MINGW_PACKAGE_PREFIX}-nss" + "${MINGW_PACKAGE_PREFIX}-openssl") +source=("https://download.kde.org/stable/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.xz"{,.sig} + "cyrus_sasl_linking.patch" + "qt5-custom-dirs.patch" + "qca-mingw-pkg-config.patch" + "qca-mingw-custom-certificates.patch" + "qca-mingw-link-to-release.patch") +sha256sums=('91f7d916ab3692bf5991f0a553bf8153161bfdda14bd005d480a2b4e384362e8' + 'SKIP' + 'eadfa58299b2dd22ad7ea4b6841466effb191e24ed153485c0f4c82ff4ce00f7' + 'faada79c026ccb50b122b8a45d5c0f138ac2dbfd1cf036d7a9e070f524eeae89' + '9107a43a7fa620d32dc78c2a7a4f58e17896fe1fc6dd695e6e49a7c65351bbfd' + '879b6e306a1a4a1887a824cde5fecef3dc43170b9f7578d968fe705d6da9f613' + '037b615f8b6f609112383b69e6050e7c939b12b0c7c0fa210a58e075c0d1c589') +validpgpkeys=('CB9387521E1EE0127DA804843FDBB55084CC5D84') # Harald Sitter + +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying $_patch" + patch -Nbp1 -i "${srcdir}/$_patch" + done +} + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + apply_patch_with_msg \ + cyrus_sasl_linking.patch \ + qt5-custom-dirs.patch \ + qca-mingw-pkg-config.patch \ + qca-mingw-custom-certificates.patch \ + qca-mingw-link-to-release.patch +} + +build() { + declare -a _extra_config + if check_option "debug" "n"; then + _extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + _extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi + + mkdir -p ${srcdir}/build-${MSYSTEM}-qt5 && cd ${srcdir}/build-${MSYSTEM}-qt5 + + #QC_CERTSTORE_PATH=${MINGW_PREFIX}/ssl/certs/ca-bundle.crt + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;DQC_CERTSTORE_PATH=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"Ninja" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ${_extra_config[@]} \ + -DWITH_botan_PLUGIN=OFF \ + -DBUILD_TESTS=OFF \ + -DQCA_SYSTEMSTORE_PATH=../etc/ssl/certs/ca-bundle.crt \ + -DQCA_INSTALL_IN_QT_PREFIX=ON \ + -DBUILD_WITH_QT6=OFF \ + ../${_realname}-${pkgver}. + + ${MINGW_PREFIX}/bin/cmake --build . + + if [[ ${CARCH} != i686 ]]; then + + mkdir -p ${srcdir}/build-${MSYSTEM}-qt6 && cd ${srcdir}/build-${MSYSTEM}-qt6 + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;DQC_CERTSTORE_PATH=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"Ninja" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + ${_extra_config[@]} \ + -DWITH_botan_PLUGIN=OFF \ + -DBUILD_TESTS=OFF \ + -DQCA_SYSTEMSTORE_PATH=../etc/ssl/certs/ca-bundle.crt \ + -DQCA_INSTALL_IN_QT_PREFIX=ON \ + -DBUILD_WITH_QT6=ON \ + ../${_realname}-${pkgver}. + + ${MINGW_PREFIX}/bin/cmake --build . + + fi +} + +package_qca-qt5() { + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-qt5-git") + replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-qt5-git") + depends+=("${MINGW_PACKAGE_PREFIX}-qt5-base") + install=${_realname}-qt5-${MSYSTEM}.install + cd ${srcdir}/build-${MSYSTEM}-qt5 + DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install . +} + +package_qca-qt6() { + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-qt5-git") + replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-qt5-git") + depends+=("${MINGW_PACKAGE_PREFIX}-qt6-base" + "${MINGW_PACKAGE_PREFIX}-qt6-5compat") + install=${_realname}-qt6-${MSYSTEM}.install + cd ${srcdir}/build-${MSYSTEM}-qt6 + DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install . +} + +# template start; name=mingw-w64-splitpkg-wrappers; version=1.0; +# vim: set ft=bash : + +# generate wrappers +for _name in "${pkgname[@]}"; do + _short="package_${_name#${MINGW_PACKAGE_PREFIX}-}" + _func="$(declare -f "${_short}")" + eval "${_func/#${_short}/package_${_name}}" +done +# template end; diff --git a/mingw-w64-qca-qt5/cyrus_sasl_linking.patch b/mingw-w64-qca/cyrus_sasl_linking.patch similarity index 100% rename from mingw-w64-qca-qt5/cyrus_sasl_linking.patch rename to mingw-w64-qca/cyrus_sasl_linking.patch diff --git a/mingw-w64-qca-qt5/qca-mingw-custom-certificates.patch b/mingw-w64-qca/qca-mingw-custom-certificates.patch similarity index 100% rename from mingw-w64-qca-qt5/qca-mingw-custom-certificates.patch rename to mingw-w64-qca/qca-mingw-custom-certificates.patch diff --git a/mingw-w64-qca-qt5/qca-mingw-link-to-release.patch b/mingw-w64-qca/qca-mingw-link-to-release.patch similarity index 100% rename from mingw-w64-qca-qt5/qca-mingw-link-to-release.patch rename to mingw-w64-qca/qca-mingw-link-to-release.patch diff --git a/mingw-w64-qca-qt5/qca-mingw-pkg-config.patch b/mingw-w64-qca/qca-mingw-pkg-config.patch similarity index 100% rename from mingw-w64-qca-qt5/qca-mingw-pkg-config.patch rename to mingw-w64-qca/qca-mingw-pkg-config.patch diff --git a/mingw-w64-qca-qt5/qca-qt5-git-CLANG32.install b/mingw-w64-qca/qca-qt5-CLANG32.install similarity index 100% rename from mingw-w64-qca-qt5/qca-qt5-git-CLANG32.install rename to mingw-w64-qca/qca-qt5-CLANG32.install diff --git a/mingw-w64-qca-qt5/qca-qt5-git-CLANG64.install b/mingw-w64-qca/qca-qt5-CLANG64.install similarity index 100% rename from mingw-w64-qca-qt5/qca-qt5-git-CLANG64.install rename to mingw-w64-qca/qca-qt5-CLANG64.install diff --git a/mingw-w64-qca-qt5/qca-qt5-git-CLANGARM64.install b/mingw-w64-qca/qca-qt5-CLANGARM64.install similarity index 100% rename from mingw-w64-qca-qt5/qca-qt5-git-CLANGARM64.install rename to mingw-w64-qca/qca-qt5-CLANGARM64.install diff --git a/mingw-w64-qca-qt5/qca-qt5-git-MINGW32.install b/mingw-w64-qca/qca-qt5-MINGW32.install similarity index 100% rename from mingw-w64-qca-qt5/qca-qt5-git-MINGW32.install rename to mingw-w64-qca/qca-qt5-MINGW32.install diff --git a/mingw-w64-qca-qt5/qca-qt5-git-MINGW64.install b/mingw-w64-qca/qca-qt5-MINGW64.install similarity index 100% rename from mingw-w64-qca-qt5/qca-qt5-git-MINGW64.install rename to mingw-w64-qca/qca-qt5-MINGW64.install diff --git a/mingw-w64-qca-qt5/qca-qt5-git-UCRT64.install b/mingw-w64-qca/qca-qt5-UCRT64.install similarity index 100% rename from mingw-w64-qca-qt5/qca-qt5-git-UCRT64.install rename to mingw-w64-qca/qca-qt5-UCRT64.install diff --git a/mingw-w64-qca/qca-qt6-CLANG32.install b/mingw-w64-qca/qca-qt6-CLANG32.install new file mode 100644 index 0000000000..001dc7f2e1 --- /dev/null +++ b/mingw-w64-qca/qca-qt6-CLANG32.install @@ -0,0 +1,11 @@ +post_install() { + local _real_prefix=/clang32 + local _prefix=$(cygpath -wm ${_real_prefix}) + for f in ${_real_prefix}/lib/cmake/Qca-qt6/*.cmake; do + sed -s "s|${_real_prefix}|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca/qca-qt6-CLANG64.install b/mingw-w64-qca/qca-qt6-CLANG64.install new file mode 100644 index 0000000000..f5d4c5ccf2 --- /dev/null +++ b/mingw-w64-qca/qca-qt6-CLANG64.install @@ -0,0 +1,11 @@ +post_install() { + local _real_prefix=/clang64 + local _prefix=$(cygpath -wm ${_real_prefix}) + for f in ${_real_prefix}/lib/cmake/Qca-qt6/*.cmake; do + sed -s "s|${_real_prefix}|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca/qca-qt6-CLANGARM64.install b/mingw-w64-qca/qca-qt6-CLANGARM64.install new file mode 100644 index 0000000000..00074e65f9 --- /dev/null +++ b/mingw-w64-qca/qca-qt6-CLANGARM64.install @@ -0,0 +1,11 @@ +post_install() { + local _real_prefix=/clangarm64 + local _prefix=$(cygpath -wm ${_real_prefix}) + for f in ${_real_prefix}/lib/cmake/Qca-qt6/*.cmake; do + sed -s "s|${_real_prefix}|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca/qca-qt6-MINGW32.install b/mingw-w64-qca/qca-qt6-MINGW32.install new file mode 100644 index 0000000000..b81ce1ba83 --- /dev/null +++ b/mingw-w64-qca/qca-qt6-MINGW32.install @@ -0,0 +1,11 @@ +post_install() { + local _real_prefix=/mingw32 + local _prefix=$(cygpath -wm ${_real_prefix}) + for f in ${_real_prefix}/lib/cmake/Qca-qt6/*.cmake; do + sed -s "s|${_real_prefix}|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca/qca-qt6-MINGW64.install b/mingw-w64-qca/qca-qt6-MINGW64.install new file mode 100644 index 0000000000..f826ccbddd --- /dev/null +++ b/mingw-w64-qca/qca-qt6-MINGW64.install @@ -0,0 +1,11 @@ +post_install() { + local _real_prefix=/mingw64 + local _prefix=$(cygpath -wm ${_real_prefix}) + for f in ${_real_prefix}/lib/cmake/Qca-qt6/*.cmake; do + sed -s "s|${_real_prefix}|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca/qca-qt6-UCRT64.install b/mingw-w64-qca/qca-qt6-UCRT64.install new file mode 100644 index 0000000000..a7e107b72f --- /dev/null +++ b/mingw-w64-qca/qca-qt6-UCRT64.install @@ -0,0 +1,11 @@ +post_install() { + local _real_prefix=/ucrt64 + local _prefix=$(cygpath -wm ${_real_prefix}) + for f in ${_real_prefix}/lib/cmake/Qca-qt6/*.cmake; do + sed -s "s|${_real_prefix}|${_prefix}|g" -i ${f} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qca-qt5/qt5-custom-dirs.patch b/mingw-w64-qca/qt5-custom-dirs.patch similarity index 92% rename from mingw-w64-qca-qt5/qt5-custom-dirs.patch rename to mingw-w64-qca/qt5-custom-dirs.patch index 178400c36c..51116125c8 100644 --- a/mingw-w64-qca-qt5/qt5-custom-dirs.patch +++ b/mingw-w64-qca/qt5-custom-dirs.patch @@ -5,7 +5,7 @@ set(QCA_BINARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Directory where qca plugins will install") set(QCA_LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}" CACHE PATH "Directory where qca library will install") - set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install") -+ set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/qt5/mkspecs/features" CACHE PATH "Directory where qca feature file will install") ++ set(QCA_FEATURE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/${QCA_PREFIX}/mkspecs/features" CACHE PATH "Directory where qca feature file will install") if(NOT QCA_SUFFIX) set(QCA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca public headers will install") set(QCA_PRIVATE_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory where qca headers will install")