pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/csvutils
Module Name: pkgsrc
Committed By: cheusov
Date: Wed Jul 20 23:15:52 UTC 2016
Added Files:
pkgsrc/textproc/csvutils: DESCR Makefile PLIST distinfo
pkgsrc/textproc/csvutils/patches: patch-Makefile patch-src_csvgrep.c
Log Message:
Import csvutils from WIP.
csvutils is a set of command-line utilities for managing CSV data using the libcsv library.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/csvutils/DESCR \
pkgsrc/textproc/csvutils/Makefile pkgsrc/textproc/csvutils/PLIST \
pkgsrc/textproc/csvutils/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/csvutils/patches/patch-Makefile \
pkgsrc/textproc/csvutils/patches/patch-src_csvgrep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/textproc/csvutils/DESCR
diff -u /dev/null pkgsrc/textproc/csvutils/DESCR:1.1
--- /dev/null Wed Jul 20 23:15:52 2016
+++ pkgsrc/textproc/csvutils/DESCR Wed Jul 20 23:15:52 2016
@@ -0,0 +1 @@
+A set of command-line utilities for managing CSV data using the libcsv library.
Index: pkgsrc/textproc/csvutils/Makefile
diff -u /dev/null pkgsrc/textproc/csvutils/Makefile:1.1
--- /dev/null Wed Jul 20 23:15:52 2016
+++ pkgsrc/textproc/csvutils/Makefile Wed Jul 20 23:15:52 2016
@@ -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"
Index: pkgsrc/textproc/csvutils/PLIST
diff -u /dev/null pkgsrc/textproc/csvutils/PLIST:1.1
--- /dev/null Wed Jul 20 23:15:52 2016
+++ pkgsrc/textproc/csvutils/PLIST Wed Jul 20 23:15:52 2016
@@ -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
Index: pkgsrc/textproc/csvutils/distinfo
diff -u /dev/null pkgsrc/textproc/csvutils/distinfo:1.1
--- /dev/null Wed Jul 20 23:15:52 2016
+++ pkgsrc/textproc/csvutils/distinfo Wed Jul 20 23:15:52 2016
@@ -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
Index: pkgsrc/textproc/csvutils/patches/patch-Makefile
diff -u /dev/null pkgsrc/textproc/csvutils/patches/patch-Makefile:1.1
--- /dev/null Wed Jul 20 23:15:52 2016
+++ pkgsrc/textproc/csvutils/patches/patch-Makefile Wed Jul 20 23:15:52 2016
@@ -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
Index: pkgsrc/textproc/csvutils/patches/patch-src_csvgrep.c
diff -u /dev/null pkgsrc/textproc/csvutils/patches/patch-src_csvgrep.c:1.1
--- /dev/null Wed Jul 20 23:15:52 2016
+++ pkgsrc/textproc/csvutils/patches/patch-src_csvgrep.c Wed Jul 20 23:15:52 2016
@@ -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