783f84fe1c7d2d54db8efb3f59e7e5ce49bfda03
[openwrt/svn-archive/archive.git] / Xorg / lib / gtk2 / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 12846 2008-10-03 22:38:55Z lars $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gtk2
12 PKG_VERSION:=2.14.3
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=gtk+-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@GNOME/gtk+/2.14
17 PKG_BUILD_DIR=$(BUILD_DIR)/gtk+-$(PKG_VERSION)
18 PKG_MD5SUM:=359e44c8e47dfe04a09ac09b8e015e58
19 PKG_FIXUP:=libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 PKG_INSTALL:=1
24
25 TARGET_CFLAGS+=\
26 -I$(STAGING_DIR)/usr/lib/libintl/include/
27
28 EXTRA_LDFLAGS+=\
29 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
30 -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
31 -L$(STAGING_DIR)/usr/lib/libiconv/lib/ \
32 -L$(STAGING_DIR)/usr/lib/
33
34 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_gtk2 CONFIG_PACKAGE_gtk-cups2)
35
36 define Package/gtk2
37 SECTION:=xorg-framework
38 CATEGORY:=Xorg
39 SUBMENU:=framework
40 TITLE:=GTK+-2.0
41 DEPENDS:=+cairo +pango +libpng +libjpeg +atk +libtiff +libX11 +libXext +libXrender
42 endef
43
44 define Package/gtk2-cups
45 SECTION:=xorg-framework
46 CATEGORY:=Xorg
47 SUBMENU:=framework
48 TITLE:=CUPS print backend for GTK+-2.0
49 DEPENDS:=gtk2 +cups
50 endef
51
52 define Build/Configure
53 $(call Build/Configure/Default, \
54 --disable-glibtest \
55 --disable-gdiplus \
56 --disable-xinerama \
57 --without-libjasper \
58 $(if $(CONFIG_PACKAGE_gtk2-cups),--enable-cups=auto,--disable-cups), \
59 gio_can_sniff=no \
60 )
61 endef
62
63 define Build/InstallDev
64 $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include}
65 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/include/* $(1)/usr/include/
67
68 $(INSTALL_DATA) \
69 $(PKG_INSTALL_DIR)/usr/lib/*.{la,so*} \
70 $(1)/usr/lib/
71
72 $(INSTALL_DATA) \
73 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
74 $(1)/usr/lib/pkgconfig/
75 endef
76
77 define Package/gtk2/install
78 $(INSTALL_DIR) $(1)/etc/gtk-2.0
79 $(INSTALL_DATA) \
80 $(PKG_INSTALL_DIR)/etc/gtk-2.0/* \
81 $(1)/etc/gtk-2.0/
82
83 $(INSTALL_DIR) $(1)/usr/lib
84 $(INSTALL_DATA) \
85 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
86 $(1)/usr/lib/
87
88 $(foreach d,engines immodules loaders, \
89 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/$(d); \
90 $(INSTALL_DATA) \
91 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/$(d)/*.{so,a} \
92 $(1)/usr/lib/gtk-2.0/2.10.0/$(d)/;\
93 )
94 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
95 $(INSTALL_DATA) \
96 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-{file,lpr}.{so,a} \
97 $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
98
99 $(INSTALL_DIR) $(1)/usr/bin/
100 $(INSTALL_BIN) \
101 $(PKG_INSTALL_DIR)/usr/bin/{gdk-pixbuf-query-loaders,gtk-query-immodules-2.0,gtk-update-icon-cache} \
102 $(1)/usr/bin/
103
104 $(INSTALL_DIR) $(1)/usr/share/themes/
105 $(CP) \
106 $(PKG_INSTALL_DIR)/usr/share/themes/* \
107 $(1)/usr/share/themes/
108
109 $(INSTALL_DIR) $(1)/etc/init.d/
110 $(INSTALL_BIN) ./files/gdk-pixbuf-query-loaders.init $(1)/etc/init.d/gdk-pixbuf-query-loaders
111 endef
112
113 define Package/gtk2-cups/install
114 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
115 $(INSTALL_DATA) \
116 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.{so,a} \
117 $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
118 endef
119
120 $(eval $(call BuildPackage,gtk2))
121 $(eval $(call BuildPackage,gtk2-cups))
122 $(eval $(call RequireCommand,gdk-pixbuf-csource, \
123 Please install gtk2.0-dev \
124 ))