Add pycairo to python-rsvg depencies. fixes #4013
[openwrt/svn-archive/archive.git] / lang / python-gnome-desktop2 / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gnome-python-desktop
11 PKG_VERSION:=2.22.0
12 PKG_RELEASE:=1
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14 PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.22
15 PKG_MD5SUM:=504877a973f6abc0788283232cd703c
16 PKG_FIXUP:=libtool
17
18 include $(INCLUDE_DIR)/package.mk
19 include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
20
21 PKG_INSTALL=1
22
23 EXTRA_CFLAGS += \
24 -I$(STAGING_DIR)/usr/lib/libintl/include \
25 -I$(STAGING_DIR)/usr/lib/libiconv/include \
26 $(if CONFIG_PACKAGE_python-rsvg, \
27 -I$(STAGING_DIR)/usr/include/librsvg-2 \
28 -I$(STAGING_DIR)/usr/include/pycairo \
29 ,) \
30 $(if CONFIG_PACKAGE_python-wnck,-I$(STAGING_DIR)/usr/include/libwnck-1.0,)
31
32 EXTRA_LDFLAGS += \
33 -L$(STAGING_DIR)/usr/lib/libintl/lib \
34 -L$(STAGING_DIR)/usr/lib/libiconv/lib
35
36 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_python-rsvg CONFIG_PACKAGE_python-wnck)
37
38 define Package/python-gnome-desktop/Default
39 SECTION:=lang
40 SUBMENU:=Python
41 CATEGORY:=Languages
42 TITLE:=$(1) python bindings
43 URL:=http://ftp.gnome.org/
44 DEPENDS:=python-core $(2)
45 endef
46
47 define Package/python-rsvg
48 $(call Package/python-gnome-desktop/Default,librsvg,+librsvg +pycairo)
49 endef
50
51 define Package/python-wnck
52 $(call Package/python-gnome-desktop/Default,libwnck,+libwnck)
53 endef
54
55 define Build/Configure
56 $(call Build/Configure/Default, \
57 $(if, $(CONFIG_PACKGE_python-rsvg), --enable-rsvg, --disable-rsvg), \
58 $(if, $(CONFIG_PACKGE_python-wnck), --enable-wnck, --disable-wnck), \
59 )
60 endef
61
62 define Build/InstallDev
63 $(INSTALL_DIR) $(1)/usr/share/pygtk/2.0/defs
64 $(INSTALL_DATA) \
65 $(PKG_INSTALL_DIR)/usr/share/pygtk/2.0/defs/* \
66 $(1)/usr/share/pygtk/2.0/defs
67
68 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
69 $(INSTALL_DATA) \
70 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
71 $(1)/usr/lib/pkgconfig
72
73 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0
74 $(INSTALL_DATA) \
75 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.{so,la} \
76 $(1)$(PYTHON_PKG_DIR)/gtk-2.0
77 endef
78
79 define Package/python-gnome-desktop/install/Default
80 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0
81 $(INSTALL_DATA) \
82 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/$(2).{so,a} \
83 $(1)$(PYTHON_PKG_DIR)/gtk-2.0
84 endef
85
86 define Package/python-rsvg/install
87 $(call Package/python-gnome-desktop/install/Default,$(1),rsvg)
88 endef
89
90 define Package/python-wnck/install
91 $(call Package/python-gnome-desktop/install/Default,$(1),wnck)
92 endef
93
94 $(eval $(call BuildPackage,python-rsvg))
95 $(eval $(call BuildPackage,python-wnck))
96