source: gs2-extensions/gnome-lib/trunk/src/packages/CASCADE-MAKE/GLIB.sh

Last change on this file was 34983, checked in by anupama, 3 years ago

Merging the gnome-lib branch macos-dev at https://trac.greenstone.org/browser/gs2-extensions/gnome-lib/branches/macos-dev with the main trunk after testing it first on assigned linux 64 bit machine in lab as well as 64 bit LSB VM, and making changes for it to compile on Linux 64 bit LSB.

  • Property svn:executable set to *
File size: 3.4 KB
Line 
1#!/bin/bash
2
3# glib2.28.1 was modified for Greenstone to allow compilation to succed on a Mac, so it has acquired a 'gs-' prefix
4# More recently compiling on Mojave (MacOS) newer compilation errors were encountered,
5# prompting a signficant bump up in version number
6# Back to using gs- prefix as this newer glib needed customisations for linux 64 bit LSB env,
7# see packages/README.txt for details
8
9package=gs-glib
10#package=glib
11#version=-2.24.2
12#version=-2.28.1
13##version=-2.34.3
14version=-2.54.3
15
16progname=$0
17
18source ../cascade-make/lib/cascade-lib.bash GEXTGNOME ../.. $*
19
20prefix=$GEXTGNOME_INSTALLED
21
22export CFLAGS="$CFLAGS -I$GEXTGNOME_INSTALLED/include"
23export CPPFLAGS="$CPPFLAGS -I$GEXTGNOME_INSTALLED/include"
24export CXXFLAGS="$CXXFLAGS -I$GEXTGNOME_INSTALLED/include"
25export LDFLAGS="$LDFLAGS -L$GEXTGNOME_INSTALLED/lib"
26
27export LIBFFI_CFLAGS="-I$GEXTGNOME_INSTALLED/lib/libffi-3.0.11/include"
28export LIBFFI_LIBS="-L$GEXTGNOME_INSTALLED/lib -lffi"
29
30export PCRE_CFLAGS="-I$GEXTGNOME_INSTALLED/include"
31export PCRE_LIBS="-L$GEXTGNOME_INSTALLED/lib -lpcre"
32
33if [ "x$crossOS" = "xandroid" ] ; then
34 # Based on details found at:
35 # http://axcoto.com/blog/article/836
36 extra_config_args="glib_cv_stack_grows=${glib_cv_stack_grows=no} glib_cv_uscore=${glib_cv_uscore=no} ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no} ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no}"
37
38 # Not clear how many of the following are needed.
39 # List came from:
40 # https://mail.gnome.org/archives/gtk-devel-list/2011-March/msg00096.html
41 #
42 # Could be that some of these are helpful in general (i.e. move out to
43 # main section of this script) in making a more minimal glib
44
45 extra_config_args="--without-included-regex --disable-java --disable-openmp --without-libiconv-prefix --without-libintl-prefix --without-libglib-2.0-prefix --without-libcroco-0.6-prefix --with-included-libxml --without-libncurses-prefix --without-libtermcap-prefix --without-libcurses-prefix --without-libexpat-prefix --without-emacs $extra_config_args"
46
47
48else
49 extra_config_args=
50fi
51
52# Disabling libmount, as it breaks compilation:
53# - http://unix.stackexchange.com/questions/327019/ddg#398242
54# "Unless you actually need libmount for something it's much easier
55# to simply disable it by passing --enable-libmount=no to configure"
56# - http://linuxfromscratch.org/lfs/view/systemd/chapter08/util-linux.html
57# "Purpose of libmount: Contains routines for block device mounting and unmounting"
58opt_run_untar $force_untar $auto_untar $package $version
59opt_run_configure $force_config $auto_config $package $version $prefix \
60 --disable-shared --enable-static --disable-dtrace --disable-systemtap \
61 --enable-libmount=no $extra_config_args
62
63# In the above ...
64# Linking error can occur when compiling due to mix of wanting static libraries built
65# and 'dtrace' and 'systemtap' being present on the underlying linux system
66# Details relating to the linking error disucssed at:
67# https://gitlab.gnome.org/GNOME/glib/issues/653
68# Since we don't want to move to a newer version of the the gslib library (at this stage)
69# the workaround is to add in:
70# --disable-dtrace and --disable-systemtap in
71
72opt_run_make $compile $package $version
73opt_run_make $install $package $version "install"
74opt_run_make $clean $package $version "clean"
75opt_run_make $distclean $package $version "distclean"
76
77opt_run_tarclean $tarclean $package $version
Note: See TracBrowser for help on using the repository browser.