mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
hstr: bump to version 2.5 (#7249)
This commit is contained in:
@@ -2,11 +2,11 @@ SUMMARY="Shell history suggest box"
|
||||
DESCRIPTION="Easily view, navigate, search and use your command history with \
|
||||
shell history suggest box for Bash and ZSH."
|
||||
HOMEPAGE="http://me.mindforger.com/projects/hh.html"
|
||||
COPYRIGHT="2014-2018 Martin Dvorak"
|
||||
COPYRIGHT="2014-2021 Martin Dvorak"
|
||||
LICENSE="Apache v2"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/dvorka/hstr/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="8d93ed8bfee1a979e8d06646e162b70316e2097e16243636d81011ba1000627a"
|
||||
CHECKSUM_SHA256="7f5933fc07d55d09d5f7f9a6fbfdfc556d8a7d8575c3890ac1e672adabd2bec4"
|
||||
PATCHES="hstr-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all ?x86_gcc2"
|
||||
@@ -1,4 +1,4 @@
|
||||
From 705c5d4aa39bf8f71eb155730858c480bef9c268 Mon Sep 17 00:00:00 2001
|
||||
From 4b5cdd73ba59aed4ecbd6cfcff56edec73e01624 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sat, 27 Oct 2018 12:51:57 +0200
|
||||
Subject: Haiku supporting patches
|
||||
@@ -16,25 +16,8 @@ index 7640d21..328353c 100644
|
||||
+ ln -s $(DESTDIR)$(bindir)/hstr$(EXEEXT) $(DESTDIR)$(bindir)/hh$(EXEEXT)
|
||||
|
||||
hstr_LDADD = $(NCURSES_LIBS)
|
||||
diff --git a/src/hstr_history.c b/src/hstr_history.c
|
||||
index c4353ca..e2f8891 100644
|
||||
--- a/src/hstr_history.c
|
||||
+++ b/src/hstr_history.c
|
||||
@@ -51,7 +51,11 @@ char* get_history_file_name(void)
|
||||
if(!historyFile || strlen(historyFile)==0) {
|
||||
char* home = getenv(ENV_VAR_HOME);
|
||||
historyFile = malloc(strlen(home) + 1 + strlen(FILE_DEFAULT_HISTORY) + 1);
|
||||
- strcat(strcat(strcpy(historyFile, home), "/"), FILE_DEFAULT_HISTORY);
|
||||
+ #ifndef __HAIKU__
|
||||
+ strcat(strcat(strcpy(historyFile, home), "/"), FILE_DEFAULT_HISTORY);
|
||||
+ #else
|
||||
+ strcat(strcat(strcpy(historyFile, home), "/config/settings/"), FILE_DEFAULT_HISTORY);
|
||||
+ #endif
|
||||
} else {
|
||||
// allocate so that this function always returns string to be freed
|
||||
// (getenv() returns pointer (no need to free), home is allocated (must be freed)
|
||||
diff --git a/src/hstr_utils.c b/src/hstr_utils.c
|
||||
index 2c0742c..ab48a05 100644
|
||||
index 12ec8fb..eb5c80a 100644
|
||||
--- a/src/hstr_utils.c
|
||||
+++ b/src/hstr_utils.c
|
||||
@@ -106,7 +106,7 @@ void hstr_chop(char *s)
|
||||
@@ -56,7 +39,7 @@ index 2c0742c..ab48a05 100644
|
||||
if(padding) fprintf(stderr, "%s", "\n");
|
||||
#else
|
||||
diff --git a/src/include/hstr.h b/src/include/hstr.h
|
||||
index 6376b47..3ea4443 100644
|
||||
index 5eac881..be248d3 100644
|
||||
--- a/src/include/hstr.h
|
||||
+++ b/src/include/hstr.h
|
||||
@@ -25,6 +25,8 @@
|
||||
@@ -69,7 +52,7 @@ index 6376b47..3ea4443 100644
|
||||
#include <ncursesw/curses.h>
|
||||
#endif
|
||||
diff --git a/src/include/hstr_curses.h b/src/include/hstr_curses.h
|
||||
index 045673e..ef3ef46 100644
|
||||
index 8a50ab9..de92e58 100644
|
||||
--- a/src/include/hstr_curses.h
|
||||
+++ b/src/include/hstr_curses.h
|
||||
@@ -21,6 +21,8 @@
|
||||
@@ -82,35 +65,73 @@ index 045673e..ef3ef46 100644
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
--
|
||||
2.19.1
|
||||
2.37.3
|
||||
|
||||
|
||||
From 1393e5f2234634e8430072684cce36be83fd4fca Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sat, 27 Oct 2018 12:54:48 +0200
|
||||
From d2c81bf97bfce27b2baa764f91ffef4097dbb729 Mon Sep 17 00:00:00 2001
|
||||
From: Oscar Lesta <oscar.lesta@gmail.com>
|
||||
Date: Mon, 3 Oct 2022 06:59:40 -0300
|
||||
Subject: Updated Haiku support patch.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Modeled after the part of Zoltán Mizsei's 2.0 patch that was not
|
||||
applying cleanly anymore.
|
||||
|
||||
diff --git a/src/hstr_utils.c b/src/hstr_utils.c
|
||||
index eb5c80a..15c0b60 100644
|
||||
--- a/src/hstr_utils.c
|
||||
+++ b/src/hstr_utils.c
|
||||
@@ -168,7 +168,11 @@ char* get_home_file_path(char* filename)
|
||||
{
|
||||
char* home = getenv(ENV_VAR_HOME);
|
||||
char* path = malloc(strlen(home) + 1 + strlen(filename) + 1);
|
||||
+#ifndef __HAIKU__
|
||||
strcat(strcat(strcpy(path, home), "/"), filename);
|
||||
+#else
|
||||
+ strcat(strcat(strcpy(path, home), "/config/settings/"), filename);
|
||||
+#endif
|
||||
return path;
|
||||
}
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From 5af8c31ff4012a93814580994478b66302dfeae8 Mon Sep 17 00:00:00 2001
|
||||
From: Oscar Lesta <oscar.lesta@gmail.com>
|
||||
Date: Mon, 3 Oct 2022 07:04:35 -0300
|
||||
Subject: No dotfiles on Haiku
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Based on the previous 2.0 patch from Zoltán Mizsei.
|
||||
|
||||
diff --git a/src/include/hstr_history.h b/src/include/hstr_history.h
|
||||
index 80ca7d1..bf65cdc 100644
|
||||
index f715672..adffc64 100644
|
||||
--- a/src/include/hstr_history.h
|
||||
+++ b/src/include/hstr_history.h
|
||||
@@ -31,8 +31,13 @@
|
||||
@@ -32,9 +32,15 @@
|
||||
|
||||
#define ENV_VAR_HISTFILE "HISTFILE"
|
||||
|
||||
-#define FILE_DEFAULT_HISTORY ".bash_history"
|
||||
-#define FILE_ZSH_HISTORY ".zsh_history"
|
||||
-#define FILE_ZSH_ZHISTORY ".zhistory"
|
||||
+#ifndef __HAIKU__
|
||||
+ #define FILE_DEFAULT_HISTORY ".bash_history"
|
||||
+ #define FILE_ZSH_HISTORY ".zsh_history"
|
||||
+ #define FILE_ZSH_ZHISTORY ".zhistory"
|
||||
+#else
|
||||
+ #define FILE_DEFAULT_HISTORY "bash_history"
|
||||
+ #define FILE_ZSH_HISTORY "zsh_history"
|
||||
+ #define FILE_ZSH_ZHISTORY "zhistory"
|
||||
+#endif
|
||||
|
||||
#define ZSH_HISTORY_ITEM_OFFSET 15
|
||||
#define BASH_HISTORY_ITEM_OFFSET 0
|
||||
#define ZSH_HISTORY_EXT_DIGITS 10
|
||||
|
||||
--
|
||||
2.19.1
|
||||
2.37.3
|
||||
|
||||
Reference in New Issue
Block a user