source: trunk/dports/science/htcondor/Portfile @ 109483

Last change on this file since 109483 was 109483, checked in by aronnax@…, 7 years ago

htcondor: update to 8.1.0

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