Fix asterisk-1.4.x build.
[openwrt/svn-archive/archive.git] / lang / pygtk / 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:=pygtk
11 PKG_VERSION:=2.10.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.10/
16 PKG_FIXUP:=libtool
17 PKG_MD5SUM:=d033b7617b9074357f687326b52b6296
18
19 include $(INCLUDE_DIR)/package.mk
20
21 EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/pycairo/ -I$(STAGING_DIR)/usr/lib/libintl/include/ -I$(STAGING_DIR)/usr/lib/libiconv/include/
22 EXTRA_LDFLAGS:=-L$(STAGING_DIR)/usr/lib/libintl/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib
23
24 define Package/python-gtk
25 SUBMENU:=Python
26 SECTION:=lang
27 CATEGORY:=Languages
28 TITLE:=GTK bindings to python
29 URL:=http://www.pygtk.org/
30 DEPENDS:=python-core +python-gobject +gtk2 +pycairo
31 endef
32
33 define Package/python-gtk/description
34 API to GTK and glade library from python
35 endef
36
37 define Build/Compile
38 PYTHON_HOST="python2.5" \
39 DESTDIR="$(PKG_INSTALL_DIR)" \
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 SUBDIRS="codegen . gtk" \
42 all install
43 sed -i "s/UCS4/UCS2/g" $(PKG_INSTALL_DIR)/usr/lib/python2.5/site-packages/gtk-2.0/gtk/_gtk.so
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)
48 $(CP) $(PKG_INSTALL_DIR)/* $(1)
49 endef
50
51 define Package/python-gtk/install
52 $(INSTALL_DIR) $(1)
53 $(CP) $(PKG_INSTALL_DIR)/* $(1)
54 endef
55
56 $(eval $(call BuildPackage,python-gtk))
57 $(eval $(call RequireCommand,pygtk-codegen-2.0, \
58 Please install the pygtk 2.0 development package \
59 ))