APP=gyp
VERSION=20200512
BUILD=1sml
HOMEPAGE='https://gyp.gsrc.io/'
DESC="Meta-Build system that generates other build systems"
REQUIRES="python3"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION"_caa60026"

tar xf $SRCDIR/$APP-$VERSION"_caa60026".tar.?z*
  cd $APP-$VERSION"_caa60026"
  fixbuilddirpermissions

  patch -p1 < $SRCDIR/gyp-fix-cmake.patch
  patch -p1 < $SRCDIR/gyp-ninja-build.patch
  patch -p1 < $SRCDIR/gyp-python3.patch
  patch -p1 < $SRCDIR/gyp-python38.patch
  patch -p1 < $SRCDIR/gyp-python39.patch

  python3 setup.py install --prefix="" --root="$PKG"

  cp LICENSE $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
23a23e85eae9c7d92acea47a7e35b359ebe7f4039521276d0bbaf0fbcabe46c75351a2276185f2a478fb1cd04ccbf77b49aa553e63d6342e2fea219644a4010e  gyp-20200512_caa60026.tar.xz
09ddf9b2ae8bcaba7e419522ab51968613214928d76f386daf947f9af1f456f0979c9b22481f5747f67afd9b2cb9b8396a54148978c5c8692f22b7c68d44807e  gyp-fix-cmake.patch
c8a03c7904447b8b75c98a71c5c7891acbd94479d52bd7be402dbe142430bf31a9a102fadd8b627d3c95cf72ff8321abbb282a4230af390bfb7e08e04e0af710  gyp-ninja-build.patch
ea9d5d27ec10094a27cb27a739a4be08d0c65cf0a33e3c9cecb896b7fe0502be89a93ef3aa1cc1a0938a5a89f0af96e6c6035737419d0a8b32a79bc13db479c1  gyp-python3.patch
5edaec75a092270d75cf8161f39efbef92c80b3d71e413f9ae15a5ff2b02fdb83a5b5fbed5a666ea7683cbb16fe9b203ee5aa453b76e4bfcb3a9fd977c517e97  gyp-python38.patch
4fec654f18344edd9bb8a9d4838f2405e56e6ff2aaa459cea740d5a5cfbef3176449733a00a3a70c80858e7426b651f99c8e1ad1cbe28e4b40d55612af5f6fae  gyp-python39.patch
"
