| # Maintainer (MSYS2): Ray Donnelly <mingw.android@gmail.com> |
| # Contributor: Zach Bacon <zachbacon@vba-m.com> |
| |
| _variant=-${KF5_VARIANT:-shared} |
| source "$(dirname ${BASH_SOURCE[0]})"/../mingw-w64-PKGBUILD-common/kde-frameworks5 |
| _kde_f5_init_package "${_variant}" "ki18n" |
| pkgver=5.83.0 |
| pkgrel=1 |
| arch=('any') |
| mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64') |
| pkgdesc="KDE Gettext-based UI text internationalization (mingw-w64-qt5${_namesuff})" |
| license=('LGPL') |
| makedepends=("${MINGW_PACKAGE_PREFIX}-extra-cmake-modules>=${pkgver}" |
| "${MINGW_PACKAGE_PREFIX}-ninja") |
| depends=() |
| _kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-gettext" |
| _kde_f5_add_depends "${_variant}" "${MINGW_PACKAGE_PREFIX}-qt5${_namesuff}" |
| groups=("${MINGW_PACKAGE_PREFIX}-kf5") |
| source=("https://download.kde.org/stable/frameworks/${pkgver%.*}/${_basename}-${pkgver}.tar.xz"{,.sig} |
| "build-ktranscript-plugin-statically-if-not-shared.patch") |
| sha256sums=('d1bde46763240d3462df34131364c9693914a3016041e6cefb71bdcbfa4bef5e' |
| 'SKIP' |
| '2e00e2f5b202e964c5aaadda43a386ba4257e49bda027840b492692655c2741f') |
| validpgpkeys=('53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB') # David Faure <faure@kde.org> |
| |
| prepare() { |
| mkdir -p build-${CARCH}${_variant} |
| cd "${srcdir}"/${_basename}-${pkgver} |
| patch -p1 -i "${srcdir}"/build-ktranscript-plugin-statically-if-not-shared.patch |
| } |
| |
| build() { |
| local -a extra_config |
| cd build-${CARCH}${_variant} |
| if [ "${_variant}" = "-static" ]; then |
| extra_config+=( -DBUILD_SHARED_LIBS=NO ) |
| fi |
| |
| _kde_f5_build_env |
| ${MINGW_PREFIX}/bin/cmake.exe \ |
| -G "Ninja" \ |
| -DCMAKE_BUILD_TYPE=$(_kde_f5_CMAKE_BUILD_TYPE) \ |
| "${_kde_f5_KDE_INSTALL_DIRS[@]}" \ |
| -DBUILD_QCH=OFF \ |
| -DBUILD_TESTING=OFF \ |
| -DECM_DIR=${MINGW_PREFIX}/share/ECM \ |
| "${extra_config[@]}" \ |
| ../${_basename}-${pkgver} |
| |
| ${MINGW_PREFIX}/bin/cmake.exe --build ./ |
| } |
| |
| package() { |
| cd build-${CARCH}${_variant} |
| DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake.exe --build ./ --target install |
| |
| local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) |
| for _f in "${pkgdir}${MINGW_PREFIX}"/lib/cmake/KF5I18n/*.cmake; do |
| sed -e "s|${PREFIX_WIN}|\$\{_IMPORT_PREFIX\}|g" -i ${_f} |
| done |
| } |