diff options
author | William Pitcock <nenolod@dereferenced.org> | 2011-04-09 08:29:11 -0500 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2011-04-09 08:29:11 -0500 |
commit | f9c5ff16326765c4eb4535e79c6f31101f690fb0 (patch) | |
tree | 56be012ed1173135d41d8593e60f86db48cab961 /main/mesa-demos | |
parent | 9c6e31f12ba641d9da1306c681f06fcf69623531 (diff) | |
download | aports-f9c5ff16326765c4eb4535e79c6f31101f690fb0.tar.bz2 aports-f9c5ff16326765c4eb4535e79c6f31101f690fb0.tar.xz |
main/mesa-demos: move from testing
Diffstat (limited to 'main/mesa-demos')
-rw-r--r-- | main/mesa-demos/APKBUILD | 42 | ||||
-rw-r--r-- | main/mesa-demos/sincos.patch | 32 |
2 files changed, 74 insertions, 0 deletions
diff --git a/main/mesa-demos/APKBUILD b/main/mesa-demos/APKBUILD new file mode 100644 index 0000000000..1b371db139 --- /dev/null +++ b/main/mesa-demos/APKBUILD @@ -0,0 +1,42 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Natanael Copa +pkgname=mesa-demos +pkgver=8.0.1 +pkgrel=0 +pkgdesc="Mesa demos and utils" +url="http://mesa3d.sourceforge.net" +arch="all" +license="custom" +depends="" +depends_dev= +makedepends="$depends_dev mesa-dev glew-dev automake autoconf libtool" +install="" +subpackages= +source="ftp://ftp.freedesktop.org/pub/mesa/demos/$pkgver/$pkgname-$pkgver.tar.bz2 + sincos.patch" + +_builddir="$srcdir/$pkgname-$pkgver" + +prepare() { + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1 + esac + done +} + +build() { + cd "$_builddir" + export LDFLAGS="$LDFLAGS -Wl,-z,lazy" + ./configure --prefix=/usr + make V=1 || return 1 +} + +package() { + cd "$_builddir" + make -j1 DESTDIR="$pkgdir" install || return 1 +} + +md5sums="320c2a4b6edc6faba35d9cb1e2a30bf4 mesa-demos-8.0.1.tar.bz2 +75be22556a657f0a157028233832d167 sincos.patch" diff --git a/main/mesa-demos/sincos.patch b/main/mesa-demos/sincos.patch new file mode 100644 index 0000000000..38da0285d1 --- /dev/null +++ b/main/mesa-demos/sincos.patch @@ -0,0 +1,32 @@ +--- ./src/egl/opengles2/es2gears.c.orig ++++ ./src/egl/opengles2/es2gears.c +@@ -109,13 +109,15 @@ + c[4] = 1; + v = gear->vertices; + for (i = 0; i < teeth; i++) { ++ GLint j; + s[0] = s[4]; + c[0] = c[4]; +- sincos(i * 2.0 * M_PI / teeth + da, &s[1], &c[1]); +- sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]); +- sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]); +- sincos(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]); + ++ for (j=1; j <=4; j++) { ++ s[j] = sin(i * 2.0 * M_PI / teeth + da * j); ++ c[j] = cos(i * 2.0 * M_PI / teeth + da * j); ++ } ++ + normal[0] = 0.0; + normal[1] = 0.0; + normal[2] = 1.0; +@@ -199,7 +201,8 @@ + { + double s, c; + +- sincos(angle, &s, &c); ++ s = sin(angle); ++ c = cos(angle); + GLfloat r[16] = { + x * x * (1 - c) + c, y * x * (1 - c) + z * s, x * z * (1 - c) - y * s, 0, + x * y * (1 - c) - z * s, y * y * (1 - c) + c, y * z * (1 - c) + x * s, 0, |