1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name poco |
---|
7 | version 1.3.6p2 |
---|
8 | categories devel |
---|
9 | maintainers nox openmaintainer |
---|
10 | platforms darwin |
---|
11 | description POCO C++ Libraries |
---|
12 | |
---|
13 | long_description \ |
---|
14 | POCO aims to be for network-centric, cross-platform C++ software development \ |
---|
15 | what Apple's Cocoa is for Mac development, or Ruby on Rails is for Web \ |
---|
16 | development -- a powerful, yet easy to use platform to build your applications upon. |
---|
17 | |
---|
18 | homepage http://pocoproject.org/ |
---|
19 | master_sites sourceforge |
---|
20 | distname ${name}-${version}-all |
---|
21 | set docdistname ${name}-[strsed ${version} {s/[a-z].*$//}]-doc |
---|
22 | |
---|
23 | checksums [suffix ${distname}] \ |
---|
24 | md5 6adfe63f119f0d5bd07898881cf74713 \ |
---|
25 | sha1 44f7e4f412eb7f425a4a88f264c03c257411aa18 \ |
---|
26 | rmd160 4811b8704f1de15b18fd8924caa0e7eac956b202 \ |
---|
27 | ${docdistname}.zip \ |
---|
28 | md5 e58b517c08661000581f732c24fd0a8f \ |
---|
29 | sha1 8356abfb11fc2694fa46d2c93e9b7dce75bd9371 \ |
---|
30 | rmd160 471ad082126dbe0d40494a7b2bce1dbeaac83b78 |
---|
31 | |
---|
32 | set config Darwin |
---|
33 | set omit {NetSSL_OpenSSL Data/ODBC Data/MySQL Crypto} |
---|
34 | |
---|
35 | configure.args --no-samples |
---|
36 | |
---|
37 | pre-configure { |
---|
38 | configure.args-append --omit=[join ${omit} ,] |
---|
39 | |
---|
40 | reinplace -E "/^C(XX)?FLAGS +=/s|\$| ${configure.cppflags} ${configure.cflags}|" \ |
---|
41 | ${worksrcpath}/build/config/${config} |
---|
42 | reinplace -E "/^((SH|DY)LIB|LINKFLAGS) +=/s|\$| -L\$(LIBPATH) ${configure.ldflags}|" \ |
---|
43 | ${worksrcpath}/build/config/${config} |
---|
44 | } |
---|
45 | |
---|
46 | use_parallel_build yes |
---|
47 | |
---|
48 | build.target poco |
---|
49 | |
---|
50 | test.run yes |
---|
51 | |
---|
52 | test { |
---|
53 | proc luniq {list} { |
---|
54 | set x() {}; unset x |
---|
55 | foreach {item} ${list} { |
---|
56 | set x(${item}) "" |
---|
57 | } |
---|
58 | return [array names x] |
---|
59 | } |
---|
60 | |
---|
61 | set file [open ${worksrcpath}/components] |
---|
62 | |
---|
63 | set components {} |
---|
64 | while {[gets ${file} component] != -1} { |
---|
65 | lappend components ${component} |
---|
66 | } |
---|
67 | |
---|
68 | close ${file} |
---|
69 | |
---|
70 | foreach {component} [luniq ${components}] { |
---|
71 | foreach {testrunner} [glob -nocomplain ${worksrcpath}/${component}/testsuite/bin/*/*/testrunner{,d}] { |
---|
72 | catch {system "${testrunner} -all -print"} |
---|
73 | } |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | set docdir ${prefix}/share/doc/${name}-${version} |
---|
78 | |
---|
79 | post-destroot { |
---|
80 | xinstall -d ${destroot}${docdir} |
---|
81 | xinstall -m 0644 -W ${worksrcpath} CHANGELOG CONTRIBUTORS LICENSE NEWS README VERSION \ |
---|
82 | ${destroot}${docdir} |
---|
83 | |
---|
84 | if {![variant_isset doc]} { |
---|
85 | xinstall -d ${destroot}${docdir}/html |
---|
86 | xinstall -m 0644 -W ${worksrcpath}/doc Acknowledgements.html ${destroot}${docdir}/html |
---|
87 | } |
---|
88 | |
---|
89 | set libdir ${prefix}/lib |
---|
90 | |
---|
91 | foreach {dylib} [glob -types f -tails -directory ${destroot}${libdir} *.dylib] { |
---|
92 | system "install_name_tool -id ${libdir}/${dylib} ${destroot}${libdir}/${dylib}" |
---|
93 | |
---|
94 | set otool [lrange [split [exec otool -L ${destroot}${libdir}/${dylib}] \n] 2 end] |
---|
95 | |
---|
96 | foreach {otoolentry} ${otool} { |
---|
97 | set lib [lindex ${otoolentry} 0] |
---|
98 | |
---|
99 | if {! [string match ${worksrcpath}/* ${lib}]} { |
---|
100 | continue |
---|
101 | } |
---|
102 | |
---|
103 | system "install_name_tool -change ${lib} ${libdir}/[file tail ${lib}] \ |
---|
104 | ${destroot}${libdir}/${dylib}" |
---|
105 | } |
---|
106 | } |
---|
107 | } |
---|
108 | |
---|
109 | variant ssl description {Build NetSSL and Crypto library} { |
---|
110 | depends_lib-append port:openssl |
---|
111 | set omit [ldelete [ldelete ${omit} NetSSL_OpenSSL] Crypto] |
---|
112 | } |
---|
113 | |
---|
114 | variant odbc description {Build ODBC backend for Data library} { |
---|
115 | depends_lib-append lib:libiodbc:unixODBC |
---|
116 | set omit [ldelete ${omit} Data/ODBC] |
---|
117 | } |
---|
118 | |
---|
119 | variant mysql description {Build MySQL backend for Data library} { |
---|
120 | depends_lib-append path:bin/mysql_config5:mysql5 |
---|
121 | |
---|
122 | post-configure { |
---|
123 | reinplace -E "/^C(XX)?FLAGS +=/s|\$| -I${prefix}/include/mysql5/mysql|" \ |
---|
124 | ${worksrcpath}/build/config/${config} |
---|
125 | reinplace -E "/^((SH|DY)LIB|LINKFLAGS) +=/s|\$| -L${prefix}/lib/mysql5/mysql|" \ |
---|
126 | ${worksrcpath}/build/config/${config} |
---|
127 | } |
---|
128 | |
---|
129 | set omit [ldelete ${omit} Data/MySQL] |
---|
130 | } |
---|
131 | |
---|
132 | variant doc description {Install extra documentation} { |
---|
133 | extract.only ${distfiles} |
---|
134 | distfiles-append ${docdistname}.zip |
---|
135 | |
---|
136 | post-extract { |
---|
137 | system "unzip ${distpath}/${docdistname}.zip -d ${workpath}" |
---|
138 | } |
---|
139 | |
---|
140 | post-destroot { |
---|
141 | set workdocpath ${workpath}/${docdistname} |
---|
142 | |
---|
143 | xinstall -d ${destroot}${docdir}/html/CppUnit |
---|
144 | eval xinstall -m 0644 [glob -directory ${workdocpath} *.html] ${destroot}${docdir}/html |
---|
145 | eval xinstall -m 0644 [glob -directory ${worksrcpath}/CppUnit/doc *] ${destroot}${docdir}/html/CppUnit |
---|
146 | |
---|
147 | foreach {dir} {images css} { |
---|
148 | xinstall -d ${destroot}${docdir}/html/${dir} |
---|
149 | eval xinstall -m 0644 [glob -directory ${workdocpath}/${dir} *] ${destroot}${docdir}/html/${dir} |
---|
150 | } |
---|
151 | } |
---|
152 | } |
---|
153 | |
---|
154 | livecheck.regex "<title>sources ${name}-(.*) released.*</title>" |
---|