wdiff: new port for v1.2.2 (#7919)

This commit is contained in:
Peter van Dijk
2023-03-07 09:19:28 +01:00
committed by GitHub
parent 7b7cea635c
commit 8e654e4867
2 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
From a855c3354df3706a0167b558e5ca90a7aa6230c4 Mon Sep 17 00:00:00 2001
From: Peter van Dijk <peter@7bits.nl>
Date: Mon, 6 Mar 2023 20:26:28 +0000
Subject: inline the charset map
diff --git a/lib/localcharset.c b/lib/localcharset.c
index a928867..10ad9fe 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -127,7 +127,7 @@ get_charset_aliases (void)
cp = charset_aliases;
if (cp == NULL)
{
-#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__)
+#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined __HAIKU__)
const char *dir;
const char *base = "charset.alias";
char *file_name;
@@ -341,6 +341,10 @@ get_charset_aliases (void)
"CP54936" "\0" "GB18030" "\0"
"CP65001" "\0" "UTF-8" "\0";
# endif
+
+# if defined __HAIKU__
+ cp = "*" "\0" "UTF-8" "\0";
+# endif
#endif
charset_aliases = cp;
--
2.37.3

View File

@@ -0,0 +1,55 @@
SUMMARY="Compares two files word by word"
DESCRIPTION="'wdiff' is a front-end to GNU 'diff'. It compares two files, finding \
which words have been deleted or added to the first in order to create \
the second. It has many output formats and interacts well with \
terminals and pagers (notably with 'less'). 'wdiff' is particularly \
useful when two texts differ only by a few words and paragraphs have \
been refilled."
HOMEPAGE="https://www.gnu.org/software/wdiff/"
COPYRIGHT="2001-2012 Free Software Foundation"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="http://ftp.gnu.org/gnu/wdiff/wdiff-$portVersion.tar.gz"
CHECKSUM_SHA256="34ff698c870c87e6e47a838eeaaae729fa73349139fc8db12211d2a22b78af6b"
PATCHES="wdiff-$portVersion.patchset"
ARCHITECTURES="all"
PROVIDES="
wdiff = $portVersion
cmd:wdiff = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc
cmd:make
cmd:makeinfo
"
TEST_REQUIRES="
cmd:autom4te
"
BUILD()
{
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/charset.alias # the map has been inlined, see patch "inline the charset map"
}
TEST()
{
make check
}