Mercurial > mxe-octave
comparison src/glib.mk @ 3183:96e96221fe09
Update glib mingw native and cross compile
* src/mingw-glib-2-fixes.patch: New file for MemoryBarrier call.
* src/mingw-glib-1-fixes.patch: update to use latest mxe devel branch glib patch.
* src/glib.mk: run autogen.sh on native build, build just cross version of everything if cross mingw.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Mon, 29 Jul 2013 13:54:19 -0400 |
parents | 6e323510f5b5 |
children | 13be64f9f16d |
comparison
equal
deleted
inserted
replaced
3182:23a5b6df3061 | 3183:96e96221fe09 |
---|---|
13 $(WGET) -q -O- 'http://git.gnome.org/browse/glib/refs/tags' | \ | 13 $(WGET) -q -O- 'http://git.gnome.org/browse/glib/refs/tags' | \ |
14 $(SED) -n "s,.*tag/?id=\([0-9]\+\.[0-9]*[02468]\.[^']*\).*,\1,p" | \ | 14 $(SED) -n "s,.*tag/?id=\([0-9]\+\.[0-9]*[02468]\.[^']*\).*,\1,p" | \ |
15 head -1 | 15 head -1 |
16 endef | 16 endef |
17 | 17 |
18 define $(PKG)_NATIVE_BUILD | |
19 cp -Rp '$(1)' '$(1).native' | |
20 | |
21 # native build of libiconv (used by glib-genmarshal) | |
22 cd '$(1).native' && $(call UNPACK_PKG_ARCHIVE,libiconv,$(TAR)) | |
23 cd '$(1).native/$(libiconv_SUBDIR)' && ./configure \ | |
24 $(ENABLE_SHARED_OR_STATIC) \ | |
25 --disable-nls | |
26 $(MAKE) -C '$(1).native/$(libiconv_SUBDIR)' -j '$(JOBS)' | |
27 | |
28 # native build for glib-genmarshal, without pkg-config, gettext and zlib | |
29 cd '$(1).native' && ./configure \ | |
30 $(ENABLE_SHARED_OR_STATIC) \ | |
31 --prefix='$(HOST_PREFIX)' \ | |
32 --enable-regex \ | |
33 --disable-threads \ | |
34 --disable-selinux \ | |
35 --disable-inotify \ | |
36 --disable-fam \ | |
37 --disable-xattr \ | |
38 --disable-dtrace \ | |
39 --with-libiconv=gnu \ | |
40 --with-pcre=internal \ | |
41 CPPFLAGS='-I$(1).native/$(libiconv_SUBDIR)/include' \ | |
42 LDFLAGS='-L$(1).native/$(libiconv_SUBDIR)/lib/.libs' | |
43 $(SED) -i 's,#define G_ATOMIC.*,,' '$(1).native/config.h' | |
44 $(MAKE) -C '$(1).native/glib' -j '$(JOBS)' | |
45 $(MAKE) -C '$(1).native/gthread' -j '$(JOBS)' | |
46 $(MAKE) -C '$(1).native/gmodule' -j '$(JOBS)' | |
47 $(MAKE) -C '$(1).native/gobject' -j '$(JOBS)' lib_LTLIBRARIES= install-exec | |
48 $(MAKE) -C '$(1).native/gio/xdgmime' -j '$(JOBS)' | |
49 $(MAKE) -C '$(1).native/gio' -j '$(JOBS)' glib-compile-schemas | |
50 $(MAKE) -C '$(1).native/gio' -j '$(JOBS)' glib-compile-resources | |
51 $(INSTALL) -m755 '$(1).native/gio/glib-compile-schemas' '$(HOST_BINDIR)' | |
52 $(INSTALL) -m755 '$(1).native/gio/glib-compile-resources' '$(HOST_BINDIR)' | |
53 endef | |
54 | |
55 define $(PKG)_SYMLINK | 18 define $(PKG)_SYMLINK |
56 $(LN_SF) `which glib-genmarshal` '$(HOST_BINDIR)' | 19 $(LN_SF) `which glib-genmarshal` '$(HOST_BINDIR)' |
57 $(LN_SF) `which glib-compile-schemas` '$(HOST_BINDIR)' | 20 $(LN_SF) `which glib-compile-schemas` '$(HOST_BINDIR)' |
58 $(LN_SF) `which glib-compile-resources` '$(HOST_BINDIR)' | 21 $(LN_SF) `which glib-compile-resources` '$(HOST_BINDIR)' |
59 endef | 22 endef |
60 | 23 |
61 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) | 24 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) |
62 define $(PKG)_BUILD | 25 define $(PKG)_BUILD |
26 cd $(1) && ./autogen.sh | |
63 cd '$(1)' && PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' ./configure \ | 27 cd '$(1)' && PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' ./configure \ |
64 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ | 28 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
65 $(ENABLE_SHARED_OR_STATIC) \ | 29 $(ENABLE_SHARED_OR_STATIC) \ |
66 --prefix='$(HOST_PREFIX)' \ | 30 --prefix='$(HOST_PREFIX)' \ |
67 --with-threads=win32 \ | 31 --with-threads=win32 \ |
73 $(MAKE) -C '$(1)' -j '$(JOBS)' | 37 $(MAKE) -C '$(1)' -j '$(JOBS)' |
74 $(MAKE) -C '$(1)' -j 1 install | 38 $(MAKE) -C '$(1)' -j 1 install |
75 endef | 39 endef |
76 else | 40 else |
77 define $(PKG)_BUILD | 41 define $(PKG)_BUILD |
78 cd '$(1)' && ./autogen.sh | 42 cd '$(1)' && NOCONFIGURE=true ./autogen.sh |
79 rm -f '$(HOST_BINDIR)/glib-*' | 43 rm -f '$(HOST_BINDIR)/glib-*' |
80 $(if $(findstring y,\ | |
81 $(shell [ -x "`which glib-genmarshal`" ] && \ | |
82 [ -x "`which glib-compile-schemas`" ] && \ | |
83 [ -x "`which glib-compile-resources`" ] && echo y)), \ | |
84 $($(PKG)_SYMLINK), \ | |
85 $($(PKG)_NATIVE_BUILD)) | |
86 # cross build | 44 # cross build |
87 cd '$(1)' && ./configure \ | 45 cd '$(1)' && ./configure \ |
88 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ | 46 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
89 $(ENABLE_SHARED_OR_STATIC) \ | 47 $(ENABLE_SHARED_OR_STATIC) \ |
48 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ | |
90 --prefix='$(HOST_PREFIX)' \ | 49 --prefix='$(HOST_PREFIX)' \ |
91 --with-threads=win32 \ | 50 --with-threads=win32 \ |
92 --with-pcre=system \ | 51 --with-pcre=system \ |
93 --with-libiconv=gnu \ | 52 --with-libiconv=gnu \ |
94 --disable-inotify \ | 53 --disable-inotify \ |
95 CXX='$(MXE_CXX)' \ | 54 --disable-modular-tests \ |
96 PKG_CONFIG='$(MXE_PKG_CONFIG)' \ | 55 PKG_CONFIG='$(MXE_PKG_CONFIG)' \ |
97 GLIB_GENMARSHAL='$(HOST_BINDIR)/glib-genmarshal' \ | 56 PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' |
98 GLIB_COMPILE_SCHEMAS='$(HOST_BINDIR)/glib-compile-schemas' \ | 57 |
99 GLIB_COMPILE_RESOURCES='$(HOST_BINDIR)/glib-compile-resources' | 58 $(MAKE) -C '$(1)' -j '$(JOBS)' |
100 $(MAKE) -C '$(1)/glib' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= | 59 $(MAKE) -C '$(1)' -j 1 install |
101 $(MAKE) -C '$(1)/gmodule' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= | |
102 $(MAKE) -C '$(1)/gthread' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= | |
103 $(MAKE) -C '$(1)/gobject' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= | |
104 $(MAKE) -C '$(1)/gio' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= MISC_STUFF= | |
105 $(MAKE) -C '$(1)' -j '$(JOBS)' install-pkgconfigDATA | |
106 endef | 60 endef |
61 | |
107 endif | 62 endif |