1 # Contributor: Matthew Bauer <mjbauer95@gmail.com>
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.'
8 url='http://lbpp.sourceforge.net/'
11 makedepends=('gcc' 'pkgconfig' 'gtk' 'libgnomeui')
12 source=("http://prdownloads.sourceforge.net/lbpp/${pkgname}-${pkgver}-linux.tgz")
13 md5sums=('850c8c58c4520b28cb61fd9acd18bd46')
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" ]
33 export GLBCC_CORE=${GLBCC_SHARE}
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/*
55 install -m444 $i ${GLBCC_INCLUDE}
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\`" \
64 echo "-L${GLBCC_LIB} -lLB -lm \`pkg-config --libs gnomeui\`" \
66 echo "${GLBCC_LIB}/lbcrt0.o" >> ${GLBCC_SPEC}
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"