source: gs2-extensions/tesseract/trunk/src/devel.bash@ 34180

Last change on this file since 34180 was 34180, checked in by ak19, 4 years ago

Gnome-lib has setup.bash_old and setup.bat_old, but imagemagick and pdf-box (and now gstika) have setup.bash and setup.bat. I think this is because gnome-lib is needed for compiling Greenstone but doesn't get loaded as an regular extension when running GS3 or building collections, whereas the other gs2-extensions do (so GEXT is set for pdfbox and now gstika etc. Previously followed the gnome-lib pattern for tesseract gs2-extension, and source gs3-setup didn't detect it until tesseracts setup.bash_old was renamed to setup.bash. So I think renaming that and setup.bat_old on svn is the way forward. I think.

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/bash
2
3if [ -d cascade-make ] ; then
4 source cascade-make/lib/cascade-lib.bash GEXTTESS . $*
5fi
6
7if [ -z $GEXTTESS ] ; then
8 source ./setup.bash
9fi
10
11if [ -z $GEXTTESS_DEVEL ] ; then
12 # Set environment variable so we can tell devel.bash has been sourced
13 export GEXTTESS_DEVEL=$GEXTTESS
14
15 export PATH="$GEXTTESS_INSTALLED/bin:$PATH"
16 export CFLAGS="-I$GEXTTESS_INSTALLED/include -I$GEXTTESS_INSTALLED/include/libxml2 $CFLAGS"
17 export CPPFLAGS="-I$GEXTTESS_INSTALLED/include -I$GEXTTESS_INSTALLED/include/libxml2 $CPPFLAGS"
18 export CXXFLAGS="-I$GEXTTESS_INSTALLED/include -I$GEXTTESS_INSTALLED/include/libxml2 $CXXFLAGS"
19 export LDFLAGS="-L$GEXTTESS_INSTALLED/lib $LDFLAGS"
20 export PKG_CONFIG_PATH="$GEXTTESS_INSTALLED/lib/pkgconfig:$PKG_CONFIG_PATH"
21
22 echo "+Your environment is now setup to compile with the TESSeract Support Library"
23
24 if [ -d "$GEXTTESS_INSTALLED/lib/pkgconfig" ] ; then
25 echo ""
26 echo "+Testing that pkg-config is correctly configured..."
27
28 pushd $GEXTTESS_INSTALLED/lib/pkgconfig
29
30 if [ ! -e .fixed-prefix.awk ] ; then
31
32 echo "Configuring ..."
33
34 echo "/^prefix=/ { print \"prefix=$GEXTTESS_INSTALLED\" ; next }" > .fixed-prefix.awk
35 echo " { print \$0 }" >> .fixed-prefix.awk
36
37 for file in *.pc ; do
38 cat $file | awk -f .fixed-prefix.awk > $file.new && \
39 /bin/mv $file.new $file
40 done
41 echo "... done"
42 else
43 echo "No configuration needed"
44 fi
45
46 popd
47 fi
48else
49 echo "+Your environment is already setup to compile with the TESSeract Support Library"
50fi
Note: See TracBrowser for help on using the repository browser.