### this file is sourced not run
PKGBUILD=1
PKGARCH=x86_64

# source: james

# release tarball
PKGVER=2023.01
TARBALL=glmark2-$PKGVER.tar.gz
MD5SUM=f6f20b4cb95aa40a446e8637115c7138
SRC_URL=https://github.com/glmark2/glmark2/archive/refs/tags/$PKGVER.tar.gz
BUNDLE=

# git-master tarball
#PKGVER=2023.01
#MD5SUM=
#hash=42e3d8fe3aa88743ef90348138f643f7b04a9237
#hash7=${hash#???????}; hash7=${hash%$hash7}
#TARBALL=glmark2-$PKGVER-$hash7.tar.gz
#SRC_URL=https://github.com/glmark2/glmark2/archive/$hash.tar.gz
#BUNDLE=

SLACKREQ='libglew libpng' # and opengl and xorg libraries, requires python3 to build
SLACKDESC="glmark2: glmark2 $PKGVER (OpenGL ES benchmark)  
glmark2:  
glmark2: glmark2 is a benchmark for OpenGL (ES) 2.0. It uses only the subset 
glmark2: of the OpenGL 2.0 API that is compatible with OpenGL ES 2.0.  
glmark2: 
glmark2: https://github.com/glmark2/glmark2
glmark2: 
glmark2: 
glmark2: 
glmark2: 
glmark2: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	! [ -e /usr/bin/env ] && ln -s /tools/bin/env /usr/bin/env
	cd /tmp/glmark*
	./waf configure --prefix=/usr --with-flavors="x11-gl,x11-glesv2"
	./waf build $MAKEFLAGS && 
	./waf install &&
	pkg_build_slackdesc &&
	rm -rf /usr/bin/env
}
