Ticket #26044: Portfile

File Portfile, 3.7 KB (added by manphiz@…, 14 years ago)

Portfile for icu 4.4.1

Line 
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
4PortSystem      1.0
5PortGroup       muniversal 1.0
6
7name            icu
8set my_name     icu4c
9version         4.4.1
10categories      devel textproc
11platforms       darwin freebsd
12maintainers     nox openmaintainer
13description     International Components for Unicode
14
15long_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
21homepage        http://www.icu-project.org/
22master_sites    http://download.icu-project.org/files/${my_name}/${version}/
23
24distname        ${my_name}-[join [split ${version} .] _]
25extract.suffix  .tgz
26distfiles       ${distname}-src${extract.suffix}
27
28checksums       ${distname}-src${extract.suffix} \
29                    md5     b6bc0a1153540b2088f8b03e0ba625d3 \
30                    sha1    0d011f7e1e042ec8e8833ac910056021d0924d91 \
31                    rmd160  dae3634f7a1f9ce78e0b36c49503e5d3c43ebdc5
32
33worksrcdir      ${name}/source
34set docdir      ${prefix}/share/doc/${name}
35
36patchfiles      patch-configure.diff \
37                patch-config-mh-darwin.diff
38
39post-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
44set platform [switch ${os.platform} {darwin {format MacOSX} freebsd {format FreeBSD}}]
45configure.cmd   ./runConfigureICU ${platform}
46
47configure.args  --mandir=${prefix}/share/man \
48                --enable-static \
49                --disable-samples
50
51configure.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.
56configure.cppflags
57configure.ldflags
58
59# Disable ccache, #23931
60configure.ccache no
61
62build.type      gnu
63
64use_parallel_build  yes
65
66test.run        yes
67test.target     check
68
69post-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
86post-destroot {
87    xinstall -d ${destroot}${docdir}
88    xinstall -m 0644 -W ${worksrcpath}/.. readme.html ${destroot}${docdir}
89}
90
91variant 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
109platform freebsd {
110    build.env       MAKE=/usr/local/bin/gmake
111    destroot.env    MAKE=/usr/local/bin/gmake
112}
113
114livecheck.url   http://icu-project.org/download/
115livecheck.regex {\((\d+(?:\.\d+)*)\)</a>}