1SUMMARY="Several programs for finding differences between files"
2DESCRIPTION="You can use the diff command to show differences between two \
3files, or each corresponding file in two directories. diff outputs \
4differences between files line by line in any of several formats, selectable \
5by command line options. This set of differences is often called a 'diff' or \
6'patch'.
7You can use the cmp command to show the offsets and line numbers where two \
8files differ. cmp can also show all the characters that differ between the two \
9files, side by side.
10You can use the diff3 command to show differences among three files. When two \
11people have made independent changes to a common original, diff3 can report \
12the differences between the original and the two changed versions, and can \
13produce a merged file that contains both persons' changes together with \
14warnings about conflicts.
15You can use the sdiff command to merge two files interactively."
16HOMEPAGE="https://www.gnu.org/software/diffutils/"
17COPYRIGHT="1992-2016 Free Software Foundation, Inc."
18LICENSE="GNU GPL v3"
19REVISION="3"
20SOURCE_URI="https://ftp.gnu.org/gnu/diffutils/diffutils-$portVersion.tar.xz"
21CHECKSUM_SHA256="90e5e93cc724e4ebe12ede80df1634063c7a855692685919bfe60b556c9bd09e"
22PATCHES="diffutils-$portVersion.patchset"
23
24ARCHITECTURES="all !x86_gcc2"
25SECONDARY_ARCHITECTURES="x86"
26
27PROVIDES="
28	diffutils$secondaryArchSuffix = $portVersion
29	cmd:cmp = $portVersion
30	cmd:diff = $portVersion
31	cmd:diff3 = $portVersion
32	cmd:sdiff = $portVersion
33	"
34REQUIRES="
35	haiku$secondaryArchSuffix
36	"
37if [ "$targetArchitecture" = x86_gcc2 ]; then
38	REPLACES="
39		diffutils
40		"
41fi
42
43BUILD_REQUIRES="
44	haiku${secondaryArchSuffix}_devel
45	"
46BUILD_PREREQUIRES="
47	cmd:awk
48	cmd:gcc$secondaryArchSuffix
49	cmd:make
50	cmd:perl
51	"
52
53defineDebugInfoPackage diffutils$secondaryArchSuffix \
54	$prefix/bin/cmp \
55	$prefix/bin/diff \
56	$prefix/bin/diff3 \
57	$prefix/bin/sdiff
58
59BUILD()
60{
61	export CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS"
62	export CXXFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS"
63	export LDFLAGS="-lposix_error_mapper"
64
65	runConfigure --omit-dirs binDir ./configure \
66		--bindir=$prefix/bin \
67		--disable-gcc-warnings
68
69	make $jobArgs
70}
71
72INSTALL()
73{
74	make install
75}
76
77TEST()
78{
79	make check
80}
81