[packages] Add missing md5sums
[openwrt/svn-archive/archive.git] / Xorg / lib / gtk2 / Makefile
1 #
2 # Copyright (C) 2008-2010 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:=gtk2
11 PKG_VERSION:=2.17.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=gtk+-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@GNOME/gtk+/2.17
16 PKG_BUILD_DIR=$(BUILD_DIR)/gtk+-$(PKG_VERSION)
17 PKG_MD5SUM:=a1a1f0b66a240c31cb2733643f9170ba
18
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 TARGET_CFLAGS+=\
25 -I$(STAGING_DIR)/usr/lib/libintl/include/ \
26 -I$(STAGING_DIR)/usr/lib/libiconv/include/
27
28 TARGET_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
33 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_gtk2 CONFIG_PACKAGE_gtk2-cups)
34
35 # We can _either_ compile gtk2 with directfb-support _or_ against libX11 (libX11 is preferred when both libs are selected)
36
37 define Package/gtk2
38 SECTION:=xorg-framework
39 CATEGORY:=Xorg
40 SUBMENU:=framework
41 TITLE:=GTK+-2.0
42 DEPENDS:=+cairo +pango +libpng +libjpeg +atk +libtiff \
43 +FEATURE_drawing-backend_DirectFB:DirectFB \
44 +FEATURE_drawing-backend_libX11:libX11 \
45 +FEATURE_drawing-backend_libX11:libXext \
46 +FEATURE_drawing-backend_libX11:libXrender \
47 +FEATURE_drawing-backend_libX11:libXfixes \
48 +FEATURE_drawing-backend_libX11:libXrandr \
49 +FEATURE_drawing-backend_libX11:libXcursor \
50 +FEATURE_drawing-backend_libX11:libXdamage \
51 +FEATURE_drawing-backend_libX11:libXcomposite \
52 +FEATURE_drawing-backend_libX11:libXi
53 endef
54
55 define Package/gtk2-cups
56 SECTION:=xorg-framework
57 CATEGORY:=Xorg
58 SUBMENU:=framework
59 TITLE:=CUPS print backend for GTK+-2.0
60 DEPENDS:=gtk2 +cups
61 endef
62
63 define Build/Configure
64 $(call Build/Configure/Default, \
65 --enable-shm \
66 --disable-xkb \
67 --disable-glibtest \
68 --disable-gdiplus \
69 --disable-xinerama \
70 --without-libjasper \
71 --without-xinput \
72 $(if $(CONFIG_FEATURE_drawing-backend_DirectFB),--with-gdktarget=directfb,) \
73 $(if $(CONFIG_FEATURE_drawing-backend_libX11),--with-x --with-gdktarget=x11,--without-x) \
74 $(if $(CONFIG_PACKAGE_gtk2-cups),--enable-cups=auto,--disable-cups), \
75 gio_can_sniff=no \
76 )
77 endef
78
79 define Build/InstallDev
80 $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include}
81 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/include/* $(1)/usr/include/
83
84 $(CP) \
85 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
86 $(1)/usr/lib/
87
88 $(INSTALL_DATA) \
89 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
90 $(1)/usr/lib/pkgconfig/
91 endef
92
93 define Package/gtk2/install
94 $(INSTALL_DIR) $(1)/etc/gtk-2.0
95 $(INSTALL_DATA) \
96 $(PKG_INSTALL_DIR)/etc/gtk-2.0/* \
97 $(1)/etc/gtk-2.0/
98
99 $(INSTALL_DIR) $(1)/usr/lib
100 $(CP) \
101 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
102 $(1)/usr/lib/
103
104 $(foreach d,engines immodules loaders, \
105 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/$(d); \
106 $(INSTALL_DATA) \
107 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/$(d)/*.so \
108 $(1)/usr/lib/gtk-2.0/2.10.0/$(d)/;\
109 )
110 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
111 $(INSTALL_DATA) \
112 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-{file,lpr}.so \
113 $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
114
115 $(INSTALL_DIR) $(1)/usr/bin/
116 $(INSTALL_BIN) \
117 $(PKG_INSTALL_DIR)/usr/bin/{gdk-pixbuf-query-loaders,gtk-query-immodules-2.0,gtk-update-icon-cache} \
118 $(1)/usr/bin/
119
120 $(INSTALL_DIR) $(1)/usr/share/themes/
121 $(CP) \
122 $(PKG_INSTALL_DIR)/usr/share/themes/* \
123 $(1)/usr/share/themes/
124
125 $(INSTALL_DIR) $(1)/etc/init.d/
126 $(INSTALL_BIN) ./files/gdk-pixbuf-query-loaders.init $(1)/etc/init.d/gdk-pixbuf-query-loaders
127 endef
128
129 define Package/gtk2-cups/install
130 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
131 $(INSTALL_DATA) \
132 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so \
133 $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
134 endef
135
136 $(eval $(call BuildPackage,gtk2))
137 $(eval $(call BuildPackage,gtk2-cups))