mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
677 lines
26 KiB
Tcl
677 lines
26 KiB
Tcl
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
PortSystem 1.0
|
|
|
|
PortGroup active_variants 1.1
|
|
PortGroup select 1.0
|
|
PortGroup github 1.0
|
|
|
|
#github.setup root-mirror root 5-34-36 v
|
|
github.setup root-mirror root c06fdea
|
|
# Change github.tarball_from to 'releases' or 'archive' next update
|
|
github.tarball_from tarball
|
|
version 5.34.37
|
|
revision 12
|
|
|
|
livecheck.type none
|
|
|
|
set version_major [lindex [split ${version} .] 0]
|
|
|
|
checksums rmd160 4d28ced0f6faee87e5dd7130f96c15fd0237041b \
|
|
sha256 da68645b5c31b6fe2c52cf73a6f7c848d3ccdd2ef68436b953c95c55cb030468 \
|
|
size 75535862
|
|
|
|
name root${version_major}
|
|
categories science
|
|
maintainers {jonesc @cjones051073} openmaintainer
|
|
license LGPL-2.1+
|
|
|
|
description ROOT is a data analysis framework from CERN
|
|
long_description The ROOT system provides a set of frameworks with all \
|
|
the functionality needed to handle and analyze large amounts \
|
|
of data in a very efficient way.
|
|
|
|
homepage https://root.cern.ch/
|
|
|
|
dist_subdir root
|
|
|
|
depends_build-append port:cctools
|
|
|
|
depends_lib port:xz \
|
|
port:pcre \
|
|
port:zlib \
|
|
path:include/turbojpeg.h:libjpeg-turbo \
|
|
port:libpng \
|
|
port:giflib \
|
|
port:tiff \
|
|
port:gmp \
|
|
port:expat \
|
|
port:lzma
|
|
# port:freetype
|
|
|
|
depends_run port:root_select
|
|
|
|
# TODO: the file ${filespath}/${name} would have to be generated on the fly instead
|
|
select.group root
|
|
select.file ${filespath}/${name}
|
|
|
|
# Force a compatible compiler
|
|
compiler.blacklist-append *gcc* clang macports-clang-3.3 macports-clang-3.4 macports-clang-3.7 \
|
|
macports-clang-4.0 macports-clang-6.0 macports-clang-7.0 macports-clang-8.0
|
|
|
|
post-patch {
|
|
# reinplace "s|-lfreetype| \`freetype-config --libs\`|g" ${worksrcpath}/config/root-config.in
|
|
reinplace "s|\"/usr/include\"|\"${prefix}/include /usr/include\"|g" ${worksrcpath}/configure
|
|
reinplace "s|/usr/lib |${prefix}/lib /usr/lib |g" ${worksrcpath}/configure
|
|
reinplace "s|/usr/include |${prefix}/include /usr/include |g" ${worksrcpath}/configure
|
|
reinplace "s|\"/usr/lib\"|\"${prefix}/lib /usr/lib\"|g" ${worksrcpath}/configure
|
|
}
|
|
|
|
# port specific location
|
|
set install_prefix ${prefix}/libexec/root${version_major}
|
|
|
|
pre-configure {
|
|
configure.args-append \
|
|
--with-cc=${configure.cc} \
|
|
--with-cxx=${configure.cxx} \
|
|
--with-ld=${configure.cxx} \
|
|
--with-f77=${configure.f77}
|
|
# the build type (32 or 64 bit) -must- be for first argument
|
|
if {${build_arch} eq "i386" || ${build_arch} eq "ppc"} {
|
|
configure.pre_args macosx --prefix=${install_prefix}
|
|
} else {
|
|
configure.pre_args macosx64 --prefix=${install_prefix}
|
|
}
|
|
}
|
|
|
|
configure.args --etcdir=${install_prefix}/etc/root \
|
|
--disable-builtin-glew \
|
|
--disable-builtin-pcre \
|
|
--disable-builtin-zlib \
|
|
--disable-builtin-lzma \
|
|
--disable-fftw3 \
|
|
--disable-krb5 \
|
|
--disable-ldap \
|
|
--disable-mysql \
|
|
--disable-sqlite \
|
|
--disable-odbc \
|
|
--disable-opengl \
|
|
--disable-pythia6 \
|
|
--disable-pythia8 \
|
|
--disable-roofit \
|
|
--disable-ssl \
|
|
--disable-xml \
|
|
--disable-python \
|
|
--disable-fitsio \
|
|
--disable-gsl-shared \
|
|
--disable-pgsql \
|
|
--disable-dcache \
|
|
--disable-chirp \
|
|
--disable-hdfs \
|
|
--disable-ruby \
|
|
--disable-minuit2 \
|
|
--disable-tmva \
|
|
--disable-qt \
|
|
--disable-qtgsi \
|
|
--disable-bonjour \
|
|
--disable-gviz \
|
|
--disable-soversion \
|
|
--disable-c++11 \
|
|
--disable-xrootd \
|
|
--disable-oracle \
|
|
--disable-http \
|
|
--disable-vc \
|
|
--disable-mathmore \
|
|
--enable-builtin-ftgl \
|
|
--enable-genvector \
|
|
--enable-memstat \
|
|
--enable-unuran \
|
|
--enable-reflex \
|
|
--enable-table \
|
|
--enable-fink \
|
|
--enable-gdml \
|
|
--enable-builtin-freetype
|
|
|
|
# Does not build using MacOS10.14 SDK. So use 10.13 instead
|
|
if {${os.platform} eq "darwin" && ${os.major} >= 18} {
|
|
configure.args-append --with-macosxvers=10.13
|
|
}
|
|
|
|
platform darwin {
|
|
if {${configure.cxx_stdlib} eq "libc++"} {
|
|
configure.args-replace --disable-c++11 --enable-c++11
|
|
}
|
|
}
|
|
|
|
post-destroot {
|
|
# create versioned symlinks for the content of libexec
|
|
# bin dir
|
|
foreach f [glob -directory ${destroot}${install_prefix}/bin *] {
|
|
set filename [file tail $f]
|
|
set extension [file extension $filename]
|
|
set base [file rootname $filename]
|
|
set versioned_filename ${base}${version_major}${extension}
|
|
ln -s ${install_prefix}/bin/${filename} ${destroot}${prefix}/bin/${versioned_filename}
|
|
}
|
|
# lib dir
|
|
ln -s ${install_prefix}/lib/root ${destroot}${prefix}/lib/root${version_major}
|
|
# include dir
|
|
ln -s ${install_prefix}/include/root ${destroot}${prefix}/include/root${version_major}
|
|
# etc dir
|
|
ln -s ${install_prefix}/etc/root ${destroot}${prefix}/etc/root${version_major}
|
|
# share dir
|
|
ln -s ${install_prefix}/share ${destroot}${prefix}/share/root${version_major}
|
|
# 'Fix' genreflex
|
|
reinplace "s|lib/python/genreflex|lib/root${version_major}/python/genreflex|g" ${destroot}${install_prefix}/bin/genreflex
|
|
# Compress manpages in custom location (borrowed from mariadb)
|
|
set manpath ${install_prefix}/share/man
|
|
set gzip [findBinary gzip ${portutil::autoconf::gzip_path}]
|
|
foreach manpage [glob -type f ${destroot}${manpath}/man1/*] {
|
|
# Zip the man file
|
|
system "$gzip -9vf ${manpage}"
|
|
# Create man pages for versioned files
|
|
set filename [file tail $manpage]
|
|
set extension [file extension $filename]
|
|
set base [file rootname $filename]
|
|
set versioned_filename ${base}${version_major}${extension}.gz
|
|
set d [file tail $manpage]
|
|
ln -s ${manpath}/man1/${d}.gz ${destroot}${prefix}/share/man/man1/${versioned_filename}
|
|
}
|
|
}
|
|
|
|
set run_port_select "No"
|
|
pre-activate {
|
|
if { ![file exists ${prefix}/bin/root] &&
|
|
![file exists ${prefix}/bin/root5] &&
|
|
![file exists ${prefix}/bin/root6] } {
|
|
set run_port_select "Yes"
|
|
}
|
|
}
|
|
|
|
post-activate {
|
|
ui_msg "======================================================================================"
|
|
if { ${run_port_select} == "Yes" } {
|
|
ui_msg " Making root${version_major} your default root version. To change this run 'sudo port select root'"
|
|
catch { system "port select root root${version_major}" }
|
|
} else {
|
|
ui_msg " To make root${version_major} your default root version, run 'sudo port select root root${version_major}'"
|
|
}
|
|
ui_msg "======================================================================================"
|
|
}
|
|
|
|
universal_variant no
|
|
|
|
default_variants +ssl +xml +gsl +minuit2 +tmva +roofit +graphviz +opengl +soversion +http
|
|
|
|
# Since ROOT 5.34.15 the cocoa backend is default on OS X 10.8 or newer
|
|
# We also make it default on 10.7
|
|
if {${os.platform} eq "darwin" && ${os.major} > 10} {
|
|
set default_gui_variant +cocoa
|
|
} else {
|
|
set default_gui_variant +x11
|
|
}
|
|
|
|
# ROOT5 is no longer supported from macOS 10.15
|
|
if {${os.platform} eq "darwin" && ${os.major} > 18} {
|
|
known_fail yes
|
|
pre-fetch {
|
|
ui_error "${name} is not supported on macOS 10.15 or later. Please migrate to ROOT6."
|
|
return -code error "Unsupported macOS version"
|
|
}
|
|
}
|
|
|
|
# macOS 10.14 requires optional SDK header package to be installed
|
|
if {${os.platform} eq "darwin" && ${os.major} == 18 && ![file exists /usr/include] } {
|
|
pre-fetch {
|
|
ui_error "${name} requires the optional Xcode SDK header package to be installed."
|
|
ui_error "See https://apple.stackexchange.com/questions/337940/why-is-usr-include-missing-i-have-xcode-and-command-line-tools-installed-moja for more details."
|
|
return -code error "Missing SDK headers"
|
|
}
|
|
}
|
|
|
|
variant http description {Build with HTTP Server library support} {
|
|
configure.args-replace --disable-http --enable-http
|
|
}
|
|
|
|
variant vc description {Build with Vc library support} {
|
|
configure.args-replace --disable-vc --enable-vc
|
|
}
|
|
|
|
variant debug description {Enable a debug build} {
|
|
configure.args-append --build=debug
|
|
}
|
|
|
|
variant xrootd description {Build with XRootD support} {
|
|
configure.args-delete --disable-xrootd
|
|
configure.args-append --enable-xrootd \
|
|
--with-xrootd-incdir="${prefix}/include/xrootd" \
|
|
--with-xrootd-libdir="${prefix}/lib"
|
|
depends_lib-append port:xrootd
|
|
}
|
|
|
|
variant soversion description {Build with soversion support} {
|
|
configure.args-replace --disable-soversion --enable-soversion
|
|
}
|
|
|
|
variant graphviz description {Build with graphviz support} {
|
|
configure.args-delete --disable-gviz
|
|
configure.args-append --enable-gviz \
|
|
--with-gviz-incdir="${prefix}/include/graphviz" \
|
|
--with-gviz-libdir="${prefix}/lib"
|
|
depends_lib-append path:bin/dot:graphviz
|
|
}
|
|
|
|
variant avahi description {Build with avahi support} {
|
|
configure.args-delete --disable-bonjour
|
|
configure.args-append --enable-bonjour \
|
|
--with-avahi-incdir="${prefix}/include" \
|
|
--with-avahi-libdir="${prefix}/lib"
|
|
depends_lib-append port:avahi
|
|
}
|
|
|
|
variant fftw3 description {Build with fftw3 support} {
|
|
configure.args-delete --disable-fftw3
|
|
configure.args-append --enable-fftw3 \
|
|
--with-fftw3-incdir="${prefix}/include" \
|
|
--with-fftw3-libdir="${prefix}/lib"
|
|
depends_lib-append port:fftw-3
|
|
}
|
|
|
|
variant gsl description {Build with gsl support} {
|
|
configure.args-replace --disable-mathmore --enable-mathmore
|
|
configure.args-delete --disable-gsl-shared
|
|
configure.args-append --enable-gsl-shared \
|
|
--with-gsl-incdir="${prefix}/include" \
|
|
--with-gsl-libdir="${prefix}/lib"
|
|
depends_lib-append port:gsl
|
|
}
|
|
|
|
variant fitsio description {Build with fitsio support} {
|
|
configure.args-delete --disable-fitsio
|
|
configure.args-append --enable-fitsio \
|
|
--with-cfitsio-incdir="${prefix}/include" \
|
|
--with-cfitsio-libdir="${prefix}/lib"
|
|
depends_lib-append port:cfitsio
|
|
}
|
|
|
|
variant odbc description {Build with odbc support} {
|
|
configure.args-delete --disable-odbc
|
|
configure.args-append --enable-odbc \
|
|
--with-odbc-incdir="${prefix}/include" \
|
|
--with-odbc-libdir="${prefix}/lib"
|
|
depends_lib-append port:libiodbc
|
|
}
|
|
|
|
variant ldap description {Build with ldap support} {
|
|
configure.args-delete --disable-ldap
|
|
configure.args-append --enable-ldap \
|
|
--with-ldap-incdir="${prefix}/include" \
|
|
--with-ldap-libdir="${prefix}/lib"
|
|
depends_lib-append path:lib/libldap.dylib:openldap
|
|
}
|
|
|
|
variant roofit description {Build the RooFit advanced fitting package} {
|
|
configure.args-replace --disable-roofit --enable-roofit
|
|
}
|
|
|
|
variant tmva description {Build the TMVA package} {
|
|
configure.args-replace --disable-tmva --enable-tmva
|
|
post-destroot {
|
|
set tmvaTuts ${destroot}${install_prefix}/share/root/tutorial/tmva
|
|
file mkdir ${tmvaTuts}
|
|
foreach f [glob ${worksrcpath}/tmva/test/*] { file copy $f ${tmvaTuts}/ }
|
|
}
|
|
}
|
|
|
|
variant minuit2 description {Build with minuit2 support} {
|
|
configure.args-replace --disable-minuit2 --enable-minuit2
|
|
}
|
|
|
|
variant opengl description {Build with opengl support} {
|
|
configure.args-delete --disable-opengl
|
|
configure.args-delete --disable-builtin-glew
|
|
configure.args-append --enable-opengl --enable-builtin-glew
|
|
}
|
|
|
|
# ========================================================================================
|
|
# Setup various python variants
|
|
# ========================================================================================
|
|
|
|
# List of possible python versions
|
|
set python_versions { 2.7 3.5 3.6 3.7 }
|
|
|
|
# Define the available variants
|
|
foreach ver ${python_versions} {
|
|
set ver_no_dot [join [split ${ver} "."] ""]
|
|
set variant_line {variant python${ver_no_dot} description "Build with python ${ver} support"}
|
|
foreach over ${python_versions} {
|
|
if { ${ver} == ${over} } { continue }
|
|
set over_no_dot [join [split ${over} "."] ""]
|
|
append variant_line " conflicts python${over_no_dot}"
|
|
}
|
|
append variant_line { { } }
|
|
eval $variant_line
|
|
}
|
|
|
|
# Is a variant active ?
|
|
set active_python_variant ""
|
|
foreach ver ${python_versions} {
|
|
set ver_no_dot [join [split ${ver} "."] ""]
|
|
if {[variant_isset python${ver_no_dot}]} {
|
|
set active_python_variant ${ver}
|
|
}
|
|
}
|
|
|
|
# If so, set it up.
|
|
if { ${active_python_variant} != "" } {
|
|
set ver_no_dot [join [split ${active_python_variant} "."] ""]
|
|
if {![catch {set result [active_variants root6 python${ver_no_dot}]}]} {
|
|
if {$result} {
|
|
ui_error "Cannot install ${name} with +python${ver_no_dot} variant"
|
|
return -code error "root6 port is already installed with +python${ver_no_dot} and both cannot be active at once. Pick a different python variant."
|
|
}
|
|
}
|
|
set mypydir ${frameworks_dir}/Python.framework/Versions/${active_python_variant}
|
|
configure.args-delete --disable-python
|
|
configure.args-append --enable-python \
|
|
--with-python-incdir="${mypydir}/Headers" \
|
|
--with-python-libdir="${mypydir}"
|
|
depends_lib-append port:python${ver_no_dot}
|
|
post-destroot {
|
|
set mypylibdir ${frameworks_dir}/Python.framework/Versions/${active_python_variant}/lib/python${active_python_variant}
|
|
set mypysitedir ${mypylibdir}/site-packages/
|
|
file mkdir ${destroot}${mypysitedir}
|
|
foreach pyfile [glob ${destroot}${install_prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir}/ }
|
|
ln -sf ${install_prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
|
|
}
|
|
}
|
|
|
|
# ========================================================================================
|
|
|
|
variant ssl description {Build with ssl support} {
|
|
configure.args-delete --disable-ssl
|
|
configure.args-append --enable-ssl \
|
|
--with-ssl-shared=yes \
|
|
--with-ssl-incdir="${prefix}/include" \
|
|
--with-ssl-libdir="${prefix}/lib"
|
|
depends_lib-append path:lib/libssl.dylib:openssl
|
|
}
|
|
|
|
variant xml description {Build with xml support} {
|
|
configure.args-delete --disable-xml
|
|
configure.args-append --enable-xml \
|
|
--with-xml-incdir="${prefix}/include/libxml2" \
|
|
--with-xml-libdir="${prefix}/lib"
|
|
depends_lib-append port:libxml2
|
|
}
|
|
|
|
variant sqlite3 description {Build with sqlite3 support} {
|
|
configure.args-delete --disable-sqlite
|
|
configure.args-append --enable-sqlite \
|
|
--with-sqlite-incdir="${prefix}/include" \
|
|
--with-sqlite-libdir="${prefix}/lib"
|
|
depends_lib-append port:sqlite3
|
|
}
|
|
|
|
variant mysql conflicts mysql51 mysql55 mysql56 mariadb description {Build with mysql5 support} {
|
|
configure.args-delete --disable-mysql
|
|
configure.args-append --enable-mysql \
|
|
--with-mysql-incdir="${prefix}/include/mysql5/mysql" \
|
|
--with-mysql-libdir="${prefix}/lib/mysql5/mysql"
|
|
depends_lib-append port:mysql5
|
|
}
|
|
|
|
variant mysql51 conflicts mysql mysql55 mysql56 mariadb description {Build with mysql51 support} {
|
|
configure.args-delete --disable-mysql
|
|
configure.args-append --enable-mysql \
|
|
--with-mysql-incdir="${prefix}/include/mysql51/mysql" \
|
|
--with-mysql-libdir="${prefix}/lib/mysql51/mysql"
|
|
depends_lib-append port:mysql51
|
|
}
|
|
|
|
variant mysql55 conflicts mysql mysql51 mysql56 mariadb description {Build with mysql55 support} {
|
|
configure.args-delete --disable-mysql
|
|
configure.args-append --enable-mysql \
|
|
--with-mysql-incdir="${prefix}/include/mysql55/mysql" \
|
|
--with-mysql-libdir="${prefix}/lib/mysql55/mysql"
|
|
depends_lib-append port:mysql55
|
|
}
|
|
|
|
variant mysql56 conflicts mysql mysql51 mysql55 mariadb description {Build with mysql56 support} {
|
|
configure.args-delete --disable-mysql
|
|
configure.args-append --enable-mysql \
|
|
--with-mysql-incdir="${prefix}/include/mysql56/mysql" \
|
|
--with-mysql-libdir="${prefix}/lib/mysql56/mysql"
|
|
depends_lib-append port:mysql56
|
|
}
|
|
|
|
variant mariadb conflicts mysql mysql51 mysql55 mysql56 description {Build with mariadb support} {
|
|
configure.args-delete --disable-mysql
|
|
configure.args-append --enable-mysql \
|
|
--with-mysql-incdir="${prefix}/include/mariadb/mysql" \
|
|
--with-mysql-libdir="${prefix}/lib/mariadb/mysql"
|
|
depends_lib-append port:mariadb
|
|
}
|
|
|
|
variant postgresql90 conflicts postgresql92 description {Build with PostgreSQL 9.0 support} {
|
|
configure.args-delete --disable-pgsql
|
|
configure.args-append --enable-pgsql \
|
|
--with-pgsql-incdir="${prefix}/include/postgresql90" \
|
|
--with-pgsql-libdir="${prefix}/lib/postgresql90"
|
|
depends_lib-append port:libpqxx port:postgresql90
|
|
}
|
|
|
|
variant postgresql92 conflicts postgresql90 description {Build with PostgreSQL 9.2 support} {
|
|
configure.args-delete --disable-pgsql
|
|
configure.args-append --enable-pgsql \
|
|
--with-pgsql-incdir="${prefix}/include/postgresql92" \
|
|
--with-pgsql-libdir="${prefix}/lib/postgresql92"
|
|
depends_lib-append port:libpqxx port:postgresql92
|
|
}
|
|
|
|
# variant oracle description {Build with Oracle support} {
|
|
# configure.args-replace --disable-oracle --enable-oracle
|
|
# configure.args-append --with-oracle-incdir="${prefix}/lib/oracle/sdk/include" \
|
|
# --with-oracle-libdir="${prefix}/lib/oracle"
|
|
# depends_lib-append port:oracle-instantclient
|
|
# }
|
|
|
|
variant pythia description {Pythia 8 support for root} {
|
|
configure.args-delete --disable-pythia8
|
|
configure.args-append --enable-pythia8 \
|
|
--with-pythia8-incdir=${prefix}/include/pythia \
|
|
--with-pythia8-libdir=${prefix}/lib
|
|
depends_lib-append port:pythia
|
|
}
|
|
|
|
variant cocoa conflicts x11 description {Enables native OSX graphical backend} {
|
|
# Force a compatible clang compiler
|
|
compiler.blacklist-append {clang < 425} *gcc*
|
|
# Enable cocoa support in configure
|
|
configure.args-delete --disable-cocoa
|
|
configure.args-append --enable-cocoa
|
|
# patch afterimage build to make sure TIFF support is disabled. Causes problems with cocoa...
|
|
patchfiles-append patch-builtin-afterimage-disabletiff.diff
|
|
}
|
|
|
|
variant x11 conflicts cocoa description {Enables X11 graphical backend} {
|
|
# Dependencies on X11 ports
|
|
depends_lib-append port:xorg-libX11 port:mesa port:libGLU port:Xft2 port:xpm
|
|
# Disable cocoa
|
|
configure.args-append --disable-cocoa
|
|
}
|
|
|
|
# If neither graphical variant is set, use default
|
|
if { ![variant_isset cocoa] && ![variant_isset x11] } {
|
|
default_variants-append ${default_gui_variant}
|
|
}
|
|
|
|
# ========================================================================================
|
|
# Setup various clang variants, to provide alternative C++ compilers that support cocoa
|
|
# ========================================================================================
|
|
|
|
# List of possible clang versions that work
|
|
set clang_versions { 5.0 }
|
|
|
|
# Define the available variants
|
|
foreach ver ${clang_versions} {
|
|
set ver_no_dot [join [split ${ver} "."] ""]
|
|
set variant_line {variant clang${ver_no_dot} description "Compile using MacPorts clang ${ver}"}
|
|
foreach over ${clang_versions} {
|
|
if { ${ver} == ${over} } { continue }
|
|
set over_no_dot [join [split ${over} "."] ""]
|
|
append variant_line " conflicts clang${over_no_dot}"
|
|
}
|
|
append variant_line { { } }
|
|
eval $variant_line
|
|
}
|
|
|
|
# make sure that the proper variant is automatically selected
|
|
# (ROOT crashes if the compiler it was built with doesn't exist)
|
|
if { ![variant_isset clang50] } {
|
|
if { ${configure.compiler} eq "macports-clang-5.0" } {
|
|
default_variants-append +clang50
|
|
}
|
|
}
|
|
|
|
# Is a variant active ?
|
|
set active_clang_variant ""
|
|
foreach ver ${clang_versions} {
|
|
set ver_no_dot [join [split ${ver} "."] ""]
|
|
if {[variant_isset clang${ver_no_dot}]} {
|
|
set active_clang_variant ${ver}
|
|
}
|
|
}
|
|
|
|
# If so, set it up.
|
|
if { ${active_clang_variant} != "" } {
|
|
configure.compiler macports-clang-${active_clang_variant}
|
|
configure.args-append --with-llvm-config="${prefix}/bin/llvm-config-mp-"${active_clang_variant}
|
|
depends_run-append port:clang-${active_clang_variant}
|
|
}
|
|
|
|
# ========================================================================================
|
|
|
|
variant qt_mac description {Build with Qt support via Mac UI} {
|
|
post-patch {
|
|
# fix where "qglobal.h" is found in all files that use or reference it
|
|
foreach tpf { configure graf2d/qt/src/TGQt.cxx } {
|
|
reinplace "s@Qt/qglobal\\.h@QtCore/qglobal\\.h@g" \
|
|
${worksrcpath}/${tpf}
|
|
}
|
|
reinplace "/qttestdir/s@Qt@QtCore@g" ${worksrcpath}/configure
|
|
|
|
# fix library search extensions to include ".la"
|
|
# for Qt framework libraries (only)
|
|
reinplace "s@\\(\\.so \\.sl \\.dylib \\.dll\\.a\\)@\\1 \\.la@g" \
|
|
${worksrcpath}/configure
|
|
}
|
|
|
|
configure.args-delete --disable-qt
|
|
configure.args-delete --disable-qtgsi
|
|
configure.args-append --enable-qt --enable-qtgsi \
|
|
--with-qt-incdir="${prefix}/include" \
|
|
--with-qt-libdir="${prefix}/lib"
|
|
depends_lib-append port:qt4-mac
|
|
|
|
post-configure {
|
|
# patch up the Makefile.config to handle the QTLIB frameworks correctly
|
|
reinplace "/QTLIB\[ \]/s@:= @:= -F${qt_libs_dir} @" \
|
|
${worksrcpath}/config/Makefile.config
|
|
reinplace "/QTLIB\[ \]/s@\\(Qt\[^ \]*\\).la@-framework \\1@g" \
|
|
${worksrcpath}/config/Makefile.config
|
|
}
|
|
}
|
|
|
|
if {[variant_isset qt_mac]} {
|
|
PortGroup qt4 1.0
|
|
}
|
|
|
|
# ========================================================================================
|
|
# Following is for fortran support
|
|
# Might eventually move to a portgroup, or similar, so could be simplified.
|
|
# Based on recipe from https://trac.macports.org/wiki/PortfileRecipes#fortran
|
|
# Note that g95 does not work here, so that variant is removed
|
|
# ========================================================================================
|
|
|
|
set gcc_versions { 4.9 5 6 7 8 9 }
|
|
set default_fortran_variant +gcc9
|
|
|
|
foreach ver ${gcc_versions} {
|
|
set ver_no_dot [join [split ${ver} "."] ""]
|
|
|
|
set variant_line {variant gcc${ver_no_dot} description "Build with gfortran from gcc${ver_no_dot}"}
|
|
|
|
foreach over ${gcc_versions} {
|
|
if {${ver} == ${over}} {
|
|
continue
|
|
}
|
|
|
|
set over_no_dot [join [split ${over} "."] ""]
|
|
append variant_line " conflicts gcc${over_no_dot}"
|
|
}
|
|
append variant_line { { } }
|
|
|
|
eval $variant_line
|
|
|
|
if {[variant_isset gcc${ver_no_dot}]} {
|
|
if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
|
|
set default_fortran_variant ""
|
|
}
|
|
}
|
|
}
|
|
|
|
if {${default_fortran_variant} != ""} {
|
|
default_variants-append "${default_fortran_variant}"
|
|
}
|
|
|
|
foreach ver ${gcc_versions} {
|
|
set ver_no_dot [join [split ${ver} "."] ""]
|
|
|
|
if {[variant_isset gcc${ver_no_dot}]} {
|
|
depends_lib-append path:share/doc/libgcc/README:libgcc
|
|
depends_build-append port:gcc${ver_no_dot}
|
|
|
|
configure.fc ${prefix}/bin/gfortran-mp-${ver}
|
|
configure.f77 ${prefix}/bin/gfortran-mp-${ver}
|
|
configure.f90 ${prefix}/bin/gfortran-mp-${ver}
|
|
}
|
|
}
|
|
|
|
# ========================================================================================
|
|
# The following have build issues, are obsolete or experimental.
|
|
# ========================================================================================
|
|
|
|
# Problems finding includes ...
|
|
# variant ruby description {Build with ruby support} {
|
|
# configure.args-delete --disable-ruby
|
|
# configure.args-append --enable-ruby \
|
|
# --with-ruby-incdir="${prefix}/include/ruby-1.9.1" \
|
|
# --with-ruby-libdir="${prefix}/lib"
|
|
# depends_lib-append port:ruby19
|
|
# }
|
|
|
|
# Intefers with builtin freetype build (enforced by cocoa variant)
|
|
# Also do not seem to be actually needed any more
|
|
#pre-build {
|
|
# build.args CC=${configure.cc} \
|
|
# CXX=${configure.cxx} \
|
|
# F77=${configure.f77}
|
|
#}
|
|
|
|
# variant kerberos5 description {Build with kerberos5 support} {
|
|
# configure.args-delete --disable-krb5
|
|
# configure.args-append --enable-krb5 \
|
|
# --with-krb5-incdir="${prefix}/include" \
|
|
# --with-krb5-libdir="${prefix}/lib"
|
|
# depends_lib-append port:kerberos5
|
|
# }
|
|
|
|
# variant ftgl description {Build with ftgl support} {
|
|
# configure.args-delete --enable-builtin-ftgl
|
|
# configure.args-append --disable-builtin-ftgl \
|
|
# configure.args-append --with-ftgl-incdir="${prefix}/include" \
|
|
# --with-ftgl-libdir="${prefix}/lib"
|
|
# depends_lib-append port:ftgl
|
|
# }
|