Skip to content

Instantly share code, notes, and snippets.

@Subv
Created February 8, 2019 00:24
Show Gist options
  • Save Subv/d7d5e123d270cf0ec4685011b5c112ea to your computer and use it in GitHub Desktop.
Save Subv/d7d5e123d270cf0ec4685011b5c112ea to your computer and use it in GitHub Desktop.
Switch Waffle PKGBUILD
pkgname=switch-waffle
pkgver=r1224.0608693
pkgrel=1
pkgdesc='Waffle'
arch=('any')
url='http://www.waffle-gl.org/'
license=('BSD')
options=(!strip libtool staticlibs)
makedepends=('git' 'switch-pkg-config' 'devkitpro-pkgbuild-helpers')
source=(${pkgname}::"git+https://github.com/subv/waffle#commit=060869315480cb4e159e4a2283de0fecc4667095")
md5sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname}"
printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd ${pkgname}
source /opt/devkitpro/devkita64.sh
source /opt/devkitpro/switchvars.sh
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/devkita64.cmake \
-DCMAKE_INSTALL_PREFIX=$PORTLIBS_PREFIX \
-DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS -D_GNU_SOURCE" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS $CPPFLAGS -D_GNU_SOURCE" \
-Dwaffle_has_surfaceless_egl:BOOL=OFF \
-Dwaffle_build_tests:BOOL=OFF \
-Dwaffle_build_examples:BOOL=OFF \
.
make
}
package() {
cd ${pkgname}
source /opt/devkitpro/devkita64.sh
source /opt/devkitpro/switchvars.sh
make install DESTDIR="$pkgdir"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment