2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=glib-$(PKG_VERSION).tar.bz2
16 PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
17 PKG_SOURCE_URL:=@GNOME/glib/2.20
18 PKG_MD5SUM:=05188e560dbd8bddd568e24ce10dd003
20 include $(INCLUDE_DIR)/package.mk
27 DEPENDS:=+libiconv +libintl
29 URL:=http://www.gtk.org/
32 define Package/glib2/description
33 The GLib library of C routines
38 -I$(STAGING_DIR)/usr/lib/libiconv/include \
39 -I$(STAGING_DIR)/usr/lib/libintl/include
42 -L$(STAGING_DIR)/usr/lib/libiconv/lib \
43 -L$(STAGING_DIR)/usr/lib/libintl/lib
45 Hooks/InstallDev/Post += libtool_fixup_libdir
47 define Build/Configure
48 mkdir -p $(PKG_BUILD_DIR)/build/$(GNU_HOST_NAME)
49 ( cd $(PKG_BUILD_DIR); CONFIG_SITE= \
51 --target=$(GNU_HOST_NAME) \
52 --host=$(GNU_HOST_NAME) \
53 --build=$(GNU_HOST_NAME) \
54 --prefix=$(PKG_BUILD_DIR)/build/$(GNU_HOST_NAME) \
59 $(MAKE) -C $(PKG_BUILD_DIR) install clean
61 $(call Build/Configure/Default, \
66 glib_cv_stack_grows=no \
68 ac_cv_path_GLIB_GENMARSHAL=$(PKG_BUILD_DIR)/build/$(GNU_HOST_NAME)/bin/glib-genmarshal \
69 ac_cv_func_mmap_fixed_mapped=yes \
73 define Build/InstallDev
74 $(INSTALL_DIR) $(1)/usr/include
76 $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
79 $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
82 $(INSTALL_DIR) $(1)/usr/lib
84 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
88 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
91 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
93 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
94 $(1)/usr/lib/pkgconfig
96 $(INSTALL_DIR) $(2)/share/aclocal/
98 $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
101 $(INSTALL_DIR) $(2)/bin
103 $(PKG_BUILD_DIR)/build/$(GNU_HOST_NAME)/bin/* \
107 define Package/glib2/install
108 $(INSTALL_DIR) $(1)/usr/lib
110 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
115 $(eval $(call BuildPackage,glib2))