app-shells/kshdb: new package
authorMike Gilbert <floppym@gentoo.org>
Sun, 3 Nov 2019 23:58:47 +0000 (18:58 -0500)
committerMike Gilbert <floppym@gentoo.org>
Sun, 3 Nov 2019 23:59:11 +0000 (18:59 -0500)
Package-Manager: Portage-2.3.78_p6, Repoman-2.3.17_p102
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
app-shells/kshdb/Manifest [new file with mode: 0644]
app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch [new file with mode: 0644]
app-shells/kshdb/kshdb-1.0.0.ebuild [new file with mode: 0644]
app-shells/kshdb/metadata.xml [new file with mode: 0644]

diff --git a/app-shells/kshdb/Manifest b/app-shells/kshdb/Manifest
new file mode 100644 (file)
index 0000000..88cb0b0
--- /dev/null
@@ -0,0 +1 @@
+DIST kshdb-1.0.0.tar.gz 153633 BLAKE2B 91e5d77e1a74f98149ef4c953c34b6a4ac43f68c930092bde6f5313be6d581072fb8ef39a500204e5eb544e1e6bc53d1f5f7800ba1d333020f6908bbde2268f6 SHA512 f010b3b739f1a9fdead52c251a536405f8cbae67882c554b034ef115a9d9ecd60438d883d51dd282a747068e108ad8e5d9442380b6563a2aa262c35b423ee1dd
diff --git a/app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch b/app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch
new file mode 100644 (file)
index 0000000..48db4db
--- /dev/null
@@ -0,0 +1,47 @@
+From a989aef80767d6608f3c3c9db007c5aafd022358 Mon Sep 17 00:00:00 2001
+From: rocky <rocky@gnu.org>
+Date: Sun, 3 Nov 2019 18:23:07 -0500
+Subject: [PATCH] Remove COLORFGBG message from term-background.sh
+
+---
+ init/term-background.sh | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/init/term-background.sh b/init/term-background.sh
+index 63f6e7d..716bb04 100644
+--- a/init/term-background.sh
++++ b/init/term-background.sh
+@@ -57,9 +57,9 @@ get_default_bg() {
+ # Pass as parameters R G B values in hex
+ # On return, variable is_dark_bg is set
+ is_dark_rgb() {
+-    typeset r g b
++    typeset -i r g b
+     r=$1; g=$2; b=$3
+-    if (( (16#$r + 16#$g + 16#$b) < $TERMINAL_COLOR_MIDPOINT )) ; then
++    if (( (16#r + 16#g + 16#b) < TERMINAL_COLOR_MIDPOINT )) ; then
+       is_dark_bg=1
+     else
+       is_dark_bg=0
+@@ -172,11 +172,7 @@ if (( !success )) && [[ -n $TERM ]] ; then
+ fi
+ if (( success )) ; then
+-    if (( is_dark_bg == 1 )) ; then
+-      echo "Dark background from ${method}"
+-    else
+-      echo "Light background from ${method}"
+-    fi
++    :
+ elif [[ -n $COLORFGBG ]] ; then
+     # Note that this can be wrong if
+     # COLORFGBG was set prior invoking a terminal
+@@ -196,7 +192,7 @@ fi
+ # some environment variables
+ if is_sourced  ; then
+     if (( exitrc == 0 )) ; then
+-      if (( $is_dark_bg == 1 ))  ; then
++      if (( is_dark_bg == 1 ))  ; then
+           export DARK_BG=1
+           [[ -z $COLORFGBG ]] && export COLORFGBG='0;15'
+       else
diff --git a/app-shells/kshdb/kshdb-1.0.0.ebuild b/app-shells/kshdb/kshdb-1.0.0.ebuild
new file mode 100644 (file)
index 0000000..2c73928
--- /dev/null
@@ -0,0 +1,23 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Korn Shell Debugger"
+HOMEPAGE="https://github.com/rocky/kshdb"
+SRC_URI="https://github.com/rocky/kshdb/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+PATCHES=(
+       "${FILESDIR}"/kshdb-1.0.0-remove-COLORFGBG-message.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
diff --git a/app-shells/kshdb/metadata.xml b/app-shells/kshdb/metadata.xml
new file mode 100644 (file)
index 0000000..de09ffd
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>floppym@gentoo.org</email>
+               <name>Mike Gilbert</name>
+       </maintainer>
+</pkgmetadata>