[packages] massive change: replace occurences of -I$(STAGING_DIR)/{include,usr/includ...
[openwrt/svn-archive/archive.git] / Xorg / lib / gtk2 / Makefile
1 #
2 # Copyright (C) 2008-2009 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.14.4
12 PKG_RELEASE:=6
13
14 PKG_SOURCE:=gtk+-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@GNOME/gtk+/2.14
16 PKG_BUILD_DIR=$(BUILD_DIR)/gtk+-$(PKG_VERSION)
17 PKG_MD5SUM:=72bf65a54d2d29a6644dc0d28313ee67
18 PKG_FIXUP:=libtool
19
20 include $(INCLUDE_DIR)/package.mk
21
22 PKG_INSTALL:=1
23
24 TARGET_CFLAGS+=\
25 -I$(STAGING_DIR)/usr/lib/libintl/include/
26
27 EXTRA_LDFLAGS+=\
28 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
29 -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
30 -L$(STAGING_DIR)/usr/lib/libiconv/lib/ \
31 $(TARGET_LDFLAGS)
32
33 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_gtk2 CONFIG_PACKAGE_gtk2-cups)
34
35 define Package/gtk2
36 SECTION:=xorg-framework
37 CATEGORY:=Xorg
38 SUBMENU:=framework
39 TITLE:=GTK+-2.0
40 DEPENDS:=+cairo +pango +libpng +libjpeg +atk +libtiff +libX11 +libXext \
41 +libXrender +libXfixes +libXrandr +libXcursor +libXdamage +libXcomposite \
42 +libXi
43 endef
44
45 define Package/gtk2-cups
46 SECTION:=xorg-framework
47 CATEGORY:=Xorg
48 SUBMENU:=framework
49 TITLE:=CUPS print backend for GTK+-2.0
50 DEPENDS:=gtk2 +cups
51 endef
52
53 define Build/Configure
54 $(call Build/Configure/Default, \
55 --enable-shm \
56 --disable-xkb \
57 --disable-glibtest \
58 --disable-gdiplus \
59 --disable-xinerama \
60 --without-libjasper \
61 --with-xinput \
62 $(if $(CONFIG_PACKAGE_gtk2-cups),--enable-cups=auto,--disable-cups), \
63 gio_can_sniff=no \
64 )
65 endef
66
67 define Build/InstallDev
68 $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include}
69 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/include/* $(1)/usr/include/
71
72 $(CP) \
73 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
74 $(1)/usr/lib/
75
76 $(INSTALL_DATA) \
77 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
78 $(1)/usr/lib/pkgconfig/
79 endef
80
81 define Package/gtk2/install
82 $(INSTALL_DIR) $(1)/etc/gtk-2.0
83 $(INSTALL_DATA) \
84 $(PKG_INSTALL_DIR)/etc/gtk-2.0/* \
85 $(1)/etc/gtk-2.0/
86
87 $(INSTALL_DIR) $(1)/usr/lib
88 $(CP) \
89 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
90 $(1)/usr/lib/
91
92 $(foreach d,engines immodules loaders, \
93 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/$(d); \
94 $(INSTALL_DATA) \
95 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/$(d)/*.so \
96 $(1)/usr/lib/gtk-2.0/2.10.0/$(d)/;\
97 )
98 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
99 $(INSTALL_DATA) \
100 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-{file,lpr}.so \
101 $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
102
103 $(INSTALL_DIR) $(1)/usr/bin/
104 $(INSTALL_BIN) \
105 $(PKG_INSTALL_DIR)/usr/bin/{gdk-pixbuf-query-loaders,gtk-query-immodules-2.0,gtk-update-icon-cache} \
106 $(1)/usr/bin/
107
108 $(INSTALL_DIR) $(1)/usr/share/themes/
109 $(CP) \
110 $(PKG_INSTALL_DIR)/usr/share/themes/* \
111 $(1)/usr/share/themes/
112
113 $(INSTALL_DIR) $(1)/etc/init.d/
114 $(INSTALL_BIN) ./files/gdk-pixbuf-query-loaders.init $(1)/etc/init.d/gdk-pixbuf-query-loaders
115 endef
116
117 define Package/gtk2-cups/install
118 $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
119 $(INSTALL_DATA) \
120 $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so \
121 $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/
122 endef
123
124 $(eval $(call BuildPackage,gtk2))
125 $(eval $(call BuildPackage,gtk2-cups))
126 $(eval $(call RequireCommand,gdk-pixbuf-csource, \
127 Please install gtk2.0-dev \
128 ))