source: packages/lang/pygobject/Makefile @ 24592

Last change on this file since 24592 was 24592, checked in by jow, 5 years ago

[packages] pygobject: fix compilation by explicitely enabling static libs

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=pygobject
11PKG_VERSION:=2.16.0
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.16
16PKG_MD5SUM:=431e7d4632163b93d1ee43cd071a389c
17PKG_FIXUP:=libtool
18PKG_INSTALL:=1
19
20include $(INCLUDE_DIR)/package.mk
21$(call include_mk, python-package.mk)
22
23EXTRA_LDFLAGS+= \
24        -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
25        -L$(STAGING_DIR)/usr/lib/libiconv/lib/
26
27TARGET_CFLAGS += $(FPIC)
28CONFIGURE_ARGS += --enable-static
29
30define 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
37endef
38
39define Package/python-gobject/description
40  GLib bindings for python
41endef
42
43define Build/Configure
44        $(call Build/Configure/Default, \
45                --with-libffi \
46        )
47endef
48
49define 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
87endef
88
89define 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        )
111endef
112
113$(eval $(call BuildPackage,python-gobject))
Note: See TracBrowser for help on using the repository browser.