مهدي شينون (Mehdi Chinoune) c87298f444 Drop 32bit on some Large packages (>40Mb Download size)
and their reverse dependencies
2023-12-10 17:03:08 +01:00

55 lines
1.6 KiB
Bash

# Maintainer: Sarah Ottinger <schalaalexiazeal@gmail.com>
_realname=godot-cpp
pkgbase=mingw-w64-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
pkgver=3.5.1
pkgrel=1
pkgdesc='C++ bindings for the Godot script API (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://www.godotengine.org/"
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-godot_headers")
makedepends=("${MINGW_PACKAGE_PREFIX}-scons")
source=("https://github.com/godotengine/godot-cpp/archive/godot-${pkgver}-stable.tar.gz")
sha256sums=('a0ab1f117d30ab01837e39e7ff704bbded282db4643343579b2bca11794f99fc')
prepare() {
rm -rf "${_realname}-${pkgver}"
mv "${_realname}-godot-${pkgver}-stable" "${_realname}-${pkgver}"
}
build() {
cd "${_realname}-${pkgver}"
declare -a extra_config
if [ "$CARCH" = "x86_64" ]; then
extra_config+=("use_lto=yes")
extra_config+=("bits=64")
else
# lto is broken on 32bit
extra_config+=("use_lto=no")
extra_config+=("bits=32")
fi
${MINGW_PREFIX}/bin/scons ${MAKEFLAGS} \
platform=windows \
target=release \
use_mingw=yes \
headers_dir=${MINGW_PREFIX}/include/godot \
custom_api_file=${MINGW_PREFIX}/share/godot/api.json \
"${extra_config[@]}" \
generate_bindings=yes
}
package() {
cd "${srcdir}/${_realname}-${pkgver}"
mkdir -p "${pkgdir}${MINGW_PREFIX}/include"
cd include
find . -type f -exec install -Dm644 {} "${pkgdir}${MINGW_PREFIX}/include/godot/"{} \;
cd ..
install -D -m644 bin/libgodot-cpp.windows.release.*.a "${pkgdir}${MINGW_PREFIX}/lib/libgodot-cpp.a"
install -D -m644 LICENSE.md "${pkgdir}${MINGW_PREFIX}/share/licenses/godot-cpp/LICENSE.md"
}