diff options
Diffstat (limited to 'app-text/csvfix')
-rw-r--r-- | app-text/csvfix/Manifest | 6 | ||||
-rw-r--r-- | app-text/csvfix/csvfix-1.6.ebuild | 49 | ||||
-rw-r--r-- | app-text/csvfix/files/csvfix-1.10a-tests.patch | 51 | ||||
-rw-r--r-- | app-text/csvfix/files/csvfix-1.6-makefile.patch | 69 | ||||
-rw-r--r-- | app-text/csvfix/metadata.xml | 11 |
5 files changed, 186 insertions, 0 deletions
diff --git a/app-text/csvfix/Manifest b/app-text/csvfix/Manifest new file mode 100644 index 000000000000..12c4e0edd392 --- /dev/null +++ b/app-text/csvfix/Manifest @@ -0,0 +1,6 @@ +AUX csvfix-1.10a-tests.patch 1004 BLAKE2B 3b7c1b133ccf4a38bd8be053498c61b0d34c699d9400d5100f07cebc17f235a3510dcde21caa42775681a0f47023d0ad51b9282ffb28a6fc798c71863ad19564 SHA512 3f2330d44872cb022f9f0d9ef9f3bf43d27da94d53ec306d84d56c6d5cf6bbd2afbfa710872cb7a144caeefcf90ce7837422fc421bee30a0af78bdef7d991383 +AUX csvfix-1.6-makefile.patch 1604 BLAKE2B d8f012a3f02c513f8b26e8fa5c7e805a0d333623a7018fadde5c6fea76bd2dd0582587e5aeedd990a71924dd2beba43e5d36c9332f2b257841536e4de8357433 SHA512 f1f5cf1e2d1b7d5d3031ff27fa570ec501af38e9340e8d00be62bee1a46afb9e2941de6d40644d7f5d1326abd8d94036bfc5b04d4fad0e5dba15faaaa22b66dc +DIST csvfix-1.6.tar.bz2 322530 BLAKE2B 8bda635a5182b31efe2c5c6613baaea13fe2f5c32f97c2bcbdaf05447103507c46190557f0a07e46aa0f442a6ed6b63b0d46d9759e5ddb2b19f00a31a38ddcce SHA512 abd525cff11e6dc4e59f5b26d57b2327564327e27009bbf777a6d83a6f8e474415b4448408aa162c6fb20b9a5bbaf970bdca23d8a9d7e31c3b8aaa19cd878035 +DIST csvfix_man_html_160.zip 403468 BLAKE2B 8007ca95891a99926f6c2968a73ddc30211ff07017261583664dc44ac84a508d097cb4acb81529891caa2f98ca4f094565f46cfa9d79e0d99df92ffd5acc908e SHA512 868047ca4eef7bbbf3735f25489c72820465c414af2ffa11fd3e61fd45ca80661d73082a90b94c4503876bb2355a6b3751f8ede862744f0d7223e77ae770ccd5 +EBUILD csvfix-1.6.ebuild 1079 BLAKE2B b579923ad074ed361048e391a0c4674d139a7c63de347130e7b869d31f23b9964bba63e0652e493b733f2cf35b1de4584f6d925bcf588d6b8a2d22893f41b2a9 SHA512 c311b14e8465c49c44c58a8017107b05c76edc9b66a9519a50889041812c2d215d4b9c3b0c3f44bbe08126bd612a7bf90b4c09b2641eab2cb225f5ae653798b0 +MISC metadata.xml 336 BLAKE2B d48b98955a4ccd6b3c1dfab49fc5e7a18820c7f787fbb5dcf5833690b082efda24bdda2168fc90f58a4d571c71c6856c86e319596840fe669f0fd3208c44da4e SHA512 e2d5e85fd1ecca319a7fe32f7fcd1f897cc3ba4c5fb4200ca9be1a4ebbc1e26c7200fbdf8cf5df9850bc57b62c9ef227cb907c611d43c2e5f04de3639811caa1 diff --git a/app-text/csvfix/csvfix-1.6.ebuild b/app-text/csvfix/csvfix-1.6.ebuild new file mode 100644 index 000000000000..e79e239ef7de --- /dev/null +++ b/app-text/csvfix/csvfix-1.6.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs versionator vcs-snapshot + +MY_PV="$(delete_all_version_separators)" +DESCRIPTION="A stream editor for manipulating CSV files" +HOMEPAGE="https://neilb.bitbucket.org/csvfix/ https://bitbucket.org/neilb/csvfix/" +SRC_URI="https://bitbucket.org/neilb/csvfix/get/version-${PV}.tar.bz2 -> ${P}.tar.bz2 + doc? ( https://bitbucket.org/neilb/csvfix/downloads/csvfix_man_html_${MY_PV}0.zip )" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +RDEPEND="dev-libs/expat" +DEPEND="${RDEPEND} + doc? ( app-arch/unzip )" + +PATCHES=( + "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${PN}-1.10a-tests.patch +) + +src_prepare() { + default + edos2unix $(find csvfix/tests -type f) +} + +src_compile() { + emake CC="$(tc-getCXX)" AR="$(tc-getAR)" lin +} + +src_test() { + cd ${PN}/tests + chmod +x run1 runtests + ./runtests || die "tests failed" +} + +src_install() { + dobin csvfix/bin/csvfix + if use doc; then + docinto html + dodoc -r "${WORKDIR}"/${PN}${MY_PV}/* + fi +} diff --git a/app-text/csvfix/files/csvfix-1.10a-tests.patch b/app-text/csvfix/files/csvfix-1.10a-tests.patch new file mode 100644 index 000000000000..8e4461d85a31 --- /dev/null +++ b/app-text/csvfix/files/csvfix-1.10a-tests.patch @@ -0,0 +1,51 @@ +--- csvfix-build.orig/csvfix/tests/run1 ++++ csvfix-build/csvfix/tests/run1 +@@ -1,4 +1,4 @@ +-#!bash
++#!/bin/bash
+ # run1
+ # run single test
+ # copyright (C) 2008 Neil Butterworth
+@@ -49,7 +49,7 @@ + fi
+
+ # exe to be tested - used in tests
+-CSVED=../bin/csvfix.exe
++CSVED=../bin/csvfix
+ export CSVED
+
+ if [ ! -f "$CSVED" ]
+@@ -64,7 +64,7 @@ + fi
+
+ # where to find diff & where to put output
+-DIFF=/bin/diff
++DIFF=/usr/bin/diff
+ DIFFOUT=tmp/_diffout
+ WINDIFF="C:/Program Files/Microsoft Visual Studio/Common/Tools/WINDIFF.EXE"
+ TEST=`basename $TEST`
+@@ -133,5 +133,7 @@ + fi
+ else
+ echo "Execution problem with $TEST - please correct"
++ color_red "FAILED $TEST"
++ exit 1
+ fi
+
+--- csvfix-build.orig/csvfix/tests/runtests ++++ csvfix-build/csvfix/tests/runtests +@@ -1,4 +1,4 @@ +-#!bash
++#!/bin/bash
+ # runall.bash
+ # run all tests and report
+
+@@ -22,3 +22,8 @@ + echo $FAILS failed, $PASSES passed
+ echo ""
+
++if [[ $FAILS -gt 0 ]]; then
++ exit 1
++else
++ exit 0
++fi
diff --git a/app-text/csvfix/files/csvfix-1.6-makefile.patch b/app-text/csvfix/files/csvfix-1.6-makefile.patch new file mode 100644 index 000000000000..aaee2aa003f7 --- /dev/null +++ b/app-text/csvfix/files/csvfix-1.6-makefile.patch @@ -0,0 +1,69 @@ +--- neilb-csvfix-e804a794d175/alib/Makefile ++++ neilb-csvfix-e804a794d175/alib/Makefile +@@ -2,12 +2,12 @@ + # Copyright (C) 2009 Neil Butterworth
+
+ OUT = lib/alib.a
++AR = ar
+ CCTYPE = gcc
+ IDIR = inc
+ ODIR = obj
+-XDIR = expat
+ SDIR = src
+-INC = -Iinc -Iexpat
++INC = -Iinc
+
+ cc.gcc = g++
+ cc.clang = clang++ -std=c++11 -stdlib=libc++
+@@ -26,9 +26,6 @@ + _WINOBJS = a_db.o a_dir.o a_opsys.o a_winerr.o
+ WINOBJS = $(patsubst %,$(ODIR)/%,$(_WINOBJS))
+
+-_EXPAT = xmlparse.o xmlrole.o xmltok.o xmltok_impl.o xmltok_ns.o
+-EXPAT = $(patsubst %,$(ODIR)/%,$(_EXPAT))
+-
+ $(ODIR)/%.o: $(SDIR)/%.cpp $(IDIR)/%.h
+ $(CC) -c $(INC) $(CFLAGS) -o $@ $<
+
+@@ -36,10 +33,10 @@ + $(CC) -c $(INC) $(CFLAGS) -o $@ $<
+
+ win: $(OBJS) $(EXPAT) $(WINOBJS)
+- ar rvs $(OUT) $^
++ $(AR) rvs $(OUT) $^
+
+ lin: $(OBJS) $(EXPAT)
+- ar rvs $(OUT) $^
++ $(AR) rvs $(OUT) $^
+
+ .PHONY: clean
+ clean:
+--- neilb-csvfix-e804a794d175/csvfix/Makefile ++++ neilb-csvfix-e804a794d175/csvfix/Makefile +@@ -22,7 +22,7 @@ +
+ ALIB = ../alib/lib/alib.a
+ WINLIBS = ../alib/lib/alib.a -lodbc32
+-LINLIBS = ../alib/lib/alib.a
++LINLIBS = ../alib/lib/alib.a -lexpat
+
+ _OBJS = csved_atable.o \
+ csved_block.o \
+@@ -99,8 +99,7 @@ + strip $(WINOUT)
+
+ $(LINOUT): $(OBJS) $(ALIB)
+- $(CC) -o $@ $^ $(LINLIBS)
+- strip $(LINOUT)
++ $(CC) $(LDFLAGS) -o $@ $^ $(LINLIBS)
+
+ .PHONY: win
+ win:
+--- neilb-csvfix-e804a794d175/Makefile ++++ neilb-csvfix-e804a794d175/Makefile +@@ -1,3 +1,5 @@ ++CFLAGS += -std=c++11
++
+ ifndef COMSPEC
+ CLEAN = (cd alib; $(MAKE) clean) && (cd csvfix; $(MAKE) clean)
+ else
diff --git a/app-text/csvfix/metadata.xml b/app-text/csvfix/metadata.xml new file mode 100644 index 000000000000..8aaa5d2f6787 --- /dev/null +++ b/app-text/csvfix/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>radhermit@gentoo.org</email> + <name>Tim Harder</name> + </maintainer> + <upstream> + <remote-id type="bitbucket">neilb/csvfix</remote-id> + </upstream> +</pkgmetadata> |