source: trunk/dports/devel/icu/Portfile @ 69188

Last change on this file since 69188 was 69188, checked in by jmr@…, 7 years ago

icu: fix checksums line (#25446), remove use of private suffix proc, add unzip extract dep for docs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
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.3.4
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     9736a1e69bce0e5322af6986008d89bc \
30                    sha1    99c95f924f82b48c97f9e1e57ea2568cef22d6ef \
31                    rmd160  2c1a42379a6d14bea2ac1585532e3a7b8a4fe836
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     df164cba867cd293c4041352496537fa \
97                    sha1    1ec70bb0bdb101d569cc3f164ba3dfa5a62e2fe4 \
98                    rmd160  0f7f479197e1bf1993d6369e859388ade239a112
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/latest_milestone.html
115livecheck.regex {\((\d+(?:\.\d+)*)\)</title>}
Note: See TracBrowser for help on using the repository browser.