123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #! /bin/sh
- : ${MC_TOPDIR=`pwd`}
- : ${GLIB_VERSION=1.2.10}
- GLIB_DIR="glib-$GLIB_VERSION"
- GLIB_TARBALL="glib-$GLIB_VERSION.tar.gz"
- GLIB_URL="ftp://ftp.gtk.org/pub/gtk/v1.2/$GLIB_TARBALL"
- GLIB_INSTDIR="$MC_TOPDIR/glib-inst"
- get_file() {
- curl --remote-name "$1" || \
- wget --passive-ftp "$1" || \
- wget "$1" || \
- ftp "$1" </dev/null || \
- exit 1
- }
- if test -f src/dir.c; then : ; else
- echo "Not in the top-level directory of GNU Midnight Commander." 2>&1
- exit 1
- fi
- if test -f configure; then : ; else
- ./autogen.sh --help >/dev/null || exit 1
- fi
- if gzip -vt "$GLIB_TARBALL"; then : ; else
- get_file "$GLIB_URL"
- fi
- rm -rf "$GLIB_DIR"
- gzip -cd "$GLIB_TARBALL" | tar xf -
- cd "$GLIB_DIR"
- if test -f glist.c; then : ; else
- echo "glib source is incomplete" 2>&1
- exit 1
- fi
- rm -rf "$GLIB_INSTDIR"
- ./configure --disable-shared --with-glib12 --prefix="$GLIB_INSTDIR" || exit 1
- make all || exit 1
- make install || exit 1
- cd "$MC_TOPDIR"
- ./configure GLIB_CONFIG="$GLIB_INSTDIR/bin/glib-config" \
- PKG_CONFIG=/bin/false "$@" || exit 1
- make clean || exit 1
- make || exit 1
- echo "GNU Midnight Commander has been successfully compiled"
|