[packages] pygobject: fix compilation by explicitely enabling static libs
[openwrt/svn-archive/archive.git] / lang / pygobject / 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:=pygobject
11 PKG_VERSION:=2.16.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.16
16 PKG_MD5SUM:=431e7d4632163b93d1ee43cd071a389c
17 PKG_FIXUP:=libtool
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21 $(call include_mk, python-package.mk)
22
23 EXTRA_LDFLAGS+= \
24 -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
25 -L$(STAGING_DIR)/usr/lib/libiconv/lib/
26
27 TARGET_CFLAGS += $(FPIC)
28 CONFIGURE_ARGS += --enable-static
29
30 define Package/python-gobject
31 SUBMENU:=Python
32 SECTION:=lang
33 CATEGORY:=Languages
34 TITLE:=GLib bindings for python
35 URL:=http://www.pygtk.org/
36 DEPENDS:=+python-mini +glib2 +libffi
37 endef
38
39 define Package/python-gobject/description
40 GLib bindings for python
41 endef
42
43 define Build/Configure
44 $(call Build/Configure/Default, \
45 --with-libffi \
46 )
47 endef
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(1)/usr/include/pygtk-2.0/
51 $(INSTALL_DATA) \
52 $(PKG_INSTALL_DIR)/usr/include/pygtk-2.0/* \
53 $(1)/usr/include/pygtk-2.0/
54
55 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
56 $(INSTALL_DATA) \
57 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
58 $(1)/usr/lib/pkgconfig/
59
60 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
61 $(CP) \
62 $(PKG_INSTALL_DIR)/usr/lib/*.{so,a,la} \
63 $(1)/usr/lib/
64
65 $(SED) \
66 "s,^\(prefix\|exec_prefix\|datadir\)=,\1=$(STAGING_DIR),g" \
67 $(1)/usr/lib/pkgconfig/pygobject-2.0.pc
68
69 $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/codegen
70 $(INSTALL_DATA) \
71 $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/codegen/*.py \
72 $(1)/usr/share/pygobject/2.0/codegen
73
74 $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/defs
75 $(INSTALL_DATA) \
76 $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/defs/* \
77 $(1)/usr/share/pygobject/2.0/defs
78
79 $(INSTALL_DIR) $(2)/bin
80 $(INSTALL_BIN) \
81 $(PKG_INSTALL_DIR)/usr/bin/* \
82 $(2)/bin
83
84 $(SED) \
85 "s,^\(prefix\|datadir\)=,\1=$(STAGING_DIR),g" \
86 $(2)/bin/pygobject-codegen-2.0
87 endef
88
89 define Package/python-gobject/install
90 $(INSTALL_DIR) $(1)/usr/lib
91 $(CP) \
92 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
93 $(1)/usr/lib
94
95 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
96 $(INSTALL_DATA) \
97 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/*.{pth,py} \
98 $(1)$(PYTHON_PKG_DIR)/
99
100 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0
101 $(INSTALL_DATA) \
102 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.py \
103 $(1)$(PYTHON_PKG_DIR)/gtk-2.0/
104
105 $(foreach d,gobject gio glib, \
106 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \
107 $(INSTALL_DATA) \
108 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/$(d)/*.{py,so} \
109 $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \
110 )
111 endef
112
113 $(eval $(call BuildPackage,python-gobject))