updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / glbcc / PKGBUILD
blob0aee93b58656a989f5c63b09aebdf25468ec659f
1 # Contributor: Matthew Bauer <mjbauer95@gmail.com>
3 pkgname=glbcc
4 pkgver=0.1.1
5 pkgrel=1
6 pkgdesc='GNU/Liberty Basic Compiler Collection (GLBCC) is a set of tools to allow Windows and Linux users to compile Liberty Basic code to standalone applications.'
7 arch=('i686' 'x86_64')
8 url='http://lbpp.sourceforge.net/'
9 license=('custom')
10 depends=('gtk')
11 makedepends=('gcc' 'pkgconfig' 'gtk' 'libgnomeui')
12 source=("http://prdownloads.sourceforge.net/lbpp/${pkgname}-${pkgver}-linux.tgz")
13 md5sums=('850c8c58c4520b28cb61fd9acd18bd46')
15 build() {
16         cd "${srcdir}/${pkgname}-0.1.0"
18         GLBCC_ROOT="$pkgdir/usr/lib/glbcc-lib/0.0.7"
19         GLBCC_LIB="$GLBCC_ROOT/lib"
21         GLBCC_LIB="${GLBCC_ROOT}/lib"
22         GLBCC_XLIB="${GLBCC_ROOT}/xlib"
23         GLBCC_INCLUDE="${GLBCC_ROOT}/include"
25         GLBCC_SHARE="$pkgdir/usr/share/glbcc"
26         GLBCC_BIN="$pkgdir/usr/bin"
28         GLBCC_SPEC="${GLBCC_ROOT}/specs"
29         GLBCC_XSPEC="${GLBCC_ROOT}/xspecs"
31         if [ -z "$GLBCC_CORE" ]
32         then
33                 export GLBCC_CORE=${GLBCC_SHARE}
34         fi
36         install -d ${GLBCC_LIB}
37         install -d ${GLBCC_INCLUDE}
39         make -C lbpp || return 1
41         install -m555 lbpp/src/lbpp ${GLBCC_BIN}
43         sed -i 's/gnome-config --cflags gnome/pkg-config --cflags libgnomeui-2.0/' './libLB/src/gui/gtk/Makefile'
44         sed -i 's/#include <gtk\/gtk.h>/#define GTK_ENABLE_BROKEN\n#include <gtk\/gtk.h>/' './libLB/src/gui/gtk/text_window.c'
45         sed -i 's/gnome-config --cflags gnomeui/pkg-config --cflags libgnomeui-2.0/' './config.h'
46         sed -i 's/gnome-config --libs gnomeui/pkg-config --libs libgnomeui-2.0/' './config.h'
48         make -C libLB clean all || return 1
50         install -m444 libLB/lib/libLB.a ${GLBCC_LIB}
51         install -m444 libLB/lib/lbcrt0.o ${GLBCC_LIB}
53         for i in libLB/include/*
54         do
55                 install -m444 $i ${GLBCC_INCLUDE}
56         done
58         rm -f ${GLBCC_SPEC}
60         echo "${GLBCC_BIN}/lbpp -I${GLBCC_INCLUDE}" >> ${GLBCC_SPEC}
61         echo "gcc" >> ${GLBCC_SPEC}
62         echo "-g -I${GLBCC_INCLUDE} \`pkg-config --cflags gnomeui\`" \
63              >> ${GLBCC_SPEC}
64         echo "-L${GLBCC_LIB} -lLB -lm \`pkg-config --libs gnomeui\`" \
65              >> ${GLBCC_SPEC}
66         echo "${GLBCC_LIB}/lbcrt0.o" >> ${GLBCC_SPEC}
68         rm -f glbcc/glbcc.bas
69         echo -e "specs$$ = \"${GLBCC_SPEC}\"\nxspecs$$ = \"${GLBCC_XSPEC}\"" \
70              | cat - glbcc/glbcc.tmpl > glbcc/glbcc.bas
72         make -C glbcc bootstrap || return 1
74         install -m555 glbcc/glbcc "$pkgdir/usr/bin"