summaryrefslogtreecommitdiff
path: root/package/python
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-10-28 16:33:41 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2013-10-28 16:33:41 +0100
commit444176e8aa3a958f147f15542793678b619be262 (patch)
tree3bae8dc0b3fd98ebffc239c6f4d0bb2e7604d957 /package/python
parent05abc676e9272fdf933e0ea376bb12d8ec497467 (diff)
fix host build stuff and update-patches, convert cifs-utils and libaudiofile to new autotool infrastructure
Diffstat (limited to 'package/python')
-rw-r--r--package/python/Makefile63
-rw-r--r--package/python/patches/patch-Makefile_pre_in118
-rw-r--r--package/python/patches/patch-Modules__io__iomodule_h14
-rw-r--r--package/python/patches/patch-configure27
-rw-r--r--package/python/patches/patch-setup_py84
5 files changed, 0 insertions, 306 deletions
diff --git a/package/python/Makefile b/package/python/Makefile
deleted file mode 100644
index 9a869aa9b..000000000
--- a/package/python/Makefile
+++ /dev/null
@@ -1,63 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-include ${TOPDIR}/rules.mk
-
-PKG_NAME:= python
-PKG_VERSION:= 3.2.2
-PKG_RELEASE:= 1
-PKG_MD5SUM:= 3c63a6d97333f4da35976b6a0755eb67
-PKG_DESCR:= Python scripting language (Version 3)
-PKG_SECTION:= lang
-PKG_DEPENDS:= libpthread
-PKG_URL:= http://www.python.org/
-PKG_SITES:= http://www.python.org/ftp/python/${PKG_VERSION}/
-
-PKG_HOST_DEPENDS:= !netbsd !openbsd !cygwin
-
-DISTFILES= Python-${PKG_VERSION}.tgz
-WRKDIST= ${WRKDIR}/Python-${PKG_VERSION}
-
-include ${TOPDIR}/mk/package.mk
-
-$(eval $(call PKG_template,PYTHON,python,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-
-# disable honour cflags stuff
-XAKE_FLAGS+= GCC_HONOUR_COPTS=s
-
-MAKE_ENV+= OPT="$(TARGET_CFLAGS)" \
- HOSTPYTHON=./hostpython \
- HOSTPGEN=./Parser/hostpgen
-CONFIGURE_ARGS:= --with-threads \
- --with-system-ffi \
- --without-cxx-main
-CONFIGURE_ENV+= ac_cv_have_long_long_format=yes
-
-post-extract:
- (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
- OPT="$(CFLAGS_FOR_BUILD)" \
- ./configure --without-cxx-main --without-threads \
- --prefix=$(STAGING_HOST_DIR) \
- );
- $(MAKE) -C ${WRKBUILD} python Parser/pgen
- $(MAKE) -C ${WRKBUILD} install
- ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_HOST_DIR}/bin/pgen
- ${CP} ${WRKBUILD}/python ${STAGING_HOST_DIR}/bin/hostpython
- ${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
- ${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
- $(MAKE) -C ${WRKBUILD} distclean
-
-pre-configure:
- $(SED) "s#@@CPU_ARCH@@#$(CPU_ARCH)#" ${WRKBUILD}/configure
-
-python-install:
- ${INSTALL_DIR} ${IDIR_PYTHON}/usr/bin ${IDIR_PYTHON}/usr/lib
- ${INSTALL_DIR} ${IDIR_PYTHON}/usr/lib/python3.2
- ${INSTALL_DIR} ${IDIR_PYTHON}/usr/include/python3.2m
- ${INSTALL_BIN} ${WRKINST}/usr/bin/python3 ${IDIR_PYTHON}/usr/bin
- ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON}/usr/lib
- cd ${IDIR_PYTHON}/usr/bin && ln -s python3 python
- ${CP} ${WRKINST}/usr/lib/python3.2/* ${IDIR_PYTHON}/usr/lib/python3.2
- ${CP} ${WRKINST}/usr/include/python3.2m/* ${IDIR_PYTHON}/usr/include/python3.2m
-
-include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/python/patches/patch-Makefile_pre_in b/package/python/patches/patch-Makefile_pre_in
deleted file mode 100644
index a2f7d96dc..000000000
--- a/package/python/patches/patch-Makefile_pre_in
+++ /dev/null
@@ -1,118 +0,0 @@
-diff -Nur Python-3.2.2.orig/Makefile.pre.in Python-3.2.2/Makefile.pre.in
---- Python-3.2.2.orig/Makefile.pre.in 2011-09-03 18:16:45.000000000 +0200
-+++ Python-3.2.2/Makefile.pre.in 2011-09-05 11:58:25.000000000 +0200
-@@ -57,7 +57,7 @@
- # Shared libraries must be installed with executable mode on some systems;
- # rather than figuring out exactly which, we always give them executable mode.
- # Also, making them read-only seems to be a good idea...
--INSTALL_SHARED= ${INSTALL} -m 555
-+INSTALL_SHARED= ${INSTALL} -m 755
-
- MAKESETUP= $(srcdir)/Modules/makesetup
-
-@@ -191,6 +191,7 @@
-
- PYTHON= python$(EXE)
- BUILDPYTHON= python$(BUILDEXE)
-+HOSTPYTHON?= $(BUILDPYTHON)
-
- # The task to run while instrument when building the profile-opt target
- PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-@@ -233,6 +234,7 @@
- ##########################################################################
- # Parser
- PGEN= Parser/pgen$(EXE)
-+HOSTPGEN?= $(PGEN)$(EXE)
-
- POBJS= \
- Parser/acceler.o \
-@@ -413,7 +415,7 @@
- $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
-
- run_profile_task:
-- ./$(BUILDPYTHON) $(PROFILE_TASK)
-+ $(HOSTPYTHON) $(PROFILE_TASK)
-
- build_all_use_profile:
- $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
-@@ -429,14 +431,14 @@
- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-
- platform: $(BUILDPYTHON)
-- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
-+ $(RUNSHARED) $(HOSTPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
-
-
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
- @case $$MAKEFLAGS in \
-- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
-- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
-+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
-+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
- esac
-
- # Build static library
-@@ -587,7 +589,7 @@
- $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
- Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
- -@$(INSTALL) -d Include
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- -touch Parser/pgen.stamp
-
- $(PGEN): $(PGENOBJS)
-@@ -758,7 +760,7 @@
-
- TESTOPTS= -l $(EXTRATESTOPTS)
- TESTPROG= $(srcdir)/Lib/test/regrtest.py
--TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -E -bb $(TESTPYTHONOPTS)
-+TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) -Wd -E -bb $(TESTPYTHONOPTS)
- test: all platform
- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
- -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-@@ -1102,7 +1104,7 @@
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall: sharedmods
-- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
-+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
-@@ -1140,7 +1142,7 @@
- fi; \
- done
- $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
-- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
-+ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
- $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
- $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
- $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1174,7 +1176,7 @@
- # This installs a few of the useful scripts in Tools/scripts
- scriptsinstall:
- SRCDIR=$(srcdir) $(RUNSHARED) \
-- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
-+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --root=$(DESTDIR)/
-@@ -1196,7 +1198,7 @@
-
- # Run reindent on the library
- reindent:
-- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
-+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
-
- # Rerun configure with the same options as it was run last time,
- # provided the config.status script exists
-@@ -1317,7 +1319,7 @@
-
- # Perform some verification checks on any modified files.
- patchcheck:
-- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-+ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-
- # Dependencies
-
diff --git a/package/python/patches/patch-Modules__io__iomodule_h b/package/python/patches/patch-Modules__io__iomodule_h
deleted file mode 100644
index 64ac4ffaf..000000000
--- a/package/python/patches/patch-Modules__io__iomodule_h
+++ /dev/null
@@ -1,14 +0,0 @@
---- Python-3.1.1.orig/Modules/_io/_iomodule.h 2009-06-12 04:07:12.000000000 +0200
-+++ Python-3.1.1/Modules/_io/_iomodule.h 2009-09-16 22:02:30.000000000 +0200
-@@ -99,7 +99,10 @@ typedef off_t Py_off_t;
- # define PY_OFF_T_MAX LONG_MAX
- # define PY_OFF_T_MIN LONG_MIN
- #else
--# error off_t does not match either size_t, long, or long long!
-+# define PyLong_AsOff_t PyLong_AsSsize_t
-+# define PyLong_FromOff_t PyLong_FromSsize_t
-+# define PY_OFF_T_MAX PY_SSIZE_T_MAX
-+# define PY_OFF_T_MIN PY_SSIZE_T_MIN
- #endif
-
- #endif
diff --git a/package/python/patches/patch-configure b/package/python/patches/patch-configure
deleted file mode 100644
index b24d4c24f..000000000
--- a/package/python/patches/patch-configure
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -Nur Python-3.2.2.orig/configure Python-3.2.2/configure
---- Python-3.2.2.orig/configure 2011-09-03 18:16:50.000000000 +0200
-+++ Python-3.2.2/configure 2011-09-05 11:35:01.000000000 +0200
-@@ -2983,12 +2983,12 @@
- $as_echo_n "checking MACHDEP... " >&6; }
- if test -z "$MACHDEP"
- then
-- ac_sys_system=`uname -s`
-+ ac_sys_system=Linux
- if test "$ac_sys_system" = "AIX" \
- -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
- ac_sys_release=`uname -v`
- else
-- ac_sys_release=`uname -r`
-+ ac_sys_release=2.6
- fi
- ac_md_system=`echo $ac_sys_system |
- tr -d '/ ' | tr '[A-Z]' '[a-z]'`
-@@ -3140,7 +3140,7 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
- $as_echo_n "checking machine type as reported by uname -m... " >&6; }
--ac_sys_machine=`uname -m`
-+ac_sys_machine=@@CPU_ARCH@@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
- $as_echo "$ac_sys_machine" >&6; }
-
diff --git a/package/python/patches/patch-setup_py b/package/python/patches/patch-setup_py
deleted file mode 100644
index 2c910039c..000000000
--- a/package/python/patches/patch-setup_py
+++ /dev/null
@@ -1,84 +0,0 @@
-diff -Nur Python-3.2.2.orig/setup.py Python-3.2.2/setup.py
---- Python-3.2.2.orig/setup.py 2011-09-03 18:16:50.000000000 +0200
-+++ Python-3.2.2/setup.py 2011-09-05 12:17:57.000000000 +0200
-@@ -332,36 +332,6 @@
- # cached. Clear that cache before trying to import.
- sys.path_importer_cache.clear()
-
-- try:
-- imp.load_dynamic(ext.name, ext_filename)
-- except ImportError as why:
-- self.failed.append(ext.name)
-- self.announce('*** WARNING: renaming "%s" since importing it'
-- ' failed: %s' % (ext.name, why), level=3)
-- assert not self.inplace
-- basename, tail = os.path.splitext(ext_filename)
-- newname = basename + "_failed" + tail
-- if os.path.exists(newname):
-- os.remove(newname)
-- os.rename(ext_filename, newname)
--
-- # XXX -- This relies on a Vile HACK in
-- # distutils.command.build_ext.build_extension(). The
-- # _built_objects attribute is stored there strictly for
-- # use here.
-- # If there is a failure, _built_objects may not be there,
-- # so catch the AttributeError and move on.
-- try:
-- for filename in self._built_objects:
-- os.remove(filename)
-- except AttributeError:
-- self.announce('unable to remove files (ignored)')
-- except:
-- exc_type, why, tb = sys.exc_info()
-- self.announce('*** WARNING: importing extension "%s" '
-- 'failed with %s: %s' % (ext.name, exc_type, why),
-- level=3)
-- self.failed.append(ext.name)
-
- def get_platform(self):
- # Get value of sys.platform
-@@ -396,8 +366,8 @@
- # Ensure that /usr/local is always used, but the local build
- # directories (i.e. '.' and 'Include') must be first. See issue
- # 10520.
-- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
-@@ -434,25 +404,16 @@
- for directory in reversed(options.dirs):
- add_dir_to_list(dir_list, directory)
-
-- if os.path.normpath(sys.prefix) != '/usr' \
-- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
-- # (PYTHONFRAMEWORK is set) to avoid # linking problems when
-- # building a framework with different architectures than
-- # the one that is currently installed (issue #7473)
-- add_dir_to_list(self.compiler.library_dirs,
-- sysconfig.get_config_var("LIBDIR"))
-- add_dir_to_list(self.compiler.include_dirs,
-- sysconfig.get_config_var("INCLUDEDIR"))
--
- # lib_dirs and inc_dirs are used to search for files;
- # if a file is found in one of those directories, it can
- # be assumed that no additional -I,-L directives are needed.
-- lib_dirs = self.compiler.library_dirs + [
-- '/lib64', '/usr/lib64',
-- '/lib', '/usr/lib',
-- ]
-- inc_dirs = self.compiler.include_dirs + ['/usr/include']
-+ lib_dirs = self.compiler.library_dirs
-+ #+ [
-+ # '/lib64', '/usr/lib64',
-+ # '/lib', '/usr/lib',
-+ # ]
-+ inc_dirs = self.compiler.include_dirs
-+ #+ ['/usr/include']
- exts = []
- missing = []
-