summaryrefslogtreecommitdiff
path: root/app-text/csvfix
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/csvfix')
-rw-r--r--app-text/csvfix/Manifest8
-rw-r--r--app-text/csvfix/csvfix-1.6.ebuild49
-rw-r--r--app-text/csvfix/files/csvfix-1.10a-tests.patch51
-rw-r--r--app-text/csvfix/files/csvfix-1.6-makefile.patch69
-rw-r--r--app-text/csvfix/metadata.xml11
5 files changed, 188 insertions, 0 deletions
diff --git a/app-text/csvfix/Manifest b/app-text/csvfix/Manifest
new file mode 100644
index 000000000000..a248dfb9c37a
--- /dev/null
+++ b/app-text/csvfix/Manifest
@@ -0,0 +1,8 @@
+AUX csvfix-1.10a-tests.patch 1004 SHA256 1cd14d0b00845b739e2ed79a4efd76ba62976eb448786e9704e645a559914e85 SHA512 3f2330d44872cb022f9f0d9ef9f3bf43d27da94d53ec306d84d56c6d5cf6bbd2afbfa710872cb7a144caeefcf90ce7837422fc421bee30a0af78bdef7d991383 WHIRLPOOL afa2e0353278b24a84b1bb39234b11c47e4f5f0d1b63ce4e2ec8798fd5174b9d8b883dc042bc0a0caedc67cae4825f51c5f47c6963252087c9cb5802d7dae199
+AUX csvfix-1.6-makefile.patch 1604 SHA256 63b46d45ff200537bf0553958d5f702b8d6cb166f2a8227b21cbe34949593f17 SHA512 f1f5cf1e2d1b7d5d3031ff27fa570ec501af38e9340e8d00be62bee1a46afb9e2941de6d40644d7f5d1326abd8d94036bfc5b04d4fad0e5dba15faaaa22b66dc WHIRLPOOL 49111164fa49c3825b5e2654895ce546493e75a3b458fe1b997ce619e26469b7735338cd0144365860df93abc27d2aff8a82f88a990ed2a132b94f3ce781ab34
+DIST csvfix-1.6.tar.bz2 322530 SHA256 d899796e0e6ff5ff6ed6ffd106bec4a66f681eea9ed1068834d35939948028a1 SHA512 abd525cff11e6dc4e59f5b26d57b2327564327e27009bbf777a6d83a6f8e474415b4448408aa162c6fb20b9a5bbaf970bdca23d8a9d7e31c3b8aaa19cd878035 WHIRLPOOL 8a40e334ad281585bd88e83ffc3435e0bfc8851f5b7cb924f5ada4a84757fa172ce0061fe1af906e67eca0cd61b11ef0f75813af3935544804e896dafe57deb9
+DIST csvfix_man_html_160.zip 403468 SHA256 56e770ed6a5f8526b560157fa134d5b6c1e0bf21103a8dca5964cd7d476d96da SHA512 868047ca4eef7bbbf3735f25489c72820465c414af2ffa11fd3e61fd45ca80661d73082a90b94c4503876bb2355a6b3751f8ede862744f0d7223e77ae770ccd5 WHIRLPOOL 2a5490432f6b88ded5bb25b7bfb664f85dd4eb6dfc292b84fda9ffb427601e089d32f1815f415d75e924652a667f9459509df3d20f635a99d0b398da6897ec8b
+EBUILD csvfix-1.6.ebuild 1079 SHA256 820777a260968081626c2891498494a6fb4a083ace5a893486117c90e9cd0afb SHA512 c311b14e8465c49c44c58a8017107b05c76edc9b66a9519a50889041812c2d215d4b9c3b0c3f44bbe08126bd612a7bf90b4c09b2641eab2cb225f5ae653798b0 WHIRLPOOL baa1ffe70ee85ae9ba8373d99517f30bdaa097848e3c5b79a2d327d533753b80ca60b6c349501f59c729d2a31da5f6f798fb944c234a55392d6022ffc0564678
+MISC ChangeLog 2873 SHA256 54a1e1180fbe1f599f91a9a3532e2046e7ef60141741180cae0aeafe90cddec4 SHA512 c9a1cffc8f9ac34c1b696dbe2b4dcd09d636ee0353998848ea9af5f0e5af432c50ca3e69d443dab33b660c94ab5fc92796a74a5d916673d591502b21a51394a0 WHIRLPOOL 03a0778c60fb2f8b6c090166351577ab7f2b5ff209565c479f388838b0ddb2960dde781af7d560bd40bae930b1dd206c9c15606893eb50ecbb17be6914ea643c
+MISC ChangeLog-2015 1695 SHA256 91daca286e7b8a378d88efb186f6feade8a3ce54025367569b8af657a50c7193 SHA512 0ccf94b1dd1506a8481a2250021bb209ad5e0b3af2ffb1eb8d967c69a4e64d0059fe2163ecf2c7b0ed6bd9d6ed330be2e7f6629c61a9bc44facdd965a7fb6c7e WHIRLPOOL 4b58587ae232a6430786659a5e40d6b45e8c4d8f775f94cf478691c507ecefa4df458fccc04014dff27997d12f3e9c1e4d0f7acd541c8a8f60346f402b82fbc1
+MISC metadata.xml 336 SHA256 cd5395048ac16a7f1468c4e58039d89aeff1ea45aef2b54ed71bdec62eb34620 SHA512 e2d5e85fd1ecca319a7fe32f7fcd1f897cc3ba4c5fb4200ca9be1a4ebbc1e26c7200fbdf8cf5df9850bc57b62c9ef227cb907c611d43c2e5f04de3639811caa1 WHIRLPOOL 09e16f11226b81aeabaa844ffa7667a68c8d8391fb12f66c6e77e003467100efbadb6f49a67fe8c4d3e83059b578f1b99f6a9651bdaf538d970584245792dc9b
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>