pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

dasht: Import dasht-2.2.0 as wip/dasht



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Wed Aug 16 21:34:50 2017 +0200
Changeset:	d9ff94ef76931602a1c40f7b8a24d3bb2bb68443

Modified Files:
	Makefile
Added Files:
	dasht/DESCR
	dasht/Makefile
	dasht/PLIST
	dasht/distinfo
	dasht/patches/patch-bin_dasht
	dasht/patches/patch-bin_dasht-docsets-install
	dasht/patches/patch-bin_dasht-docsets-remove

Log Message:
dasht: Import dasht-2.2.0 as wip/dasht

dasht is a collection of shell scripts for searching, browsing,
and managing API documentation (in the form of 150+ offline
documentation sets, courtesy of Dash for OS X) all from the comfort
of your own terminal!

The name "dasht" is a portmanteau of Dash and the letter "t", for
terminal.  Etymologically, "dasht" is Persian for plain, as in an
flat expanse of land, which aptly characterizes the terminal
environment where everything is text.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d9ff94ef76931602a1c40f7b8a24d3bb2bb68443

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                      |  1 +
 dasht/DESCR                                   |  9 ++++
 dasht/Makefile                                | 59 +++++++++++++++++++++++++++
 dasht/PLIST                                   | 23 +++++++++++
 dasht/distinfo                                |  9 ++++
 dasht/patches/patch-bin_dasht                 | 15 +++++++
 dasht/patches/patch-bin_dasht-docsets-install | 15 +++++++
 dasht/patches/patch-bin_dasht-docsets-remove  | 15 +++++++
 8 files changed, 146 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 704f07e248..c4977de8a6 100644
--- a/Makefile
+++ b/Makefile
@@ -484,6 +484,7 @@ SUBDIR+=	darcs
 SUBDIR+=	darcs-to-git
 SUBDIR+=	darkcoin
 SUBDIR+=	dart-git
+SUBDIR+=	dasht
 SUBDIR+=	datamash
 SUBDIR+=	datapipe
 SUBDIR+=	dates
