Skip to content
Permalink
Browse files

xrootd: Make python bindings a non-default variant

  • Loading branch information
cjones051073 committed Apr 9, 2019
1 parent 2a657e9 commit a4201a72b9a537410000a9bd3a5525830c2a6e4f
Showing with 17 additions and 32 deletions.
  1. +17 −20 science/xrootd/Portfile
  2. +0 −12 science/xrootd/files/XrdClBuffer-include-utility.patch
@@ -9,7 +9,7 @@ PortGroup legacysupport 1.0

github.setup xrootd xrootd 4.9.1 v
version ${github.version}
revision 3
revision 4

livecheck.version ${version}
livecheck.type regex
@@ -36,12 +36,7 @@ checksums rmd160 b95c010dc952b641cae07805259a8c1ad689872b \
depends_build-append port:cctools \
port:pkgconfig

set python_v 3.7
set python_v_nodot [string map {. {}} $python_v]
configure.python ${prefix}/bin/python${python_v}

depends_lib port:curl \
port:python${python_v_nodot} \
port:libxml2 \
port:json-c \
port:swig \
@@ -51,12 +46,6 @@ default_variants +ssl +readline +kerberos

cmake.out_of_source yes

patch.pre_args -p1

# Temporary fix for missing <utility> include
# https://github.com/xrootd/xrootd/pull/958
patchfiles-append XrdClBuffer-include-utility.patch

# Force a compatible compiler
compiler.blacklist-append *gcc* {clang < 900} macports-clang-3.3 macports-clang-3.4 \
macports-clang-3.7 macports-clang-4.0 macports-clang-3.9 \
@@ -68,10 +57,24 @@ configure.args-append -DENABLE_CRYPTO=False \
-DENABLE_READLINE=False \
-DENABLE_KRB5=False \
-DENABLE_FUSE=False \
-DENABLE_PYTHON=FALSE \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_CXX_FLAGS="${configure.cxxflags}" \
-DCMAKE_INSTALL_MANDIR="share/man" \
-DPYTHON_EXECUTABLE=${configure.python}
-DCMAKE_INSTALL_MANDIR="share/man"

set python_v 3.7
set python_v_nodot [string map {. {}} $python_v]
variant python${python_v_nodot} description "Enable python ${python_v} bindings" {
configure.python ${prefix}/bin/python${python_v}
depends_lib-append port:python${python_v_nodot}
configure.args-replace -DENABLE_PYTHON=FALSE -DENABLE_PYTHON=TRUE
configure.args-append -DPYTHON_EXECUTABLE=${configure.python}
post-extract {
# Fix python install location
set python_framework ${frameworks_dir}/Python.framework/Versions/${python_v}
reinplace "s|\${CMAKE_INSTALL_PREFIX}|${python_framework}|g" ${worksrcpath}/bindings/python/CMakeLists.txt
}
}

variant readline description {Build with Readline Support} {
configure.args-delete -DENABLE_READLINE=False
@@ -90,9 +93,3 @@ variant kerberos description {Build with Kerberos 5 Support} {
configure.args-append -DENABLE_KRB5=True -DKERBEROS5_ROOT_DIR="${prefix}"
depends_lib-append port:kerberos5
}

post-extract {
# Fix python install location
set python_framework ${frameworks_dir}/Python.framework/Versions/${python_v}
reinplace "s|\${CMAKE_INSTALL_PREFIX}|${python_framework}|g" ${worksrcpath}/bindings/python/CMakeLists.txt
}

This file was deleted.

0 comments on commit a4201a7

Please sign in to comment.
You can’t perform that action at this time.