mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
74 lines
2.5 KiB
Tcl
74 lines
2.5 KiB
Tcl
# -*- 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
|
|
|
|
name itstool
|
|
epoch 1
|
|
version 2.0.7
|
|
revision 4
|
|
|
|
license GPL-3+
|
|
set branch [join [lrange [split ${version} .] 0 1] .]
|
|
|
|
description ITS Tool allows you to translate your XML documents with PO files, \
|
|
using rules from the W3C Internationalization Tag Set.
|
|
|
|
long_description {*}${description}
|
|
|
|
maintainers nomaintainer
|
|
categories textproc
|
|
platforms any
|
|
homepage https://itstool.org/
|
|
master_sites https://files.itstool.org/${name}
|
|
|
|
use_bzip2 yes
|
|
|
|
checksums rmd160 a19767226488d512d63c0a240f01fba57d73ca30 \
|
|
sha256 6b9a7cd29a12bb95598f5750e8763cee78836a1a207f85b74d8b3275b27e87ca \
|
|
size 104648
|
|
|
|
supported_archs noarch
|
|
installs_libs no
|
|
|
|
depends_build port:gawk
|
|
|
|
# per its manpage, itstool uses msgfmt provided by gettext to create MO files
|
|
depends_lib port:gettext
|
|
|
|
patchfiles patch-configure.diff \
|
|
invalid-sequence-pygte.patch
|
|
|
|
# Python variants
|
|
set python_suffixes {310 311 312 313 314}
|
|
set python_variants {}
|
|
set plugin_variants {}
|
|
foreach pyver ${python_suffixes} {
|
|
lappend python_variants python${pyver}
|
|
lappend plugin_variants plugin_support${pyver}
|
|
}
|
|
foreach pyver ${python_suffixes} {
|
|
set vrt python${pyver}
|
|
set pyversion [string index ${pyver} 0].[string range ${pyver} 1 end]
|
|
set index [lsearch -exact ${python_variants} ${vrt}]
|
|
set conf [lreplace ${python_variants} ${index} ${index}]
|
|
|
|
variant ${vrt} description "Use Python ${pyversion} bindings" conflicts {*}${conf} "
|
|
configure.python ${frameworks_dir}/Python.framework/Versions/${pyversion}/bin/python${pyversion}
|
|
depends_lib-append port:python${pyver} \
|
|
port:py${pyver}-libxml2
|
|
"
|
|
}
|
|
|
|
# Python default
|
|
set python_default "if {"
|
|
foreach pyver ${python_suffixes} {
|
|
set python_default "${python_default}!\[variant_isset python${pyver}\] && "
|
|
}
|
|
set python_default [string range ${python_default} 0 end-4]
|
|
set python_default "${python_default}} { default_variants +python314}"
|
|
eval ${python_default}
|
|
|
|
livecheck.type regex
|
|
livecheck.url http://itstool.org/download/
|
|
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
|