pkgsrc-WIP-changes archive

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

tig: Import tig-2.3.0 as wip/tig



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Fri Oct 27 12:43:18 2017 +0200
Changeset:	729fb901c883c82e0055326d62f71575414038f1

Modified Files:
	Makefile
Added Files:
	tig/DESCR
	tig/Makefile
	tig/PLIST
	tig/TODO
	tig/distinfo
	tig/options.mk
	tig/patches/patch-aa
	tig/patches/patch-include_tig_display.h
	tig/patches/patch-include_tig_tig.h
	tig/patches/patch-src_display.c

Log Message:
tig: Import tig-2.3.0 as wip/tig

Tig is a git repository browser that additionally can act as a pager for
output from various git commands.

When browsing repositories, it uses the underlying git commands to present
the user with various views, such as summarized revision log and showing
the commit with the log message, diffstat, and the diff.

Using it as a pager, it will display input from stdin and colorize it.

This package is intended as an update for devel/tig, it was only briefly tested
and some (new) patches needs a review. Please look at the TODO for more
information about that, any possible review/feedback/critics/testing (especially
from devel/tig users) are welcome!

About pkgsrc changes related to devel/tig:
 - patch-tig_c is no more needed, the logic in tig-2.3.0 is different
 - patch-contrib_config.make-Darwin: already applied by upstream, no more needed

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

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

diffstat:
 Makefile                                |  1 +
 tig/DESCR                               |  8 ++++++
 tig/Makefile                            | 50 +++++++++++++++++++++++++++++++++
 tig/PLIST                               | 12 ++++++++
 tig/TODO                                |  7 +++++
 tig/distinfo                            | 10 +++++++
 tig/options.mk                          | 15 ++++++++++
 tig/patches/patch-aa                    | 24 ++++++++++++++++
 tig/patches/patch-include_tig_display.h | 19 +++++++++++++
 tig/patches/patch-include_tig_tig.h     | 13 +++++++++
 tig/patches/patch-src_display.c         | 25 +++++++++++++++++
 11 files changed, 184 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index e333a29d5b..3b3493ba1b 100644
--- a/Makefile
+++ b/Makefile
@@ -4304,6 +4304,7 @@ SUBDIR+=	theama
 SUBDIR+=	thepeg
 SUBDIR+=	threadingbuildingblocks
 SUBDIR+=	thrift
+SUBDIR+=	tig
 SUBDIR+=	tilda
 SUBDIR+=	timewarrior
 SUBDIR+=	tinyca2
