Skip to content

Instantly share code, notes, and snippets.

@Subv
Created February 8, 2019 00:24
Show Gist options
  • Save Subv/76d2fbeeeb050bf155a8bc0b042aa404 to your computer and use it in GitHub Desktop.
Save Subv/76d2fbeeeb050bf155a8bc0b042aa404 to your computer and use it in GitHub Desktop.
Switch Piglit PKGBUILD
pkgname=switch-piglit
pkgver=r1223.1ded029
pkgrel=1
pkgdesc='Piglit'
arch=('any')
url='https://github.com/mesa3d/piglit'
license=('GPL')
options=(!strip libtool staticlibs)
makedepends=('git' 'switch-pkg-config' 'devkitpro-pkgbuild-helpers' 'switch-waffle')
source=(${pkgname}::"git+https://github.com/subv/piglit#commit=3c20fb3e60b656b4b39da36e19c33a610e895173")
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" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS $CPPFLAGS" \
-DPIGLIT_DYNAMIC_LINKING:BOOL=OFF \
-DPIGLIT_USE_WAFFLE:BOOL=ON \
.
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