1SUMMARY="GNU locale utilities"
2DESCRIPTION="GNU 'gettext' is an important step for the GNU Translation \
3Project, as it is an asset on which we may build many other steps. This \
4package offers to programmers, translators, and even users, a well integrated \
5set of tools and documentation. Specifically, the GNU 'gettext' utilities are \
6a set of tools that provides a framework to help other GNU packages produce \
7multi-lingual messages. These tools include a set of conventions about how \
8programs should be written to support message catalogs, a directory and file \
9naming organization for the message catalogs themselves, a runtime library \
10supporting the retrieval of translated messages, and a few stand-alone \
11programs to massage in various ways the sets of translatable strings, or \
12already translated strings. A special GNU Emacs mode also helps interested \
13parties in preparing these sets, or bringing them up to date."
14HOMEPAGE="https://www.gnu.org/software/gettext/"
15COPYRIGHT="1998-2020 Free Software Foundation, Inc."
16LICENSE="GNU GPL v3"
17REVISION="5"
18SOURCE_URI="https://ftpmirror.gnu.org/gettext/gettext-$portVersion.tar.gz"
19CHECKSUM_SHA256="e8c3650e1d8cee875c4f355642382c1df83058bd5a11ee8555c0cf276d646d45"
20
21ARCHITECTURES="all !x86_gcc2"
22SECONDARY_ARCHITECTURES="x86"
23
24PROVIDES="
25	gettext$secondaryArchSuffix = $portVersion compat >= 0.19.8.1
26	lib:libasprintf$secondaryArchSuffix = 0.0.0 compat >= 0
27	lib:libgettextlib_$portVersion$secondaryArchSuffix
28	lib:libgettextpo$secondaryArchSuffix = 0.5.7 compat >= 0
29	lib:libgettextsrc_$portVersion$secondaryArchSuffix
30	lib:libtextstyle$secondaryArchSuffix = 0.1.1 compat >= 0
31	cmd:autopoint$secondaryArchSuffix = $portVersion compat >= 0
32	cmd:envsubst$secondaryArchSuffix = $portVersion compat >= 0
33	cmd:gettext$secondaryArchSuffix = $portVersion compat >= 0
34	cmd:gettext.sh$secondaryArchSuffix = $portVersion compat >= 0
35	cmd:gettextize$secondaryArchSuffix = $portVersion compat >= 0
36	cmd:msgattrib$secondaryArchSuffix = $portVersion compat >= 0
37	cmd:msgcat$secondaryArchSuffix = $portVersion compat >= 0
38	cmd:msgcmp$secondaryArchSuffix = $portVersion compat >= 0
39	cmd:msgcomm$secondaryArchSuffix = $portVersion compat >= 0
40	cmd:msgconv$secondaryArchSuffix = $portVersion compat >= 0
41	cmd:msgen$secondaryArchSuffix = $portVersion compat >= 0
42	cmd:msgexec$secondaryArchSuffix = $portVersion compat >= 0
43	cmd:msgfilter$secondaryArchSuffix = $portVersion compat >= 0
44	cmd:msgfmt$secondaryArchSuffix = $portVersion compat >= 0
45	cmd:msggrep$secondaryArchSuffix = $portVersion compat >= 0
46	cmd:msginit$secondaryArchSuffix = $portVersion compat >= 0
47	cmd:msgmerge$secondaryArchSuffix = $portVersion compat >= 0
48	cmd:msgunfmt$secondaryArchSuffix = $portVersion compat >= 0
49	cmd:msguniq$secondaryArchSuffix = $portVersion compat >= 0
50	cmd:ngettext$secondaryArchSuffix = $portVersion compat >= 0
51	cmd:recode_sr_latin$secondaryArchSuffix = $portVersion compat >= 0
52	cmd:xgettext$secondaryArchSuffix = $portVersion compat >= 0
53	"
54REQUIRES="
55	haiku$secondaryArchSuffix
56	gettext${secondaryArchSuffix}_libintl == $portVersion base
57	lib:libiconv$secondaryArchSuffix
58	lib:libncurses$secondaryArchSuffix
59	"
60if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
61	REQUIRES="$REQUIRES
62		lib:libgomp$secondaryArchSuffix
63		"
64fi
65
66SUMMARY_libintl="The gettext internationalization library"
67PROVIDES_libintl="
68	gettext${secondaryArchSuffix}_libintl = $portVersion compat >= 0.21
69	lib:libintl$secondaryArchSuffix = 8.2.0 compat >= 8
70	"
71REQUIRES_libintl="
72	haiku$secondaryArchSuffix
73	lib:libiconv$secondaryArchSuffix
74	"
75
76PROVIDES_devel="
77	gettext${secondaryArchSuffix}_devel = $portVersion compat >= 0.21
78	devel:libasprintf$secondaryArchSuffix = 0.0.0 compat >= 0
79	devel:libgettextlib$secondaryArchSuffix = $portVersion
80	devel:libgettextlib_$portVersion$secondaryArchSuffix
81	devel:libgettextpo$secondaryArchSuffix = 0.5.7 compat >= 0
82	devel:libgettextsrc$secondaryArchSuffix = $portVersion
83	devel:libgettextsrc_$portVersion$secondaryArchSuffix
84	devel:libintl$secondaryArchSuffix = 8.2.0 compat >= 8
85	devel:libtextstyle$secondaryArchSuffix = 0.1.1 compat >= 0
86	"
87REQUIRES_devel="
88	gettext$secondaryArchSuffix == $portVersion base
89	"
90
91BUILD_REQUIRES="
92	haiku${secondaryArchSuffix}_devel
93	devel:libiconv$secondaryArchSuffix
94	devel:libncurses$secondaryArchSuffix
95	"
96BUILD_PREREQUIRES="
97	cmd:aclocal
98	cmd:autoconf
99	cmd:automake
100	cmd:autoheader
101	cmd:gcc$secondaryArchSuffix
102	cmd:groff
103	cmd:gzip
104	cmd:ld$secondaryArchSuffix
105	cmd:libtoolize$secondaryArchSuffix
106	cmd:make
107	cmd:makeinfo
108	"
109
110BUILD()
111{
112	runConfigure ./configure \
113		--disable-java \
114		--without-git \
115		--disable-rpath \
116		--disable-static \
117		--disable-maintainer-mode
118	make $jobArgs AUTOCONF=: AUTOMAKE=: AUTOHEADER=: ACLOCAL=:
119}
120
121INSTALL()
122{
123	make install AUTOCONF=: AUTOMAKE=: AUTOHEADER=: ACLOCAL=:
124
125	# remove libtool files & static libraries
126	rm -f $libDir/lib*.la $libDir/lib*.a
127
128	prepareInstalledDevelLibs \
129		libasprintf \
130		libgettextpo \
131		libintl \
132		libtextstyle
133
134	# These two need to be handled separately from the above, due to their
135	# naming pattern: "lib<name>-<version>.so", otherwise it results on
136	# broken links in the final package.
137	prepareInstalledDevelLib libgettextlib '*.so' '*'
138	prepareInstalledDevelLib libgettextsrc '*.so' '*'
139
140	# devel package
141	packageEntries devel \
142		$developDir \
143		$docDir
144
145	# libintl package
146	packageEntries libintl \
147		$libDir/libintl*
148}
149
150TEST()
151{
152	make check
153}
154