diff --git a/tig/DESCR b/tig/DESCR
new file mode 100644
index 0000000000..328bb1baa8
--- /dev/null
+++ b/tig/DESCR
@@ -0,0 +1,8 @@
+Tig is a git repository browser that additionally can act as a pager for
+output from various git commands.
+
+When browsing repositories, it uses the underlying git commands to present
+the user with various views, such as summarized revision log and showing
+the commit with the log message, diffstat, and the diff.
+
+Using it as a pager, it will display input from stdin and colorize it.
diff --git a/tig/Makefile b/tig/Makefile
new file mode 100644
index 0000000000..ec4824e09d
--- /dev/null
+++ b/tig/Makefile
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile,v 1.15 2017/01/04 18:16:32 roy Exp $
+
+DISTNAME=	tig-2.3.0
+CATEGORIES=	devel scm
+MASTER_SITES=	${MASTER_SITE_GITHUB:=jonas/}
+GITHUB_RELEASE=	${DISTNAME}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://jonas.github.io/tig/
+COMMENT=	Ncurses-based GIT repository tool
+LICENSE=	gnu-gpl-v2
+
+BUILD_DEPENDS+=	asciidoc-[0-9]*:../../textproc/asciidoc
+BUILD_DEPENDS+=	xmlto-[0-9]*:../../textproc/xmlto
+DEPENDS+=	git-base-[0-9]*:../../devel/git-base
+
+GNU_CONFIGURE=	yes
+USE_TOOLS+=	gmake
+FAKE_NCURSES=	yes
+
+CONF_FILES=	${EGDIR}/tigrc ${PKG_SYSCONFDIR}/tigrc
+EGDIR=		${PREFIX}/share/examples/${PKGBASE}
+
+GIT_CONFIG=	${PREFIX}/bin/git-config
+CONFIGURE_ENV+=	GIT_CONFIG=${GIT_CONFIG:Q}
+
+CONFIGURE_ARGS+=		${CONFIGURE_ARGS.${ICONV_TYPE}-iconv}
+CONFIGURE_ARGS.gnu-iconv=	--with-libiconv=${BUILDLINK_PREFIX.iconv}
+
+.include "../../mk/bsd.prefs.mk"
+.if !empty(GLIBC_VERSION)
+# Some version of glibc requires _XOPEN_SOURCE being defined to
+# provide S_IFMT in <sys/stat.h>
+CFLAGS+=	-D_XOPEN_SOURCE
+# It is also required to define _BSD_SOURCE to get struct timezone
+# defined in <sys/time.h>
+CFLAGS+=	-D_BSD_SOURCE
+.endif
+
+BUILD_TARGET=	all doc
+INSTALL_TARGET=	install install-doc
+
+post-install:
+	${INSTALL_DATA_DIR} ${DESTDIR}/${EGDIR} && \
+	${INSTALL_DATA} ${WRKSRC}/tigrc ${DESTDIR}/${EGDIR}
+
+.include "options.mk"
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/tig/PLIST b/tig/PLIST
new file mode 100644
index 0000000000..0d318a361a
--- /dev/null
+++ b/tig/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.5 2014/04/04 21:00:24 ryoon Exp $
+bin/tig
+man/man1/tig.1
+man/man5/tigrc.5
+man/man7/tigmanual.7
+share/doc/tig/INSTALL.html
+share/doc/tig/NEWS.html
+share/doc/tig/README.html
+share/doc/tig/manual.html
+share/doc/tig/tig.1.html
+share/doc/tig/tigrc.5.html
+share/examples/tig/tigrc
diff --git a/tig/TODO b/tig/TODO
new file mode 100644
index 0000000000..99e5f936a5
--- /dev/null
+++ b/tig/TODO
@@ -0,0 +1,7 @@
+- Investigate if we should install TESTS, if yes patches/patch-aa needed to be
+  adjusted accordingly like devel/tig
+- Review patches/patch-include_tig_display.h, I am not sure if it is correct
+- Add a comment about patches/patch-include_tig_tig.h
+- Why having two `review' worked upstream, can patches/patch-src_display.c
+  be avoided?
+    -- leot (2017/10/27)
diff --git a/tig/distinfo b/tig/distinfo
new file mode 100644
index 0000000000..7479811cc3
--- /dev/null
+++ b/tig/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.10 2015/11/03 03:29:36 agc Exp $
+
+SHA1 (tig-2.3.0.tar.gz) = bdf92320b63bdd83350ebbda37150102f461422d
+RMD160 (tig-2.3.0.tar.gz) = c4d0bb0436cbdc3a97fc7a41fe774d7e2a9aa671
+SHA512 (tig-2.3.0.tar.gz) = d5e8bf04689fdbeab4f2ee60eef1e8e7686827228dc2f87b20c40a3a1c31aa3476d5088423ba8bcb72616a9f0f211a2dbb631a72cc946553e41cb225ea60ab37
+Size (tig-2.3.0.tar.gz) = 1080956 bytes
+SHA1 (patch-aa) = 03dfc24758b757d7cc7e715334f5648f94f7f2d3
+SHA1 (patch-include_tig_display.h) = 23a2773882ab45c3210a6e746248534b4a8361d5
+SHA1 (patch-include_tig_tig.h) = 42803e6589f97b6ad0230d0d895c429e1525476b
+SHA1 (patch-src_display.c) = 48e5a8ce20f10a95228589fa8b9e0836b3ffd4ab
diff --git a/tig/options.mk b/tig/options.mk
new file mode 100644
index 0000000000..cdbe591bce
--- /dev/null
+++ b/tig/options.mk
@@ -0,0 +1,15 @@
+# $NetBSD: options.mk,v 1.3 2017/01/04 18:16:32 roy Exp $
+#
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.tig
+PKG_SUPPORTED_OPTIONS=	wide-curses
+###
+###	Git commit messages often contain UTF-8, so we default
+###	to this here.
+###
+PKG_SUGGESTED_OPTIONS+=	wide-curses
+
+.include "../../mk/bsd.options.mk"
+
+USE_CURSES=		getsyx
+.include "../../mk/curses.buildlink3.mk"
diff --git a/tig/patches/patch-aa b/tig/patches/patch-aa
new file mode 100644
index 0000000000..f0b59c9164
--- /dev/null
+++ b/tig/patches/patch-aa
@@ -0,0 +1,24 @@
+$NetBSD: patch-aa,v 1.6 2014/04/04 21:00:24 ryoon Exp $
+
+- Don't make/install PDF.
+- Do not install tigrc, this is handled via CONF_FILES by pkgsrc.
+
+--- Makefile.orig	2017-09-29 15:15:29.000000000 +0000
++++ Makefile
+@@ -51,7 +51,7 @@ TOOLS	= test/tools/test-graph tools/doc-
+ TXTDOC	= doc/tig.1.adoc doc/tigrc.5.adoc doc/manual.adoc NEWS.adoc README.adoc INSTALL.adoc
+ MANDOC	= doc/tig.1 doc/tigrc.5 doc/tigmanual.7
+ HTMLDOC = doc/tig.1.html doc/tigrc.5.html doc/manual.html README.html INSTALL.html NEWS.html
+-ALLDOC	= $(MANDOC) $(HTMLDOC) doc/manual.html-chunked doc/manual.pdf
++ALLDOC	= $(MANDOC) $(HTMLDOC) doc/manual.html-chunked
+ 
+ # Never include the release number in the tarname for tagged
+ # versions.
+@@ -91,7 +91,6 @@ export sysconfdir
+ 
+ install: all
+ 	$(QUIET_INSTALL)tools/install.sh bin $(EXE) "$(DESTDIR)$(bindir)"
+-	$(QUIET_INSTALL)tools/install.sh data tigrc "$(DESTDIR)$(sysconfdir)"
+ 
+ install-doc-man: doc-man
+ 	$(Q)$(foreach doc, $(filter %.1, $(MANDOC)), \
diff --git a/tig/patches/patch-include_tig_display.h b/tig/patches/patch-include_tig_display.h
new file mode 100644
index 0000000000..e33a100bf2
--- /dev/null
+++ b/tig/patches/patch-include_tig_display.h
@@ -0,0 +1,19 @@
+$NetBSD$
+
+`newscr' is present only in curses, not in POSIX curses. Use `curscr' instead.
+
+XXX: Is this correct?
+
+--- include/tig/display.h.orig	2017-09-29 15:15:26.000000000 +0000
++++ include/tig/display.h
+@@ -58,8 +58,8 @@ void enable_mouse(bool enable);
+ 
+ enum status_code open_script(const char *path);
+ 
+-#define get_cursor_pos(cursor_y, cursor_x) getyx(newscr, cursor_y, cursor_x)
+-#define set_cursor_pos(cursor_y, cursor_x) wmove(newscr, cursor_y, cursor_x)
++#define get_cursor_pos(cursor_y, cursor_x) getyx(curscr, cursor_y, cursor_x)
++#define set_cursor_pos(cursor_y, cursor_x) wmove(curscr, cursor_y, cursor_x)
+ 
+ #endif
+ /* vim: set ts=8 sw=8 noexpandtab: */
diff --git a/tig/patches/patch-include_tig_tig.h b/tig/patches/patch-include_tig_tig.h
new file mode 100644
index 0000000000..31f2701eeb
--- /dev/null
+++ b/tig/patches/patch-include_tig_tig.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- include/tig/tig.h.orig	2017-09-29 15:15:26.000000000 +0000
++++ include/tig/tig.h
+@@ -108,7 +108,7 @@
+ #define MIN(x, y)	((x) < (y) ? (x) :  (y))
+ #define MAX(x, y)	((x) > (y) ? (x) :  (y))
+ 
+-#define ARRAY_SIZE(x)	(sizeof(x) / sizeof(x[0]))
++#define ARRAY_SIZE(x)	(sizeof(x) / sizeof((x)[0]))
+ #define STRING_SIZE(x)	(sizeof(x) - 1)
+ 
+ #define SIZEOF_STR	1024	/* Default string size. */
diff --git a/tig/patches/patch-src_display.c b/tig/patches/patch-src_display.c
new file mode 100644
index 0000000000..358117387e
--- /dev/null
+++ b/tig/patches/patch-src_display.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+Rename boolean `refresh' to `brefresh' to avoid confusion with curses(3)
+refresh().
+
+--- src/display.c.orig	2017-09-29 15:15:26.000000000 +0000
++++ src/display.c
+@@ -56,7 +56,7 @@ open_script(const char *path)
+ }
+ 
+ bool
+-open_external_viewer(const char *argv[], const char *dir, bool silent, bool confirm, bool echo, bool refresh, const char *notice)
++open_external_viewer(const char *argv[], const char *dir, bool silent, bool confirm, bool echo, bool brefresh, const char *notice)
+ {
+ 	bool ok;
+ 
+@@ -89,7 +89,7 @@ open_external_viewer(const char *argv[],
+ 		set_terminal_modes();
+ 	}
+ 
+-	if (watch_update(WATCH_EVENT_AFTER_COMMAND) && refresh) {
++	if (watch_update(WATCH_EVENT_AFTER_COMMAND) && brefresh) {
+ 		struct view *view;
+ 		int i;
+ 


Home | Main Index | Thread Index | Old Index