summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD28
-rw-r--r--libpng.patch23
3 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..81e186e8ba9e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = lightspeed
+ pkgdesc = Illustrate the effects of special relativity on the appearance of moving objects.
+ pkgver = 1.2a
+ pkgrel = 4
+ url = http://lightspeed.sourceforge.net
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ license = MPL
+ depends = gtkglarea1
+ depends = libpng
+ depends = libgl
+ depends = libtiff
+ source = http://downloads.sourceforge.net/sourceforge/lightspeed/lightspeed-1.2a.tar.gz
+ source = libpng.patch
+ md5sums = d6162f8b200db8ebfade791a71a439c0
+ md5sums = 44e7e5d9de2a838ffc87b24e207e0507
+
+pkgname = lightspeed
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7996434a019b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Mainrainer: Michael Kogan <michael dot kogan at gmx dot net >
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: Abhishek Dasgupta <abhidg@gmail.com>
+
+pkgname=lightspeed
+pkgver=1.2a
+pkgrel=4
+pkgdesc='Illustrate the effects of special relativity on the appearance of moving objects.'
+arch=('i686' 'x86_64')
+license=('LGPL' 'MPL')
+url='http://lightspeed.sourceforge.net'
+depends=('gtkglarea1' 'libpng' 'libgl' 'libtiff')
+source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz" "libpng.patch")
+md5sums=('d6162f8b200db8ebfade791a71a439c0' '44e7e5d9de2a838ffc87b24e207e0507')
+
+build() {
+ patch $pkgname-$pkgver/src/snapshot.c < libpng.patch
+
+ cd $pkgname-$pkgver
+
+ ./configure --prefix=/usr || return 1
+
+ make || return 1
+}
+package(){
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install || return 1
+}
diff --git a/libpng.patch b/libpng.patch
new file mode 100644
index 000000000000..ea21eb1f92a1
--- /dev/null
+++ b/libpng.patch
@@ -0,0 +1,23 @@
+--- snapshot_old.c 2000-10-26 23:00:27.000000000 +0200
++++ snapshot.c 2012-07-29 20:40:19.000000000 +0200
+@@ -30,6 +30,11 @@
+ static int write_png( int message, const void *data );
+ #endif
+
++/* starting with libpng15, png.h no longer #includes zlib.h */
++#ifndef Z_BEST_COMPRESSION
++#define Z_BEST_COMPRESSION 9
++#endif
++
+ #ifdef HAVE_LIBTIFF
+ #include <tiffio.h>
+ static int write_tiff( int message, const void *data );
+@@ -250,7 +255,7 @@
+ return -1;
+ png_write_s = png_create_write_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL );
+ png_info_s = png_create_info_struct( png_write_s );
+- if (setjmp( png_write_s->jmpbuf )) {
++ if (setjmp(png_jmpbuf(png_write_s))) {
+ /* Error writing file */
+ png_destroy_write_struct( &png_write_s, &png_info_s );
+ fclose( png_fp );