[packages] glib2: add missing dependencies (#11659)
[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:=autoreconf
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) +zlib +libpthread
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 ac_cv_func_posix_getpwuid_r=yes \
56 ac_cv_func_posix_getgrgid_r=yes \
57 );
58 endef
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/include
62 $(CP) \
63 $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
64 $(1)/usr/include/
65 $(CP) \
66 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
67 $(1)/usr/include/glib-2.0/
68 $(CP) \
69 $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
70 $(1)/usr/include/
71
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(CP) \
74 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
75 $(1)/usr/lib/
76
77 $(CP) \
78 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
79 $(1)/usr/lib/
80
81 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
82 $(INSTALL_DATA) \
83 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
84 $(1)/usr/lib/pkgconfig
85
86 $(INSTALL_DIR) $(2)/share/aclocal/
87 $(INSTALL_DATA) \
88 $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
89 $(2)/share/aclocal/
90 endef
91
92 define Package/glib2/install
93 $(INSTALL_DIR) $(1)/usr/lib
94 $(CP) \
95 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
96 $(1)/usr/lib/
97 endef
98
99 $(eval $(call HostBuild))
100 $(eval $(call BuildPackage,glib2))