Browse Source

Merge pull request #2605 from commodo/python-fix-build

python: revert $(STAGING_DIR)/host to $(STAGING_DIR)/host change
Hannu Nyman 8 years ago
parent
commit
22b6275312
2 changed files with 18 additions and 13 deletions
  1. 14
    9
      lang/python/Makefile
  2. 4
    4
      lang/python/files/python-host.mk

+ 14
- 9
lang/python/Makefile View File

@@ -12,7 +12,7 @@ include ./files/python-package.mk
12 12
 
13 13
 PKG_NAME:=python
14 14
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
15
-PKG_RELEASE:=7
15
+PKG_RELEASE:=8
16 16
 
17 17
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
18 18
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
@@ -144,13 +144,13 @@ define Build/InstallDev
144 144
 		$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
145 145
 		$(1)/usr/include/
146 146
 	$(CP) \
147
-		$(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) \
147
+		$(STAGING_DIR)/host/lib/python$(PYTHON_VERSION) \
148 148
 		$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
149 149
 		$(1)/usr/lib/
150 150
 	$(CP) \
151
-		$(STAGING_DIR_HOST)/lib/pkgconfig/python.pc \
152
-		$(STAGING_DIR_HOST)/lib/pkgconfig/python2.pc \
153
-		$(STAGING_DIR_HOST)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
151
+		$(STAGING_DIR)/host/lib/pkgconfig/python.pc \
152
+		$(STAGING_DIR)/host/lib/pkgconfig/python2.pc \
153
+		$(STAGING_DIR)/host/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
154 154
 		$(1)/usr/lib/pkgconfig
155 155
 	$(CP) \
156 156
 		$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
@@ -221,16 +221,21 @@ HOST_CONFIGURE_ARGS+= \
221 221
 	--without-cxx-main \
222 222
 	--without-pymalloc \
223 223
 	--with-threads \
224
-	--with-system-expat="$(STAGING_DIR_HOST)" \
225
-	--with-system-ffi="$(STAGING_DIR_HOST)" \
224
+	--prefix=$(STAGING_DIR)/host \
225
+	--exec-prefix=$(STAGING_DIR)/host \
226
+	--sysconfdir=$(STAGING_DIR_HOST)/host/etc \
227
+	--localstatedir=$(STAGING_DIR)/host/var \
228
+	--sbindir=$(STAGING_DIR)/host/bin \
229
+	--with-system-expat=$(STAGING_DIR)/host \
230
+	--with-system-ffi=$(STAGING_DIR)/host \
226 231
 	--with-ensurepip=upgrade \
227 232
 	CONFIG_SITE= \
228 233
 	CFLAGS="$(HOST_CFLAGS)"
229 234
 
230 235
 define Host/Install
231
-	$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
236
+	$(INSTALL_DIR) $(STAGING_DIR)/host/bin/
232 237
 	$(MAKE) -C $(HOST_BUILD_DIR) install
233
-	$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen2
238
+	$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR)/host/bin/pgen2
234 239
 endef
235 240
 
236 241
 $(eval $(call HostBuild))

+ 4
- 4
lang/python/files/python-host.mk View File

@@ -1,11 +1,11 @@
1 1
 #
2
-# Copyright (C) 2016-2016 OpenWrt.org
2
+# Copyright (C) 2015-2016 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
6 6
 #
7 7
 
8
-HOST_PYTHON_DIR:=$(STAGING_DIR_HOST)
8
+HOST_PYTHON_DIR:=$(STAGING_DIR)/host
9 9
 HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION)
10 10
 HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)
11 11
 
@@ -13,7 +13,7 @@ HOST_PYTHON_PKG_DIR:=/lib/python$(PYTHON_VERSION)/site-packages
13 13
 
14 14
 HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)
15 15
 
16
-HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(STAGING_DIR_HOST)/$(HOST_PYTHON_PKG_DIR)
16
+HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(STAGING_DIR)/host/$(HOST_PYTHON_PKG_DIR)
17 17
 
18 18
 define HostPython
19 19
 	if [ "$(strip $(3))" == "HOST" ]; then \
@@ -44,7 +44,7 @@ define Build/Compile/HostPyMod
44 44
 		LDSHARED="$(HOSTCC) -shared" \
45 45
 		CFLAGS="$(HOST_CFLAGS)" \
46 46
 		CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
47
-		LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOST)/lib" \
47
+		LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR)/host/lib" \
48 48
 		_PYTHON_HOST_PLATFORM=linux2 \
49 49
 		$(3) \
50 50
 		, \