packages/libs/glib2: fix dependency issue (#5590)
[openwrt/svn-archive/archive.git] / libs / glib2 / Makefile
1 #
2 # Copyright (C) 2007 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.22.2
12 PKG_RELEASE:=1
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.22
17 PKG_MD5SUM:=846a86c74b74d5b16826aa5508940f9b
18
19 PKG_FIXUP:=libtool
20 PKG_BUILD_DEPENDS:=glib2/host
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
28 define Package/glib2
29 SECTION:=libs
30 CATEGORY:=Libraries
31 DEPENDS:=+libiconv +libintl +gettext
32 TITLE:=glib 2.0
33 URL:=http://www.gtk.org/
34 endef
35
36 define Package/glib2/description
37 The GLib library of C routines
38 endef
39
40 TARGET_CFLAGS+= \
41 $(FPIC) \
42 -I$(STAGING_DIR)/usr/lib/libiconv/include \
43 -I$(STAGING_DIR)/usr/lib/libintl/include
44
45 TARGET_LDFLAGS+= \
46 -L$(STAGING_DIR)/usr/lib/libiconv/lib \
47 -L$(STAGING_DIR)/usr/lib/libintl/lib
48
49 define Build/Configure
50 $(call Build/Configure/Default, \
51 --enable-shared \
52 --enable-static \
53 --enable-debug=no \
54 --with-libiconv=gnu \
55 --disable-selinux \
56 --disable-fam \
57 , \
58 glib_cv_stack_grows=no \
59 glib_cv_uscore=no \
60 ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOST)/bin/glib-genmarshal \
61 ac_cv_func_mmap_fixed_mapped=yes \
62 );
63 endef
64
65 define Build/InstallDev
66 $(INSTALL_DIR) $(1)/usr/include
67 $(CP) \
68 $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
69 $(1)/usr/include/
70 $(CP) \
71 $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
72 $(1)/usr/include/
73
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) \
76 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
77 $(1)/usr/lib/
78
79 $(CP) \
80 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
81 $(1)/usr/lib/
82
83 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
84 $(INSTALL_DATA) \
85 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
86 $(1)/usr/lib/pkgconfig
87
88 $(INSTALL_DIR) $(2)/share/aclocal/
89 $(INSTALL_DATA) \
90 $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
91 $(2)/share/aclocal/
92 endef
93
94 define Package/glib2/install
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(CP) \
97 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
98 $(1)/usr/lib/
99 endef
100
101 $(eval $(call HostBuild))
102 $(eval $(call BuildPackage,glib2))