Update the dependencies for the MinGW build script

As the binaries from Tor Lillqvist are no longer being kept up-to-date
this also builds more of the deps from source.

https://bugzilla.gnome.org/show_bug.cgi?id=701356
This commit is contained in:
Neil Roberts 2013-05-31 13:18:45 +01:00
parent c2d5dd2d11
commit 3715a6687c

View File

@ -8,12 +8,15 @@
TOR_URL="http://ftp.gnome.org/pub/gnome/binaries/win32";
TOR_BINARIES=( \
glib/2.28/glib{-dev,}_2.28.1-1_win32.zip \
gtk+/2.16/gtk+{-dev,}_2.16.6-2_win32.zip \
pango/1.28/pango{-dev,}_1.28.0-1_win32.zip );
gtk+/2.16/gtk+{-dev,}_2.16.6-2_win32.zip );
TOR_DEP_URL="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies";
ZLIB_VERSION=1.2.4-2
FFI_VERSION=3.0.6
GLIB_VERSION=2.34.3
GLIB_MINOR_VERSION="${GLIB_VERSION%.*}"
TOR_DEPS=( \
cairo{-dev,}_1.10.0-2_win32.zip \
gettext-runtime-{dev-,}0.17-1.zip \
@ -21,13 +24,17 @@ TOR_DEPS=( \
freetype{-dev,}_2.3.12-1_win32.zip \
expat_2.0.1-1_win32.zip \
libpng{-dev,}_1.4.0-1_win32.zip \
zlib{-dev,}_1.2.4-2_win32.zip );
zlib{-dev,}_${ZLIB_VERSION}_win32.zip \
libffi{-dev,}_${FFI_VERSION}-1_win32.zip \
gettext-runtime{-dev,}_0.18.1.1-2_win32.zip );
GNOME_SOURCES_URL="http://ftp.gnome.org/pub/GNOME/sources/"
SOURCES_DEPS=(\
cogl/1.8/cogl-1.8.0.tar.bz2 \
json-glib/0.12/json-glib-0.12.2.tar.bz2 \
atk/2.1/atk-2.1.91.tar.bz2 );
glib/${GLIB_MINOR_VERSION}/glib-${GLIB_VERSION}.tar.xz \
cogl/1.14/cogl-1.14.0.tar.xz \
json-glib/0.16/json-glib-0.16.0.tar.xz \
atk/2.8/atk-2.8.0.tar.xz \
pango/1.34/pango-1.34.1.tar.xz );
GL_HEADER_URLS=( \
http://cgit.freedesktop.org/mesa/mesa/plain/include/GL/gl.h \
@ -132,7 +139,7 @@ function do_untar_source_d ()
local exdir="$1"; shift;
local tarfile="$1"; shift;
tar -C "$exdir" -jxvf "$tarfile" "$@";
tar -C "$exdir" -axvf "$tarfile" "$@";
if [ "$?" -ne 0 ]; then
echo "Failed to extract $tarfile";
@ -185,13 +192,51 @@ function find_compiler ()
echo "Using compiler ${MINGW_TOOL_PREFIX}gcc and target $TARGET";
}
function generate_pc_file ()
{
local pcfile="$1"; shift;
local libs="$1"; shift;
local version="$1"; shift;
local include="$1"; shift;
local bn=`basename "$pcfile"`;
if test -z "$include"; then
include="\${prefix}/include";
fi;
if ! test -f "$pcfile"; then
cat > "$pcfile" <<EOF
prefix=$ROOT_DIR
exec_prefix=\${prefix}
libdir=\${prefix}/lib
sharedlibdir=\${libdir}
includedir=$include
Name: $bn
Description: $bn
Requires:
Libs: -L\${libdir} $libs
Cflags: -I\${includedir}
Version: $version
EOF
fi
}
function do_cross_compile ()
{
local dep="$1"; shift;
local builddir="$BUILD_DIR/$dep";
cd "$builddir"
./configure --prefix="$ROOT_DIR" --host="$TARGET" --target="$TARGET" --build="`./config.guess`" CFLAGS="-mms-bitfields -I$ROOT_DIR/include" PKG_CONFIG="$RUN_PKG_CONFIG";
./configure --prefix="$ROOT_DIR" \
--host="$TARGET" \
--target="$TARGET" \
--build="$build_config" \
CFLAGS="-mms-bitfields -I${ROOT_DIR}/include" \
LDFLAGS="-L${ROOT_DIR}/lib" \
PKG_CONFIG="$RUN_PKG_CONFIG" \
"$@";
if [ "$?" -ne 0 ]; then
echo "Failed to configure $dep";
@ -321,6 +366,13 @@ for header in "${GL_HEADERS[@]}"; do
fi;
done;
# We need pkg-config files for zlib and ffi to build glib. The
# prepackaged binaries from tml doesn't seem to include them so we'll
# just generate it manually.
generate_pc_file "$ROOT_DIR/lib/pkgconfig/zlib.pc" "-lz" "$ZLIB_VERSION"
generate_pc_file "$ROOT_DIR/lib/pkgconfig/libffi.pc" "-lffi" "$FFI_VERSION" \
"${ROOT_DIR}/lib/libffi-${FFI_VERSION}/include"
RUN_PKG_CONFIG="$BUILD_DIR/run-pkg-config.sh";
echo "Generating $BUILD_DIR/run-pkg-config.sh";
@ -356,8 +408,13 @@ build_config=`bash $DOWNLOAD_DIR/config.guess`;
for dep in "${SOURCES_DEPS[@]}"; do
echo "Building $dep...";
src="${dep##*/}";
src="${src%%.tar.bz2}";
src="${src%%.tar.*}";
if echo "$src" | grep -q '^glib'; then
do_cross_compile "$src" --disable-modular-tests
else
do_cross_compile "$src"
fi;
done;
echo