initial import
This commit is contained in:
166
godot/PKGBUILD
Normal file
166
godot/PKGBUILD
Normal file
@@ -0,0 +1,166 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
# PKGBUILD incomplete, do not build it.
|
||||
# https://docs.godotengine.org/en/latest/development/compiling/compiling_for_linuxbsd.html
|
||||
|
||||
_pkgname=godot
|
||||
pkgname=godot-lts
|
||||
pkgver=3.3.2
|
||||
pkgrel=1
|
||||
pkgdesc='Advanced cross-platform 2D and 3D game engine'
|
||||
url="https://${pkgname}engine.org"
|
||||
license=(Apache-2.0 CC-BY-4.0) # software (Apache-2.0, not Expat) and logotype
|
||||
arch=(i686 x86_64)
|
||||
# add libyuv to replace misc/yuv2rgb.h code
|
||||
depends=(alsa-lib ca-certificates enet freetype2 libgl libtheora libvorbis libvpx libwebp libxcursor libxi libxinerama libxrandr libyuv-git
|
||||
miniupnpc opusfile pcre2 zstd)
|
||||
# this package needs system libraries to disable builtin libraries:
|
||||
# bullet, embree (x86_64 only), libsquish, libwslay, mbedtls, recastnavigation, xatlas
|
||||
#depends_x86_64=(embree)
|
||||
# list of builtin libraries are part in the source code:
|
||||
# * cvtt: Expat https://github.com/elasota/cvtt
|
||||
# * etc2comp: Apache-2.0 https://github.com/google/etc2comp
|
||||
# * fonts/noto-fonts: OFL-1.1 https://github.com/googlei18n/noto-fonts
|
||||
# * fonts/hack-font: Expat and Bitstream-Vera https://github.com/source-foundry/Hack
|
||||
# * fonts/droid-font: Apache-2.0 https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/
|
||||
# * glad: Expat https://github.com/Dav1dde/glad
|
||||
# * jpeg-compressor: (Public-Domain or Apache-2.0) and Intel https://github.com/richgel999/jpeg-compressor
|
||||
# * libsimplewebm: Expat https://github.com/zaps166/libsimplewebm
|
||||
# * minimp3: CC0 https://github.com/lieff/minimp3
|
||||
# * minizip: zlib and Info-Zip-BSD http://www.winimage.com/zLibDll/minizip.html (wrong tls keys in https)
|
||||
# https://raw.githubusercontent.com/madler/zlib/master/contrib/minizip/MiniZip64_info.txt
|
||||
# http://infozip.sourceforge.net/license.html (no https support)
|
||||
# * misc/clipper* Boost-1.0 https://sourceforge.net/projects/polyclipping
|
||||
# * misc/easing_equations* Modified-BSD http://robertpenner.com/easing/ (no https support)
|
||||
# https://github.com/jesusgollonet/ofpennereasing
|
||||
# * misc/fastlz* Expat https://github.com/ariya/FastLZ
|
||||
# * misc/hq2x* Apache-2.0 https://github.com/brunexgeek/hqx
|
||||
# * misc/ifaddrs-android* Modified-BSD https://chromium.googlesource.com/external/webrtc/stable/talk/+/master/base/ifaddrs-android.h
|
||||
# * misc/mikktspace* zlib https://archive.blender.org/wiki/index.php/Dev:Shading/Tangent_Space_Normal_Maps/
|
||||
# * misc/open-simplex* Public-Domain https://github.com/smcameron/open-simplex-noise-in-c
|
||||
# * misc/pcg* Apache-2.0 https://www.pcg-random.org
|
||||
# * misc/smaz* Modified-BSD https://github.com/antirez/smaz
|
||||
# * misc/stb_* Public-Domain or Expat https://github.com/nothings/stb
|
||||
# * misc/triangulator* Expat https://github.com/ivanfratric/polypartition
|
||||
# * misc/yuv2rgb.h NONFREE-BSD!!! http://wss.co.uk/pinknoise/yuv2rgb/ (no https support)
|
||||
# code used by misc/yuv2rgb.h (yuv422_2_rgb8888(), yuv420_2_rgb8888() and yuv444_2_rgb8888() functions):
|
||||
# * modules/theora/video_stream_theora.cpp (patched?)
|
||||
# * modules/webm/video_stream_webm.cpp (patched?)
|
||||
# * nanosvg: zlib https://github.com/memononen/nanosvg
|
||||
# * oidn: Apache-2.0 https://github.com/OpenImageDenoise/oidn
|
||||
# * pvrtccompressor: Modified-BSD https://bitbucket.org/jthlim/pvrtccompressor (dead link)
|
||||
# * stb_rect_pack: Public-Domain or Expat https://github.com/nothings/stb
|
||||
# * tinyexr: Modified-BSD https://github.com/syoyo/tinyexr
|
||||
# * vhacd: Modified-BSD https://github.com/kmammou/v-hacd
|
||||
makedepends=(mesa-libgl python-setuptools scons)
|
||||
source=(https://downloads.tuxfamily.org/${_pkgname}engine/$pkgver/${_pkgname}-$pkgver-stable.tar.xz)
|
||||
sha512sums=('90806b99065f8916ddda81e21d01d6e9fee0a9a778793ffb8db13accda3bbb5ebee8a98ecf0f0b7a4e3b647cfceba6674d8e234725736cd0fadc74f77e8f64d5')
|
||||
|
||||
prepare() {
|
||||
cd $_pkgname-$pkgver-stable
|
||||
|
||||
# replace "thirdparty/misc/yuv2rgb.h" to <libyuv/convert_argb.h> code
|
||||
# please do not use video codecs (and video files) this software (like: theora, vp8, pv9 and av1; and: ogv and webm)
|
||||
sed -i 's|["]thirdparty/misc/yuv2rgb[.]h["]|<libyuv/convert_argb.h>|' \
|
||||
modules/theora/video_stream_theora.cpp \
|
||||
modules/webm/video_stream_webm.cpp
|
||||
sed -i 's|yuv444_2_rgb8888|//yuv444_2_rgb8888|' \
|
||||
modules/webm/video_stream_webm.cpp
|
||||
sed -i 's|yuv422_2_rgb8888|//yuv422_2_rgb8888|' \
|
||||
modules/webm/video_stream_webm.cpp
|
||||
sed -i 's|yuv420_2_rgb8888|//yuv420_2_rgb8888|' \
|
||||
modules/webm/video_stream_webm.cpp
|
||||
sed -i 's|[/][/]libyuv[:][:]I444ToARGB|libyuv::I444ToARGB|' \
|
||||
modules/webm/video_stream_webm.cpp
|
||||
sed -i 's|[/][/]libyuv[:][:]I422ToARGB|libyuv::I422ToARGB|' \
|
||||
modules/webm/video_stream_webm.cpp
|
||||
sed -i 's|[/][/]libyuv[:][:]I420ToARGB|libyuv::I420ToARGB|' \
|
||||
modules/webm/video_stream_webm.cpp
|
||||
#sed -i 's|[/][/]libyuv[:][:]I411ToARGB|libyuv::I411ToARGB|' \
|
||||
# modules/webm/video_stream_webm.cpp
|
||||
#sed -i 's|[/][/]converted [=] true[;]|converted = true;|' \
|
||||
# modules/webm/video_stream_webm.cpp
|
||||
sed -i 's|yuv444_2_rgb8888[(][(]uint8_t [*][)]dst[,] [(]uint8_t [*][)]yuv[[]0[]][.]data[,] [(]uint8_t [*][)]yuv[[]1[]][.]data[,] [(]uint8_t [*][)]yuv[[]2[]][.]data[,] size[.]x[,] size[.]y[,] yuv[[]0[]][.]stride[,] yuv[[]1[]][.]stride[,] size[.]x [<][<] 2[)]|libyuv::I444ToARGB((uint8_t *)yuv[0].data, yuv[0].stride, (uint8_t *)yuv[2].data, yuv[2].stride, (uint8_t *)yuv[1].data, yuv[1].stride, (uint8_t *)dst, size.x << 2, size.x, size.y)|' \
|
||||
modules/theora/video_stream_theora.cpp
|
||||
sed -i 's|yuv422_2_rgb8888[(][(]uint8_t [*][)]dst[,] [(]uint8_t [*][)]yuv[[]0[]][.]data[,] [(]uint8_t [*][)]yuv[[]1[]][.]data[,] [(]uint8_t [*][)]yuv[[]2[]][.]data[,] size[.]x[,] size[.]y[,] yuv[[]0[]][.]stride[,] yuv[[]1[]][.]stride[,] size[.]x [<][<] 2[)]|libyuv::I422ToARGB((uint8_t *)yuv[0].data, yuv[0].stride, (uint8_t *)yuv[2].data, yuv[2].stride, (uint8_t *)yuv[1].data, yuv[1].stride, (uint8_t *)dst, size.x << 2, size.x, size.y)|' \
|
||||
modules/theora/video_stream_theora.cpp
|
||||
sed -i 's|yuv420_2_rgb8888[(][(]uint8_t [*][)]dst[,] [(]uint8_t [*][)]yuv[[]0[]][.]data[,] [(]uint8_t [*][)]yuv[[]1[]][.]data[,] [(]uint8_t [*][)]yuv[[]2[]][.]data[,] size[.]x[,] size[.]y[,] yuv[[]0[]][.]stride[,] yuv[[]1[]][.]stride[,] size[.]x [<][<] 2[)]|libyuv::I420ToARGB((uint8_t *)yuv[0].data, yuv[0].stride, (uint8_t *)yuv[2].data, yuv[2].stride, (uint8_t *)yuv[1].data, yuv[1].stride, (uint8_t *)dst, size.x << 2, size.x, size.y)|' \
|
||||
modules/theora/video_stream_theora.cpp
|
||||
|
||||
# remove nonfree yuv2rgb.h header (nonfree bsd license)
|
||||
rm -v thirdparty/misc/yuv2rgb.h
|
||||
|
||||
# convert function examples:
|
||||
# * yuv444_2_rgb8888((uint8_t *)dst, (uint8_t *)yuv[0].data, (uint8_t *)yuv[1].data, (uint8_t *)yuv[2].data, size.x, size.y, yuv[0].stride, yuv[1].stride, size.x << 2);
|
||||
# * libyuv::I420ToARGB((uint8_t *)yuv[0].data, yuv[0].stride, (uint8_t *)yuv[2].data, yuv[2].stride, (uint8_t *)yuv[1].data, yuv[1].stride, (uint8_t *)dst, size.x << 2, size.x, size.y);
|
||||
# * yuv420_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
|
||||
# * libyuv::I420ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
|
||||
}
|
||||
|
||||
_build() {
|
||||
scons \
|
||||
bits=$1 \
|
||||
builtin_bullet=yes \
|
||||
builtin_certs=no \
|
||||
builtin_embree=yes \
|
||||
builtin_enet=no \
|
||||
builtin_freetype=no \
|
||||
builtin_libogg=no \
|
||||
builtin_libpng=no \
|
||||
builtin_libtheora=no \
|
||||
builtin_libvorbis=no \
|
||||
builtin_libvpx=no \
|
||||
builtin_libwebp=no \
|
||||
builtin_mbedtls=yes \
|
||||
builtin_miniupnpc=no \
|
||||
builtin_opus=no \
|
||||
builtin_pcre2=no \
|
||||
builtin_pcre2_with_jit=no \
|
||||
builtin_recast=yes \
|
||||
builtin_squish=yes \
|
||||
builtin_wslay=yes \
|
||||
builtin_xatlas=yes \
|
||||
builtin_zlib=no \
|
||||
builtin_zstd=no \
|
||||
deprecated=no \
|
||||
platform=$2 \
|
||||
production=yes \
|
||||
pulseaudio=no \
|
||||
target=$3 \
|
||||
tools=$4 \
|
||||
use_lto=$5
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $_pkgname-$pkgver-stable
|
||||
|
||||
export BUILD_NAME=hyperbola_gnu+linux-libre
|
||||
export SCONSFLAGS='-j1'
|
||||
|
||||
_build default linuxbsd release_debug yes no # godot
|
||||
#_build 32 linuxbsd release_debug no no # linux_x11_32_debug
|
||||
#_build 32 linuxbsd release no no # linux_x11_32_release
|
||||
#_build 64 linuxbsd release_debug no no # linux_x11_64_debug
|
||||
#_build 64 linuxbsd release no no # linux_x11_64_release
|
||||
#_build default server release_debug yes no # godot-headless
|
||||
#_build default server release no no # godot-server
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $_pkgname-$pkgver-stable
|
||||
install -Dm644 misc/dist/linux/org.${_pkgname}engine.Godot.desktop $pkgdir/usr/share/applications/$_pkgname.desktop
|
||||
install -Dm644 misc/dist/linux/org.${_pkgname}engine.Godot.appdata.xml -t $pkgdir/usr/share/metainfo
|
||||
install -Dm644 misc/dist/linux/org.${_pkgname}engine.Godot.xml -t $pkgdir/usr/share/metainfo
|
||||
install -Dm644 icon.svg $pkgdir/usr/share/pixmaps/godot.svg
|
||||
install -Dm755 bin/$_pkgname.x11.opt.tools.64 $pkgdir/usr/bin/$_pkgname
|
||||
#install -Dm755 bin/$_pkgname.?.opt.tools.64 $pkgdir/usr/bin/$_pkgname-headless
|
||||
#install -Dm755 bin/$_pkgname.?.opt.?.64 $pkgdir/usr/bin/$_pkgname-server
|
||||
#install -Dm755 bin/$_pkgname.x11.opt.?.32 $pkgdir/usr/share/$_pkgname/templates/linux_x11_32_debug
|
||||
#install -Dm755 bin/$_pkgname.x11.opt.?.32 $pkgdir/usr/share/$_pkgname/templates/linux_x11_32_release
|
||||
#install -Dm755 bin/$_pkgname.x11.opt.?.64 $pkgdir/usr/share/$_pkgname/templates/linux_x11_64_debug
|
||||
#install -Dm755 bin/$_pkgname.x11.opt.?.64 $pkgdir/usr/share/$_pkgname/templates/linux_x11_64_release
|
||||
install -Dm644 LICENSE.txt -t $pkgdir/usr/share/licenses/$pkgname
|
||||
install -Dm644 LOGO_LICENSE.md -t $pkgdir/usr/share/licenses/$pkgname
|
||||
install -Dm644 thirdparty/README.md -t $pkgdir/usr/share/licenses/$pkgname/thirdparty
|
||||
install -Dm644 misc/dist/linux/$_pkgname.6 -t $pkgdir/usr/share/man/man6
|
||||
}
|
||||
Reference in New Issue
Block a user