pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/textproc/csvutils Import csvutils from WIP.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/87086e9aa507
branches:  trunk
changeset: 349999:87086e9aa507
user:      cheusov <cheusov%pkgsrc.org@localhost>
date:      Wed Jul 20 23:15:52 2016 +0000

description:
Import csvutils from WIP.

csvutils is a set of command-line utilities for managing CSV data using the libcsv library.

diffstat:

 textproc/csvutils/DESCR                       |   1 +
 textproc/csvutils/Makefile                    |  30 ++++++++++
 textproc/csvutils/PLIST                       |  14 ++++
 textproc/csvutils/distinfo                    |   7 ++
 textproc/csvutils/patches/patch-Makefile      |  76 +++++++++++++++++++++++++++
 textproc/csvutils/patches/patch-src_csvgrep.c |  15 +++++
 6 files changed, 143 insertions(+), 0 deletions(-)

diffs (167 lines):

diff -r 3ab1e017564f -r 87086e9aa507 textproc/csvutils/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/csvutils/DESCR   Wed Jul 20 23:15:52 2016 +0000
@@ -0,0 +1,1 @@
+A set of command-line utilities for managing CSV data using the libcsv library.
diff -r 3ab1e017564f -r 87086e9aa507 textproc/csvutils/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/csvutils/Makefile        Wed Jul 20 23:15:52 2016 +0000
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1 2016/07/20 23:15:52 cheusov Exp $
+
+DISTNAME=      csvutils-0.9.3
+CATEGORIES=    textproc
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=csvutils/}
+EXTRACT_SUFX=  .tgz
+
+MAINTAINER=    leot%NetBSD.org@localhost
+HOMEPAGE=      http://csvutils.sourceforge.net/
+COMMENT=       Command-line utilities for managing CSV data using libcsv
+LICENSE=       gnu-gpl-v2
+
+CONFLICTS=     csvkit-[0-9]*
+
+USE_TOOLS+=    gmake gunzip
+
+MAKE_ENV+=     INCLUDES="-I${PREFIX}/include" PREFIX="${PREFIX}" MANDIR="${PKGMANDIR}"
+MAKE_ENV+=     LDFLAGS="-R,-L${PREFIX}/lib"
+
+INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1
+
+pre-install:
+       set -e ; \
+       for f in ${WRKSRC}/*.gz; do \
+               gunzip "$${f}" ; \
+       done
+
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../textproc/libcsv/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 3ab1e017564f -r 87086e9aa507 textproc/csvutils/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/csvutils/PLIST   Wed Jul 20 23:15:52 2016 +0000
@@ -0,0 +1,14 @@
+@comment $NetBSD: PLIST,v 1.1 2016/07/20 23:15:52 cheusov Exp $
+bin/csvbreak
+bin/csvcheck
+bin/csvcount
+bin/csvcut
+bin/csvfix
+bin/csvgrep
+man/man1/csvbreak.1
+man/man1/csvcheck.1
+man/man1/csvcount.1
+man/man1/csvcut.1
+man/man1/csvfix.1
+man/man1/csvgrep.1
+man/man1/csvutils.1
diff -r 3ab1e017564f -r 87086e9aa507 textproc/csvutils/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/csvutils/distinfo        Wed Jul 20 23:15:52 2016 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2016/07/20 23:15:52 cheusov Exp $
+
+SHA1 (csvutils-0.9.3.tgz) = 0153f39f899c85cdf276316ebadfa4b2b537c7b3
+RMD160 (csvutils-0.9.3.tgz) = 0805b32ac3df05a399bdf0028114985afd3118d7
+Size (csvutils-0.9.3.tgz) = 47046 bytes
+SHA1 (patch-Makefile) = fa6490dc31fa4b55898f0c1ec24a933192fc2a31
+SHA1 (patch-src_csvgrep.c) = 402b7eaea8c4db04ba76e86ecc65e66e397c4427
diff -r 3ab1e017564f -r 87086e9aa507 textproc/csvutils/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/csvutils/patches/patch-Makefile  Wed Jul 20 23:15:52 2016 +0000
@@ -0,0 +1,76 @@
+$NetBSD: patch-Makefile,v 1.1 2016/07/20 23:15:52 cheusov Exp $
+
+o Do not force various variables and do not ignore user's CFLAGS and LDFLAGS.
+o Properly use DESTDIR, PREFIX and MANDIR.
+o Convert INCLUDES to INCS, add LIBS and also honor other include.
+
+--- Makefile.orig      2008-07-26 23:09:18.000000000 +0000
++++ Makefile
+@@ -1,9 +1,13 @@
+-CC=gcc
+-CFLAGS=-Wall -ansi
+-DESTDIR=/usr/local/bin
+-MANDIR=/usr/share/man/man1
+-INCLUDES=-I include
+-CPPFLAGS=
++CC?=gcc
++
++PREFIX?=/usr/local
++MANDIR?=man
++
++INCS = -I ./include -I ${PREFIX}/include
++LIBS = -L ${PREFIX}/lib
++
++CFLAGS += -Wall -ansi ${INCS}
++LDFLAGS += ${LIBS}
+ 
+ VPATH=src
+ 
+@@ -15,35 +19,35 @@ csvcut csvgrep csvcount csvcheck csvfix 
+ csvcut csvgrep csvcount csvcheck csvfix csvbreak: helper.o
+ 
+ csvcut: csvcut.c 
+-      $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $^ -o $@ -lcsv
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lcsv
+ 
+ csvgrep: csvgrep.c 
+-      $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $^ -o $@ -lcsv -lpcre
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lcsv -lpcre
+ 
+ csvcount: csvcount.c 
+-      $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $^ -o $@ -lcsv
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lcsv
+ 
+ csvcheck: csvcheck.c 
+-      $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $^ -o $@ -lcsv
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lcsv
+ 
+ csvfix: csvfix.c 
+-      $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $^ -o $@ -lcsv
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lcsv
+ 
+ csvbreak: csvbreak.c 
+-      $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $^ -o $@ -lcsv
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lcsv
+ 
+ version.o: version.c
+-      $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) -c $<
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c $<
+ 
+ helper.o: helper.c
+-      $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) -c $<
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c $<
+ 
+ install_utils: csvcut csvgrep csvcount csvcheck csvfix csvbreak
+-      cp -f $^ $(DESTDIR)
++      cp -f $^ $(DESTDIR)$(PREFIX)/bin
+ 
+-install_man: csvutils.1.gz csvcut.1.gz csvgrep.1.gz csvcount.1.gz \
+-             csvcheck.1.gz csvfix.1.gz csvbreak.1.gz
+-      cp -f $^ $(MANDIR)
++install_man: csvutils.1 csvcut.1 csvgrep.1 csvcount.1 \
++             csvcheck.1 csvfix.1 csvbreak.1
++      cp -f $^ $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+ 
+ clean:
+       rm *.o csvcut csvgrep csvcount csvcheck csvfix csvbreak
diff -r 3ab1e017564f -r 87086e9aa507 textproc/csvutils/patches/patch-src_csvgrep.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/csvutils/patches/patch-src_csvgrep.c     Wed Jul 20 23:15:52 2016 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_csvgrep.c,v 1.1 2016/07/20 23:15:52 cheusov Exp $
+
+Properly use toupper(3).
+
+--- src/csvgrep.c.orig 2008-07-27 17:45:20.000000000 +0000
++++ src/csvgrep.c
+@@ -778,7 +778,7 @@ main (int argc, char *argv[])
+       /* Upcase string for case insensitive fixed match*/
+       char *ptr = pattern;
+       while (*ptr)
+-        *ptr = toupper(*ptr), ptr++;
++        *ptr = toupper((unsigned char)*ptr), ptr++;
+     }
+   } else if (match_type == PCRE) {
+     #ifdef WITHOUT_PCRE



Home | Main Index | Thread Index | Old Index