# -*- 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 153643 2016-10-06 17:14:09Z 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_4_9 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 +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" } # TODO: Remove after 2016-01-04. variant python25 requires python27 description {Legacy variant} {} variant python26 requires python27 description {Legacy variant} {} variant python31 requires python34 description {Legacy variant} {} variant python32 requires python34 description {Legacy variant} {} variant python33 requires python34 description {Legacy variant} {} set pythons_suffixes {27 34} if {![variant_isset python25] && ![variant_isset python26] && ![variant_isset python31] && ![variant_isset python32] && ![variant_isset python33] && ![variant_isset python34]} { default_variants +python27 } 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" -DPYTHON_LIBRARY:PATH="${frameworks_dir}/Python.framework/Versions/${v}/lib/libpython${v}.dylib" 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 60e6dc02f0482db9e5ab8b61308f6de99232641f \ sha256 9460d99750ed5622b9a1fbebc97f5860ccced3cf5ff65309b56015dafdbc539a depends_build-append port:latex2html depends_lib-append port:boost \ port:expat \ path:lib/libssl.dylib: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-doc_Makefile.diff \ 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 doc/Makefile 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" -DWITH_VOMS:BOOL="0" -DWITH_GSOAP: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 } } # The second of the three version numbers is even for a stable release. # See http://research.cs.wisc.edu/htcondor/version_number.html livecheck.regex archive/V(\\d+_\\d*\[02468\]_\\d+)${extract.suffix}