source: trunk/dports/textproc/libiconv/Portfile

Last change on this file was 124169, checked in by ryandesign@…, 3 years ago

libiconv: fix livecheck

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 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 124169 2014-08-20 03:15:27Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               muniversal 1.0
6
7name                    libiconv
8version                 1.14
9set cp932fix_version    1.13
10set cp932fix_patchfile  ${name}-${cp932fix_version}-cp932-devel.patch.gz
11categories              textproc
12license                 {LGPL-2+ GPL-3+}
13maintainers             ryandesign
14platforms               darwin freebsd linux
15homepage                http://www.gnu.org/software/libiconv/
16master_sites            gnu
17patch_sites             http://www2d.biglobe.ne.jp/~msyk/software/libiconv/
18use_parallel_build      yes
19
20description \
21    Character set conversion library
22
23long_description \
24    A character-set conversion library which implements the \
25    iconv() API for dealing with unicode and other types of \
26    conversion.
27
28checksums               ${distname}${extract.suffix} \
29                        sha1    be7d67e50d72ff067b2c0291311bc283add36965 \
30                        rmd160  87c36ba3f8ad1a49eb0d06f71856c856893bb52e \
31                        ${cp932fix_patchfile} \
32                        sha1    8384da4114d62018b6bed2d8973237a423c1cbf1 \
33                        rmd160  62852bd1cd22f0be0280c4f64bd6d256b4b00917
34
35depends_build           port:gperf
36
37# Use -p1 to accommodate the cp932fix patch
38patch.pre_args -p1
39patchfiles \
40    patch-src-Makefile.in-darwin.diff \
41    patch-c99.diff
42
43configure.cppflags
44configure.ldflags
45configure.args \
46    ac_cv_prog_AWK=/usr/bin/awk \
47    ac_cv_path_GREP=/usr/bin/grep \
48    ac_cv_path_SED=/usr/bin/sed \
49    --enable-static \
50    --docdir=${prefix}/share/doc/${name} \
51    --without-libiconv-prefix \
52    --without-libintl-prefix \
53    --disable-nls \
54    --enable-extra-encodings
55
56build.cmd               ${build.cmd} CC=${configure.cc} -f Makefile.devel && ${build.cmd}
57
58test.run                yes
59test.target             check
60
61platform darwin {
62    patchfiles-append patch-utf8mac.diff
63}
64
65platform freebsd {
66    patchfiles-append patch-Makefile.devel
67}
68
69post-destroot {
70    if {[file exists ${destroot}${prefix}/lib/charset.alias]} {
71        delete ${destroot}${prefix}/lib/charset.alias
72    }
73}
74
75variant enable_cp932fix requires cp932fix description {Legacy compatibility variant} {}
76
77variant cp932fix description {Apply a patch to fix the conversion problem between Shift-JIS and Unicode (See Microsoft KB Q170559)} {
78    patchfiles-append ${cp932fix_patchfile}
79}
80
81if { [variant_isset universal] } {
82    # When cross-compiling, can guess wrong endian value.
83    if {${os.arch} eq "i386"} {
84        if { ${os.major} >= 10 } {
85            lappend merger_configure_env(ppc) cl_cv_sys_endian='big endian'
86            set cross_archs "ppc ppc64"
87        }
88        lappend merger_configure_env(ppc64)   cl_cv_sys_endian='big endian'
89        set cross_archs "ppc64"
90    } else {
91        lappend merger_configure_env(i386)    cl_cv_sys_endian='little endian'
92        lappend merger_configure_env(x86_64)  cl_cv_sys_endian='little endian'
93        set cross_archs "i386 x86_64"
94    }
95
96    foreach arch ${cross_archs} {
97        lappend merger_configure_env(${arch}) \
98            ac_cv_func_malloc_0_nonnull='yes' \
99            gl_cv_func_malloc_0_nonnull='1'
100    }
101
102    # See https://trac.macports.org/ticket/18440
103    if {${os.major} == 8} {
104            foreach arch "ppc64 x86_64" {
105                lappend merger_configure_env(${arch}) \
106                    am_cv_func_iconv='yes' \
107                    am_cv_proto_iconv_arg1='const'
108        }
109    }
110}
Note: See TracBrowser for help on using the repository browser.