# $Id$ PortSystem 1.0 PortGroup muniversal 1.0 name libiconv version 1.13 categories textproc maintainers ryandesign platforms darwin freebsd linux homepage http://www.gnu.org/software/libiconv/ distfiles ${distname}${extract.suffix}:gnu extract.only ${distname}${extract.suffix} use_parallel_build yes master_sites \ gnu::gnu \ http://www2d.biglobe.ne.jp/~msyk/software/libiconv/:cp932fix description \ Character set conversion library long_description \ A character-set conversion library which implements the \ iconv() API for dealing with unicode and other types of \ conversion. checksums \ ${distname}${extract.suffix} \ md5 048032a3032ebd182150bdee30a5d533 \ sha1 10e5f7d26a59430a9a88a3d0b557634e6f72c859 \ rmd160 695b90c0830ee457213a9b46ae7da70f2e962c43 \ ${distname}-cp932-devel.patch.gz \ md5 07610e708d664627b83f905832f671d4 \ sha1 8384da4114d62018b6bed2d8973237a423c1cbf1 \ rmd160 62852bd1cd22f0be0280c4f64bd6d256b4b00917 depends_build \ port:gperf patchfiles \ patch-utf8mac.diff \ patch-src-Makefile.in-darwin.diff configure.cppflags configure.ldflags configure.args \ --enable-static \ --mandir=${prefix}/share/man \ --docdir=${prefix}/share/doc/${name}-${version} \ --without-libiconv-prefix \ --without-libintl-prefix \ --disable-nls \ --enable-extra-encodings if {![variant_isset disable_utf8mac] || [variant_isset enable_cp932fix]} { build.cmd ${build.cmd} CC=${configure.cc} -f Makefile.devel && ${build.cmd} } test.run yes test.target check platform freebsd { patchfiles-append patch-Makefile.devel pre-fetch { variant_set disable_utf8mac } } platform linux { pre-fetch { variant_set disable_utf8mac } } post-destroot { if {[file exists ${destroot}${prefix}/lib/charset.alias]} { delete ${destroot}${prefix}/lib/charset.alias } } # Do not support UTF-8-MAC encoding variant disable_utf8mac { patchfiles-delete patch-utf8mac.diff } # Apply a patch to fix the conversion problem between Shift-JIS and Unicode (See Microsoft KB Q170559) variant enable_cp932fix { distfiles-append ${distname}-cp932-devel.patch.gz:cp932fix post-patch { system "cd ${worksrcpath} && gzip -dc '${distpath}/${distname}-cp932-devel.patch.gz' | patch -p1" } } if { [variant_isset universal] } { # When cross-compiling, can guess wrong endian value. if { ${os.arch}=="i386" } { if { ${os.major} >= 10 } { lappend merger_configure_env(ppc) cl_cv_sys_endian='big endian' set cross_archs "ppc ppc64" } lappend merger_configure_env(ppc64) cl_cv_sys_endian='big endian' set cross_archs "ppc64" } else { lappend merger_configure_env(i386) cl_cv_sys_endian='little endian' lappend merger_configure_env(x86_64) cl_cv_sys_endian='little endian' set cross_archs "i386 x86_64" } foreach arch ${cross_archs} { lappend merger_configure_env(${arch}) \ ac_cv_func_malloc_0_nonnull='yes' \ gl_cv_func_malloc_0_nonnull='1' } # See http://trac.macports.org/ticket/18440. if { ${os.major}=="8" } { foreach arch "ppc64 x86_64" { lappend merger_configure_env(${arch}) \ am_cv_func_iconv='yes' \ am_cv_proto_iconv_arg1='const' } } } livecheck.check freshmeat