Changeset 34983


Ignore:
Timestamp:
2021-04-01T11:55:33+13:00 (3 years ago)
Author:
anupama
Message:

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.

Location:
gs2-extensions/gnome-lib/trunk/src
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/gnome-lib/trunk/src/README

    r34598 r34983  
    1 A. To configure and compile wvware in Greenstone2/3, it used to be required to first:
     1A. For compiling glib-2.54.3 onwards, need python2.7+. On LSB, python needs to be manually compiled up (we're using 2.7.18 on 64 bit LSB) and put into a user location e.g. /home/sjm84/python2.7/bin in our case, with its bin folder added to the PATH:
     2(  export PATH=/home/sjm84/python2.7/bin:$PATH   )
     3
     4To configure and compile wvware in Greenstone2/3, it used to be required to first:
    25   source ./devel.bash
    36
     
    1215   cd gnome-lib
    1316
     17For compiling glib-2.54.3 onwards, need python2.7+. On LSB this needs to be manually compiled up and put into a user location and its bin folder on the PATH, e.g. /home/sjm84/python2.7/bin
     18
    1419Then:
    15 
     20(  export PATH=/home/sjm84/python2.7/bin:$PATH   )
    1621   export CFLAGS="-fPIC $CFLAGS"
    1722   export CXXFLAGS="-fPIC $CXXFLAGS"
  • gs2-extensions/gnome-lib/trunk/src/packages/CASCADE-MAKE.sh

    r31159 r34983  
    55# The standard list of packages
    66# For Mac Yosemite we found that PKG-CONFIG is dependent on GLIB, so we've moved GLIB ahead of PKG-CONFIG in the list
    7 pkglist="LIBZ LIBBZ2 EXPAT LIBPNG READLINE XMLPARSER INTLTOOL GETTEXT GLIB PKG-CONFIG LIBXML LIBXSLT LIBFFI LIBGSF"
     7pkglist="LIBZ LIBBZ2 EXPAT LIBPNG READLINE XMLPARSER INTLTOOL GETTEXT LIBFFI PCRE GLIB PKG-CONFIG LIBXML LIBXSLT LIBGSF"
    88
    99# libiconv was found to be necessary on the latest DL mac (2013)
     
    1919if [ "x$GSDLOS" = "xdarwin" -a $osversion -ge 11 ] ; then
    2020#    pkglist="LIBZ LIBBZ2 EXPAT LIBPNG READLINE XMLPARSER INTLTOOL CUPS LIBICONV GETTEXT GLIB PKG-CONFIG LIBXML LIBFFI LIBGSF"   
    21     pkglist="LIBZ LIBBZ2 EXPAT LIBPNG READLINE XMLPARSER INTLTOOL GETTEXT GLIB PKG-CONFIG LIBXML LIBXSLT LIBFFI LIBGSF"   
     21    pkglist="LIBZ LIBBZ2 EXPAT LIBPNG READLINE XMLPARSER INTLTOOL GETTEXT LIBFFI PCRE GLIB PKG-CONFIG LIBXML LIBXSLT LIBGSF"   
    2222fi
    2323
     
    2626  windows_pkglist="LIBZ LIBBZ2 EXPAT LIBPNG READLINE INTLTOOL LIBICONV GETTEXT GLIB LIBXML LIBGSF"
    2727
    28   android_pkglist="LIBZ LIBBZ2 EXPAT LIBPNG READLINE INTLTOOL LIBICONV GETTEXT GLIB LIBXML DBUS LIBFFI LIBGSF"
     28  android_pkglist="LIBZ LIBBZ2 EXPAT LIBPNG READLINE INTLTOOL LIBICONV GETTEXT LIBFFI GLIB LIBXML DBUS LIBGSF"
    2929
    3030
  • gs2-extensions/gnome-lib/trunk/src/packages/CASCADE-MAKE/GLIB.sh

    r32887 r34983  
    22
    33# 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
    49package=gs-glib
     10#package=glib
    511#version=-2.24.2
    6 version=-2.28.1
    7 #version=-2.34.3
     12#version=-2.28.1
     13##version=-2.34.3
     14version=-2.54.3
    815
    916progname=$0
     
    1724export CXXFLAGS="$CXXFLAGS -I$GEXTGNOME_INSTALLED/include"
    1825export 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"
    1932
    2033if [ "x$crossOS" = "xandroid" ] ; then
     
    3750fi
    3851
     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"
    3958opt_run_untar $force_untar $auto_untar $package $version
    4059opt_run_configure $force_config $auto_config $package $version $prefix \
    41   --disable-shared --enable-static --disable-dtrace --disable-systemtap $extra_config_args
     60          --disable-shared --enable-static --disable-dtrace --disable-systemtap \
     61          --enable-libmount=no $extra_config_args
    4262
    4363# In the above ...
  • gs2-extensions/gnome-lib/trunk/src/packages/CASCADE-MAKE/LIBGSF.sh

    r30881 r34983  
    1212export CFLAGS="$CFLAGS -DLIBXML_STATIC"
    1313
    14 export CFLAGS="$CFLAGS -I$GEXTGNOME_INSTALLED/include"
     14export CFLAGS="-Dg_memmove=memmove $CFLAGS -I$GEXTGNOME_INSTALLED/include"
    1515export CPPFLAGS="$CPPFLAGS -I$GEXTGNOME_INSTALLED/include"
    1616export CXXFLAGS="$CXXFLAGS -I$GEXTGNOME_INSTALLED/include"
    1717export LDFLAGS="$LDFLAGS -L$GEXTGNOME_INSTALLED/lib"
     18
     19osversion=`uname -r | sed 's/\..*$//'`;
     20if [ "x$GSDLOS" = "xdarwin" -a $osversion -ge 11 ] ; then
     21    export CFLAGS="$CFLAGS -framework Carbon -framework CoreFoundation -framework Security"
     22    if [ -d /usr/local/lib/pkgconfig ] ; then
     23    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
     24    fi
     25fi
     26
    1827
    1928opt_run_untar $force_untar $auto_untar $package $version
  • gs2-extensions/gnome-lib/trunk/src/packages/CASCADE-MAKE/LIBZ.sh

    r26761 r34983  
    22
    33package=zlib
    4 version=-1.2.7
     4version=-1.2.11
    55
    66progname=$0
     
    3333    echo "[pushd $package$version]"
    3434    ( cd $package$version ; \
    35       echo $CROSSCONFIGURE_VARS ./configure --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ; \
    36       eval $CROSSCONFIGURE_VARS ./configure --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ )
     35      echo $CROSSCONFIGURE_VARS ./configure --static --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ; \
     36      eval $CROSSCONFIGURE_VARS ./configure --static --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ )
    3737    if [ $? != 0 ] ; then
    3838        echo "      Error encountered running *configure* stage of $progname"
  • gs2-extensions/gnome-lib/trunk/src/packages/CASCADE-MAKE/PKG-CONFIG.sh

    r30881 r34983  
    1414export GLIB_LIBS="-L$GEXTGNOME_INSTALLED/lib -lglib-2.0"
    1515
     16osversion=`uname -r | sed 's/\..*$//'`;
     17if [ "x$GSDLOS" = "xdarwin" -a $osversion -ge 11 ] ; then
     18    export CFLAGS="$CFLAGS -framework Carbon -framework CoreFoundation -framework Security"
     19fi
     20
    1621opt_run_untar $force_untar $auto_untar $package $version
    1722opt_run_configure $force_config $auto_config $package $version $prefix --disable-shared --enable-static
  • gs2-extensions/gnome-lib/trunk/src/packages/README.txt

    r30862 r34983  
    4141Besides the changes that were necessary to common-src/packages/configure, mgpp/jni/Makefile.in and mgpp/text/Makefile.in to use a system Mac, the gnome-lib extension's glib uses libiconv too and had to find the right one to get gconvert.c to compile properly. This required the following change, copied from glib-2.50.1.tar.xz (see also https://discussions.apple.com/thread/2378361?start=0&tstart=0, found searching google for: error: GNU libiconv not in use but included iconv.h is from libiconv macos).
    4242
    43 $diff gs-glib-2.28.1/glib/gconvert.c
    44 64,65c64
    45 < #if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)
    46 ---
    47 > #if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H) \
    48 >   && !defined (__APPLE_CC__) && !defined (__LP_64__)
     43ff gs-glib-2.28.1/glib/gconvert.c
     44
     454. On 30/03/2021, the following customisations to glib-2.54.3/glib/gmessages.c were necessary as part of getting the gnome-lib (merged into main trunk from Mojave/Catalina branch) to compile on the 64 bit Linux LSB.
     46
     47These changes were taken from a future version of glib, at https://github.com/GNOME/glib/blob/master/glib/gmessages.c
     48but should not affect Catalina or Mojave MacOS, as the #if defined tests for linux and next a test concerning Bionic, an Ubuntu distribution.
     49
     50
     51a. Change:
     52
     53    #if defined(__linux__) && !defined(__BIONIC__)
     54    static int
     55    journal_sendv (struct iovec *iov,
     56                       gsize         iovlen)
     57
     58To:
     59    /* Enable support for the journal if we're on a recent enough Linux */
     60    #if defined(__linux__) && !defined(__BIONIC__) && defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC)
     61    #define ENABLE_JOURNAL_SENDV
     62    #endif
     63
     64    #ifdef ENABLE_JOURNAL_SENDV
     65    static int
     66    journal_sendv (struct iovec *iov,
     67                       gsize         iovlen)
     68
     69
     70
     71b. And Change:
     72    GLogWriterOutput
     73    g_log_writer_journald (GLogLevelFlags   log_level,
     74    const GLogField *fields,
     75    gsize            n_fields,
     76    gpointer         user_data)
     77    {
     78    #if defined(__linux__) && !defined(__BIONIC__)
     79
     80To:
     81    GLogWriterOutput
     82    g_log_writer_journald (GLogLevelFlags   log_level,
     83    const GLogField *fields,
     84    gsize            n_fields,
     85    gpointer         user_data)
     86    {
     87    #ifdef ENABLE_JOURNAL_SENDV
     88
Note: See TracChangeset for help on using the changeset viewer.