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

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

htcondor: update to 8.1.1 and fix build on Mavericks

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.9 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 112613 2013-10-28 03:02:40Z 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_1 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 +python27
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
42set pythons_suffixes {25 26 27 31 32 33}
43
44set pythons_ports {}
45foreach s ${pythons_suffixes} {
46    lappend pythons_ports python${s}
47}
48
49conflicts_build     ${name}
50
51configure.args-append   -DWITH_PYTHON_BINDINGS:BOOL="0"
52
53foreach s ${pythons_suffixes} {
54    set p python${s}
55    set v [string index ${s} 0].[string index ${s} 1]
56    set i [lsearch -exact ${pythons_ports} ${p}]
57    set c [lreplace ${pythons_ports} ${i} ${i}]
58    set d ${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}
59    eval [subst {
60        variant ${p} description "Enable Python interface for Python ${v}" conflicts ${c} {
61
62            depends_lib-append      port:${p}
63            require_active_variants boost ${p}
64            configure.args-append   -DC_PYTHONARCHLIB:PATH="${d}/site-packages"
65            configure.args-strsed   s/-DWITH_PYTHON_BINDINGS:BOOL="0"/-DWITH_PYTHON_BINDINGS:BOOL="1"/
66
67            post-patch {
68                reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/src/condor_utils/condor_config.cpp
69                reinplace "s|@c_pythonarchlib@|${d}/site-packages|g" ${worksrcpath}/build/cmake/CondorPackageConfig.cmake
70            }
71
72        }
73    }]
74}
75
76checksums               rmd160  87af615b5a2a5b347f281ddc06e508be94681766 \
77                        sha256  6b299e52368de505e3391d72ef5482550103bc36f7f526da33d52303d8a9233e
78
79depends_build-append    port:latex2html
80
81depends_lib-append      port:boost \
82                        port:expat \
83                        port:kerberos5 \
84                        port:openssl \
85                        port:pcre
86
87license_noconflict      latex2html
88
89# FIXME: For some reason, Condor uses install_name_tool to have dynamic links
90# point to @executable_path/../lib/condor/libexpat.1.dylib, etc, instead of
91# @executable_path/../lib/libexpat.1.dylib, etc. Why?
92patchfiles              patch-src-condor_scripts-macosx_rewrite_libs.diff \
93                        patch-src-condor_utils-condor_config.cpp.diff \
94                        patch-src-python-bindings-CMakeLists.txt.diff \
95                        patch-build-cmake-CondorPackageConfig.cmake.diff
96
97# makeman.C:182:26: error: no member named '_Ios_Fmtflags' in namespace 'std'
98patchfiles-append       patch-doc-makeman-makeman.C.diff
99
100# ar: -lc++: No such file or directory
101if {${os.major} >= 13} {
102    patchfiles-append   patch-build-cmake-CondorConfigure.cmake.diff
103}
104
105post-patch {
106    reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/src/condor_utils/condor_config.cpp
107    reinplace "s|g\+\+|${configure.cxx}|g" ${worksrcpath}/doc/makeman/Makefile
108}
109
110# FIXME: Globus support is disabled because Globus is not available in MacPorts.
111configure.args-append   -DWITH_GLOBUS:BOOL="0" -DBUILD_TESTING:BOOL="0"
112
113# Man pages are not part of the default build target.
114post-build {
115    system -W ${worksrcpath}/doc "make just-man-pages"
116}
117
118# These are empty directories that are needed by the personal Condor pool.
119destroot.keepdirs       ${destroot}${prefix}/etc/condor/config.d \
120                        ${destroot}${prefix}/var/lib/condor/execute \
121                        ${destroot}${prefix}/var/lib/condor/spool \
122                        ${destroot}${prefix}/var/log/condor
123
124# Condor installs some documentation into ${prefix}. Move them into
125# ${prefix}/share/doc/${name}.
126post-destroot {
127    # Move manpages into place.
128    eval xinstall [glob ${worksrcpath}/doc/man/man1/*] \
129        ${destroot}${prefix}/share/man/man1
130
131    # Remove SysV-init and Fedora-style service scripts.
132    # See https://htcondor-wiki.cs.wisc.edu/index.cgi/tktview?tn=3684
133    file delete ${destroot}${prefix}/etc/init.d/condor
134    file delete ${destroot}${prefix}/etc/sysconfig/condor
135
136    # Remove packaging scripts.
137    file delete ${destroot}${prefix}/sbin/condor_configure
138    file delete ${destroot}${prefix}/sbin/condor_install
139
140    # Move documentation into ${prefix}/share.
141    file mkdir ${destroot}${prefix}/share/doc/${name}
142    move \
143      ${destroot}${prefix}/examples \
144      ${destroot}${prefix}/LICENSE-2.0.txt \
145      ${destroot}${prefix}/README \
146      ${destroot}${prefix}/share/doc/${name}
147
148    # Move example configuration files from ${prefix}/etc to ${prefix}/share.
149    move \
150      ${destroot}${prefix}/etc/examples \
151      ${destroot}${prefix}/share/doc/${name}/examples/config
152
153    # If deploying a personal Condor pool, create all necessary directories.
154    if {[variant_isset personal]} {
155        xinstall -d ${destroot}${prefix}/etc/condor/config.d
156        xinstall ${filespath}/condor_config ${destroot}${prefix}/etc/condor
157        reinplace "s|@prefix@|${prefix}|g" ${destroot}${prefix}/etc/condor/condor_config
158        xinstall ${filespath}/condor_config.local ${destroot}${prefix}/etc/condor
159
160        xinstall -d ${destroot}${prefix}/var/lib
161        xinstall -d -o condor -g condor ${destroot}${prefix}/var/lib/condor/execute
162        xinstall -d -o condor -g condor ${destroot}${prefix}/var/lib/condor/spool
163        xinstall -d ${destroot}${prefix}/var/log
164        xinstall -d -o condor -g condor ${destroot}${prefix}/var/log/condor
165    }
166}
167
168# Override default GitHub livecheck because the HTCondor git repository has
169# thousands of tags, and GitHub has to paginate the tags.
170livecheck.type          regexm
171livecheck.url           ${homepage}/downloads/
172livecheck.version       ${version}
173livecheck.regex         {Current Developer Release</td>\s*<td [^>]*>([0-9]+(\.[0-9]+)+)}
Note: See TracBrowser for help on using the repository browser.