PKGBUILDs/alarm/kodi-rbp-addon-visualization-shadertoy/PKGBUILD

55 lines
2.1 KiB
Bash

# Maintainer: BlackEagle <ike.devolder@gmail.com>>
# ALARM: Oleg Rakhmanov <oleg [at] archlinuxarm [dot] org>
# - Use CFLAGS, CXXFLAGS, CPPFLAGS, LDFLAGS from kodi-rbp
# - DUSE_LTO=0
# - Use -DOPENGL_INCLUDE_DIR=OPENGL_INCLUDE_DIR-NOTFOUND to disable OPENGL
# - Provide path to opengles{gl,egl} libraries for rpi
buildarch=20
pkgname=kodi-rbp-addon-visualization-shadertoy
_commit=6a9a5ca
pkgver=20170105.6a9a5ca
pkgrel=1
pkgdesc="Shadertoy visualizer for Kodi on raspberry pi"
arch=('armv6h' 'armv7h')
url='https://github.com/notspiff/visualization.shadertoy'
license=('GPL')
groups=('kodi-rbp-addons' 'kodi-rbp-addons-visualization')
depends=('kodi-rbp' 'p8-platform')
makedepends=('git' 'cmake' 'kodi-rbp-dev')
source=("$pkgname::git://github.com/notspiff/visualization.shadertoy.git#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
cd "$pkgname"
git log -1 --date=short --format="%cd.%h" | tr -d '-'
}
build() {
cd "$pkgname"
FLAGS="-Ofast -fexcess-precision=fast -mfloat-abi=hard -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4\
-I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
[[ $CARCH == "armv6h" ]] && export CFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp" && export CXXFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp"
[[ $CARCH == "armv7h" ]] && export CFLAGS="$FLAGS -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" && export CXXFLAGS="$FLAGS -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad"
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=1 \
-DUSE_LTO=0 \
-DOPENGL_INCLUDE_DIR=OPENGL_INCLUDE_DIR-NOTFOUND \
-DOPENGLES2_INCLUDE_DIR=/opt/vc/include \
-DOPENGLES2_gl_LIBRARY=/opt/vc/lib/libbrcmGLESv2.so \
-DOPENGLES2_egl_LIBRARY=/opt/vc/lib/libbrcmEGL.so
make
}
package() {
cd "$pkgname"
make DESTDIR="$pkgdir/" install
}