2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2009-02-28 03:05:01 +00:00
|
|
|
|
2009-04-05 13:00:17 +01:00
|
|
|
PKG := glib
|
2017-03-05 03:41:39 +00:00
|
|
|
$(PKG)_WEBSITE := https://gtk.org/
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_DESCR := GLib
|
2010-10-04 02:23:07 +01:00
|
|
|
$(PKG)_IGNORE :=
|
2017-01-31 01:11:46 +00:00
|
|
|
$(PKG)_VERSION := 2.50.2
|
|
|
|
$(PKG)_CHECKSUM := be68737c1f268c05493e503b3b654d2b7f43d7d0b8c5556f7e4651b870acfbf5
|
2009-04-05 13:00:17 +01:00
|
|
|
$(PKG)_SUBDIR := glib-$($(PKG)_VERSION)
|
2012-05-02 23:02:36 +01:00
|
|
|
$(PKG)_FILE := glib-$($(PKG)_VERSION).tar.xz
|
2017-03-04 10:33:47 +00:00
|
|
|
$(PKG)_URL := https://download.gnome.org/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)
|
2017-11-25 13:36:07 +00:00
|
|
|
$(PKG)_DEPS := cc dbus gettext libffi libiconv pcre zlib $(BUILD)~$(PKG)
|
2017-10-26 07:29:23 +01:00
|
|
|
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
|
|
|
|
|
2018-02-27 01:35:37 +00:00
|
|
|
$(PKG)_DEPS_$(BUILD) := autotools gettext libffi libiconv zlib
|
2009-02-28 03:05:01 +00:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2019-05-13 20:52:31 +01:00
|
|
|
$(WGET) -q -O- 'https://gitlab.gnome.org/GNOME/glib/tags' | \
|
|
|
|
$(SED) -n "s,.*<a [^>]\+>v\?\([0-9]\+\.[0-9.]\+\)<.*,\1,p" | \
|
2014-10-14 23:30:14 +01:00
|
|
|
$(SORT) -Vr | \
|
2009-02-28 03:05:01 +00:00
|
|
|
head -1
|
|
|
|
endef
|
|
|
|
|
2017-10-26 07:29:23 +01:00
|
|
|
define $(PKG)_BUILD_DARWIN
|
2018-02-26 11:24:19 +00:00
|
|
|
# native build for glib-tools
|
|
|
|
cd '$(SOURCE_DIR)' && NOCONFIGURE=true ./autogen.sh
|
|
|
|
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
|
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
|
|
|
--enable-regex \
|
|
|
|
--disable-threads \
|
|
|
|
--disable-selinux \
|
|
|
|
--disable-inotify \
|
|
|
|
--disable-fam \
|
|
|
|
--disable-xattr \
|
|
|
|
--disable-dtrace \
|
|
|
|
--disable-libmount \
|
|
|
|
--with-pcre=internal \
|
2018-02-27 04:35:30 +00:00
|
|
|
PKG_CONFIG='$(PREFIX)/$(TARGET)/bin/pkgconf' \
|
2018-02-28 07:38:26 +00:00
|
|
|
CPPFLAGS='-I$(PREFIX)/$(TARGET).gnu/include' \
|
|
|
|
LDFLAGS='-L$(PREFIX)/$(TARGET).gnu/lib'
|
2018-02-26 11:24:19 +00:00
|
|
|
$(MAKE) -C '$(BUILD_DIR)/glib' -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gthread' -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gmodule' -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gobject' -j '$(JOBS)' lib_LTLIBRARIES= install-exec
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gio/xdgmime' -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gio/kqueue' -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' glib-compile-schemas
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' glib-compile-resources
|
|
|
|
$(INSTALL) -m755 '$(BUILD_DIR)/gio/glib-compile-schemas' '$(PREFIX)/$(TARGET)/bin/'
|
|
|
|
$(INSTALL) -m755 '$(BUILD_DIR)/gio/glib-compile-resources' '$(PREFIX)/$(TARGET)/bin/'
|
2017-10-26 07:29:23 +01:00
|
|
|
endef
|
2015-02-02 21:46:13 +00:00
|
|
|
|
2017-10-26 07:29:23 +01:00
|
|
|
define $(PKG)_BUILD_NATIVE
|
|
|
|
# native build for glib-tools
|
2017-11-22 09:02:53 +00:00
|
|
|
cd '$(SOURCE_DIR)' && NOCONFIGURE=true ./autogen.sh
|
2017-10-26 07:29:23 +01:00
|
|
|
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
|
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
2009-02-28 04:54:26 +00:00
|
|
|
--enable-regex \
|
2010-04-26 14:07:14 +01:00
|
|
|
--disable-threads \
|
2009-02-28 03:05:01 +00:00
|
|
|
--disable-selinux \
|
2012-06-04 17:02:11 +01:00
|
|
|
--disable-inotify \
|
2009-02-28 03:05:01 +00:00
|
|
|
--disable-fam \
|
2010-02-11 22:55:39 +00:00
|
|
|
--disable-xattr \
|
2010-09-25 17:04:53 +01:00
|
|
|
--disable-dtrace \
|
2017-02-15 10:06:31 +00:00
|
|
|
--disable-libmount \
|
2010-02-11 22:55:39 +00:00
|
|
|
--with-libiconv=gnu \
|
2010-05-16 15:29:47 +01:00
|
|
|
--with-pcre=internal \
|
2018-02-27 04:35:30 +00:00
|
|
|
PKG_CONFIG='$(PREFIX)/$(TARGET)/bin/pkgconf' \
|
2017-10-26 07:29:23 +01:00
|
|
|
CPPFLAGS='-I$(PREFIX)/$(TARGET)/include' \
|
|
|
|
LDFLAGS='-L$(PREFIX)/$(TARGET)/lib'
|
|
|
|
$(SED) -i 's,#define G_ATOMIC.*,,' '$(BUILD_DIR)/config.h'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/glib' -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gthread' -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gmodule' -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gobject' -j '$(JOBS)' lib_LTLIBRARIES= install-exec
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gio/xdgmime' -j '$(JOBS)'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' glib-compile-schemas
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' glib-compile-resources
|
|
|
|
$(INSTALL) -m755 '$(BUILD_DIR)/gio/glib-compile-schemas' '$(PREFIX)/$(TARGET)/bin/'
|
|
|
|
$(INSTALL) -m755 '$(BUILD_DIR)/gio/glib-compile-resources' '$(PREFIX)/$(TARGET)/bin/'
|
2012-09-18 08:37:36 +01:00
|
|
|
endef
|
2009-03-05 15:55:13 +00:00
|
|
|
|
2017-10-26 07:29:23 +01:00
|
|
|
define $(PKG)_BUILD_$(BUILD)
|
2017-10-29 23:42:47 +00:00
|
|
|
$(if $(findstring darwin, $(BUILD)), \
|
2017-10-26 07:29:23 +01:00
|
|
|
$($(PKG)_BUILD_DARWIN), \
|
|
|
|
$($(PKG)_BUILD_NATIVE))
|
2012-09-18 08:37:36 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
2017-10-26 07:29:23 +01:00
|
|
|
# other packages expect glib-tools in $(TARGET)/bin
|
|
|
|
rm -f '$(PREFIX)/$(TARGET)/bin/glib-*'
|
|
|
|
ln -sf '$(PREFIX)/$(BUILD)/bin/glib-genmarshal' '$(PREFIX)/$(TARGET)/bin/'
|
|
|
|
ln -sf '$(PREFIX)/$(BUILD)/bin/glib-compile-schemas' '$(PREFIX)/$(TARGET)/bin/'
|
|
|
|
ln -sf '$(PREFIX)/$(BUILD)/bin/glib-compile-resources' '$(PREFIX)/$(TARGET)/bin/'
|
2014-08-19 16:24:34 +01:00
|
|
|
|
2009-02-28 03:05:01 +00:00
|
|
|
# cross build
|
2017-10-26 07:29:23 +01:00
|
|
|
cd '$(SOURCE_DIR)' && NOCONFIGURE=true ./autogen.sh
|
|
|
|
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
|
2013-12-15 13:52:58 +00:00
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
2009-03-05 15:55:13 +00:00
|
|
|
--with-threads=win32 \
|
2009-02-28 03:05:01 +00:00
|
|
|
--with-pcre=system \
|
2009-03-07 21:20:07 +00:00
|
|
|
--with-libiconv=gnu \
|
2012-06-04 17:02:11 +01:00
|
|
|
--disable-inotify \
|
2014-08-10 01:52:30 +01:00
|
|
|
CXX='$(TARGET)-g++' \
|
2010-02-07 23:22:58 +00:00
|
|
|
PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' \
|
2010-10-05 22:30:30 +01:00
|
|
|
GLIB_GENMARSHAL='$(PREFIX)/$(TARGET)/bin/glib-genmarshal' \
|
2012-06-04 17:02:11 +01:00
|
|
|
GLIB_COMPILE_SCHEMAS='$(PREFIX)/$(TARGET)/bin/glib-compile-schemas' \
|
2015-01-17 00:48:09 +00:00
|
|
|
GLIB_COMPILE_RESOURCES='$(PREFIX)/$(TARGET)/bin/glib-compile-resources'
|
2017-10-26 07:29:23 +01:00
|
|
|
$(MAKE) -C '$(BUILD_DIR)/glib' -j '$(JOBS)' install sbin_PROGRAMS= noinst_PROGRAMS=
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gmodule' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gthread' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gobject' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= MISC_STUFF=
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' install-pkgconfigDATA
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)/m4macros' install
|
2009-02-28 03:05:01 +00:00
|
|
|
endef
|