59 lines
2.0 KiB
Diff
59 lines
2.0 KiB
Diff
--- setup.py.orig
|
|
+++ setup.py
|
|
@@ -38,7 +38,7 @@
|
|
return sys.platform
|
|
|
|
|
|
-CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ)
|
|
+CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ) or ('PYTHONXCPREFIX' in os.environ)
|
|
HOST_PLATFORM = get_platform()
|
|
MS_WINDOWS = (HOST_PLATFORM == 'win32')
|
|
CYGWIN = (HOST_PLATFORM == 'cygwin')
|
|
@@ -700,6 +700,10 @@
|
|
if HOST_PLATFORM == 'hp-ux11':
|
|
self.lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32']
|
|
|
|
+ if 'XBPS_CROSS_BASE' in os.environ:
|
|
+ self.lib_dirs += [os.environ['XBPS_CROSS_BASE'] + '/usr/lib']
|
|
+ self.inc_dirs += [os.environ['XBPS_CROSS_BASE'] + '/usr/include']
|
|
+
|
|
if MACOS:
|
|
# This should work on any unixy platform ;-)
|
|
# If the user has bothered specifying additional -I and -L flags
|
|
--- Makefile.pre.in.orig 2017-07-08 05:33:27.000000000 +0200
|
|
+++ Makefile.pre.in 2017-08-27 19:49:11.114893045 +0200
|
|
@@ -1055,8 +1055,6 @@
|
|
upgrade) ensurepip="--upgrade" ;; \
|
|
install|*) ensurepip="" ;; \
|
|
esac; \
|
|
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
|
|
- $$ensurepip --root=$(DESTDIR)/ ; \
|
|
fi
|
|
|
|
altinstall: commoninstall
|
|
@@ -1065,8 +1063,6 @@
|
|
upgrade) ensurepip="--altinstall --upgrade" ;; \
|
|
install|*) ensurepip="--altinstall" ;; \
|
|
esac; \
|
|
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
|
|
- $$ensurepip --root=$(DESTDIR)/ ; \
|
|
fi
|
|
|
|
commoninstall: @FRAMEWORKALTINSTALLFIRST@ \
|
|
@@ -1434,11 +1430,12 @@
|
|
# Install the dynamically loadable modules
|
|
# This goes into $(exec_prefix)
|
|
sharedinstall: sharedmods
|
|
+ CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
|
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
|
|
--prefix=$(prefix) \
|
|
- --install-scripts=$(BINDIR) \
|
|
- --install-platlib=$(DESTSHARED) \
|
|
- --root=$(DESTDIR)/
|
|
+ --install-scripts=$(DESTDIR)$(BINDIR) \
|
|
+ --install-platlib=$(DESTDIR)$(DESTSHARED) \
|
|
+ --root=/
|
|
-rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
|
|
-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
|
|
|