source: trunk/dports/science/htcondor/Portfile

Last change on this file was 153643, checked in by aronnax@…, 10 months ago

htcondor: update to 8.4.9

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.4 KB
Line 
1# -*- 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
2# $Id: Portfile 153643 2016-10-06 17:14:09Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               github 1.0
6PortGroup               cmake 1.0
7PortGroup               active_variants 1.1
8PortGroup               conflicts_build 1.0
9
10github.setup            htcondor htcondor 8_4_9 V
11version                 [strsed ${github.version} g/_/\./]
12maintainers             aronnax
13
14categories              science parallel net
15license                 apache
16platforms               darwin
17description \
18  specialized workload management system for compute-intensive jobs
19long_description \
20  HTCondor is a specialized workload management system for compute-intensive \
21  jobs. Like other full-featured batch systems, HTCondor provides a job \
22  queueing mechanism, scheduling policy, priority scheme, resource monitoring, \
23  and resource management. Users submit their serial or parallel jobs to \
24  HTCondor, HTCondor places them into a queue, chooses when and where to run \
25  the jobs based upon a policy, carefully monitors their progress, and \
26  ultimately informs the user upon completion.
27homepage                http://research.cs.wisc.edu/htcondor
28
29default_variants        +personal +kerberos
30
31variant personal \
32  description "configure your computer as a one-node personal Condor pool" {
33
34    add_users           condor group=condor
35
36    startupitem.create  yes
37    startupitem.name    ${name}
38    startupitem.start   "${prefix}/sbin/condor_master -f"
39    startupitem.stop    "${prefix}/sbin/condor_off -all -master"
40}
41
42# TODO: Remove after 2016-01-04.
43variant python25 requires python27 description {Legacy variant} {}
44variant python26 requires python27 description {Legacy variant} {}
45variant python31 requires python34 description {Legacy variant} {}
46variant python32 requires python34 description {Legacy variant} {}
47variant python33 requires python34 description {Legacy variant} {}
48
49set pythons_suffixes {27 34}
50
51if {![variant_isset python25] && ![variant_isset python26] && ![variant_isset python31] && ![variant_isset python32] && ![variant_isset python33] && ![variant_isset python34]} {
52    default_variants +python27
53}
54
55set pythons_ports {}
56foreach s ${pythons_suffixes} {
57    lappend pythons_ports python${s}
58}
59
60conflicts_build     ${name}
61
62configure.args-append   -DWITH_PYTHON_BINDINGS:BOOL="0" -DWITH_KRB5:BOOL="0"
63
64foreach s ${pythons_suffixes} {
65    set p python${s}
66    set v [string index ${s} 0].[string index ${s} 1]
67    set i [lsearch -exact ${pythons_ports} ${p}]
68    set c [lreplace ${pythons_ports} ${i} ${i}]
69    set d ${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}
70    eval [subst {
71        variant ${p} description "Enable Python interface for Python ${v}" conflicts ${c} {
72
73            depends_lib-append      port:${p}
74            require_active_variants boost ${p}
75            configure.args-append   -DC_PYTHONARCHLIB:PATH="${d}/site-packages" -DPYTHON_LIBRARY:PATH="${frameworks_dir}/Python.framework/Versions/${v}/lib/libpython${v}.dylib"
76            configure.args-replace  -DWITH_PYTHON_BINDINGS:BOOL="0" -DWITH_PYTHON_BINDINGS:BOOL="1"
77
78            post-patch {
79                reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/src/condor_utils/condor_config.cpp
80                reinplace "s|@c_pythonarchlib@|${d}/site-packages|g" ${worksrcpath}/build/cmake/CondorPackageConfig.cmake
81            }
82
83        }
84    }]
85}
86
87variant kerberos description {enable Kerberos5 support} {
88    depends_lib-append port:kerberos5
89    configure.args-replace -DWITH_KRB5:BOOL="0" -DWITH_KRB5:BOOL="1"
90}
91
92
93checksums               rmd160  60e6dc02f0482db9e5ab8b61308f6de99232641f \
94                        sha256  9460d99750ed5622b9a1fbebc97f5860ccced3cf5ff65309b56015dafdbc539a
95
96depends_build-append    port:latex2html
97
98depends_lib-append      port:boost \
99                        port:expat \
100                        path:lib/libssl.dylib:openssl \
101                        port:pcre
102
103license_noconflict      latex2html
104
105# FIXME: For some reason, Condor uses install_name_tool to have dynamic links
106# point to @executable_path/../lib/condor/libexpat.1.dylib, etc, instead of
107# @executable_path/../lib/libexpat.1.dylib, etc. Why?
108patchfiles              patch-doc_Makefile.diff \
109                        patch-src-condor_scripts-macosx_rewrite_libs.diff \
110                        patch-src-condor_utils-condor_config.cpp.diff \
111                        patch-src-python-bindings-CMakeLists.txt.diff \
112                        patch-build-cmake-CondorPackageConfig.cmake.diff
113
114post-patch {
115    reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/src/condor_utils/condor_config.cpp doc/Makefile
116    reinplace "s|g\+\+|${configure.cxx}|g" ${worksrcpath}/doc/makeman/Makefile
117}
118
119# FIXME: Globus support is disabled because Globus is not available in MacPorts.
120configure.args-append   -DWITH_GLOBUS:BOOL="0" -DWITH_VOMS:BOOL="0" -DWITH_GSOAP:BOOL="0" -DBUILD_TESTING:BOOL="0"
121
122# Man pages are not part of the default build target.
123post-build {
124    system -W ${worksrcpath}/doc "make just-man-pages"
125}
126
127# These are empty directories that are needed by the personal Condor pool.
128destroot.keepdirs       ${destroot}${prefix}/etc/condor/config.d \
129                        ${destroot}${prefix}/var/lib/condor/execute \
130                        ${destroot}${prefix}/var/lib/condor/spool \
131                        ${destroot}${prefix}/var/log/condor
132
133# Condor installs some documentation into ${prefix}. Move them into
134# ${prefix}/share/doc/${name}.
135post-destroot {
136    # Move manpages into place.
137    eval xinstall [glob ${worksrcpath}/doc/man/man1/*] \
138        ${destroot}${prefix}/share/man/man1
139
140    # Remove SysV-init and Fedora-style service scripts.
141    # See https://htcondor-wiki.cs.wisc.edu/index.cgi/tktview?tn=3684
142    file delete ${destroot}${prefix}/etc/init.d/condor
143    file delete ${destroot}${prefix}/etc/sysconfig/condor
144
145    # Remove packaging scripts.
146    file delete ${destroot}${prefix}/sbin/condor_configure
147    file delete ${destroot}${prefix}/sbin/condor_install
148
149    # Move documentation into ${prefix}/share.
150    file mkdir ${destroot}${prefix}/share/doc/${name}
151    move \
152      ${destroot}${prefix}/examples \
153      ${destroot}${prefix}/LICENSE-2.0.txt \
154      ${destroot}${prefix}/README \
155      ${destroot}${prefix}/share/doc/${name}
156
157    # Move example configuration files from ${prefix}/etc to ${prefix}/share.
158    move \
159      ${destroot}${prefix}/etc/examples \
160      ${destroot}${prefix}/share/doc/${name}/examples/config
161
162    # If deploying a personal Condor pool, create all necessary directories.
163    if {[variant_isset personal]} {
164        xinstall -d ${destroot}${prefix}/etc/condor/config.d
165        xinstall ${filespath}/condor_config ${destroot}${prefix}/etc/condor
166        reinplace "s|@prefix@|${prefix}|g" ${destroot}${prefix}/etc/condor/condor_config
167        xinstall ${filespath}/condor_config.local ${destroot}${prefix}/etc/condor
168
169        xinstall -d ${destroot}${prefix}/var/lib
170        xinstall -d -o condor -g condor ${destroot}${prefix}/var/lib/condor/execute
171        xinstall -d -o condor -g condor ${destroot}${prefix}/var/lib/condor/spool
172        xinstall -d ${destroot}${prefix}/var/log
173        xinstall -d -o condor -g condor ${destroot}${prefix}/var/log/condor
174    }
175}
176
177# The second of the three version numbers is even for a stable release.
178# See http://research.cs.wisc.edu/htcondor/version_number.html
179livecheck.regex     archive/V(\\d+_\\d*\[02468\]_\\d+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.