1SUMMARY="Text Encoding Conversion toolkit"
2DESCRIPTION="TECkit is a low-level toolkit intended to be used by other \
3applications that need to perform encoding conversions (e.g., when importing \
4legacy data into a Unicode-based application).
5The primary component of the TECkit package is therefore a library that \
6performs conversions; this is the \"TECkit engine\". The engine relies on \
7mapping tables in a specific binary format (for which documentation is \
8available); there is a compiler that creates such tables from a \
9human-readable mapping description (a simple text file)."
10HOMEPAGE="https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=TECkitIntro"
11COPYRIGHT="Jonathan Kew, SIL International"
12LICENSE="CPL v0.5
13	GNU GPL v2
14	GNU LGPL v2.1
15	MPL v2.0"
16REVISION="1"
17SOURCE_URI="https://github.com/silnrsi/teckit/releases/download/v$portVersion/teckit-$portVersion.tar.gz"
18CHECKSUM_SHA256="6823fb3142efa34e5d74de35d37cdf4724efbf577f5ff15a8e2b364e6ef47d3d"
19
20ARCHITECTURES="all !x86_gcc2"
21SECONDARY_ARCHITECTURES="x86"
22
23libVersion="0.0.0"
24libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
25
26PROVIDES="
27	teckit$secondaryArchSuffix = $portVersion
28	lib:libTECkit$secondaryArchSuffix = $libVersionCompat
29	lib:libTECkit_Compiler$secondaryArchSuffix = $libVersionCompat
30	cmd:sfconv
31	cmd:teckit_compile
32	cmd:txtconv
33	"
34REQUIRES="
35	haiku$secondaryArchSuffix
36	lib:libexpat$secondaryArchSuffix
37	lib:libz$secondaryArchSuffix
38	"
39
40PROVIDES_devel="
41	teckit${secondaryArchSuffix}_devel = $portVersion
42	devel:libTECkit$secondaryArchSuffix = $libVersionCompat
43	devel:libTECkit_Compiler$secondaryArchSuffix = $libVersionCompat
44	"
45REQUIRES_devel="
46	haiku${secondaryArchSuffix}_devel
47	teckit$secondaryArchSuffix == $portVersion base
48	devel:libexpat$secondaryArchSuffix
49	devel:libz$secondaryArchSuffix
50	"
51
52BUILD_REQUIRES="
53	haiku${secondaryArchSuffix}_devel
54	devel:libexpat$secondaryArchSuffix
55	devel:libz$secondaryArchSuffix
56	"
57BUILD_PREREQUIRES="
58	cmd:awk
59	cmd:gcc$secondaryArchSuffix
60	cmd:ld$secondaryArchSuffix
61	cmd:make
62	cmd:pkg_config$secondaryArchSuffix
63	"
64
65BUILD()
66{
67	runConfigure ./configure --enable-final --disable-static
68	make $jobArgs
69}
70
71INSTALL()
72{
73	make install
74
75	prepareInstalledDevelLibs libTECkit \
76		libTECkit_Compiler
77	fixPkgconfig
78
79	# DEVEL
80	packageEntries devel \
81		$developDir
82}
83
84TEST()
85{
86	make check
87}
88