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

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

htcondor: Adjust blacklisting and UseTheRightCompiler

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.0 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 110657 2013-09-03 02:31:28Z jeremyhu@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    reinplace "s|g\+\+|${configure.cxx}|g" ${worksrcpath}/doc/makeman/Makefile
101}
102
103# makeman.C:182:26: error: no member named '_Ios_Fmtflags' in namespace 'std'
104compiler.blacklist      *clang*
105
106platform darwin {
107    if {${os.major} >= 13} {
108        depends_lib
109        depends_run
110        pre-fetch {
111            ui_error "$name does not build on Mavericks or later."
112            error "unsupported platform"
113        }
114    }
115}
116
117# FIXME: Globus support is disabled because Globus is not available in MacPorts.
118configure.args-append   -DWITH_GLOBUS:BOOL="0" -DBUILD_TESTING:BOOL="0"
119
120# Man pages are not part of the default build target.
121post-build {
122    system -W ${worksrcpath}/doc "make just-man-pages"
123}
124
125# These are empty directories that are needed by the personal Condor pool.
126destroot.keepdirs       ${destroot}${prefix}/etc/condor/config.d \
127                        ${destroot}${prefix}/var/lib/condor/execute \
128                        ${destroot}${prefix}/var/lib/condor/spool \
129                        ${destroot}${prefix}/var/log/condor
130
131# Condor installs some documentation into ${prefix}. Move them into
132# ${prefix}/share/doc/${name}.
133post-destroot {
134    # Move manpages into place.
135    eval xinstall [glob ${worksrcpath}/doc/man/man1/*] \
136        ${destroot}${prefix}/share/man/man1
137
138    # Remove SysV-init and Fedora-style service scripts.
139    # See https://htcondor-wiki.cs.wisc.edu/index.cgi/tktview?tn=3684
140    file delete ${destroot}${prefix}/etc/init.d/condor
141    file delete ${destroot}${prefix}/etc/sysconfig/condor
142
143    # Remove packaging scripts.
144    file delete ${destroot}${prefix}/sbin/condor_configure
145    file delete ${destroot}${prefix}/sbin/condor_install
146
147    # Move documentation into ${prefix}/share.
148    file mkdir ${destroot}${prefix}/share/doc/${name}
149    move \
150      ${destroot}${prefix}/examples \
151      ${destroot}${prefix}/LICENSE-2.0.txt \
152      ${destroot}${prefix}/README \
153      ${destroot}${prefix}/share/doc/${name}
154
155    # Move example configuration files from ${prefix}/etc to ${prefix}/share.
156    move \
157      ${destroot}${prefix}/etc/examples \
158      ${destroot}${prefix}/share/doc/${name}/examples/config
159
160    # If deploying a personal Condor pool, create all necessary directories.
161    if {[variant_isset personal]} {
162        xinstall -d ${destroot}${prefix}/etc/condor/config.d
163        xinstall ${filespath}/condor_config ${destroot}${prefix}/etc/condor
164        reinplace "s|@prefix@|${prefix}|g" ${destroot}${prefix}/etc/condor/condor_config
165        xinstall ${filespath}/condor_config.local ${destroot}${prefix}/etc/condor
166
167        xinstall -d ${destroot}${prefix}/var/lib
168        xinstall -d -o condor -g condor ${destroot}${prefix}/var/lib/condor/execute
169        xinstall -d -o condor -g condor ${destroot}${prefix}/var/lib/condor/spool
170        xinstall -d ${destroot}${prefix}/var/log
171        xinstall -d -o condor -g condor ${destroot}${prefix}/var/log/condor
172    }
173}
174
175# Override default GitHub livecheck because the HTCondor git repository has
176# thousands of tags, and GitHub has to paginate the tags.
177livecheck.type          regexm
178livecheck.url           ${homepage}/downloads/
179livecheck.version       ${version}
180livecheck.regex         {Current Developer Release</td>\s*<td [^>]*>([0-9]+(\.[0-9]+)+)}
Note: See TracBrowser for help on using the repository browser.