# -*- 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 PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup muniversal 1.0 PortGroup clang_dependency 1.0 name gettext version 0.21.1 checksums rmd160 fbdfec7f0be090da26f9864be03c4565a3dc0d6a \ sha256 e8c3650e1d8cee875c4f355642382c1df83058bd5a11ee8555c0cf276d646d45 \ size 25248473 categories devel maintainers {ryandesign @ryandesign} homepage https://www.gnu.org/software/gettext/ master_sites gnu platforms darwin freebsd linux use_parallel_build yes # https://trac.macports.org/ticket/31167 compiler.blacklist-append {clang < 211.10.1} if {${subport} in "${name} ${name}-tools-libs"} { # https://savannah.gnu.org/bugs/?63866 compiler.blacklist-append {clang >= 600 < 700} } # Also needed by later clangs. if {${os.platform} eq "darwin" && ${os.major} < 11 && ${cxx_stdlib} eq "libc++"} { clang_dependency.extra_versions 3.7 } patch.dir ${worksrcpath} configure.args-append ac_cv_prog_AWK=/usr/bin/awk \ ac_cv_path_GMSGFMT=: \ ac_cv_path_GREP=/usr/bin/grep \ ac_cv_path_MSGFMT=: \ ac_cv_path_MSGMERGE=: \ ac_cv_path_SED=/usr/bin/sed \ ac_cv_path_XGETTEXT=: \ --disable-csharp configure.checks.implicit_function_declaration.whitelist-append strchr if {${os.platform} eq "darwin" && ${os.major} < 10} { # See: https://trac.macports.org/ticket/62994 configure.args-append gl_cv_func_getcwd_path_max=yes } if {${subport} in "${name} ${name}-runtime ${name}-tools-libs"} { set localbindir ${workpath}/bin post-patch { file mkdir ${localbindir} # Don't find any Java programs. foreach prog {gcj java javac jikes} { set fp [open ${localbindir}/${prog} w] puts ${fp} {#!/bin/sh} puts ${fp} {exit 1} close ${fp} file attributes ${localbindir}/${prog} -permissions a+x } } configure.env-append \ PATH=${localbindir}:$env(PATH) configure.args-append \ --disable-java } test.run yes test.target check subport libasprintf { revision 0 license LGPL-2.1+ description autosprintf library, part of gettext long_description ${subport} makes the C formatted output \ routines (fprintf et al.) usable in C++ \ programs, for use with strings \ and streams. This library is \ part of gettext. worksrcdir ${distname}/${name}-runtime/${subport} } subport libtextstyle { revision 0 license GPL-3+ description a text styling library, part of gettext long_description ${subport} provides an easy way to add styling \ to programs that produce output to a console or \ terminal emulator window. This library is part \ of gettext and a prerequisite for tools like \ msgfmt and friends. worksrcdir ${distname}/${subport} depends_lib-append port:libiconv \ port:ncurses } subport ${name}-runtime { revision 0 # libintl is LGPL; programs are GPL license {LGPL-2.1+ GPL-3+} description GNU internationalization (i18n) and \ localization (l10n) runtime library long_description ${subport} provides libintl, the ${description}. \ It is part of gettext, which is used for writing \ multilingual programs. To build applications that \ use gettext, the tools provided by the separate \ gettext port are required. worksrcdir ${distname}/${subport} depends_lib-append port:libiconv configure.args-append --disable-libasprintf \ --with-included-gettext post-destroot { delete ${destroot}${prefix}/lib/charset.alias delete ${destroot}${prefix}/share/locale/locale.alias } } subport ${name}-tools-libs { revision 0 license GPL-3+ description GNU internationalization (i18n) and \ localization (l10n) tools libraries long_description ${subport} provides the required libraries \ for tools like msgfmt from gettext depends_lib-append port:libiconv \ port:libtextstyle \ port:gettext-runtime # Set configure.dir and build.dir rather than worksrcdir so that the # muniversal portgroup will copy the entire worksrcdir and not just # this subdirectory, because the build compiles files outside of this # directory and we need separate builds of everything for each arch. configure.dir ${worksrcpath}/${name}-tools build.dir ${configure.dir} configure.args-append --disable-openmp \ --with-included-libunistring \ --with-included-libxml \ --with-installed-libtextstyle \ --without-emacs # Don't use possibly installed cvs or git to create the autopoint # archive because the archives they create for each architecture # under muniversal will differ and cannot be merged. configure.args-append --without-cvs \ --without-git # Don't use xz because then xz would be required by various ports # that just want to use gettext. configure.args-append --without-xz # Prevent the lang-c++ test from failing. # TODO: report this to the developers; there's no reason why # libasprintf should be getting built again. Might be the same as # https://savannah.gnu.org/bugs/?58669 configure.args-append --disable-libasprintf post-destroot { # Remove the executables and the libraries provided # by the runtime. Just leave the libraries and headers # for the tools. delete {*}[glob ${destroot}${prefix}/*/libintl.*] \ {*}[glob ${destroot}${prefix}/bin/*] \ {*}[glob ${destroot}${prefix}/share/*] } } if {${subport} in "${name}-runtime ${name}-tools-libs libasprintf"} { pre-activate { # gettext < 0.20 installed files now installed by gettext-runtime and # libasprintf. This deactivate hack can be removed after 2022-11-29. if {![catch {set installed [lindex [registry_active gettext] 0]}]} { set installed_version [lindex ${installed} 1] if {[vercmp ${installed_version} 0.20] < 0} { registry_deactivate_composite gettext "" [list ports_nodepcheck 1] } } } } if {${subport} eq ${name}} { epoch 2 revision 0 license GPL-3+ description GNU internationalization (i18n) and \ localization (l10n) tools long_description ${name} provides the tools like msgfmt for \ writing multilingual applications. The tools \ are required to build applications which use \ gettext. The runtime library libintl is in \ the separate gettext-runtime port. depends_lib-append port:libiconv \ port:libtextstyle \ port:gettext-runtime \ port:gettext-tools-libs installs_libs no # Set configure.dir and build.dir rather than worksrcdir so that the # muniversal portgroup will copy the entire worksrcdir and not just # this subdirectory, because the build compiles files outside of this # directory and we need separate builds of everything for each arch. configure.dir ${worksrcpath}/${name}-tools build.dir ${configure.dir} configure.args-append --disable-openmp \ --with-included-libunistring \ --with-included-libxml \ --with-installed-libtextstyle \ --without-emacs # Don't use possibly installed cvs or git to create the autopoint # archive because the archives they create for each architecture # under muniversal will differ and cannot be merged. configure.args-append --without-cvs \ --without-git # Don't use xz because then xz would be required by various ports # that just want to use gettext. configure.args-append --without-xz # Prevent the lang-c++ test from failing. # TODO: report this to the developers; there's no reason why # libasprintf should be getting built again. Might be the same as # https://savannah.gnu.org/bugs/?58669 configure.args-append --disable-libasprintf post-destroot { # Remove files already installed by gettext-runtime. # https://savannah.gnu.org/bugs/?58669 # Remove the libraries and headers which are provided # by gettext-tools-libs delete {*}[glob ${destroot}${prefix}/lib/*] \ {*}[glob ${destroot}${prefix}/include/*] \ ${destroot}${prefix}/share/locale/locale.alias } livecheck.type regex livecheck.url https://ftp.gnu.org/gnu/gettext/?C=M&O=D livecheck.regex ${name}-(\[0-9.\]+)\\.tar } else { livecheck.type none }