add gtk2 fix by larsc
[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.4
13 PKG_RELEASE:=5
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:=72bf65a54d2d29a6644dc0d28313ee67
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_gtk2-cups)
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 \
42 +libXrender +libXfixes +libXrandr +libXcursor +libXdamage +libXcomposite \
43 +libXi
44 endef
45
46 define Package/gtk2-cups
47 SECTION:=xorg-framework
48 CATEGORY:=Xorg
49 SUBMENU:=framework
50 TITLE:=CUPS print backend for GTK+-2.0
51 DEPENDS:=gtk2 +cups
52 endef
53
54 define Build/Configure
55 $(call Build/Configure/Default, \
56 --enable-shm \
57 --disable-xkb \
58 --disable-glibtest \
59 --disable-gdiplus \
60 --disable-xinerama \
61 --without-libjasper \
62 --with-xinput \
63 $(if $(CONFIG_PACKAGE_gtk2-cups),--enable-cups=auto,--disable-cups), \
64 gio_can_sniff=no \
65 )
66 endef
67
68 define Build/InstallDev
69 $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include}
70 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/include/* $(1)/usr/include/
72
73 $(INSTALL_DATA) \
74 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
75 $(1)/usr/lib/
76
77 $(INSTALL_DATA) \
78 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
79 $(1)/usr/lib/pkgconfig/
80 endef
81
82 define Package/gtk2/install
83 $(INSTALL_DIR) $(1)/etc/gtk-2.0
84 $(INSTALL_DATA) \
85 $(PKG_INSTALL_DIR)/etc/gtk-2.0/* \
86 $(1)/etc/gtk-2.0/
87
88 $(INSTALL_DIR) $(1)/usr/lib
89 $(INSTALL_DATA) \
90 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
91 $(1)/usr/lib/
92
93 $(foreach d,engines immodules loaders, \
94 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/$(d); \
95 $(INSTALL_DATA) \
96 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/$(d)/*.so \
97 $(1)/usr/lib/gtk-2.0/2.10.0/$(d)/;\
98 )
99 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
100 $(INSTALL_DATA) \
101 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-{file,lpr}.so \
102 $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
103
104 $(INSTALL_DIR) $(1)/usr/bin/
105 $(INSTALL_BIN) \
106 $(PKG_INSTALL_DIR)/usr/bin/{gdk-pixbuf-query-loaders,gtk-query-immodules-2.0,gtk-update-icon-cache} \
107 $(1)/usr/bin/
108
109 $(INSTALL_DIR) $(1)/usr/share/themes/
110 $(CP) \
111 $(PKG_INSTALL_DIR)/usr/share/themes/* \
112 $(1)/usr/share/themes/
113
114 $(INSTALL_DIR) $(1)/etc/init.d/
115 $(INSTALL_BIN) ./files/gdk-pixbuf-query-loaders.init $(1)/etc/init.d/gdk-pixbuf-query-loaders
116 endef
117
118 define Package/gtk2-cups/install
119 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
120 $(INSTALL_DATA) \
121 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so \
122 $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
123 endef
124
125 $(eval $(call BuildPackage,gtk2))
126 $(eval $(call BuildPackage,gtk2-cups))
127 $(eval $(call RequireCommand,gdk-pixbuf-csource, \
128 Please install gtk2.0-dev \
129 ))