add & fix python modules

git-svn-id: svn://svn.openwrt.org/openwrt/packages@11263 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
blogic 2008-05-24 18:01:46 +00:00
parent 531f43dbdf
commit 7936aec182
4 changed files with 79 additions and 7 deletions

View File

@ -19,6 +19,7 @@ PKG_FIXUP:=libtool
include $(INCLUDE_DIR)/package.mk
define Package/pycairo
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=Cairo bindings to python
@ -42,17 +43,17 @@ define Build/Configure
endef
define Build/Compile
cd $(PKG_BUILD_DIR) ; $(MAKE) $(MAKE_FLAGS) $(MAKE_VARS)
cd $(PKG_BUILD_DIR) ; DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) all install
endef
define Build/InstallDev
cd $(PKG_BUILD_DIR) ; DESTDIR=$(1) $(MAKE) $(MAKE_FLAGS) install
# rm $(1)/usr/lib/pkgconfig/pycairo.pc
mkdir -p $(1)
cp -r $(PKG_INSTALL_DIR)/* $(1)
endef
define Package/pycairo/install
cd $(PKG_BUILD_DIR) ; DESTDIR=$(1) $(MAKE) $(MAKE_FLAGS) install
# rm $(1)/usr/lib/pkgconfig/pycairo.pc
define Package/python-gtk/install
mkdir -p $(1)
cp -r $(PKG_INSTALL_DIR)/* $(1)
endef
$(eval $(call BuildPackage,pycairo))

59
lang/pygobject/Makefile Normal file
View File

@ -0,0 +1,59 @@
#
# Copyright (C) 2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=pygobject
PKG_VERSION:=2.14.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.14
EXTRA_LDFLAGS=-L$(STAGING_DIR)/usr/lib/libintl/lib/ -L$(STAGING_DIR)/usr/lib/libiconv/lib/
include $(INCLUDE_DIR)/package.mk
define Package/python-gobject
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=python gobjects
URL:=http://www.pygtk.org/
DEPENDS:=python-core
endef
define Package/python-gobject/description
API to GTK and glade library from python
endef
define Build/Configure
(cd $(PKG_BUILD_DIR); \
if [ -x $(CONFIGURE_CMD) ]; then \
$(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
$(CONFIGURE_VARS) \
$(CONFIGURE_CMD) \
$(CONFIGURE_ARGS) ;\
fi \
)
endef
define Build/Compile
cd $(PKG_BUILD_DIR)/gobject ; gcc -I$(STAGING_DIR)/usr/lib/glib-2.0/include/ -I$(STAGING_DIR)/usr/include/glib-2.0/ generate-constants.c -o generate-constants
cd $(PKG_BUILD_DIR) ; DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) all install
endef
define Build/InstallDev
mkdir -p $(1)
cp -r $(PKG_INSTALL_DIR)/* $(1)
endef
define Package/python-gtk/install
mkdir -p $(1)
cp -r $(PKG_INSTALL_DIR)/* $(1)
endef
$(eval $(call BuildPackage,python-gobject))

View File

@ -0,0 +1,11 @@
diff -urN pygobject-2.14.0.orig/gobject/Makefile.in pygobject-2.14.0/gobject/Makefile.in
--- pygobject-2.14.0.orig/gobject/Makefile.in 2008-05-22 21:54:05.000000000 +0100
+++ pygobject-2.14.0/gobject/Makefile.in 2008-05-22 21:58:47.000000000 +0100
@@ -1040,6 +1040,7 @@
rm -f constants.py
cp $(srcdir)/constants.py.in constants.py
chmod 644 constants.py
+ gcc $(GLIB_CFLAGS) generate-constants.c -o generate-constants
$(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py
chmod 444 constants.py
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View File

@ -18,8 +18,9 @@ PKG_FIXUP:=libtool
include $(INCLUDE_DIR)/package.mk
EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/pycairo/ -I$(STAGING_DIR)/usr/lib/libintl/include/ -I$(STAGING_DIR)/usr/lib/libiconv/include/
RSTRIP:=true
define Package/python-gtk
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=GTK bindings to python