+freedesktop.org/intltool (#5404)

* new file:   projects/freedesktop.org/intltool/package.yml
	new file:   projects/freedesktop.org/intltool/test.xml

* test
This commit is contained in:
Andrew 2024-03-04 21:19:56 +02:00 committed by GitHub
parent 9a57c0d807
commit a6da320674
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,53 @@
distributable:
url: https://launchpad.net/intltool/trunk/{{version}}/+download/intltool-{{version}}.tar.gz
strip-components: 1
versions:
url: https://launchpad.net/intltool/+download
match: /intltool-\d+\.\d+\.\d+.tar.gz/
strip:
- /^intltool-/
- /\.tar\.gz$/
dependencies:
perl.org: ~5
linux:
libexpat.github.io: ^2.6
runtime:
env:
PERL5LIB: ${{prefix}}/lib/perl5:{{prefix}}/libexec/lib/perl5:$PERL5LIB
build:
dependencies:
cpanmin.us: '*'
script:
- cpanm -l {{prefix}} XML::Parser --force
- ./configure $ARGS
- make --jobs {{hw.concurrency}} install
env:
PERL5LIB: ${{prefix}}/lib/perl5:{{prefix}}/libexec/lib/perl5:$PERL5LIB
ARGS:
- --disable-debug
- --disable-dependency-tracking
- --disable-silent-rules
- --prefix={{prefix}}
- --libdir={{prefix}}/lib
provides:
- bin/intltool-extract
- bin/intltool-merge
- bin/intltool-prepare
- bin/intltool-update
- bin/intltoolize
- bin/lwp-download
- bin/lwp-dump
- bin/lwp-mirror
- bin/lwp-request
test:
- intltool-extract --help
- intltoolize --version | grep {{version}}
- intltool-extract --type=gettext/xml test.xml
- cat test.xml.h | grep 'This comment is not ignored'
- cat test.xml.h | grep 'This comment is ignored' || true

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<dummy>
<!-- This comment is ignored -->
<!-- This comment is not ignored -->
<_translate>First thing to translate</_translate>
<!-- This is multi line comment for the following string;
second line of multi-line comment -->
<_translate>Something to translate</_translate>
<!-- If comment doesn't end on the previous line, it should be handled
correctly --> <_translate>Final thing to translate</_translate>
<_translate>This doesn't have a comment for translators</_translate>
<!-- This comment is not ignored even if it contains > (greater than)
sign in it, and the following string shows up as well -->
<_translate>Dum-dee-dum</_translate>
<tagnotmarked _markedattribute="attribute without comment">some content</tagnotmarked>
<!-- This comment will appear if attributes can be commented about -->
<tagnotmarked _markedattribute="attribute with comment">more content</tagnotmarked>
<!-- Comment for *both* attributes and content -->
<_translate _markedattribute="attribute value">even more content</_translate>
</dummy>