summaryrefslogtreecommitdiff
path: root/sci-libs/adolc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /sci-libs/adolc
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'sci-libs/adolc')
-rw-r--r--sci-libs/adolc/Manifest3
-rw-r--r--sci-libs/adolc/adolc-2.7.2.ebuild14
-rw-r--r--sci-libs/adolc/files/adolc-2.7.2-swig-python-configure.patch391
3 files changed, 403 insertions, 5 deletions
diff --git a/sci-libs/adolc/Manifest b/sci-libs/adolc/Manifest
index 2e29e087fbac..eb7cb16b829d 100644
--- a/sci-libs/adolc/Manifest
+++ b/sci-libs/adolc/Manifest
@@ -2,11 +2,12 @@ AUX adolc-2.4.0-no-colpack.patch 580 BLAKE2B 95247622f68b6e5c4f45eb6eef7cd99f759
AUX adolc-2.5.0-no-colpack.patch 1424 BLAKE2B ea11eed8f816daaa9809b8f6a6f20e87a22acbf2d210f60000b93635f68d5f362530bac5a46c173ffbd33aec31769c6e5dadf9f638779bbdc0e17483b1a0f5c4 SHA512 826023e0066620a1885a462c31cb5be80d880f917df26c007564e327b8be8513621e56b601b6f9bfcec0fc617a15eea5016436aa08bebb0346254089a5d850ec
AUX adolc-2.5.0-pkgconfig-no-ldflags.patch 364 BLAKE2B a35ab92ca491110c390a4d0f90c7cb12f417891762571ec91ce64fb81d84c4a7e3249971302e3801f721e7791725e37e3f4d241160ec80c5c633af096cad9107 SHA512 914bd01428fc07f50985afc076722778029835048883eade3730878c2d103cd29c288656d524ad3895416e94b50b5db2f53e35fdab0ed2a0f364669bf304af41
AUX adolc-2.6.2-dash.patch 4516 BLAKE2B 8db052472bd3051ed0b8b1a180aac4098862695cefeed0f0f94600d447b2ef5b888ba072613ea101ac1435569eb9d5bcba1aa64b23a0bc7cf01a4ef20d3f760b SHA512 9b904d8c0ab3c286af27b293b5ffe516b9c1da53169702f94a9213496b6626e1a587e8ab8d9d25b983872c1a97620a8d5386d9053ba1a4c973ef5e145f655bc5
+AUX adolc-2.7.2-swig-python-configure.patch 15544 BLAKE2B 83a31d310e6ae4245085af960ef8440983defd75fa04fac63c24171640886c17a093f44a868c397db8f4189db61f523aa98b75bcab2238ab4931d6b94290f5c7 SHA512 661c4a939d58b7593dc4fbce5874c4e0e918ea54ca1163ae2984aeef528fe4a2c67128070d4f6fc3e33aab2d1e7b7d5e2ae244cea34111c69c72478e5949755f
DIST ADOL-C-2.4.1.tgz 2210414 BLAKE2B f9b1fd7f0e619d811b29e077e436697dc8b5a388568d73b2db602e57f97cbb690a5b47a55c722ae45cc28698dd19949eddb9d02e11c87383191e217f012519bb SHA512 5e5135ca587d159510bf77338fdff3d324f4d32c4ec6f8cf64ddc92253b427b8ee26a30bc1d83fe18121bbfdc7454c3536f58849c0c335e1b240e39d46acdccc
DIST ADOL-C-2.6.3.tgz 2416928 BLAKE2B 74e575a1a919bc2787be0c29deaac4b503c077cb06efdba3f2382f21abf1ed53e8cb5f41729dc39f9188e44460fa137a09cffdb296b5f92131153795f36fa83a SHA512 e3c44b1f8ab5211a8a3c3163124e35b6d1e9551672ab4944d983dd3117f609d512c1b08c61e535dc4d50089295ee565bec07aaca67aa88b57b17bc3906573262
DIST adolc-2.7.2.tar.gz 2447479 BLAKE2B 0f871ce1dcb50bb14684e45e265cf45807f514dd3ca0dbaaedede2c7117d34cc5a34b0096a34c8ec37023e50aec7fd4be6561819d6297771e7f7fcaa7ba0e507 SHA512 b896650077367fd7388a6c5a40e5d8bb3f19af9e3bc5b067fd1d9a769809b77ccdfb5ef11ef481ab791c0f040401aaed0053cba55d4c2a3383c0d056122280f6
EBUILD adolc-2.4.1.ebuild 863 BLAKE2B e3455061dfd93d3fd14ae07051da5e3a99576d8e20d7ec5f28aad0daae9f0ef37dc0f4ba2565cf4edb96ffb7d07ad6055f06335302a787bd7e88e8c84fdebea1 SHA512 c409dd49db0d5c1043a50aae33d6dfd07e24c1f62f18abd4906ea7468944ec46f89d1e80be97af6c166b0cf1d00a2a38383555e7d1e76e062a136b32ab98006d
EBUILD adolc-2.6.3-r1.ebuild 1215 BLAKE2B 3ae1cf484b9f241225703e0da2202ff1e95e8cc850cd3bfd7278bc73e568cd65d39ad48a77a311cac7c21e06af7508305702dde33aa9bc10d516e2b5af4de2ba SHA512 b84eef882252394bbb6253b707e45bb8779dbe3066b6b2d64db032d0be06d9866ba63554ff78f620887b83b91d101c722e2268d21e7222e7e61e5dc486410c63
-EBUILD adolc-2.7.2.ebuild 1366 BLAKE2B 9d56381152f11b278f5bcbb150aab07d5cb1b8539223da53a6ff3526d813b0d7a1b0726cc78aa2f74f2df44c784ac8a801339f9b4c8b9e3e68353456da691b19 SHA512 e5098c625210d6fe7aadde93a92c79e1c9c2748ea97303c9d3acb176ce67be8d6f9ef1976821320bdea070ea43f00e24571ef13d1aa3bee4cbd694133a8bbde4
+EBUILD adolc-2.7.2.ebuild 1660 BLAKE2B 5187dffa6f999861d6c65ce07493b55a15338b606a522179ab4c4c36cfa51137c64e042210fe8aea3b674482e3b3c13860fa6155159cfb17cc4946f551f12749 SHA512 903bfe1a229fcd15cdd434fae1caf6ae9574536d18714f29db11d706f4fdf11be5fa3ab0c95f5095445b0150685a4fc31f5b3144dbd91f0425fd0c44676b91d5
EBUILD adolc-9999.ebuild 1366 BLAKE2B 9d56381152f11b278f5bcbb150aab07d5cb1b8539223da53a6ff3526d813b0d7a1b0726cc78aa2f74f2df44c784ac8a801339f9b4c8b9e3e68353456da691b19 SHA512 e5098c625210d6fe7aadde93a92c79e1c9c2748ea97303c9d3acb176ce67be8d6f9ef1976821320bdea070ea43f00e24571ef13d1aa3bee4cbd694133a8bbde4
MISC metadata.xml 736 BLAKE2B ddc9935966f95c209568fca01f222894812328b0411a75ee3ff369220860c274d52280c39f916dfdf9fd30ee3a67134a1bdab19feba1bf35b0e2695fa4577a97 SHA512 00cb5d1b587dc4220507a52f2e979fbbeed9035e59e1de26781e33b16d6a16474ad4aeae45ea7a1b8de9193fbe0671ffdd19a07431c33e22ff5586c7216b0522
diff --git a/sci-libs/adolc/adolc-2.7.2.ebuild b/sci-libs/adolc/adolc-2.7.2.ebuild
index dc6d88c74f35..52d83ebbf38a 100644
--- a/sci-libs/adolc/adolc-2.7.2.ebuild
+++ b/sci-libs/adolc/adolc-2.7.2.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit autotools toolchain-funcs eutils
+inherit autotools toolchain-funcs
DESCRIPTION="Automatic differentiation system for C/C++"
HOMEPAGE="https://projects.coin-or.org/ADOL-C/"
@@ -11,11 +11,9 @@ HOMEPAGE="https://projects.coin-or.org/ADOL-C/"
if [[ ${PV} = *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/coin-or/ADOL-C"
- SRC_URI=""
- KEYWORDS=""
else
SRC_URI="https://github.com/coin-or/ADOL-C/archive/releases/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
S="${WORKDIR}/ADOL-C-releases-${PV}"
fi
@@ -33,6 +31,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.5.0-no-colpack.patch
"${FILESDIR}"/${PN}-2.5.0-pkgconfig-no-ldflags.patch
"${FILESDIR}"/${PN}-2.6.2-dash.patch
+ "${FILESDIR}"/${P}-swig-python-configure.patch
)
src_prepare() {
@@ -41,9 +40,14 @@ src_prepare() {
}
src_configure() {
+ # Disabling Python for now because swig build
+ # needs work. Revisit with >=2.7.3.
+ # https://bugs.gentoo.org/730750
+ # https://github.com/coin-or/ADOL-C/issues/20
econf \
--enable-advanced-branching \
--enable-atrig-erf \
+ --disable-python \
$(use_enable mpi ampi) \
$(use_enable sparse) \
$(use_enable static-libs static) \
@@ -52,6 +56,8 @@ src_configure() {
}
src_test() {
+ # 'check' target is unrelated to checking lib works
+ # ('check' is more like distcheck)
emake test
}
diff --git a/sci-libs/adolc/files/adolc-2.7.2-swig-python-configure.patch b/sci-libs/adolc/files/adolc-2.7.2-swig-python-configure.patch
new file mode 100644
index 000000000000..c434f6556836
--- /dev/null
+++ b/sci-libs/adolc/files/adolc-2.7.2-swig-python-configure.patch
@@ -0,0 +1,391 @@
+https://bugs.gentoo.org/730750
+https://github.com/coin-or/ADOL-C/commit/8b53408d08f41ddaba2dea5655d332b13fc4c78b.patch
+https://github.com/coin-or/ADOL-C/commit/06b3b665fc0253ee17f0208bd06cdc130e103741.patch
+https://github.com/coin-or/ADOL-C/commit/25a69c486829ddaa19c115afc05cb7cf3b4e2410.patch
+https://github.com/coin-or/ADOL-C/commit/e41d32ba6dab09a3e58b22f1f042e49cd5ee917f.patch
+https://github.com/coin-or/ADOL-C/commit/0787a350cc181192cfd203b0f75941bcbd9c3e3a.patch
+https://github.com/coin-or/ADOL-C/commit/0b3dd1747f90f68b17dc5f1bd3a5d898e3bc77fb.patch
+----
+From e41d32ba6dab09a3e58b22f1f042e49cd5ee917f Mon Sep 17 00:00:00 2001
+From: Andrea Walther <walthand@math55020.mathematik.hu-berlin.de>
+Date: Tue, 22 Sep 2020 10:47:27 +0200
+Subject: [PATCH] fix prefix and provide --enable-python
+
+---
+ configure.ac | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6c2c88f9..b6aaeaa7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,6 +71,17 @@ if test x"${adolc_medipack_support}" = xyes ; then
+ AC_DEFINE(ADOLC_MEDIPACK_SUPPORT,1,[defined if MeDiPack support is to be compiled in])
+ fi
+
++
++AC_MSG_CHECKING(whether to build ADOL-C with python/swig support)
++AC_ARG_ENABLE(python,
++ [AS_HELP_STRING([--enable-python],[build ADOL-C with python/swig support [default=disabled]])],
++ [adolc_python_support=$enableval],[adolc_python_support=no])
++AC_MSG_RESULT($adolc_python_support)
++AM_CONDITIONAL(BUILD_ADOLC_python_SUPPORT,[test x${adolc_python_support} = xyes])
++if test x"${adolc_python_support}" = xyes ; then
++AC_DEFINE(ADOLC_python_SUPPORT,1,[defined if python/swig support is to be compiled in])
++fi
++
+ LT_PREREQ([2.2.6])
+ # checks for programs
+ AC_PROG_CXX
+@@ -651,6 +662,10 @@ if test x$sparse = xyes && test x$have_colpack = xno; then
+ Only sparsity patterns can be computed\033@<:@0m"
+ warn=true
+ fi
++echo \
++" Build with python: ${adolc_python_support}"
++
++if test x$adolc_python_support = xyes ; then
+ if test x$sparse = xyes && test x$python_found = xyes && test x$SWIG != xno; then
+ echo \
+ " Build with python swig module: yes"
+@@ -660,7 +675,7 @@ else
+ if test x$sparse = xno && test x$python_found = xyes && test x$SWIG != xno; then
+ echo \
+ "(due to sparse drivers disabled)"
+- elif test x$sparse = xyes && ( $test x$python_found = xno || test x$SWIG = xno ); then
++ elif test x$sparse = xyes && ( test x$python_found = xno || test x$SWIG = xno ); then
+ echo \
+ "(due to python/swig missing)"
+ else
+@@ -668,6 +683,8 @@ else
+ "(due to sparse drivers disabled and python/swig missing)"
+ fi
+ fi
++fi
++
+ echo
+
+ echo \
+From 8b53408d08f41ddaba2dea5655d332b13fc4c78b Mon Sep 17 00:00:00 2001
+From: Kshitij Kulshreshtha <kkhere.geo@gmail.com>
+Date: Tue, 31 Mar 2020 22:42:23 +0200
+Subject: [PATCH] Fix out-of-tree build for swig
+
+---
+ ADOL-C/swig/Makefile.am | 4 +--
+ ADOL-C/swig/setup.py | 65 +++++++++++++++++++++++++++-----------
+ ADOL-C/swig/swigprocess.py | 34 +++++++++++---------
+ Makefile.am | 3 +-
+ configure.ac | 6 ++++
+ 5 files changed, 75 insertions(+), 37 deletions(-)
+
+diff --git a/ADOL-C/swig/Makefile.am b/ADOL-C/swig/Makefile.am
+index 04a52cd0..b1d5569b 100644
+--- a/ADOL-C/swig/Makefile.am
++++ b/ADOL-C/swig/Makefile.am
+@@ -12,7 +12,7 @@
+
+ ACLOCAL_AMFLAGS = -I autoconf
+
+-EXTRA_DIST = swigprocess.py adolc-r.i adolc-python.i adubswigfuncs.h adolc_all_in.hpp matrixmemory.hpp pyedfclasses.hpp
++EXTRA_DIST = swigprocess.py adolc-r.i adolc-python.i adubswigfuncs.hpp adolc_all_in.hpp matrixmemory.hpp pyedfclasses.hpp
+
+ clean-local:
+ -rm -rf python R *.cpp *.cxx *.o *.h include
+@@ -20,6 +20,6 @@ clean-local:
+ if PYTHONFOUND
+ if SPARSE
+ install:
+- CXX=${CXX} ${PYTHON} setup.py install --prefix=${prefix} --only-swig
++ CXX=${CXX} ${PYTHON} ${srcdir}/setup.py build --only-swig --lib-prefix=${prefix} @python_srcbase@ install --prefix=${prefix}
+ endif
+ endif
+diff --git a/ADOL-C/swig/setup.py b/ADOL-C/swig/setup.py
+index 7a9a25c4..5bd98c3a 100644
+--- a/ADOL-C/swig/setup.py
++++ b/ADOL-C/swig/setup.py
+@@ -11,6 +11,10 @@
+ ##############################################################################
+
+ from __future__ import print_function
++import sys, os
++
++sys.path = [ os.path.dirname(os.path.abspath(__file__)) ] + sys.path
++
+ from swigprocess import prepare_flat_header
+ from numpy.distutils import misc_util as np_dist
+ from distutils.core import setup, Extension
+@@ -18,7 +22,6 @@
+ from distutils.command.build_ext import build_ext
+ from distutils.command.build import build
+ from distutils.command.install import install
+-import os
+ import subprocess
+
+ def compile_dynlib(prefix,colpackdir,boostdir):
+@@ -88,14 +91,34 @@ def finalize_options(self):
+ prefix = self.lib_prefix
+ print('prefix = ', prefix)
+ self.include_dirs.append(os.path.join(prefix,'include'))
+- self.library_dirs.append(os.path.join(prefix,'lib64'))
+- self.rpath.append(os.path.join(prefix,'lib64'))
+- prepare_flat_header()
++ import ctypes as c
++ plen = c.sizeof(c.c_void_p(0))
++ if plen == 8:
++ self.library_dirs.append(os.path.join(prefix,'lib64'))
++ self.rpath.append(os.path.join(prefix,'lib64'))
++ else:
++ self.library_dirs.append(os.path.join(prefix,'lib'))
++ self.rpath.append(os.path.join(prefix,'lib'))
++ buildobj = self.get_finalized_command('build')
++ self.src = buildobj.src
++ prepare_flat_header(self.src)
++ self.swig_opts = ['-c++', '-I' + self.src]
++ self.finalized = 1
+
++ def build_extension(self, ext):
++ if self.src != '.':
++ import shutil
++ sources = ext.sources
++ newSrc = []
++ for s in iter(sources):
++ shutil.copy(self.src + '/' + s, '.')
++ ext.include_dirs.append(self.src)
++ super(build_swigadolc,self).build_extension(ext)
+
+ class buildthis(build,object):
+ command_name = 'build'
+ user_options = build.user_options + [
++ ('src=', None, 'path of the source directory of swig module'),
+ ('lib-prefix=', None, 'prefix to install adolc library'),
+ ('colpack-dir=', None, 'directory in which colpack is installed'),
+ ('boost-dir=', None, 'directory in which boost is installed'),
+@@ -111,11 +134,26 @@ def lib_doesnot_exist(self):
+
+ def initialize_options(self):
+ super(buildthis,self).initialize_options()
++ self.src = None
+ self.lib_prefix = None
+ self.colpack_dir = None
+ self.boost_dir = None
+ self.only_swig = None
+
++ def finalize_options(self):
++ super(buildthis,self).finalize_options()
++ if self.src is None:
++ self.src = '.'
++ if self.lib_prefix is None:
++ self.lib_prefix = os.path.join(os.environ['HOME'],'adolc_base')
++ if self.colpack_dir is None:
++ self.colpack_dir = os.path.join(os.environ['HOME'],'adolc_base')
++ if self.boost_dir is None:
++ self.boost_dir = '/usr'
++ if self.only_swig is None:
++ self.only_swig = False
++ self.finalized = 1
++
+ #sub_commands = [ ('build_lib', lib_doesnot_exist),
+ # ('build_ext', None) ]
+ sub_commands = [ ('build_lib', None),
+@@ -137,22 +175,13 @@ def initialize_options(self):
+ super(installthis,self).initialize_options()
+
+ def finalize_options(self):
++ self.set_undefined_options('build',
++ ('lib_prefix','lib_prefix'),
++ ('colpack_dir', 'colpack_dir'),
++ ('boost_dir', 'boost_dir'),
++ ('only_swig', 'only_swig'))
+ super(installthis,self).finalize_options()
+- if self.lib_prefix is None:
+- self.lib_prefix = os.path.join(os.environ['HOME'],'adolc_base')
+- if self.colpack_dir is None:
+- self.colpack_dir = os.path.join(os.environ['HOME'],'adolc_base')
+- if self.boost_dir is None:
+- self.boost_dir = '/usr'
+- if self.only_swig is None:
+- self.only_swig = False
+ self.finalized = 1
+- buildobj = self.distribution.get_command_obj('build')
+- buildobj.set_undefined_options('install',
+- ('lib_prefix','lib_prefix'),
+- ('colpack_dir', 'colpack_dir'),
+- ('boost_dir', 'boost_dir'),
+- ('only_swig', 'only_swig'))
+
+ incdirs = np_dist.get_numpy_include_dirs()
+ #python_ldflags = subprocess.check_output(['python-config','--ldflags'],universal_newlines=True)
+diff --git a/ADOL-C/swig/swigprocess.py b/ADOL-C/swig/swigprocess.py
+index bd5fe03d..f9de5551 100644
+--- a/ADOL-C/swig/swigprocess.py
++++ b/ADOL-C/swig/swigprocess.py
+@@ -10,6 +10,7 @@
+ ##
+ ##############################################################################
+
++from __future__ import print_function
+ import re
+ import os.path
+ import sys
+@@ -191,22 +192,25 @@ def finalClean(headfile,outfiles):
+ for f in glob.glob('*.o'):
+ os.remove(f)
+
+-def prepare_flat_header():
+- sys.path = [ os.getcwd() ] + sys.path
+- p = os.getcwd() + '/../include/adolc'
+- for (dp, dn, fn) in os.walk(p):
+- ndp = re.sub(r'\.\./',r'',dp)
+- for f in iter(fn):
+- lines = readFile(dp + "/" + f)
+- lines = comment_all_includes(lines)
+- lines = uncomment_local_includes(lines)
+- try:
+- os.makedirs(ndp)
+- except:
+- pass
+- writeOutput(lines, ndp + "/" + f)
++def prepare_flat_header(src_base='.'):
++ pl = [ os.getcwd() + '/../include/adolc' ]
++ print('src_base = ', src_base)
++ if src_base != '.':
++ pl = [ src_base + '/../include/adolc' ] + pl
++ for p in iter(pl):
++ for (dp, dn, fn) in os.walk(p):
++ ndp = re.sub(r'^.*\.\./',r'',dp)
++ for f in iter(fn):
++ lines = readFile(dp + "/" + f)
++ lines = comment_all_includes(lines)
++ lines = uncomment_local_includes(lines)
++ try:
++ os.makedirs(ndp)
++ except:
++ pass
++ writeOutput(lines, ndp + "/" + f)
+
+- invoke_cpp('adolc_all_in.hpp', 'adolc_all_pre.hpp')
++ invoke_cpp(src_base + '/' + 'adolc_all_in.hpp', 'adolc_all_pre.hpp')
+ lines = readFile('adolc_all_pre.hpp')
+ lines = reinstate_nonlocal_include(lines)
+ writeOutput(lines,'adolc_all.hpp')
+diff --git a/Makefile.am b/Makefile.am
+index fb66e9f3..123ac905 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -24,13 +24,12 @@ EXTRA_DIST = TODO BUGS LICENSE update_versions.sh \
+ ADOL-C/doc/tapebasic.pdf ADOL-C/doc/tapebasic.eps \
+ ADOL-C/doc/tap_point.pdf ADOL-C/doc/tap_point.eps \
+ MSVisualStudio/v14/adolc.sln MSVisualStudio/v14/adolc.vcxproj \
+- MSVisualStudio/v14/ColPack_Readme_VC++.txt \
+ MSVisualStudio/v14/ColPack.vcxproj \
+ MSVisualStudio/v14/sparse/config.h.in MSVisualStudio/v14/nosparse/config.h.in \
+ MSVisualStudio/v14/x64/sparse/config.h.in MSVisualStudio/v14/x64/nosparse/config.h.in \
+ MSVisualStudio/v14/sparse/config.h MSVisualStudio/v14/nosparse/config.h \
+ MSVisualStudio/v14/x64/sparse/config.h MSVisualStudio/v14/x64/nosparse/config.h \
+- MSVisualStudio/v14/Readme_VC++.txt \
++ MSVisualStudio/v14/README_VC++.md \
+ MSVisualStudio/v14/installer.sh \
+ adolc.spec.in adolc.spec \
+ update_versions.sh
+diff --git a/configure.ac b/configure.ac
+index ddb08de1..6c2c88f9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -501,6 +501,12 @@ fi
+ AM_PATH_PYTHON([2.7],[python_found=yes],[python_found=no])
+ AC_PATH_PROG(SWIG, swig, [no])
+ AM_CONDITIONAL(PYTHONFOUND, [test x$python_found = xyes && test x$SWIG != xno])
++if test ${abs_top_srcdir} != ${abs_top_builddir} ; then
++ python_srcbase='--src=${abs_srcdir}'
++else
++ python_srcbase=''
++fi
++AC_SUBST(python_srcbase)
+ ###########################################################################
+ # COIN_PATCH_LIBTOOL_CYGWIN #
+ ###########################################################################
+
+From 25a69c486829ddaa19c115afc05cb7cf3b4e2410 Mon Sep 17 00:00:00 2001
+From: Kshitij Kulshreshtha <kkhere.geo@gmail.com>
+Date: Wed, 1 Apr 2020 02:36:12 +0200
+Subject: [PATCH] another small fix for swig, this time for in-tree check
+
+---
+ ADOL-C/swig/setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ADOL-C/swig/setup.py b/ADOL-C/swig/setup.py
+index e6023679..4ec9a7cc 100644
+--- a/ADOL-C/swig/setup.py
++++ b/ADOL-C/swig/setup.py
+@@ -105,7 +105,7 @@ def finalize_options(self):
+ self.finalized = 1
+
+ def build_extension(self, ext):
+- if self.src != '.':
++ if os.path.abspath(os.path.realpath(self.src)) != os.path.abspath('.'):
+ import shutil
+ sources = ext.sources
+ newSrc = []
+From 0787a350cc181192cfd203b0f75941bcbd9c3e3a Mon Sep 17 00:00:00 2001
+From: Andrea Walther <walthand@math55020.mathematik.hu-berlin.de>
+Date: Tue, 22 Sep 2020 11:58:09 +0200
+Subject: [PATCH] small change in configure.ac for swig module
+
+---
+ configure.ac | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index b6aaeaa7..58380e55 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -509,6 +509,7 @@ if test x$tapedoc_values == xyes; then
+ AC_DEFINE(ADOLC_TAPE_DOC_VALUES,1,[ADOL-C tape_doc routine computes values])
+ fi
+
++if test x$adolc_python_support == xyes; then
+ AM_PATH_PYTHON([2.7],[python_found=yes],[python_found=no])
+ AC_PATH_PROG(SWIG, swig, [no])
+ AM_CONDITIONAL(PYTHONFOUND, [test x$python_found = xyes && test x$SWIG != xno])
+@@ -517,7 +518,12 @@ if test ${abs_top_srcdir} != ${abs_top_builddir} ; then
+ else
+ python_srcbase=''
+ fi
++else
++ AM_CONDITIONAL(PYTHONFOUND, [test x$adolc_python_support])
++ python_srcbase=''
++fi
+ AC_SUBST(python_srcbase)
++end
+ ###########################################################################
+ # COIN_PATCH_LIBTOOL_CYGWIN #
+ ###########################################################################
+From 0b3dd1747f90f68b17dc5f1bd3a5d898e3bc77fb Mon Sep 17 00:00:00 2001
+From: Andrea Walther <walthand@math55020.mathematik.hu-berlin.de>
+Date: Wed, 23 Sep 2020 08:54:54 +0200
+Subject: [PATCH] small fixes in configure.ac
+
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 58380e55..88671274 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -519,11 +519,11 @@ else
+ python_srcbase=''
+ fi
+ else
+- AM_CONDITIONAL(PYTHONFOUND, [test x$adolc_python_support])
++ AM_CONDITIONAL(PYTHONFOUND, [test x$adolc_python_support = xyes])
+ python_srcbase=''
+ fi
+ AC_SUBST(python_srcbase)
+-end
++
+ ###########################################################################
+ # COIN_PATCH_LIBTOOL_CYGWIN #
+ ###########################################################################