mxe/src/glib.mk

77 lines
3.1 KiB
Makefile
Raw Normal View History

2010-01-16 22:02:02 +00:00
# This file is part of mingw-cross-env.
# See doc/index.html for further information.
2009-02-28 03:05:01 +00:00
# GLib
PKG := glib
$(PKG)_IGNORE :=
2010-10-03 20:01:16 +01:00
$(PKG)_VERSION := 2.26.0
$(PKG)_CHECKSUM := 9d7e9dce2add3fadc35079ad291a94f45ebcf706
$(PKG)_SUBDIR := glib-$($(PKG)_VERSION)
$(PKG)_FILE := glib-$($(PKG)_VERSION).tar.bz2
$(PKG)_WEBSITE := http://www.gtk.org/
$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)
$(PKG)_DEPS := gcc gettext pcre libiconv zlib
2009-02-28 03:05:01 +00:00
define $(PKG)_UPDATE
wget -q -O- 'http://git.gnome.org/browse/glib/refs/tags' | \
$(SED) -n "s,.*tag/?id=\([0-9][^']*\).*,\1,p" | \
grep -v "^2\.25\." | \
2009-02-28 03:05:01 +00:00
head -1
endef
define $(PKG)_BUILD
2010-02-23 16:48:16 +00:00
cd '$(1)' && aclocal
cd '$(1)' && $(LIBTOOLIZE) --force
cd '$(1)' && autoconf
cp -Rp '$(1)' '$(1).native'
# native build of libiconv (used by glib-genmarshal)
cd '$(1).native' && $(call UNPACK_PKG_ARCHIVE,libiconv)
cd '$(1).native/$(libiconv_SUBDIR)' && ./configure \
--disable-shared \
2010-09-26 16:25:24 +01:00
--disable-nls
$(MAKE) -C '$(1).native/$(libiconv_SUBDIR)' -j '$(JOBS)'
# native build for glib-genmarshal, without pkg-config, gettext and zlib
2010-02-07 23:21:45 +00:00
cd '$(1).native' && ./configure \
2009-02-28 03:05:01 +00:00
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
--enable-regex \
2010-04-26 14:07:14 +01:00
--disable-threads \
2009-02-28 03:05:01 +00:00
--disable-selinux \
--disable-fam \
--disable-xattr \
--disable-dtrace \
--with-libiconv=gnu \
--with-pcre=internal \
CPPFLAGS='-I$(1).native/$(libiconv_SUBDIR)/include' \
2010-09-26 16:25:24 +01:00
LDFLAGS='-L$(1).native/$(libiconv_SUBDIR)/lib/.libs'
$(SED) -i 's,#define G_ATOMIC.*,,' '$(1).native/config.h'
2010-04-26 14:07:14 +01:00
$(MAKE) -C '$(1).native/glib' -j '$(JOBS)'
$(MAKE) -C '$(1).native/gthread' -j '$(JOBS)'
$(MAKE) -C '$(1).native/gobject' -j '$(JOBS)' lib_LTLIBRARIES= install-exec
$(MAKE) -C '$(1).native/gio' -j '$(JOBS)' glib-compile-schemas
# configure will expect to find this in PATH
$(INSTALL) -m755 '$(1).native/gio/glib-compile-schemas' '$(PREFIX)/bin/glib-compile-schemas'
2009-03-05 15:55:13 +00:00
2009-02-28 03:05:01 +00:00
# cross build
# wine confuses the cross-compiling detection, so set it explicitly
$(SED) -i 's,cross_compiling=no,cross_compiling=yes,' '$(1)/configure'
2009-02-28 03:05:01 +00:00
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
2009-03-05 15:55:13 +00:00
--with-threads=win32 \
2009-02-28 03:05:01 +00:00
--with-pcre=system \
--with-libiconv=gnu \
CXX='$(TARGET)-c++' \
PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' \
GLIB_GENMARSHAL='$(PREFIX)/$(TARGET)/bin/glib-genmarshal'
$(MAKE) -C '$(1)/glib' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)/gmodule' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)/gthread' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)/gobject' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
2010-04-27 23:24:06 +01:00
$(MAKE) -C '$(1)/gio' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= MISC_STUFF=
$(MAKE) -C '$(1)' -j '$(JOBS)' install-pkgconfigDATA
2009-02-28 03:05:01 +00:00
endef