locale_maketext_extract: cleanup, add tests (#9436)

* rename to locale_maketext_lexicon, but keep the old name as an extra provide (this is the main package name)
 * cleanup install (don't install or remove architecture-specific files)
 * add tests
This commit is contained in:
Joachim Mairböck
2024-06-09 17:12:15 +02:00
committed by GitHub
parent 40c15d6413
commit c6c56db523
2 changed files with 57 additions and 44 deletions

View File

@@ -1,44 +0,0 @@
SUMMARY="Use other catalog formats in Maketext"
DESCRIPTION="This module can extract translatable strings from files, and write them back to PO \
files. It can also parse existing PO files and merge their contents with newly extracted strings.
A command-line utility, xgettext.pl, is installed with this module as well.
The format parsers are loaded as plugins, so it is possible to define your own parsers."
HOMEPAGE="https://metacpan.org/pod/Locale::Maketext::Extract"
COPYRIGHT="2014 by Audrey Tang"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/D/DR/DRTECH/Locale-Maketext-Lexicon-$portVersion.tar.gz"
CHECKSUM_SHA256="b73f6b04a58d3f0e38ebf2115a4c1532f1a4eef6fac5c6a2a449e4e14c1ddc7c"
SOURCE_DIR="Locale-Maketext-Lexicon-$portVersion"
ARCHITECTURES="any"
PROVIDES="
locale_maketext_extract = $portVersion
cmd:xgettext.pl
"
REQUIRES="
haiku
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:perl
"
BUILD()
{
perl Makefile.PL PREFIX=$prefix
make
}
INSTALL()
{
make install DESTDIR="${DESTDIR}"
}

View File

@@ -0,0 +1,57 @@
SUMMARY="Use other catalog formats in Maketext"
DESCRIPTION="This module provides lexicon-handling modules to read from other localization \
formats, such as Gettext, Msgcat, and so on.
If you are unfamiliar with the concept of lexicon modules, please consult Locale::Maketext and \
the webl10n HTML files in the docs/ directory of this module.
A command-line utility xgettext.pl is also installed with this module, for extracting \
translatable strings from source files."
HOMEPAGE="https://metacpan.org/pod/Locale::Maketext::Lexicon"
COPYRIGHT="2002-2013 by Audrey Tang"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/D/DR/DRTECH/Locale-Maketext-Lexicon-$portVersion.tar.gz"
CHECKSUM_SHA256="b73f6b04a58d3f0e38ebf2115a4c1532f1a4eef6fac5c6a2a449e4e14c1ddc7c"
SOURCE_DIR="Locale-Maketext-Lexicon-$portVersion"
ARCHITECTURES="any"
PROVIDES="
locale_maketext_lexicon = $portVersion
locale_maketext_extract = $portVersion
cmd:xgettext.pl
"
REQUIRES="
haiku
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:perl
"
BUILD()
{
perl Makefile.PL PREFIX=$prefix
make
}
INSTALL()
{
make pure_install
# remove architecture-specific files
cd $prefix
rm -r $(perl -V:vendorarch | cut -d\' -f2 | cut -d/ -f5-)
# cut extracts the quoted string and strips the prefix (which is perl's and not ours)
}
TEST()
{
make test
}