[packages] glib2: Add zlib and libpthread build dependencies
[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 PKG_INSTALL:=1
22
23 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
24
25 include $(INCLUDE_DIR)/host-build.mk
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/nls.mk
28
29 define Package/glib2
30 SECTION:=libs
31 CATEGORY:=Libraries
32 DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS)
33 TITLE:=glib 2.0
34 URL:=http://www.gtk.org/
35 endef
36
37 define Package/glib2/description
38 The GLib library of C routines
39 endef
40
41 define Build/Configure
42 $(call Build/Configure/Default, \
43 --enable-shared \
44 --enable-static \
45 --enable-debug=no \
46 --disable-selinux \
47 --disable-fam \
48 $(if $(ICONV_FULL),--with-libiconv=gnu) \
49 , \
50 glib_cv_stack_grows=no \
51 glib_cv_uscore=no \
52 ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOST)/bin/glib-genmarshal \
53 ac_cv_func_mmap_fixed_mapped=yes \
54 );
55 endef
56
57 define Build/InstallDev
58 $(INSTALL_DIR) $(1)/usr/include
59 $(CP) \
60 $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
61 $(1)/usr/include/
62 $(CP) \
63 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
64 $(1)/usr/include/glib-2.0/
65 $(CP) \
66 $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
67 $(1)/usr/include/
68
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) \
71 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
72 $(1)/usr/lib/
73
74 $(CP) \
75 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
76 $(1)/usr/lib/
77
78 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
79 $(INSTALL_DATA) \
80 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
81 $(1)/usr/lib/pkgconfig
82
83 $(INSTALL_DIR) $(2)/share/aclocal/
84 $(INSTALL_DATA) \
85 $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
86 $(2)/share/aclocal/
87 endef
88
89 define Package/glib2/install
90 $(INSTALL_DIR) $(1)/usr/lib
91 $(CP) \
92 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
93 $(1)/usr/lib/
94 endef
95
96 $(eval $(call HostBuild))
97 $(eval $(call BuildPackage,glib2))