shrub/nix/nixcrpkgs/pkgs/angle/builder.sh
benjamin-tlon edd57d380d
Finish cc-release cross-compilation. (#1202)
- Fixes the IPC bug
- Fixes the terminfo bug
- Moves the OSX SDK out of our nixcrpkgs fork.
- Vendor nixcrpkgs instead of having it be a submodule.
2019-04-23 19:50:38 -07:00

47 lines
825 B
Bash

source $setup
cp -R $src src
chmod -R u+rw src
cd src
for patch in $patches; do
echo applying patch $patch
patch -p1 -i $patch
done
# ANGLE's gyp build files do not handle out-of-tree builds properly,
# so let's just do an in tree build.
gyp $gyp_flags src/angle.gyp
if [ -n "$debug" ]; then
cd out/Debug
else
cd out/Release
fi
ninja
libs="
obj/src/libANGLE.a
obj/src/libangle_common.a
obj/src/libangle_image_util.a
obj/src/libEGL_static.a
obj/src/libGLESv2_static.a
obj/src/libpreprocessor.a
obj/src/libtranslator.a
"
# Make the static libraries not be thin.
for lib in $libs; do
$AR rvs $lib.new $($AR -t $lib)
mv $lib.new $lib
$RANLIB $lib
done
mkdir -p $out/{lib,license,include}
cp -r ../../LICENSE $out/license/
cp $libs $out/lib/
cp -r ../../include/{KHR,EGL,GLES2,GLES3,GLSLANG} $out/include/