diff --git a/dasht/DESCR b/dasht/DESCR
new file mode 100644
index 0000000000..7a0c958512
--- /dev/null
+++ b/dasht/DESCR
@@ -0,0 +1,9 @@
+dasht is a collection of shell scripts for searching, browsing,
+and managing API documentation (in the form of 150+ offline
+documentation sets, courtesy of Dash for OS X) all from the comfort
+of your own terminal!
+
+The name "dasht" is a portmanteau of Dash and the letter "t", for
+terminal.  Etymologically, "dasht" is Persian for plain, as in an
+flat expanse of land, which aptly characterizes the terminal
+environment where everything is text.
diff --git a/dasht/Makefile b/dasht/Makefile
new file mode 100644
index 0000000000..9eb0b35ba4
--- /dev/null
+++ b/dasht/Makefile
@@ -0,0 +1,59 @@
+# $NetBSD$
+
+DISTNAME=	dasht-2.2.0
+CATEGORIES=	textproc
+MASTER_SITES=	${MASTER_SITE_GITHUB:=sunaku/}
+GITHUB_TAG=	v${PKGVERSION_NOREV}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/sunaku/dasht/
+COMMENT=	Search API docs offline, in terminal or browser
+LICENSE=	isc
+
+USE_TOOLS+=	wget:run
+
+DEPENDS+=	socat-[0-9]*:../../net/socat
+DEPENDS+=	sqlite3-[0-9]*:../../databases/sqlite3
+DEPENDS+=	w3m-[0-9]*:../../www/w3m
+
+USE_LANGUAGES=	# none
+
+NO_BUILD=	yes
+
+INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1
+
+DASHT_MANPAGES= \
+	dasht-docsets-extract.1 \
+	dasht-docsets-install.1 \
+	dasht-docsets-remove.1 \
+	dasht-docsets-update.1 \
+	dasht-docsets.1 \
+	dasht-query-exec.1 \
+	dasht-query-html.1 \
+	dasht-query-line.1 \
+	dasht-server-http.1 \
+	dasht-server.1 \
+	dasht.1 
+
+DASHT_SCRIPTS= \
+	dasht \
+	dasht-docsets \
+	dasht-docsets-extract \
+	dasht-docsets-install \
+	dasht-docsets-remove \
+	dasht-docsets-update \
+	dasht-query-exec \
+	dasht-query-html \
+	dasht-query-line \
+	dasht-server \
+	dasht-server-http 
+
+do-install:
+.for _m_ in ${DASHT_MANPAGES}
+	${INSTALL_MAN} ${WRKSRC}/man/man1/${_m_} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+.endfor
+.for _s_ in ${DASHT_SCRIPTS}
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/${_s_} ${DESTDIR}${PREFIX}/bin
+.endfor
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/dasht/PLIST b/dasht/PLIST
new file mode 100644
index 0000000000..191ba3af86
--- /dev/null
+++ b/dasht/PLIST
@@ -0,0 +1,23 @@
+@comment $NetBSD$
+bin/dasht
+bin/dasht-docsets
+bin/dasht-docsets-extract
+bin/dasht-docsets-install
+bin/dasht-docsets-remove
+bin/dasht-docsets-update
+bin/dasht-query-exec
+bin/dasht-query-html
+bin/dasht-query-line
+bin/dasht-server
+bin/dasht-server-http
+man/man1/dasht-docsets-extract.1
+man/man1/dasht-docsets-install.1
+man/man1/dasht-docsets-remove.1
+man/man1/dasht-docsets-update.1
+man/man1/dasht-docsets.1
+man/man1/dasht-query-exec.1
+man/man1/dasht-query-html.1
+man/man1/dasht-query-line.1
+man/man1/dasht-server-http.1
+man/man1/dasht-server.1
+man/man1/dasht.1
diff --git a/dasht/distinfo b/dasht/distinfo
new file mode 100644
index 0000000000..d42fe6ef5f
--- /dev/null
+++ b/dasht/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+SHA1 (dasht-2.2.0.tar.gz) = 1547f5a0409e1a608aaaae7e26882ba802cfc4ad
+RMD160 (dasht-2.2.0.tar.gz) = 06a64bbf6c8735a8160239998a6d66ebbd27bf22
+SHA512 (dasht-2.2.0.tar.gz) = c6f8963dda52fc590a1570e81256a8da0534cdec08d404c71437b475192145d2dd4c1445d343db4e1688ba57a373695243d8269c048181ac8bc4e873623c7cbd
+Size (dasht-2.2.0.tar.gz) = 23282 bytes
+SHA1 (patch-bin_dasht) = d4d49432db853ffeeb7b1ff610da074d297be9d7
+SHA1 (patch-bin_dasht-docsets-install) = 544471842df43f8328bc187c0d2de78e335e731b
+SHA1 (patch-bin_dasht-docsets-remove) = e003e74fdf46a5756a8214bc3ddcf1a839ce1b96
diff --git a/dasht/patches/patch-bin_dasht b/dasht/patches/patch-bin_dasht
new file mode 100644
index 0000000000..edb1ad8263
--- /dev/null
+++ b/dasht/patches/patch-bin_dasht
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Just use pgrep(1) instead of a complex (and fragile) ps-piped-with-sed.
+
+--- bin/dasht.orig	2017-08-16 03:30:44.000000000 +0000
++++ bin/dasht
+@@ -71,7 +71,7 @@ if ! dasht-query-html "$@"; then
+ 
+   # emulate pipefail (which POSIX lacks) by killing off the w3m(1) process
+   # below (which starts up simultaneously alongside this pipeline segment)
+-  kill $(ps -e -o comm,ppid,pid | sed -n "s/^w3m *$$ //p")
++  kill $(pgrep -P $$ w3m)
+ 
+   # and then proceed to tell this script to generate a nonzero exit status
+   kill -s USR1 $$
diff --git a/dasht/patches/patch-bin_dasht-docsets-install b/dasht/patches/patch-bin_dasht-docsets-install
new file mode 100644
index 0000000000..7cd9016ddf
--- /dev/null
+++ b/dasht/patches/patch-bin_dasht-docsets-install
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Just use sh(1) `read' command to get the confirmation from the user.
+
+--- bin/dasht-docsets-install.orig	2017-08-16 03:30:44.000000000 +0000
++++ bin/dasht-docsets-install
+@@ -86,7 +86,7 @@ printf "Installable docsets ($#):\n\n\t%
+ trap exit INT # let Control-C abort `xargs -p` when running under bash(1)
+ for docset; do
+   test -n "$force" || # don't ask for confirmation when it's being forced
+-  echo "Install $docset docset [y/N]" | xargs -p | grep -q . || continue
++  { printf "Install $docset docset [y/N]"; read r; [ "$r" = "y" ] || continue ; }
+ 
+   basename="$docset".tgz
+   tgz="$DASHT_DOCSETS_DIR/$basename"
diff --git a/dasht/patches/patch-bin_dasht-docsets-remove b/dasht/patches/patch-bin_dasht-docsets-remove
new file mode 100644
index 0000000000..9e9954d7d7
--- /dev/null
+++ b/dasht/patches/patch-bin_dasht-docsets-remove
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Just use sh(1) `read' command to get the confirmation from the user.
+
+--- bin/dasht-docsets-remove.orig	2017-08-16 03:30:44.000000000 +0000
++++ bin/dasht-docsets-remove
+@@ -60,7 +60,7 @@ printf "Removable docsets ($#):\n\n\t%s\
+ trap exit INT # let Control-C abort `xargs -p` when running under bash(1)
+ for docset; do
+   test -n "$force" || # don't ask for confirmation when it's being forced
+-  echo "Remove $docset docset [y/N]" | xargs -p | grep -q . || continue
++  { printf "Remove $docset docset [y/N]"; read r; [ "$r" = "y" ] || continue ; }
+ 
+   rootname="$DASHT_DOCSETS_DIR/$docset"
+   rm -v -f -r "$rootname".docset \


Home | Main Index | Thread Index | Old Index