diff options
Diffstat (limited to 'libraries/libtorrent-rasterbar/patches/03_b3faba329d9deba7bf0efba43200fb237756fbd9.patch')
-rw-r--r-- | libraries/libtorrent-rasterbar/patches/03_b3faba329d9deba7bf0efba43200fb237756fbd9.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/libraries/libtorrent-rasterbar/patches/03_b3faba329d9deba7bf0efba43200fb237756fbd9.patch b/libraries/libtorrent-rasterbar/patches/03_b3faba329d9deba7bf0efba43200fb237756fbd9.patch new file mode 100644 index 0000000000..b42b55b03a --- /dev/null +++ b/libraries/libtorrent-rasterbar/patches/03_b3faba329d9deba7bf0efba43200fb237756fbd9.patch @@ -0,0 +1,59 @@ +From b3faba329d9deba7bf0efba43200fb237756fbd9 Mon Sep 17 00:00:00 2001 +From: Steven Siloti <ssiloti@gmail.com> +Date: Thu, 12 Apr 2018 21:05:02 -0700 +Subject: [PATCH] create dummy alias for boost_python3 when python3 is + unavailable + +Versions of boost as recent as 1.63 do not create a stub alias for python3 +which causes build failures if no version of python3 is configured. +Duplicate that behavior so that building works even on older versions of +boost. +--- + bindings/python/Jamfile | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/bindings/python/Jamfile b/bindings/python/Jamfile +index 9539eb5cff..a93325762c 100644 +--- a/bindings/python/Jamfile ++++ b/bindings/python/Jamfile +@@ -1,4 +1,5 @@ + import python ; ++import feature ; + import feature : feature ; + import project ; + import targets ; +@@ -27,11 +28,33 @@ if $(LIBTORRENT_PYTHON_INTERPRETER) + using python : : "$(LIBTORRENT_PYTHON_INTERPRETER)" : : : <libtorrent-python>on ; + } + ++# copied from boost 1.63's boost python jamfile ++rule find-py3-version ++{ ++ local versions = [ feature.values python ] ; ++ local py3ver ; ++ for local v in $(versions) ++ { ++ if $(v) >= 3.0 ++ { ++ py3ver = $(v) ; ++ } ++ } ++ return $(py3ver) ; ++} ++ + if $(BOOST_ROOT) + { + use-project /boost : $(BOOST_ROOT) ; + alias boost_python : /boost/python//boost_python : : : <include>$(BOOST_ROOT) ; +- alias boost_python3 : /boost/python//boost_python3 : : : <include>$(BOOST_ROOT) ; ++ if [ find-py3-version ] ++ { ++ alias boost_python3 : /boost/python//boost_python3 : : : <include>$(BOOST_ROOT) ; ++ } ++ else ++ { ++ alias boost_python3 ; ++ } + } + else + { |