summaryrefslogtreecommitdiff
path: root/lang/python
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2015-01-11 20:23:13 +0100
committerSteven Barth <steven@midlink.org>2015-01-11 20:23:13 +0100
commitcc3210afd37d0a19e6fcd92adcd5c7a7c2dd82b7 (patch)
tree7044d566046d23551f21c824aeb28b0f1a402f55 /lang/python
parent56ff32fd8bc1370c6b2d1338bda80e004a38441b (diff)
parent0394a1e2864afbc8cfcd134e78dc9291342c5c9e (diff)
Merge pull request #771 from commodo/python-updates
Python updates
Diffstat (limited to 'lang/python')
-rw-r--r--lang/python/Makefile10
-rw-r--r--lang/python/files/python-package.mk2
-rw-r--r--lang/python/patches/150-fix-libffi-x86-64-configure.patch31
3 files changed, 40 insertions, 3 deletions
diff --git a/lang/python/Makefile b/lang/python/Makefile
index 0bc6c440f..0c1be6de8 100644
--- a/lang/python/Makefile
+++ b/lang/python/Makefile
@@ -28,7 +28,7 @@ HOST_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=libffi/host python/host
+PKG_BUILD_DEPENDS:=python/host
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
@@ -104,7 +104,7 @@ endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/mk/
- $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
$(INSTALL_DATA) ./files/python-package.mk $(STAGING_DIR)/mk/
$(CP) \
@@ -115,6 +115,11 @@ define Build/InstallDev
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
$(1)/usr/lib/
$(CP) \
+ $(STAGING_DIR_HOST)/lib/pkgconfig/python.pc \
+ $(STAGING_DIR_HOST)/lib/pkgconfig/python2.pc \
+ $(STAGING_DIR_HOST)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
+ $(1)/usr/lib/pkgconfig
+ $(CP) \
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
$(1)/usr/lib/python$(PYTHON_VERSION)/
endef
@@ -191,6 +196,7 @@ HOST_CONFIGURE_ARGS+= \
--without-pymalloc \
--with-threads \
--prefix=$(STAGING_DIR_HOST) \
+ --with-ensurepip=upgrade \
CONFIG_SITE= \
OPT="$(HOST_CFLAGS)"
diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk
index 19e0b9b61..c8cbcda57 100644
--- a/lang/python/files/python-package.mk
+++ b/lang/python/files/python-package.mk
@@ -98,7 +98,7 @@ define Build/Compile/PyMod
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \
LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \
- _PYTHON_HOST_PLATFORM="linux-$(ARCH)" \
+ _PYTHON_HOST_PLATFORM=linux2 \
__PYVENV_LAUNCHER__="/usr/bin/$(PYTHON)" \
$(3) \
, \
diff --git a/lang/python/patches/150-fix-libffi-x86-64-configure.patch b/lang/python/patches/150-fix-libffi-x86-64-configure.patch
new file mode 100644
index 000000000..ea062a350
--- /dev/null
+++ b/lang/python/patches/150-fix-libffi-x86-64-configure.patch
@@ -0,0 +1,31 @@
+diff --git a/Modules/_ctypes/libffi/configure b/Modules/_ctypes/libffi/configure
+index 75f62a7..4d6c9f2 100755
+--- a/Modules/_ctypes/libffi/configure
++++ b/Modules/_ctypes/libffi/configure
+@@ -17257,20 +17257,12 @@ case "$host" in
+ fi
+ ;;
+
+- i?86-*-* | x86_64-*-*)
+- TARGETDIR=x86
+- if test $ac_cv_sizeof_size_t = 4; then
+- case "$host" in
+- *-gnux32)
+- TARGET=X86_64
+- ;;
+- *)
+- TARGET=X86
+- ;;
+- esac
+- else
+- TARGET=X86_64;
+- fi
++ i?86-*-*)
++ TARGET=X86; TARGETDIR=x86
++ ;;
++
++ x86_64-*-*)
++ TARGET=X86_64; TARGETDIR=x86
+ ;;
+
+ ia64*-*-*)