commit 9511343f90de2b59bdb53754514d45431ea2c845
Author: Thomas Sailer <t.sailer(a)alumni.ethz.ch>
Date: Sun Feb 13 18:13:11 2011 +0100
hack the hack to work on 32 and 64bit builders
mingw32-glib2.spec | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/mingw32-glib2.spec b/mingw32-glib2.spec
index 1c83fe2..3d26aea 100644
--- a/mingw32-glib2.spec
+++ b/mingw32-glib2.spec
@@ -74,7 +74,11 @@ pushd build_static
# HACK
cp glib/glibconfig.h ../glib
# evil Hack
- perl -i -pe "s,\\$\(AM_V_CCLD\)\\$\(LINK\) \\$\(glib_compile_schemas_OBJECTS\) \\$\(glib_compile_schemas_LDADD\) \\$\(LIBS\),/usr/libexec/gcc/i686-pc-mingw32/4.5.1/collect2 --sysroot=/usr/i686-pc-mingw32/sys-root -Bdynamic -o glib-compile-schemas.exe /usr/i686-pc-mingw32/sys-root/mingw/lib/crt2.o /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtbegin.o -L/usr/lib64/gcc/i686-pc-mingw32/4.5.1 -L/usr/lib64/gcc/i686-pc-mingw32/4.5.1/../../../../i686-pc-mingw32/lib -L/usr/i686-pc-mingw32/sys-root/mingw/lib gvdb-builder.o glib-compile-schemas.o ../glib/.libs/libglib-2.0.a -lws2_32 -lole32 -lkernel32 -lintl -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lmingw32 /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtend.o," gio/Makefile
+ if [ -f /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtbegin.o ]; then
+ perl -i -pe "s,\\$\(AM_V_CCLD\)\\$\(LINK\) \\$\(glib_compile_schemas_OBJECTS\) \\$\(glib_compile_schemas_LDADD\) \\$\(LIBS\),/usr/libexec/gcc/i686-pc-mingw32/4.5.1/collect2 --sysroot=/usr/i686-pc-mingw32/sys-root -Bdynamic -o glib-compile-schemas.exe /usr/i686-pc-mingw32/sys-root/mingw/lib/crt2.o /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtbegin.o -L/usr/lib64/gcc/i686-pc-mingw32/4.5.1 -L/usr/lib64/gcc/i686-pc-mingw32/4.5.1/../../../../i686-pc-mingw32/lib -L/usr/i686-pc-mingw32/sys-root/mingw/lib gvdb-builder.o glib-compile-schemas.o ../glib/.libs/libglib-2.0.a -lws2_32 -lole32 -lkernel32 -lintl -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lmingw32 /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtend.o," gio/Makefile
+ else
+ perl -i -pe "s,\\$\(AM_V_CCLD\)\\$\(LINK\) \\$\(glib_compile_schemas_OBJECTS\) \\$\(glib_compile_schemas_LDADD\) \\$\(LIBS\),/usr/libexec/gcc/i686-pc-mingw32/4.5.1/collect2 --sysroot=/usr/i686-pc-mingw32/sys-root -Bdynamic -o glib-compile-schemas.exe /usr/i686-pc-mingw32/sys-root/mingw/lib/crt2.o /usr/lib/gcc/i686-pc-mingw32/4.5.1/crtbegin.o -L/usr/lib/gcc/i686-pc-mingw32/4.5.1 -L/usr/lib/gcc/i686-pc-mingw32/4.5.1/../../../../i686-pc-mingw32/lib -L/usr/i686-pc-mingw32/sys-root/mingw/lib gvdb-builder.o glib-compile-schemas.o ../glib/.libs/libglib-2.0.a -lws2_32 -lole32 -lkernel32 -lintl -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lmingw32 /usr/lib/gcc/i686-pc-mingw32/4.5.1/crtend.o," gio/Makefile
+ fi
make %{?_smp_mflags}
popd
@@ -84,7 +88,11 @@ pushd build_shared
# HACK
cp glib/glibconfig.h ../glib
# evil Hack
- perl -i -pe "s,\\$\(AM_V_CCLD\)\\$\(LINK\) \\$\(glib_compile_schemas_OBJECTS\) \\$\(glib_compile_schemas_LDADD\) \\$\(LIBS\),/usr/libexec/gcc/i686-pc-mingw32/4.5.1/collect2 --sysroot=/usr/i686-pc-mingw32/sys-root -Bdynamic -o glib-compile-schemas.exe /usr/i686-pc-mingw32/sys-root/mingw/lib/crt2.o /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtbegin.o -L/usr/i686-pc-mingw32/sys-root/mingw/lib -L/usr/lib64/gcc/i686-pc-mingw32/4.5.1 -L/usr/lib64/gcc/i686-pc-mingw32/4.5.1/../../../../i686-pc-mingw32/lib -L/usr/i686-pc-mingw32/sys-root/mingw/lib gvdb-builder.o glib-compile-schemas.o ../glib/.libs/libglib-2.0.dll.a -lws2_32 -lole32 -lintl -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lmingw32 /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtend.o," gio/Makefile
+ if [ -f /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtbegin.o ]; then
+ perl -i -pe "s,\\$\(AM_V_CCLD\)\\$\(LINK\) \\$\(glib_compile_schemas_OBJECTS\) \\$\(glib_compile_schemas_LDADD\) \\$\(LIBS\),/usr/libexec/gcc/i686-pc-mingw32/4.5.1/collect2 --sysroot=/usr/i686-pc-mingw32/sys-root -Bdynamic -o glib-compile-schemas.exe /usr/i686-pc-mingw32/sys-root/mingw/lib/crt2.o /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtbegin.o -L/usr/i686-pc-mingw32/sys-root/mingw/lib -L/usr/lib64/gcc/i686-pc-mingw32/4.5.1 -L/usr/lib64/gcc/i686-pc-mingw32/4.5.1/../../../../i686-pc-mingw32/lib -L/usr/i686-pc-mingw32/sys-root/mingw/lib gvdb-builder.o glib-compile-schemas.o ../glib/.libs/libglib-2.0.dll.a -lws2_32 -lole32 -lintl -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lmingw32 /usr/lib64/gcc/i686-pc-mingw32/4.5.1/crtend.o," gio/Makefile
+ else
+ perl -i -pe "s,\\$\(AM_V_CCLD\)\\$\(LINK\) \\$\(glib_compile_schemas_OBJECTS\) \\$\(glib_compile_schemas_LDADD\) \\$\(LIBS\),/usr/libexec/gcc/i686-pc-mingw32/4.5.1/collect2 --sysroot=/usr/i686-pc-mingw32/sys-root -Bdynamic -o glib-compile-schemas.exe /usr/i686-pc-mingw32/sys-root/mingw/lib/crt2.o /usr/lib/gcc/i686-pc-mingw32/4.5.1/crtbegin.o -L/usr/i686-pc-mingw32/sys-root/mingw/lib -L/usr/lib/gcc/i686-pc-mingw32/4.5.1 -L/usr/lib/gcc/i686-pc-mingw32/4.5.1/../../../../i686-pc-mingw32/lib -L/usr/i686-pc-mingw32/sys-root/mingw/lib gvdb-builder.o glib-compile-schemas.o ../glib/.libs/libglib-2.0.dll.a -lws2_32 -lole32 -lintl -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lmingw32 /usr/lib/gcc/i686-pc-mingw32/4.5.1/crtend.o," gio/Makefile
+ fi
make %{?_smp_mflags}
popd