From aea5cdf0cf3fc8fc39d148a77efe518a8e779e88 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 24 May 2008 18:01:46 +0000 Subject: [PATCH] add & fix python modules SVN-Revision: 11263 --- lang/pycairo/Makefile | 13 +++--- lang/pygobject/Makefile | 59 ++++++++++++++++++++++++ lang/pygobject/patches/100-compile.patch | 11 +++++ lang/pygtk/Makefile | 3 +- 4 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 lang/pygobject/Makefile create mode 100644 lang/pygobject/patches/100-compile.patch diff --git a/lang/pycairo/Makefile b/lang/pycairo/Makefile index 79e52a6788..903e40c2c8 100644 --- a/lang/pycairo/Makefile +++ b/lang/pycairo/Makefile @@ -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)) diff --git a/lang/pygobject/Makefile b/lang/pygobject/Makefile new file mode 100644 index 0000000000..a5fc107dd9 --- /dev/null +++ b/lang/pygobject/Makefile @@ -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)) diff --git a/lang/pygobject/patches/100-compile.patch b/lang/pygobject/patches/100-compile.patch new file mode 100644 index 0000000000..0490aba868 --- /dev/null +++ b/lang/pygobject/patches/100-compile.patch @@ -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. diff --git a/lang/pygtk/Makefile b/lang/pygtk/Makefile index 2974699423..472e143a41 100644 --- a/lang/pygtk/Makefile +++ b/lang/pygtk/Makefile @@ -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 -- 2.30.2