summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD37
-rw-r--r--makefile.patch48
3 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..92410ac5670
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = glui
+ pkgdesc = A GLUT-based C++ user interface library which provides controls such as buttons, checkboxes, radio buttons, and spinners to OpenGL applications
+ pkgver = 2.36
+ pkgrel = 6
+ url = http://glui.sourceforge.net/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = freeglut
+ options = staticlibs
+ source = http://downloads.sourceforge.net/glui/glui-2.36.tgz
+ source = makefile.patch
+ md5sums = 9e8d506af9a9428dac09e8cd7bda7c1e
+ md5sums = ad14ce00704ceeb5183d354fd3b2d5c8
+
+pkgname = glui
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c3e38203d51
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: PhotonX <photon89 at googlemail dot com>
+# Contributor: ice-man <icemanf@gmail.com>
+# Contributor: dopsi
+pkgname=glui
+pkgver=2.36
+pkgrel=6
+pkgdesc="A GLUT-based C++ user interface library which provides controls such as buttons, checkboxes, radio buttons, and spinners to OpenGL applications"
+depends=('freeglut')
+source=('http://downloads.sourceforge.net/glui/glui-2.36.tgz' 'makefile.patch')
+url="http://glui.sourceforge.net/"
+arch=('i686' 'x86_64')
+md5sums=('9e8d506af9a9428dac09e8cd7bda7c1e' 'ad14ce00704ceeb5183d354fd3b2d5c8')
+license=('GPL')
+options=(staticlibs)
+
+build() {
+ cd $srcdir/${pkgname}-${pkgver}/src
+ patch -p0 < $srcdir/makefile.patch
+
+ make setup || exit 0
+ make lib/libglui.a || exit 0
+ make lib/libglui.so.2 || exit 0
+}
+
+package() {
+ cd $srcdir/${pkgname}-${pkgver}/src
+ mkdir -p $pkgdir/usr/lib/
+ mkdir -p $pkgdir/usr/include/
+ mkdir -p $pkgdir/usr/include/GL/
+ mkdir -p $pkgdir/usr/share/doc/glui-2.36/
+
+ cp lib/libglui.a $pkgdir/usr/lib/
+ cp lib/libglui.so.2 $pkgdir/usr/lib/
+ cp include/GL/glui.h $pkgdir/usr/include/GL/
+ cp doc/glui_manual.pdf $pkgdir/usr/share/doc/glui-2.36/
+}
+
diff --git a/makefile.patch b/makefile.patch
new file mode 100644
index 00000000000..b34ad7bd42a
--- /dev/null
+++ b/makefile.patch
@@ -0,0 +1,48 @@
+--- makefile.old 2015-02-20 11:28:57.770418000 +0100
++++ makefile 2015-02-20 11:32:19.723672891 +0100
+@@ -5,15 +5,15 @@
+ #CC=gcc
+
+ # Compiler options
+-OPTS=-g
+-OPTS=-O0
++#OPTS=-g
++#OPTS=-O0
+ #OPTS=-O2
+
+ UNAME = $(shell uname)
+
+ ifeq ($(UNAME), Linux)
+ CXX = g++
+-CPPFLAGS += $(OPTS) -Wall -pedantic
++CPPFLAGS += $(OPTS) -Wall -pedantic $(CFLAGS) -fpic
+ endif
+
+ #######################################
+@@ -44,13 +44,15 @@
+
+ GLUI_LIB = lib/libglui.a
+
++GLUI_LIB_SHARED = lib/libglui.so.2
++
+ GLUI_EXAMPLES = bin/example1 bin/example2 bin/example3 bin/example4 bin/example5 bin/example6
+
+ GLUI_TOOLS = bin/ppm2array
+
+ .PHONY: all setup examples tools clean depend doc doc-pdf doc-dist dist
+
+-all: setup $(GLUI_LIB) examples tools
++all: setup $(GLUI_LIB) $(GLUI_LIB_SHARED) examples tools
+
+ setup:
+ mkdir -p bin
+@@ -69,6 +71,9 @@
+ $(GLUI_LIB): $(GLUI_OBJS)
+ ar -r $(GLUI_LIB) $(GLUI_OBJS)
+
++$(GLUI_LIB_SHARED): $(GLUI_OBJS)
++ $(CXX) -shared -o $@ $<
++
+ .cpp.o:
+ $(CXX) $(CPPFLAGS) -c $<
+