jed: update version and various fixes (#6968)

improve the secondary arch support
use XDG_CONFIG_HOME to locate the rc file
attempt to cleanup package layout
This commit is contained in:
augiedoggie
2022-05-29 22:44:24 -06:00
committed by GitHub
parent 998b67acbd
commit b50ebd6392
3 changed files with 226 additions and 58 deletions

View File

@@ -1,25 +1,32 @@
SUMMARY="Editor for programmers"
SUMMARY="Lightweight terminal based editor for programmers"
DESCRIPTION="Jed is a small, fast and powerful text editor.\
It is completely customizable with prepared emulation modes for Emacs, \
CUA (similar to Openoffice), Borland-IDE, Brief, and EDT using the S-Lang \
scripting language (with a syntax resembling C)."
HOMEPAGE="http://www.jedsoft.org/jed/"
COPYRIGHT="1992, 1998-2009 John E. Davis"
COPYRIGHT="1992, 1998, 2000, 2005, 2006-2019 John E. Davis"
LICENSE="GNU GPL v2"
REVISION="3"
srcGitRev="bf503722a1e646cddef8a9efe4cc2b76812d6f7a"
REVISION="1"
srcGitRev="1f279c4b22854c7d02466227b3070b01ef48c053"
SOURCE_URI="https://github.com/jedsoft/jed/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="e6ae9243ed480d39175dd0d58e320287711b65f673966502a37ab9a0380f5c08"
CHECKSUM_SHA256="0b4e1fe9627869551b906bd08bec58bc0789e98d524c24199deac742ba0f49eb"
SOURCE_DIR="jed-$srcGitRev"
PATCHES="jed-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
jed$secondaryArchSuffix = $portVersion
cmd:jed$secondaryArchSuffix
cmd:jed_script$secondaryArchSuffix
cmd:jed$commandSuffix
cmd:jed_script$commandSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -35,19 +42,28 @@ BUILD_PREREQUIRES="
cmd:autoconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:m4
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
PATCH()
{
# adapted from Arch Linux
sed \
-e "s|..DEST.*doc|${docDir}|g" \
-i src/Makefile.in
}
BUILD()
{
make -C autoconf
LDFLAGS="-lbsd -lnetwork" \
JED_ROOT=$docDir \
runConfigure ./configure \
JED_ROOT=$dataDir/jed \
runConfigure --omit-dirs binDir ./configure \
--bindir="$commandBinDir" \
--with-slanglib=$libDir \
--with-slanginc=$developDir
@@ -56,6 +72,7 @@ BUILD()
INSTALL()
{
mkdir -p $libDir/jed $docDir/jed
make install
rm -f $manDir/man1/rgrep.1
cp -af INSTALL* $docDir
}

View File

@@ -1,47 +0,0 @@
From a275388bae678811300aea937137608c37bb75b7 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 15 May 2017 19:47:03 +0200
Subject: import patch from previous version
diff --git a/src/pty.c b/src/pty.c
index 22800f6..652e747 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -19,7 +19,7 @@
#include <errno.h>
#ifdef HAVE_GRANTPT
-# if !defined (__linux__) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(_AIX)
+# if !defined (__linux__) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(_AIX) && !defined(__HAIKU__)
# define USE_SYSV_PTYS
# include <sys/types.h>
# include <stropts.h>
--
2.36.1
From 5e854d2defdd13e354df630f89ab2b221b8c701d Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Fri, 27 May 2022 22:51:24 -0600
Subject: add Haiku terminfo dir
diff --git a/autoconf/aclocal.m4 b/autoconf/aclocal.m4
index 383256d..0d09da3 100644
--- a/autoconf/aclocal.m4
+++ b/autoconf/aclocal.m4
@@ -505,6 +505,10 @@ then
else
MISC_TERMINFO_DIRS=""
fi
+if test "$host_os" = "haiku"
+then
+ MISC_TERMINFO_DIRS="/boot/system/data/terminfo"
+fi
JD_Terminfo_Dirs="$MISC_TERMINFO_DIRS \
/usr/lib/terminfo \
/usr/share/terminfo \
--
2.36.1

View File

@@ -0,0 +1,198 @@
From d173322a8f5e4ba34c9312d7f0b2dedd13f5d198 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 15 May 2017 19:47:03 +0200
Subject: import patch from previous version
diff --git a/src/pty.c b/src/pty.c
index 7833a77..1dfd87b 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -19,7 +19,7 @@
#include <errno.h>
#ifdef HAVE_GRANTPT
-# if !defined (__linux__) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(_AIX)
+# if !defined (__linux__) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(_AIX) && !defined(__HAIKU__)
# define USE_SYSV_PTYS
# include <sys/types.h>
# include <stropts.h>
--
2.36.1
From c34045f132947f48820496b82dbe93d60a721938 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Fri, 27 May 2022 22:51:24 -0600
Subject: add Haiku terminfo dir
diff --git a/autoconf/aclocal.m4 b/autoconf/aclocal.m4
index b2dfcd3..c17be8b 100644
--- a/autoconf/aclocal.m4
+++ b/autoconf/aclocal.m4
@@ -509,6 +509,10 @@ then
else
MISC_TERMINFO_DIRS=""
fi
+if test "$host_os" = "haiku"
+then
+ MISC_TERMINFO_DIRS="/boot/system/data/terminfo"
+fi
JD_Terminfo_Dirs="$MISC_TERMINFO_DIRS \
/usr/lib/terminfo \
/usr/share/terminfo \
--
2.36.1
From 9ca294c3987f9216198e32c4aa78d45d3c024fc6 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 29 May 2022 02:34:58 -0600
Subject: use data dir instead of share
diff --git a/lib/site.sl b/lib/site.sl
index 01d0ff9..599f283 100644
--- a/lib/site.sl
+++ b/lib/site.sl
@@ -3335,7 +3335,11 @@ foreach ([
$1 = ();
if ($1 == NULL)
continue;
+#ifdef HAIKU
+ $2 = path_concat ($1, "data/slsh");
+#else
$2 = path_concat ($1, "share/slsh");
+#endif
if (2 != file_status ($2))
continue;
append_to_slang_load_path ($2);
--
2.36.1
From dda4aeab609bfe5853360e3d1d67ae9d6ac22ed6 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 29 May 2022 02:43:54 -0600
Subject: fix documentation paths on Haiku
diff --git a/lib/popups.sl b/lib/popups.sl
index bbb57d2..21761f9 100644
--- a/lib/popups.sl
+++ b/lib/popups.sl
@@ -30,7 +30,11 @@ private define add_files_popup_with_callback (parent, popup, dir, pattern, fun)
private define browse_docs_callback (file)
{
+#ifdef HAIKU
+ file = dircat (JED_ROOT, "../../documentation/packages/jed/txt/" + file + ".txt");
+#else
file = dircat (JED_ROOT, "doc/txt/" + file + ".txt");
+#endif
variable is_compressed = 0;
if (file_status (file) != 1)
diff --git a/lib/site.sl b/lib/site.sl
index 599f283..b7a69b5 100644
--- a/lib/site.sl
+++ b/lib/site.sl
@@ -647,6 +647,8 @@ define jed_insert_doc_file (file)
#ifdef VMS
$1 = JED_ROOT;
+#elifdef HAIKU
+$1 = dircat (JED_ROOT, "../../documentation/packages/jed/hlp");
#else
$1 = dircat (JED_ROOT, "doc/hlp");
#endif
--
2.36.1
From 57f03e406a777ea057f2b73e729df85dde34a036 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 29 May 2022 03:09:01 -0600
Subject: use XDG_CONFIG_HOME to find jed.rc
diff --git a/lib/site.sl b/lib/site.sl
index b7a69b5..8d5dd6f 100644
--- a/lib/site.sl
+++ b/lib/site.sl
@@ -3054,6 +3054,8 @@ if (NULL != getenv("JED_HOME"))
Jed_Home_Directory = "JED_HOME:";
#else
Jed_Home_Directory = getenv ("JED_HOME");
+if (Jed_Home_Directory == NULL)
+ Jed_Home_Directory = getenv("XDG_CONFIG_HOME");
if (Jed_Home_Directory == NULL)
Jed_Home_Directory = getenv("HOME");
#endif
@@ -3098,7 +3100,9 @@ define command_line_hook () %{{{
}
init_file = dircat (Jed_Home_Directory,
-#ifdef UNIX
+#ifdef HAIKU
+ "jed.rc"
+#elifdef UNIX
".jedrc"
#else
"jed.rc"
--
2.36.1
From 6b21fc9e008458f0381dcfb0cebee78cde80075a Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 29 May 2022 13:27:27 -0600
Subject: add XDG jed.rc location to the man page
diff --git a/doc/manual/jed.1 b/doc/manual/jed.1
index 875acd5..32dbe3b 100644
--- a/doc/manual/jed.1
+++ b/doc/manual/jed.1
@@ -501,6 +501,10 @@ This is the default startup file.
.RS
The system wide configuration file.
.RE
+.I $XDG_CONFIG_HOME/jed.rc
+.RS
+Per user configuration file.
+.RE
.I ~/.jedrc
.RS
Per user configuration file.
--
2.36.1
From 5b258c8ab0ae723720dcf962233a16656ac39505 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 29 May 2022 13:36:47 -0600
Subject: add XDG jed.rc location to INSTALL.unx
diff --git a/INSTALL.unx b/INSTALL.unx
index 7168d62..e8a5a16 100644
--- a/INSTALL.unx
+++ b/INSTALL.unx
@@ -74,9 +74,9 @@ UNIX installation specific functions. Please read this file.
Use `make rgrep` to build it.
4. By default, when JED starts up, it will load some files out of
- $JED_ROOT/lib then it will look for the file .jedrc in the user's
- home directory. If it does not find it, it will load the default
- file jed.rc from $JED_ROOT/lib.
+ $JED_ROOT/lib then it will look for the file $XDG_CONFIG_HOME/jed.rc
+ and finally for .jedrc in the user's home directory. If it does not
+ find either, it will load the default file jed.rc from $JED_ROOT/lib.
In fact, the user is encouraged to copy jed.rc to $HOME/.jedrc and
make personal changes there. The $JED_ROOT/lib/jed.rc file should
--
2.36.1