Revert "python: don't use libressl for host build"
[feed/packages.git] / lang / python / Makefile
index 3eb4e9dad091457e4f386bc1cc78fb9934fc9d97..ae9a2146ebe5e312ea71f10db43d0315d2bcbdcd 100644 (file)
@@ -10,23 +10,24 @@ include $(TOPDIR)/rules.mk
 # For PYTHON_VERSION
 include ./files/python-version.mk
 
-# This file provides the necsessary host build variables
-include ./files/python-host.mk
-
-# For PyPackage
-include ./files/python-package.mk
-
 PKG_NAME:=python
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_MD5SUM:=57dffcee9cee8bb2ab5f82af1d8e9a69
+PKG_MD5SUM:=53b43534153bb2a0363f08bae8b9d990
+PKG_HASH:=35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731
 
 PKG_LICENSE:=PSF
 PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
 
+# This file provides the necsessary host build variables
+include ./files/python-host.mk
+
+# For PyPackage
+include ./files/python-package.mk
+
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 HOST_BUILD_PARALLEL:=1
@@ -122,13 +123,21 @@ ifeq ($(CONFIG_IPV6),y)
        ENABLE_IPV6 += --enable-ipv6
 endif
 
+PYTHON_FOR_BUILD:= \
+       _PYTHON_PROJECT_BASE=$(PKG_BUILD_DIR) \
+       _PYTHON_HOST_PLATFORM=linux2 \
+       PYTHONPATH="$(PKG_BUILD_DIR)/Lib:$(PKG_BUILD_DIR)/build/lib.linux2-$(PYTHON_VERSION)" \
+       _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \
+       $(HOST_PYTHON_BIN)
+
 CONFIGURE_ARGS+= \
        --sysconfdir=/etc \
        --enable-shared \
        --without-cxx-main \
        --with-threads \
-       --with-system-ffi="$(STAGING_DIR)/usr" \
+       --with-system-ffi \
        --without-pymalloc \
+       PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
        $(ENABLE_IPV6) \
        CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
        OPT="$(TARGET_CFLAGS)"
@@ -227,9 +236,8 @@ HOST_CONFIGURE_ARGS+= \
        --prefix=$(HOST_PYTHON_DIR) \
        --exec-prefix=$(HOST_PYTHON_DIR) \
        --with-system-expat=$(STAGING_DIR_HOSTPKG) \
-       --with-system-ffi=$(STAGING_DIR_HOSTPKG) \
-       CONFIG_SITE= \
-       CFLAGS="$(HOST_CFLAGS)"
+       --with-system-ffi \
+       CONFIG_SITE=
 
 define Host/Install
        $(MAKE) -C $(HOST_BUILD_DIR) install