glib2: add dependencies to the gettext and libiconv stub host builds
[openwrt/svn-archive/archive.git] / libs / glib2 / Makefile
1 #
2 # Copyright (C) 2007-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=glib2
11 PKG_VERSION:=2.26.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=glib-$(PKG_VERSION).tar.bz2
15 PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
16 PKG_SOURCE_URL:=@GNOME/glib/2.26
17 PKG_MD5SUM:=17535accceef55bcb17a74d73f9c2aef
18
19 PKG_FIXUP:=libtool
20 PKG_BUILD_DEPENDS:=glib2/host libpthread zlib
21 HOST_BUILD_DEPENDS:=gettext/host libiconv/host
22 PKG_INSTALL:=1
23
24 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
25
26 include $(INCLUDE_DIR)/host-build.mk
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/nls.mk
29
30 define Package/glib2
31 SECTION:=libs
32 CATEGORY:=Libraries
33 DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS)
34 TITLE:=glib 2.0
35 URL:=http://www.gtk.org/
36 endef
37
38 define Package/glib2/description
39 The GLib library of C routines
40 endef
41
42 define Build/Configure
43 $(call Build/Configure/Default, \
44 --enable-shared \
45 --enable-static \
46 --enable-debug=no \
47 --disable-selinux \
48 --disable-fam \
49 $(if $(ICONV_FULL),--with-libiconv=gnu) \
50 , \
51 glib_cv_stack_grows=no \
52 glib_cv_uscore=no \
53 ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOST)/bin/glib-genmarshal \
54 ac_cv_func_mmap_fixed_mapped=yes \
55 );
56 endef
57
58 define Build/InstallDev
59 $(INSTALL_DIR) $(1)/usr/include
60 $(CP) \
61 $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
62 $(1)/usr/include/
63 $(CP) \
64 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
65 $(1)/usr/include/glib-2.0/
66 $(CP) \
67 $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
68 $(1)/usr/include/
69
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) \
72 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
73 $(1)/usr/lib/
74
75 $(CP) \
76 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
77 $(1)/usr/lib/
78
79 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
80 $(INSTALL_DATA) \
81 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
82 $(1)/usr/lib/pkgconfig
83
84 $(INSTALL_DIR) $(2)/share/aclocal/
85 $(INSTALL_DATA) \
86 $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
87 $(2)/share/aclocal/
88 endef
89
90 define Package/glib2/install
91 $(INSTALL_DIR) $(1)/usr/lib
92 $(CP) \
93 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
94 $(1)/usr/lib/
95 endef
96
97 $(eval $(call HostBuild))
98 $(eval $(call BuildPackage,glib2))