# -*- 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
PortGroup compiler_blacklist_versions 1.0
PortGroup clang_dependency 1.0
maintainers {ryandesign @ryandesign}
# libs are LGPL and executables are GPL
license {LGPL-2.1+ GPL-3+}
homepage https://www.gnu.org/software/gettext/
platforms darwin freebsd linux
description GNU internationalization (i18n) and localization (l10n) library
long_description ${name} is the ${description}, used for writing multilingual programs.
checksums rmd160 29a5f29d186fe2aece5c450fd1a743b819c02c5b \
sha256 ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43
# https://trac.macports.org/ticket/58323
patchfiles write-java.c.patch
# https://trac.macports.org/ticket/31167
compiler.blacklist-append {clang < 211.10.1}
set localbindir ${workpath}/bin
file mkdir ${localbindir}
# Don't find any Java programs.
foreach prog {gcj java javac jikes} {
set fp [open ${localbindir}/${prog} w]
file attributes ${localbindir}/${prog} -permissions a+x
depends_lib port:libiconv \
configure.cppflags -no-cpp-precomp
# This port is used by clang-3.4 to bootstrap libcxx
subport ${name}-bootstrap {
set myprefix ${prefix}/libexec/libcxx-bootstrap
configure.pre_args --prefix=${myprefix}
depends_lib-replace port:libiconv port:libiconv-bootstrap \
port:ncurses port:ncurses-bootstrap
set mypath ${myprefix}/bin:$env(PATH)
build.env-append PATH=${mypath}
configure.cppflags-prepend -I${myprefix}/include
configure.ldflags-prepend -L${myprefix}/lib
configure.cxx_stdlib libstdc++
compiler.whitelist clang llvm-gcc-4.2 gcc-4.2 apple-gcc-4.2
# Also needed by later clangs.
if {${os.platform} eq "darwin" && ${os.major} < 11 && ${cxx_stdlib} eq "libc++"} {
clang_dependency.extra_versions 3.7
configure.env-append PATH=${localbindir}:${mypath}
configure.args ac_cv_prog_AWK=/usr/bin/awk \
ac_cv_path_GREP=/usr/bin/grep \
ac_cv_path_SED=/usr/bin/sed \
--with-included-gettext \
--with-included-libcroco \
--with-included-libunistring \
# Don't use possibly installed cvs or git to create the autopoint archive