From c0cd540e530b39940f164e7a2479ac9ec5fefebf Mon Sep 17 00:00:00 2001 From: blogic Date: Tue, 3 Jun 2008 21:11:50 +0000 Subject: [PATCH] add lots of python dependencies of sugar git-svn-id: svn://svn.openwrt.org/openwrt/packages@11346 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- lang/gst-python/Makefile | 61 +++++++++++++++ lang/ipython/Makefile | 57 ++++++++++++++ lang/logilab-astng/Makefile | 47 ++++++++++++ lang/logilab-common/Makefile | 47 ++++++++++++ lang/numpy/Makefile | 41 ++++++++++ lang/numpy/patches/100-compile.patch | 111 +++++++++++++++++++++++++++ lang/python-dbus/Makefile | 60 +++++++++++++++ lang/python-gnome-desktop2/Makefile | 60 +++++++++++++++ lang/telepathy-python/Makefile | 40 ++++++++++ 9 files changed, 524 insertions(+) create mode 100644 lang/gst-python/Makefile create mode 100644 lang/ipython/Makefile create mode 100644 lang/logilab-astng/Makefile create mode 100644 lang/logilab-common/Makefile create mode 100644 lang/numpy/Makefile create mode 100644 lang/numpy/patches/100-compile.patch create mode 100644 lang/python-dbus/Makefile create mode 100644 lang/python-gnome-desktop2/Makefile create mode 100644 lang/telepathy-python/Makefile diff --git a/lang/gst-python/Makefile b/lang/gst-python/Makefile new file mode 100644 index 000000000..7d797875a --- /dev/null +++ b/lang/gst-python/Makefile @@ -0,0 +1,61 @@ +# +# 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:=gst-python +PKG_VERSION:=0.10.11 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-python/ +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/lib/libintl/include/ -I$(STAGING_DIR)/usr/lib/libiconv/include/ +EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libintl/lib/ -L$(STAGING_DIR)/usr/lib/libiconv/lib/ + +define Package/gst-python + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=python bindings for dbus + URL:=http://gstreamer.freedesktop.org/ + DEPENDS:=+gstreamer +gst-plugins-base +endef + +define Package/gst-python/description + python bindings for dbus +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); \ + if [ -x $(CONFIGURE_CMD) ]; then \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \ + $(CONFIGURE_VARS) \ + PYTHON=/usr/bin/python \ + $(CONFIGURE_CMD) \ + $(CONFIGURE_ARGS) ;\ + fi \ + ) +endef + +define Build/Compile + 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/gst-python/install + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +$(eval $(call BuildPackage,gst-python)) diff --git a/lang/ipython/Makefile b/lang/ipython/Makefile new file mode 100644 index 000000000..6f61adae9 --- /dev/null +++ b/lang/ipython/Makefile @@ -0,0 +1,57 @@ +# +# 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:=ipython +PKG_VERSION:=0.8.2 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://ipython.scipy.org/dist/ +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/ipython + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=python bindings for dbus + URL:=http://ipython.scipy.org/dist/ +endef + +define Package/ipython/description + python bindings for dbus +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); \ + if [ -x $(CONFIGURE_CMD) ]; then \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \ + $(CONFIGURE_VARS) \ + PYTHON=/usr/bin/python \ + $(CONFIGURE_CMD) \ + $(CONFIGURE_ARGS) ;\ + fi \ + ) +endef + +define Build/Compile + cd $(PKG_BUILD_DIR) ; $(CONFIGURE_VARS) ./setup.py install --prefix="$(PKG_INSTALL_DIR)/usr" +endef + +define Build/InstallDev + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +define Package/ipython/install + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +$(eval $(call BuildPackage,ipython)) diff --git a/lang/logilab-astng/Makefile b/lang/logilab-astng/Makefile new file mode 100644 index 000000000..7d018e0ec --- /dev/null +++ b/lang/logilab-astng/Makefile @@ -0,0 +1,47 @@ +# +# 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:=logilab-astng +PKG_VERSION:=0.17.2 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.logilab.fr/pub/astng/ + +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/logilab-astng + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=logilab-astng + URL:=http://www.logilab.fr + DEPENDS:=python-core +endef + +define Package/logilab-astng/description + The aim of this module is to provide a common base representation of python source code for projects such as pychecker, pyreverse, pylint... +endef + +define Build/Compile + $(call Build/Compile/PyMod,., \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) +endef + +define Package/logilad-astng/install + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +$(eval $(call PyPackage,logilab-astng)) +$(eval $(call BuildPackage,logilab-astng)) diff --git a/lang/logilab-common/Makefile b/lang/logilab-common/Makefile new file mode 100644 index 000000000..5e69a5840 --- /dev/null +++ b/lang/logilab-common/Makefile @@ -0,0 +1,47 @@ +# +# 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:=logilab-common +PKG_VERSION:=0.29.1 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.logilab.fr/pub/common/ + +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/logilab-common + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=logilab-common + URL:=http://www.logilab.fr + DEPENDS:=python-core +endef + +define Package/logilab-common/description + a bunch of modules providing low level functionnalities shared among some python projects devel +endef + +define Build/Compile + $(call Build/Compile/PyMod,., \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) +endef + +define Package/logilad-common/install + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +$(eval $(call PyPackage,logilab-common)) +$(eval $(call BuildPackage,logilab-common)) diff --git a/lang/numpy/Makefile b/lang/numpy/Makefile new file mode 100644 index 000000000..b2a321336 --- /dev/null +++ b/lang/numpy/Makefile @@ -0,0 +1,41 @@ +# +# 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:=numpy +PKG_VERSION:=1.0.4 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.sourceforge.net/numpy/ + +include $(INCLUDE_DIR)/package.mk + +define Package/numpy + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=numpy + URL:=http://numpy.sf.net + DEPENDS:=python-core +endef + +define Package/numpy/description + API to GTK and glade library from python +endef + +define Build/Compile + cd $(PKG_BUILD_DIR) ; $(CONFIGURE_VARS) $(MAKE_VARS) /usr/bin/python ./setup.py install --prefix="$(PKG_INSTALL_DIR)/usr" + sed -i "s/UCS4/UCS2/g" $(PKG_INSTALL_DIR)/usr/lib/python2.5/site-packages/numpy/core/multiarray.so +endef + +define Package/numpy/install + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +$(eval $(call BuildPackage,numpy)) diff --git a/lang/numpy/patches/100-compile.patch b/lang/numpy/patches/100-compile.patch new file mode 100644 index 000000000..df81fb00a --- /dev/null +++ b/lang/numpy/patches/100-compile.patch @@ -0,0 +1,111 @@ +diff -urN numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h numpy-1.0.4.patched/numpy/core/include/numpy/ufuncobject.h +--- numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h 2007-11-07 22:05:15.000000000 +0000 ++++ numpy-1.0.4.patched/numpy/core/include/numpy/ufuncobject.h 2008-05-25 11:07:14.000000000 +0100 +@@ -284,7 +284,7 @@ + #elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) + + #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) +-#include ++#include "fenv/fenv.h" + #elif defined(__CYGWIN__) + #include "fenv/fenv.c" + #endif +diff -urN numpy-1.0.4/numpy/core/setup.py numpy-1.0.4.patched/numpy/core/setup.py +--- numpy-1.0.4/numpy/core/setup.py 2007-11-07 22:06:43.000000000 +0000 ++++ numpy-1.0.4.patched/numpy/core/setup.py 2008-05-25 11:07:14.000000000 +0100 +@@ -36,6 +36,7 @@ + + def generate_config_h(ext, build_dir): + target = join(build_dir,'config.h') ++ log.info("-----------------------abc") + if newer(__file__,target): + config_cmd = config.get_config_cmd() + log.info('Generating %s',target) +@@ -73,6 +74,7 @@ + nosmp = 1 + except KeyError: + nosmp = 0 ++ nosmp = 1 + if nosmp: moredefs = [('NPY_ALLOW_THREADS', '0')] + else: moredefs = [] + # +@@ -123,8 +125,9 @@ + target_f.write('#define %s\n' % (d)) + else: + target_f.write('#define %s %s\n' % (d[0],d[1])) +- if not nosmp: # default is to use WITH_THREAD +- target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n') ++ log.info("-----------------------abc") ++ #if not nosmp: # default is to use WITH_THREAD ++ target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n') + target_f.close() + print 'File:',target + target_f = open(target) +diff -urN numpy-1.0.4/numpy/distutils/unixccompiler.py numpy-1.0.4.patched/numpy/distutils/unixccompiler.py +--- numpy-1.0.4/numpy/distutils/unixccompiler.py 2007-11-07 22:05:15.000000000 +0000 ++++ numpy-1.0.4.patched/numpy/distutils/unixccompiler.py 2008-05-25 11:07:14.000000000 +0100 +@@ -9,11 +9,35 @@ + from numpy.distutils.ccompiler import replace_method + + import log ++def UnixCCompiler__link_executable (self, ++ objects, ++ output_progname, ++ output_dir=None, ++ libraries=None, ++ library_dirs=None, ++ runtime_library_dirs=None, ++ debug=0, ++ extra_preargs=None, ++ extra_postargs=None, ++ target_lang=None): ++ if output_progname == "_configtest": ++ self.spawn(['gcc', '-lm', '-o',output_progname]+objects, display = "") ++ else: ++ self.link(CCompiler.EXECUTABLE, objects, ++ self.executable_filename(output_progname), output_dir, ++ libraries, library_dirs, runtime_library_dirs, None, ++ debug, extra_preargs, extra_postargs+ ['-lm'], None, target_lang) ++ ++replace_method(UnixCCompiler, 'link_executable', UnixCCompiler__link_executable) + + # Note that UnixCCompiler._compile appeared in Python 2.3 + def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + display = '%s: %s' % (os.path.basename(self.compiler_so[0]),src) + try: ++ if src == "_configtest.c": ++ self.spawn(['gcc', '-fwrapv', '-O2', '-Wall', '-Wstrict-prototypes', '-I/umc/blogic/olpc/staging_dir/i386/usr/include', '-I/umc/blogic/olpc/staging_dir/i386/include', '-I/umc/blogic/olpc/staging_dir/i386/usr/include/python2.5','-I/umc/blogic/olpc/staging_dir/i386/usr/include', '-I/umc/blogic/olpc/staging_dir/i386/include', '-fPIC'] + cc_args + [src, '-o', obj] + ++ extra_postargs, display = display) ++ else: + self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + + extra_postargs, display = display) + except DistutilsExecError, msg: +diff -urN numpy-1.0.4/numpy/numarray/_capi.c numpy-1.0.4.patched/numpy/numarray/_capi.c +--- numpy-1.0.4/numpy/numarray/_capi.c 2007-11-07 22:05:16.000000000 +0000 ++++ numpy-1.0.4.patched/numpy/numarray/_capi.c 2008-05-25 11:07:14.000000000 +0100 +@@ -5,7 +5,7 @@ + #include + + #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) +-#include ++#include "numpy/fenv/fenv.h" + #elif defined(__CYGWIN__) + #include "numpy/fenv/fenv.h" + #include "numpy/fenv/fenv.c" +diff -urN numpy-1.0.4.p2/numpy/core/setup.py numpy-1.0.4/numpy/core/setup.py +--- numpy-1.0.4.p2/numpy/core/setup.py 2008-05-25 11:18:19.000000000 +0100 ++++ numpy-1.0.4/numpy/core/setup.py 2008-05-25 11:18:52.000000000 +0100 +@@ -6,13 +6,11 @@ + from distutils.dep_util import newer + + FUNCTIONS_TO_CHECK = [ +- ('expl', 'HAVE_LONGDOUBLE_FUNCS'), + ('expf', 'HAVE_FLOAT_FUNCS'), + ('log1p', 'HAVE_LOG1P'), + ('expm1', 'HAVE_EXPM1'), + ('asinh', 'HAVE_INVERSE_HYPERBOLIC'), + ('atanhf', 'HAVE_INVERSE_HYPERBOLIC_FLOAT'), +- ('atanhl', 'HAVE_INVERSE_HYPERBOLIC_LONGDOUBLE'), + ('isnan', 'HAVE_ISNAN'), + ('isinf', 'HAVE_ISINF'), + ('rint', 'HAVE_RINT'), diff --git a/lang/python-dbus/Makefile b/lang/python-dbus/Makefile new file mode 100644 index 000000000..733180cc6 --- /dev/null +++ b/lang/python-dbus/Makefile @@ -0,0 +1,60 @@ +# +# 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:=dbus-python +PKG_VERSION:=0.82.4 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus-python/ +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/lib/libintl/include/ -I$(STAGING_DIR)/usr/lib/libiconv/include/ +EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libintl/lib/ -L$(STAGING_DIR)/usr/lib/libiconv/lib/ + +define Package/dbus-python + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=python bindings for dbus + URL:=http://dbus.freedesktop.org/ + DEPENDS:=+libdbus-glib +endef + +define Package/dbus-python/description + python bindings for dbus +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) ; DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) all install +endef + +define Build/InstallDev + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +define Package/dbus-python/install + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +$(eval $(call BuildPackage,dbus-python)) diff --git a/lang/python-gnome-desktop2/Makefile b/lang/python-gnome-desktop2/Makefile new file mode 100644 index 000000000..21a8878fc --- /dev/null +++ b/lang/python-gnome-desktop2/Makefile @@ -0,0 +1,60 @@ +# +# 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:=gnome-python-desktop +PKG_VERSION:=2.16.0 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://ftp.gnome.org/pub/GNOME/sources/gnome-python-desktop/2.16/ +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/lib/libintl/include/ -I$(STAGING_DIR)/usr/lib/libiconv/include/ +EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/gnome-python-desktop + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Window Navigator Construction Kit + URL:=http://ftp.gnome.org/ + DEPENDS:=+libwnck +python-gtk +endef + +define Package/gnome-python-desktop/description + python bindings for gnome +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) ; DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) all install +endef + +define Build/InstallDev + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +define Package/gnome-python-desktop/install + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +$(eval $(call BuildPackage,gnome-python-desktop)) diff --git a/lang/telepathy-python/Makefile b/lang/telepathy-python/Makefile new file mode 100644 index 000000000..853210a95 --- /dev/null +++ b/lang/telepathy-python/Makefile @@ -0,0 +1,40 @@ +# +# 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:=telepathy-python +PKG_VERSION:=0.15.0 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://telepathy.freedesktop.org/releases/telepathy-python/ + +include $(INCLUDE_DIR)/package.mk + +define Package/telepathy-python + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=telepathy-python + URL:=http://telepathy.freedesktop.org + DEPENDS:=python-core +endef + +define Package/telepathy-python/description + telepathy- python bingings +endef + +define Build/Compile + cd $(PKG_BUILD_DIR) ; $(CONFIGURE_VARS) $(MAKE_VARS) /usr/bin/python ./setup.py install --prefix="$(PKG_INSTALL_DIR)/usr" +endef + +define Package/telepathy-python/install + mkdir -p $(1) + cp -r $(PKG_INSTALL_DIR)/* $(1) +endef + +$(eval $(call BuildPackage,telepathy-python))