source: trunk/dports/devel/ace/Portfile

Last change on this file was 140604, checked in by ryandesign@…, 22 months ago

ace: update to 6.3.3 (#48902; maintainer)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.9 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 140604 2015-09-27 03:29:51Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                ace
7set name_package    ACE
8version             6.3.3
9distname            ${name_package}-${version}
10categories          devel
11maintainers         gmail.com:tlockhart1976 openmaintainer
12platforms           darwin
13license             BSD
14description         ACE is an object-oriented framework that implements many core patterns for \
15                    concurrent communication software.
16long_description    The ADAPTIVE Communication Environment (ACE) is a freely available, \
17                    open-source object-oriented (OO) framework that implements many core \
18                    patterns for concurrent communication software. ACE provides a rich set \
19                    of reusable C++ wrapper facades and framework components that perform \
20                    common communication software tasks across a range of OS platforms. The \
21                    communication software tasks provided by ACE include event \
22                    demultiplexing and event handler dispatching, signal handling, service \
23                    initialization, interprocess communication, shared memory management, \
24                    message routing, dynamic (re)configuration of distributed services, \
25                    concurrent execution and synchronization.
26
27conflicts           tao
28
29homepage            http://www.cs.wustl.edu/~schmidt/ACE.html
30master_sites        http://download.dre.vanderbilt.edu/previous_versions
31
32universal_variant   yes
33
34use_bzip2           yes
35
36worksrcdir          ACE_wrappers
37
38patch.pre_args      -p1
39patchfiles          patch-ace-config.h.diff \
40                    patch-include-makeinclude-platform_macros.GNU.diff
41
42checksums           rmd160  01e77b057b9533fb61d05185bda03a8e019c949f \
43                    sha256  f362e45f624db3343db529654b601d5df69b5f56fa4597cf453da35d80989888
44
45set os.name "mavericks"
46array set os.names {
47     7  panther
48     8  tiger
49     9  leopard
50    10  snowleopard
51    11  lion
52    12  mountainlion
53    13  mavericks
54}
55foreach {key value} [array get os.names]  {
56    if {${key} == ${os.major}} {
57        set os.name ${value}
58    }
59}
60
61set libenv          DYLD_LIBRARY_PATH=${worksrcpath}/lib
62set aceenv          ACE_ROOT=${worksrcpath}
63set makearg         INSTALL_PREFIX=${prefix}
64# omit examples and test programs to cut build time by 60%
65# set subdirs         { . }
66set subdirs         { ace ACEXML ASNMP Kokyu apps netsvcs }
67
68post-patch {
69    reinplace "s|@MACOSX@|${os.name}|g" \
70        ${worksrcpath}/ace/config.h \
71        ${worksrcpath}/include/makeinclude/platform_macros.GNU
72    # disable the assignment for compilers in lion and use our environment instead
73    ui_info "patching platform_macosx_lion.GNU"
74    reinplace "s|^\\(CXX:=.*\\)|# \\1|g" \
75        ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU
76    reinplace "s|^\\(CC:=.*\\)|# \\1|g" \
77        ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU
78}
79
80depends_lib-append  path:bin/perl:perl5
81
82proc setuniversalflags {fname cxxflags ldflags} {
83    set apat "-arch \[ \]*\[a-z\]\[_a-z0-9\]*"
84    if {[file exists ${fname}]} {
85        reinplace "s|^\\(\[ \]*FLAGS_C_CC\[ \]*+=\[ \]*\\)${apat}\\(\[ \]*${apat}\\)*|\\1${cxxflags}|g" \
86            ${fname}
87        reinplace "s|^\\(\[ \]*LDFLAGS\[ \]*+=\[ \]*\\)${apat}\\(\[ \]*${apat}\\)*|\\1${ldflags}|g" \
88            ${fname}
89    } else {
90        ui_warn "File ${fname} not found for patching"
91    }
92}
93
94variant universal {
95    post-patch {
96        ui_info "patching platform_macros.GNU"
97        reinplace "s|buildbits=64|buildbits=universal|g" \
98            ${worksrcpath}/include/makeinclude/platform_macros.GNU
99        setuniversalflags ${worksrcpath}/include/makeinclude/platform_macosx_${os.name}.GNU \
100            ${configure.universal_cxxflags} ${configure.universal_ldflags}
101    }
102}
103
104variant ssl description {Enable SSL} {
105    depends_lib-append path:lib/libssl.dylib:openssl
106
107    post-patch {
108        reinplace "s|ssl=0|ssl=1|g" \
109            ${worksrcpath}/include/makeinclude/platform_macros.GNU
110    }
111}
112
113use_configure       no
114
115use_parallel_build  no
116
117build.env           "${libenv} ${aceenv}"
118build.args-append   CC=${configure.cc} \
119                    CXX=${configure.cxx} \
120                    CPP=${configure.cpp}
121build.pre_args      ${makearg} all
122build {
123    foreach {subdir} $subdirs {
124        build.dir ${worksrcpath}/${subdir}
125        command_exec build
126    }
127}
128
129destroot.env        "${libenv} ${aceenv}"
130destroot.args-append CC=${configure.cc} \
131                    CXX=${configure.cxx} \
132                    CPP=${configure.cpp}
133destroot.pre_args   ${makearg} install
134destroot {
135    foreach {subdir} $subdirs {
136        destroot.dir ${worksrcpath}/${subdir}
137        command_exec destroot
138    }
139}
140
141livecheck.url       ${master_sites}
142livecheck.regex     ${name_package}-(\\d+\[0-9a-z.\]*)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.