pkgsrc-WIP-changes archive

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

pick: Simplify the package a bit and little (mostly cosmetic) fixes



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Tue May 8 12:13:31 2018 +0200
Changeset:	7c47cfd34776021060f3c2bee25115ef2ccf1785

Modified Files:
	pick/Makefile
	pick/distinfo
Added Files:
	pick/patches/patch-pick.c
Removed Files:
	pick/patches/patch-curses

Log Message:
pick: Simplify the package a bit and little (mostly cosmetic) fixes

 - GITHUB_PROJECT is already by default PKGBASE (i.e. `pick') so we can
   safely avoid initialization of it
 - Pass `-D_OPENBSD_SOURCE' via CFLAGS on NetBSD, needed by reallocarray(3)
   and strtonum(3).
 - pick also need curses, include curses bl3 accordingly.
 - Rename patch-curses to patch-pick.c to follow current pkgsrc practices and
   add a comment to it.

Discussed with Jenz Guenther, thank you very much Jenz for the quick feedback!

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

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

diffstat:
 pick/Makefile             |  4 +++-
 pick/distinfo             |  2 +-
 pick/patches/patch-curses | 22 ----------------------
 pick/patches/patch-pick.c | 25 +++++++++++++++++++++++++
 4 files changed, 29 insertions(+), 24 deletions(-)

diffs:
diff --git a/pick/Makefile b/pick/Makefile
index ee8db44c7d..b272e5ca00 100644
--- a/pick/Makefile
+++ b/pick/Makefile
@@ -3,7 +3,6 @@
 DISTNAME=	pick-2.0.2
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_GITHUB:=mptre/}
-GITHUB_PROJECT=	pick
 GITHUB_RELEASE=	v${PKGVERSION_NOREV}
 
 MAINTAINER=	dbotw%gmx.net@localhost
@@ -13,4 +12,7 @@ LICENSE=	mit
 
 GNU_CONFIGURE=	yes
 
+CFLAGS.NetBSD+=	-D_OPENBSD_SOURCE	# reallocarray(3), strtonum(3)
+
+.include "../../mk/curses.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/pick/distinfo b/pick/distinfo
index 6475cffa22..b0ecef41cd 100644
--- a/pick/distinfo
+++ b/pick/distinfo
@@ -4,4 +4,4 @@ SHA1 (pick-2.0.2.tar.gz) = 6cc08e999f044defff085efa9182678cf25ff132
 RMD160 (pick-2.0.2.tar.gz) = 0d5b69ca295511ac7e32b3a8fea24c590ed089e3
 SHA512 (pick-2.0.2.tar.gz) = 92d74fa62f6c829117c6c3faf6ec39fc5dd66465516be396d21d7b0a92ee10761a1d3f43aa4a454f8d19790ac02a4a1af145139d488344c97a511805c5d6965b
 Size (pick-2.0.2.tar.gz) = 132174 bytes
-SHA1 (patch-curses) = a201bf7316b20656949a62617c3369a05e5b1778
+SHA1 (patch-pick.c) = cdce675828e0187cc9567aeec93893c9dbd14087
diff --git a/pick/patches/patch-curses b/pick/patches/patch-curses
deleted file mode 100644
index 907dfabd23..0000000000
--- a/pick/patches/patch-curses
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- pick.c.orig	2018-04-10 19:52:06.000000000 +0000
-+++ pick.c
-@@ -90,7 +90,7 @@ static void			 toggle_sigwinch(int);
- static int			 tty_getc(void);
- static const char		*tty_getcap(char *);
- static void			 tty_init(int);
--static const char		*tty_parm1(char *, int);
-+static const char		*tty_parm1(const char *, int);
- static int			 tty_putc(int);
- static void			 tty_restore(int);
- static void			 tty_size(void);
-@@ -1063,7 +1063,7 @@ tty_getcap(char *cap)
- }
- 
- const char *
--tty_parm1(char *cap, int a)
-+tty_parm1(const char *cap, int a)
- {
- 	return tparm(cap, a, 0, 0, 0, 0, 0, 0, 0, 0);
- }
diff --git a/pick/patches/patch-pick.c b/pick/patches/patch-pick.c
new file mode 100644
index 0000000000..b3d2e32b69
--- /dev/null
+++ b/pick/patches/patch-pick.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+tparm(3) expects a `const char *' as first argument, adjust tty_parm1()
+accordingly.
+
+--- pick.c.orig	2018-04-10 19:52:06.000000000 +0000
++++ pick.c
+@@ -90,7 +90,7 @@ static void			 toggle_sigwinch(int);
+ static int			 tty_getc(void);
+ static const char		*tty_getcap(char *);
+ static void			 tty_init(int);
+-static const char		*tty_parm1(char *, int);
++static const char		*tty_parm1(const char *, int);
+ static int			 tty_putc(int);
+ static void			 tty_restore(int);
+ static void			 tty_size(void);
+@@ -1063,7 +1063,7 @@ tty_getcap(char *cap)
+ }
+ 
+ const char *
+-tty_parm1(char *cap, int a)
++tty_parm1(const char *cap, int a)
+ {
+ 	return tparm(cap, a, 0, 0, 0, 0, 0, 0, 0, 0);
+ }


Home | Main Index | Thread Index | Old Index