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

Last change on this file since 131565 was 131565, checked in by larryv@…, 4 years ago

htcondor: Cut back to +python{27,34} (#46405)

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