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: Portfile 69188 2010-06-27 23:48:17Z jmr@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup muniversal 1.0 |
---|
6 | |
---|
7 | name icu |
---|
8 | set my_name icu4c |
---|
9 | version 4.4.1 |
---|
10 | categories devel textproc |
---|
11 | platforms darwin freebsd |
---|
12 | maintainers nox openmaintainer |
---|
13 | description International Components for Unicode |
---|
14 | |
---|
15 | long_description \ |
---|
16 | The International Components for Unicode (ICU) libraries provide robust \ |
---|
17 | and full-featured Unicode services on a wide variety of platforms. ICU \ |
---|
18 | supports the most current version of the Unicode standard, and they provide \ |
---|
19 | support for supplementary Unicode characters (needed for GB 18030 repertoire support). |
---|
20 | |
---|
21 | homepage http://www.icu-project.org/ |
---|
22 | master_sites http://download.icu-project.org/files/${my_name}/${version}/ |
---|
23 | |
---|
24 | distname ${my_name}-[join [split ${version} .] _] |
---|
25 | extract.suffix .tgz |
---|
26 | distfiles ${distname}-src${extract.suffix} |
---|
27 | |
---|
28 | checksums ${distname}-src${extract.suffix} \ |
---|
29 | md5 b6bc0a1153540b2088f8b03e0ba625d3 \ |
---|
30 | sha1 0d011f7e1e042ec8e8833ac910056021d0924d91 \ |
---|
31 | rmd160 dae3634f7a1f9ce78e0b36c49503e5d3c43ebdc5 |
---|
32 | |
---|
33 | worksrcdir ${name}/source |
---|
34 | set docdir ${prefix}/share/doc/${name} |
---|
35 | |
---|
36 | patchfiles patch-configure.diff \ |
---|
37 | patch-config-mh-darwin.diff |
---|
38 | |
---|
39 | post-patch { |
---|
40 | reinplace "s;install_name ;install_name ${prefix}/lib/;" ${worksrcpath}/config/mh-darwin |
---|
41 | reinplace "s|`date`|[exec date]|g" ${worksrcpath}/Makefile.in |
---|
42 | } |
---|
43 | |
---|
44 | set platform [switch ${os.platform} {darwin {format MacOSX} freebsd {format FreeBSD}}] |
---|
45 | configure.cmd ./runConfigureICU ${platform} |
---|
46 | |
---|
47 | configure.args --mandir=${prefix}/share/man \ |
---|
48 | --enable-static \ |
---|
49 | --disable-samples |
---|
50 | |
---|
51 | configure.universal_args-delete --disable-dependency-tracking |
---|
52 | |
---|
53 | # Fix bug #11981 that prevents ICU from building when upgrading. |
---|
54 | # The default configure flags causes utilisation of outdated ICU |
---|
55 | # headers/libs instead of the right ones. |
---|
56 | configure.cppflags |
---|
57 | configure.ldflags |
---|
58 | |
---|
59 | # Disable ccache, #23931 |
---|
60 | configure.ccache no |
---|
61 | |
---|
62 | build.type gnu |
---|
63 | |
---|
64 | use_parallel_build yes |
---|
65 | |
---|
66 | test.run yes |
---|
67 | test.target check |
---|
68 | |
---|
69 | post-build { |
---|
70 | if {[variant_isset universal]} { |
---|
71 | set dirs {} |
---|
72 | foreach arch ${universal_archs_to_use} { |
---|
73 | lappend dirs ${worksrcpath}-${arch} |
---|
74 | } |
---|
75 | } else { |
---|
76 | set dirs ${worksrcpath} |
---|
77 | } |
---|
78 | foreach dir ${dirs} { |
---|
79 | reinplace -E {s|-arch [a-z0-9_]+||g} \ |
---|
80 | ${dir}/config/icu-config \ |
---|
81 | ${dir}/config/Makefile.inc \ |
---|
82 | ${dir}/config/pkgdata.inc |
---|
83 | } |
---|
84 | } |
---|
85 | |
---|
86 | post-destroot { |
---|
87 | xinstall -d ${destroot}${docdir} |
---|
88 | xinstall -m 0644 -W ${worksrcpath}/.. readme.html ${destroot}${docdir} |
---|
89 | } |
---|
90 | |
---|
91 | variant doc description {Install extra documentation} { |
---|
92 | depends_extract-append bin:unzip:unzip |
---|
93 | extract.only ${distname}-src${extract.suffix} |
---|
94 | distfiles-append ${distname}-docs.zip |
---|
95 | checksums-append ${distname}-docs.zip \ |
---|
96 | md5 f40fae4435c8cb13b02b4d7907ae47bc \ |
---|
97 | sha1 1bfe471824706e92af106dc690955357bc632021 \ |
---|
98 | rmd160 2ab9d76d621149fc36c161859bc7d240022e280c |
---|
99 | |
---|
100 | post-extract { |
---|
101 | system "unzip -q ${distpath}/${distname}-docs.zip -d ${workpath}/doc" |
---|
102 | } |
---|
103 | |
---|
104 | post-destroot { |
---|
105 | eval xinstall -m 0644 [glob ${workpath}/doc/*.{css,gif,html,png}] ${destroot}${docdir} |
---|
106 | } |
---|
107 | } |
---|
108 | |
---|
109 | platform freebsd { |
---|
110 | build.env MAKE=/usr/local/bin/gmake |
---|
111 | destroot.env MAKE=/usr/local/bin/gmake |
---|
112 | } |
---|
113 | |
---|
114 | livecheck.url http://icu-project.org/download/ |
---|
115 | livecheck.regex {\((\d+(?:\.\d+)*)\)</a>} |
---|