Skip to content

Commit

Permalink
gettext: Merge code for gettext and gettext-tools-libs subports
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandesign committed Jan 29, 2024
1 parent ee9941b commit 0f47aa4
Showing 1 changed file with 23 additions and 54 deletions.
77 changes: 23 additions & 54 deletions devel/gettext/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,46 +137,12 @@ subport ${name}-runtime {
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_build-append port:ncurses

depends_lib-append port:libiconv \
port:libtextstyle \
port:gettext-runtime

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

# Install from the tools subpackage, so that only its files
# are installed.
destroot.dir ${worksrcpath}/${name}-tools

post-destroot {
# Remove the executables provided by the gettext subport.
# Just leave the libraries and headers for the tools.
Expand All @@ -189,8 +155,6 @@ if {${subport} eq ${name}} {
epoch 2
revision 0

license GPL-3+

description GNU internationalization (i18n) and \
localization (l10n) tools

Expand All @@ -200,14 +164,32 @@ if {${subport} eq ${name}} {
gettext. The runtime library libintl is in \
the separate gettext-runtime port.

depends_lib-append port:${name}-tools-libs

installs_libs no

post-destroot {
# Remove the libraries and headers which are provided
# by gettext-tools-libs
delete {*}[glob ${destroot}${prefix}/lib/*] \
{*}[glob ${destroot}${prefix}/include/*]
}

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
}

if {${subport} in [list ${name} ${name}-tools-libs]} {
license GPL-3+

depends_build-append port:ncurses

depends_lib-append port:libiconv \
port:libtextstyle \
port:gettext-runtime \
port:gettext-tools-libs

installs_libs no
port:${name}-runtime

configure.args-append --disable-openmp \
--with-included-libunistring \
Expand All @@ -233,18 +215,5 @@ if {${subport} eq ${name}} {

# Install from the tools subpackage, so that only its files
# are installed.
destroot.dir ${worksrcpath}/${name}-tools

post-destroot {
# Remove the libraries and headers which are provided
# by gettext-tools-libs
delete {*}[glob ${destroot}${prefix}/lib/*] \
{*}[glob ${destroot}${prefix}/include/*]
}

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
destroot.dir ${worksrcpath}/${name}-tools
}

0 comments on commit 0f47aa4

Please sign in to comment.