From: John Crispin Date: Sat, 24 May 2008 17:15:00 +0000 (+0000) Subject: fixes pygtk & pycairo X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fa77d82417d5698259a9245cb57c04377298a944;p=openwrt%2Fsvn-archive%2Fpackages.git fixes pygtk & pycairo SVN-Revision: 11260 --- diff --git a/lang/pycairo/Makefile b/lang/pycairo/Makefile index 84f07aac0..79e52a678 100644 --- a/lang/pycairo/Makefile +++ b/lang/pycairo/Makefile @@ -13,14 +13,10 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.cairographics.org/releases/ -#PKG_MD5SUM:=532268f02870bea18c1d465e88afff30 PKG_BUILD_DEPENDS:=python cairo +PKG_FIXUP:=libtool include $(INCLUDE_DIR)/package.mk --include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) -ifneq ($(MAKECMDGOALS),download) - $(if $(DUMP)$(Build/Compile/PyMod),,$(error Python packaging code not found.)) -endif define Package/pycairo SECTION:=lang @@ -34,11 +30,29 @@ define Package/pycairo/description cairo modul for python endef -define Build/Compile - $(call Build/Compile/PyMod,., \ - install --prefix="$(PKG_INSTALL_DIR)/usr", \ +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 -$(eval $(call PyPackage,pycairo)) +define Build/Compile + cd $(PKG_BUILD_DIR) ; $(MAKE) $(MAKE_FLAGS) $(MAKE_VARS) +endef + +define Build/InstallDev + cd $(PKG_BUILD_DIR) ; DESTDIR=$(1) $(MAKE) $(MAKE_FLAGS) install +# rm $(1)/usr/lib/pkgconfig/pycairo.pc +endef + +define Package/pycairo/install + cd $(PKG_BUILD_DIR) ; DESTDIR=$(1) $(MAKE) $(MAKE_FLAGS) install +# rm $(1)/usr/lib/pkgconfig/pycairo.pc +endef + $(eval $(call BuildPackage,pycairo)) diff --git a/lang/pygtk/Makefile b/lang/pygtk/Makefile index 398e46fa0..297469942 100644 --- a/lang/pygtk/Makefile +++ b/lang/pygtk/Makefile @@ -13,32 +13,47 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.10/ -#PKG_MD5SUM:=532268f02870bea18c1d465e88afff30 -#PKG_BUILD_DEPENDS:=python gtk +PKG_FIXUP:=libtool include $(INCLUDE_DIR)/package.mk --include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) -ifneq ($(MAKECMDGOALS),download) - $(if $(DUMP)$(Build/Compile/PyMod),,$(error Python packaging code not found.)) -endif +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 SECTION:=lang CATEGORY:=Languages TITLE:=GTK bindings to python URL:=http://www.pygtk.org/ - DEPENDS:=python-core + DEPENDS:=python-core +python-gobject +gtk-2.10.14 +pycairo endef define Package/python-gtk/description API to GTK and glade library from python endef -define Build/Compile - $(call Build/Compile/PyMod,., \ - install --prefix="$(PKG_INSTALL_DIR)/usr", \ +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 -$(eval $(call PyPackage,python-gtk)) +define Build/Compile + cd $(PKG_BUILD_DIR) ; PYTHON_HOST=/usr/bin/python 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-gtk)) diff --git a/lang/pygtk/patches/100-compile.patch b/lang/pygtk/patches/100-compile.patch new file mode 100644 index 000000000..87a357bb3 --- /dev/null +++ b/lang/pygtk/patches/100-compile.patch @@ -0,0 +1,48 @@ +diff -urN pygtk-2.10.6.orig/Makefile.am pygtk-2.10.6/Makefile.am +--- pygtk-2.10.6.orig/Makefile.am 2008-05-24 15:18:49.000000000 +0100 ++++ pygtk-2.10.6/Makefile.am 2008-05-24 15:20:50.000000000 +0100 +@@ -105,7 +105,7 @@ + # code generator + .defs.c: + (cd $(srcdir)\ +- && $(PYTHON) codegen/codegen.py \ ++ && $(PYTHON_HOST) codegen/codegen.py \ + --py_ssize_t-clean \ + --register pango-types.defs \ + --register atk-types.defs \ +diff -urN pygtk-2.10.6.orig/Makefile.in pygtk-2.10.6/Makefile.in +--- pygtk-2.10.6.orig/Makefile.in 2008-05-24 15:18:49.000000000 +0100 ++++ pygtk-2.10.6/Makefile.in 2008-05-24 15:20:39.000000000 +0100 +@@ -1085,7 +1085,7 @@ + # code generator + .defs.c: + (cd $(srcdir)\ +- && $(PYTHON) codegen/codegen.py \ ++ && $(PYTHON_HOST) codegen/codegen.py \ + --py_ssize_t-clean \ + --register pango-types.defs \ + --register atk-types.defs \ +diff -urN pygtk-2.10.6.orig/gtk/Makefile.am pygtk-2.10.6/gtk/Makefile.am +--- pygtk-2.10.6.orig/gtk/Makefile.am 2008-05-24 15:18:49.000000000 +0100 ++++ pygtk-2.10.6/gtk/Makefile.am 2008-05-24 15:21:10.000000000 +0100 +@@ -170,7 +170,7 @@ + + + .defs.c: +- ($(PYTHON) $(top_srcdir)/codegen/codegen.py \ ++ ($(PYTHON_HOST) $(top_srcdir)/codegen/codegen.py \ + $(PYGTK_CODEGEN_DEFINES) \ + -I $(srcdir) \ + --py_ssize_t-clean \ +diff -urN pygtk-2.10.6.orig/gtk/Makefile.in pygtk-2.10.6/gtk/Makefile.in +--- pygtk-2.10.6.orig/gtk/Makefile.in 2008-05-24 15:18:49.000000000 +0100 ++++ pygtk-2.10.6/gtk/Makefile.in 2008-05-24 15:21:20.000000000 +0100 +@@ -1056,7 +1056,7 @@ + gtk-types.defs + + .defs.c: +- ($(PYTHON) $(top_srcdir)/codegen/codegen.py \ ++ ($(PYTHON_HOST) $(top_srcdir)/codegen/codegen.py \ + $(PYGTK_CODEGEN_DEFINES) \ + -I $(srcdir) \ + --py_ssize_t-clean \