# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 # $Id: Portfile 125103 2014-09-05 16:46:51Z aronnax@macports.org $ PortSystem 1.0 PortGroup github 1.0 PortGroup cmake 1.0 PortGroup active_variants 1.1 PortGroup conflicts_build 1.0 github.setup htcondor htcondor 8_2_2 V version [strsed ${github.version} g/_/\./] maintainers aronnax categories science parallel net license apache platforms darwin description \ specialized workload management system for compute-intensive jobs long_description \ HTCondor is a specialized workload management system for compute-intensive \ jobs. Like other full-featured batch systems, HTCondor provides a job \ queueing mechanism, scheduling policy, priority scheme, resource monitoring, \ and resource management. Users submit their serial or parallel jobs to \ HTCondor, HTCondor places them into a queue, chooses when and where to run \ the jobs based upon a policy, carefully monitors their progress, and \ ultimately informs the user upon completion. homepage http://research.cs.wisc.edu/htcondor default_variants +personal +python27 +kerberos variant personal \ description "configure your computer as a one-node personal Condor pool" { add_users condor group=condor startupitem.create yes startupitem.name ${name} startupitem.start "${prefix}/sbin/condor_master -f" startupitem.stop "${prefix}/sbin/condor_off -all -master" } set pythons_suffixes {25 26 27 31 32 33 34} set pythons_ports {} foreach s ${pythons_suffixes} { lappend pythons_ports python${s} } conflicts_build ${name} configure.args-append -DWITH_PYTHON_BINDINGS:BOOL="0" -DWITH_KRB5:BOOL="0" foreach s ${pythons_suffixes} { set p python${s} set v [string index ${s} 0].[string index ${s} 1] set i [lsearch -exact ${pythons_ports} ${p}] set c [lreplace ${pythons_ports} ${i} ${i}] set d ${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v} eval [subst { variant ${p} description "Enable Python interface for Python ${v}" conflicts ${c} { depends_lib-append port:${p} require_active_variants boost ${p} configure.args-append -DC_PYTHONARCHLIB:PATH="${d}/site-packages" configure.args-replace -DWITH_PYTHON_BINDINGS:BOOL="0" -DWITH_PYTHON_BINDINGS:BOOL="1" post-patch { reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/src/condor_utils/condor_config.cpp reinplace "s|@c_pythonarchlib@|${d}/site-packages|g" ${worksrcpath}/build/cmake/CondorPackageConfig.cmake } } }] } variant kerberos description {enable Kerberos5 support} { depends_lib-append port:kerberos5 configure.args-replace -DWITH_KRB5:BOOL="0" -DWITH_KRB5:BOOL="1" } checksums rmd160 d9870d9c295eefbb98f51f40807e592b47255095 \ sha256 abe27867c2ff327eedfb652d00356969e72d423e62719e8683e60babf53036d7 depends_build-append port:latex2html depends_lib-append port:boost \ port:expat \ port:openssl \ port:pcre license_noconflict latex2html # FIXME: For some reason, Condor uses install_name_tool to have dynamic links # point to @executable_path/../lib/condor/libexpat.1.dylib, etc, instead of # @executable_path/../lib/libexpat.1.dylib, etc. Why? patchfiles patch-src-condor_scripts-macosx_rewrite_libs.diff \ patch-src-condor_utils-condor_config.cpp.diff \ patch-src-python-bindings-CMakeLists.txt.diff \ patch-build-cmake-CondorPackageConfig.cmake.diff post-patch { reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/src/condor_utils/condor_config.cpp reinplace "s|g\+\+|${configure.cxx}|g" ${worksrcpath}/doc/makeman/Makefile } # FIXME: Globus support is disabled because Globus is not available in MacPorts. configure.args-append -DWITH_GLOBUS:BOOL="0" -DBUILD_TESTING:BOOL="0" # Man pages are not part of the default build target. post-build { system -W ${worksrcpath}/doc "make just-man-pages" } # These are empty directories that are needed by the personal Condor pool. destroot.keepdirs ${destroot}${prefix}/etc/condor/config.d \ ${destroot}${prefix}/var/lib/condor/execute \ ${destroot}${prefix}/var/lib/condor/spool \ ${destroot}${prefix}/var/log/condor # Condor installs some documentation into ${prefix}. Move them into # ${prefix}/share/doc/${name}. post-destroot { # Move manpages into place. eval xinstall [glob ${worksrcpath}/doc/man/man1/*] \ ${destroot}${prefix}/share/man/man1 # Remove SysV-init and Fedora-style service scripts. # See https://htcondor-wiki.cs.wisc.edu/index.cgi/tktview?tn=3684 file delete ${destroot}${prefix}/etc/init.d/condor file delete ${destroot}${prefix}/etc/sysconfig/condor # Remove packaging scripts. file delete ${destroot}${prefix}/sbin/condor_configure file delete ${destroot}${prefix}/sbin/condor_install # Move documentation into ${prefix}/share. file mkdir ${destroot}${prefix}/share/doc/${name} move \ ${destroot}${prefix}/examples \ ${destroot}${prefix}/LICENSE-2.0.txt \ ${destroot}${prefix}/README \ ${destroot}${prefix}/share/doc/${name} # Move example configuration files from ${prefix}/etc to ${prefix}/share. move \ ${destroot}${prefix}/etc/examples \ ${destroot}${prefix}/share/doc/${name}/examples/config # If deploying a personal Condor pool, create all necessary directories. if {[variant_isset personal]} { xinstall -d ${destroot}${prefix}/etc/condor/config.d xinstall ${filespath}/condor_config ${destroot}${prefix}/etc/condor reinplace "s|@prefix@|${prefix}|g" ${destroot}${prefix}/etc/condor/condor_config xinstall ${filespath}/condor_config.local ${destroot}${prefix}/etc/condor xinstall -d ${destroot}${prefix}/var/lib xinstall -d -o condor -g condor ${destroot}${prefix}/var/lib/condor/execute xinstall -d -o condor -g condor ${destroot}${prefix}/var/lib/condor/spool xinstall -d ${destroot}${prefix}/var/log xinstall -d -o condor -g condor ${destroot}${prefix}/var/log/condor } } # Override default GitHub livecheck because the HTCondor git repository has # tens of thousands of tags, and GitHub has to paginate the tags. livecheck.type regexm livecheck.url ${homepage}/downloads/ livecheck.version ${version} livecheck.regex {Current Stable Release\s*]*>([0-9]+(\.[0-9]+)+)}