mirror of https://github.com/mosra/magnum.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.8 KiB
59 lines
1.8 KiB
# Author: mosra <mosra@centrum.cz> |
|
pkgname=nacl-magnum |
|
pkgver=dev.newlib |
|
pkgrel=1 |
|
pkgdesc="OpenGL graphics engine (NaCl newlib version)" |
|
arch=('any') |
|
url="https://github.com/mosra/magnum" |
|
license=('MIT') |
|
depends=('nacl-corrade') |
|
makedepends=('nacl-sdk' 'cmake') |
|
options=(!buildflags !strip) |
|
|
|
build() { |
|
# Build 32bit |
|
mkdir -p "$startdir/build-nacl-newlib-x86-32" |
|
cd "$startdir/build-nacl-newlib-x86-32" |
|
|
|
cmake .. \ |
|
-DCMAKE_MODULE_PATH="$startdir/toolchains/modules" \ |
|
-DCMAKE_TOOLCHAIN_FILE="$startdir/toolchains/generic/NaCl-newlib-x86-32.cmake" \ |
|
-DCMAKE_BUILD_TYPE=Release \ |
|
-DCMAKE_INSTALL_PREFIX=/usr/nacl \ |
|
-DWITH_MAGNUMINFO=ON \ |
|
-DWITH_NACLAPPLICATION=ON \ |
|
-DWITH_WINDOWLESSNACLAPPLICATION=ON \ |
|
-DLIB_SUFFIX=/32 |
|
make |
|
|
|
# Build 64bit |
|
mkdir -p "$startdir/build-nacl-newlib-x86-64" |
|
cd "$startdir/build-nacl-newlib-x86-64" |
|
|
|
cmake .. \ |
|
-DCMAKE_MODULE_PATH="$startdir/toolchains/modules" \ |
|
-DCMAKE_TOOLCHAIN_FILE="$startdir/toolchains/generic/NaCl-newlib-x86-64.cmake" \ |
|
-DCMAKE_BUILD_TYPE=Release \ |
|
-DCMAKE_INSTALL_PREFIX=/usr/nacl \ |
|
-DWITH_MAGNUMINFO=ON \ |
|
-DWITH_NACLAPPLICATION=ON \ |
|
-DWITH_WINDOWLESSNACLAPPLICATION=ON |
|
make |
|
} |
|
|
|
package() { |
|
# Install 32bit |
|
cd "$startdir/build-nacl-newlib-x86-32" |
|
make DESTDIR="$pkgdir/" install |
|
|
|
# Strip 32bit binaries |
|
/usr/nacl/toolchain/linux_x86_newlib/bin/i686-nacl-strip ${pkgdir}/usr/nacl/bin/*x86-32.nexe |
|
|
|
# Install 64bit (the headers will be overwritten, but they are (and should |
|
# be) the same for both versions |
|
cd "$startdir/build-nacl-newlib-x86-64" |
|
make DESTDIR="$pkgdir/" install |
|
|
|
# Strip 64bit binaries |
|
/usr/nacl/toolchain/linux_x86_newlib/bin/x86_64-nacl-strip ${pkgdir}/usr/nacl/bin/*x86-64.nexe |
|
}
|
|
|