vcpkg/ports/omniorb/python-fixes.patch

47 lines
1.8 KiB
Diff
Raw Normal View History

diff --git a/mk/python.mk b/mk/python.mk
index 1380018..fb321a5 100644
--- a/mk/python.mk
+++ b/mk/python.mk
@@ -4,7 +4,7 @@
PYVERSION := $(shell $(PYTHON) -c 'import sys; sys.stdout.write(".".join(sys.version.split(".")[:2]))')
PYPREFIX := $(shell $(PYTHON) -c 'import sys; sys.stdout.write(sys.exec_prefix.replace("\\","/"))')
-PYINCDIR := $(shell $(PYTHON) -c 'import sys, distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_inc().replace("\\","/"))')
[python3] Update to 3.11.4 (#31727) * [python3] Update to 3.11.3 * Force set PythonForBuild on windows * Set LD_LIBRARY_PATH on unix * Always use vcpkg_find_acquire_program(PYTHON3) on windows * Remove LD_LIBRARY_PATH shenanigans * [vtk] Parse python version from include folder * Fix static builds on windows * Pass --with-build-python on unix * [omniorb] Fix python version in patch * Resurrect rpath patch * [python3] fix usage * [gobject-introspection] don't hardcode python version * Update vcpkg_find_aquire_program(PYTHON3) This is also required for gobject-introspection * [paraview] don't hardcode python version * [vtk-dicom] don't hardcode python version * Update python in vcpkgTools.xml * Fix host arch detection in vcpkg_find_acquire_program(PYTHON3) * [libpq] Don't hardcode python version * [shiva] Don't pass python variables * [vcpkg-get-python-packages] Delete unused file, update hardcoded python version * [python3] update to 3.11.4 * [omniorb] Use PREPEND in vcpkg_add_to_path So that python from vcpkg is picked before system python * libpq quickfix * re-fix libpq * fix vcpkg-get-python-packages * Make windows 7 patch compatible with unix builds * Copy pyd files to bin Also fixes copying files that do not belong to current build tree * Fix static builds * Speculatively fix osx regression * Fix omniorb on unix * [gobject-introspection] fix windows builds * [vtk] Update vendored copy of mpi4py for python 3.11 support * [mdl-sdk] Fix python * [gobject-introspection] fix the fix of a fix... * Update versions * Undo changes in gobject-introspection and vcpkg_find_aquire_program(PYTHON3) --------- Co-authored-by: root <root@DESKTOP-UIPL9V8>
2023-08-08 04:19:53 +08:00
+PYINCDIR := $(includedir)/python$(PYVERSION)
PythonSHAREDLIB_SUFFIX = $(shell $(PYTHON) -c 'import sys, distutils.sysconfig; sys.stdout.write((distutils.sysconfig.get_config_var("SO") or ".so").lstrip("."))')
diff --git a/src/tool/omniidl/cxx/idlpython.cc b/src/tool/omniidl/cxx/idlpython.cc
index 639515105..27ad3ee0e 100644
--- a/src/tool/omniidl/cxx/idlpython.cc
+++ b/src/tool/omniidl/cxx/idlpython.cc
@@ -27,8 +27,6 @@
// On Windows, if _DEBUG is defined, some Python versions try to force
// use of _d.lib libraries that are not actually present.
-#undef _DEBUG
-
#include <Python.h>
#include <idlsysdep.h>
diff --git a/src/tool/omniidl/cxx/dir.mk b/src/tool/omniidl/cxx/dir.mk
index 84f10ac03..3b5a60b87 100644
--- a/src/tool/omniidl/cxx/dir.mk
+++ b/src/tool/omniidl/cxx/dir.mk
@@ -190,13 +190,13 @@ ifdef Win32Platform
DIR_CPPFLAGS += -DMSDOS -DOMNIIDL_EXECUTABLE
-PYLIBDIR := $(PYPREFIX)/libs $(PYPREFIX)/lib/x86_win32
+PYLIBDIR := $(libdir)
ifdef MinGW32Build
PYLIB := -lpython$(subst .,,$(PYVERSION))
CXXLINKOPTIONS += $(patsubst %,-L%,$(PYLIBDIR))
else
-PYLIB := python$(subst .,,$(PYVERSION)).lib
+PYLIB = python$(subst .,,$(PYVERSION)).lib zlib.lib Advapi32.lib
CXXLINKOPTIONS += $(patsubst %,-libpath:%,$(PYLIBDIR))
endif