From c3cebc89f65b85a79750dc8b22c0711cbfb1db07 Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Mon, 25 Nov 2013 17:26:47 -0800 Subject: [PATCH] Added spiff, recipe and patch by GCI student Mrowqa --- sys-apps/spiff/licenses/SPIFF | 13 +++++++ sys-apps/spiff/patches/Makefile.patch | 43 +++++++++++++++++++++ sys-apps/spiff/spiff-1.recipe | 54 +++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 sys-apps/spiff/licenses/SPIFF create mode 100644 sys-apps/spiff/patches/Makefile.patch create mode 100644 sys-apps/spiff/spiff-1.recipe diff --git a/sys-apps/spiff/licenses/SPIFF b/sys-apps/spiff/licenses/SPIFF new file mode 100644 index 000000000..7f939573b --- /dev/null +++ b/sys-apps/spiff/licenses/SPIFF @@ -0,0 +1,13 @@ +COPYRIGHT + +Our lawyers advise the following: + + Copyright (c) 1988 Bellcore + All Rights Reserved + Permission is granted to copy or use this program, EXCEPT that it + may not be sold for profit, the copyright notice must be reproduced + on copies, and credit should be given to Bellcore where it is due. + BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM. + +Given that all of the above seems to be very reasonable, there should be no +reason for anyone to not play by the rules. diff --git a/sys-apps/spiff/patches/Makefile.patch b/sys-apps/spiff/patches/Makefile.patch new file mode 100644 index 000000000..48126a650 --- /dev/null +++ b/sys-apps/spiff/patches/Makefile.patch @@ -0,0 +1,43 @@ +diff --git a/SRC/Makefile b/SRC/Makefile +index 12029bd..cce9963 100644 +--- a/SRC/Makefile ++++ b/SRC/Makefile +@@ -32,8 +32,8 @@ OSFLAG= + # choose either of a) b) or c) + # + # a) if you use termcap, enable the following lines +-TFLAG=-DM_TERMCAP +-TLIB=termcap ++#TFLAG=-DM_TERMCAP ++#TLIB=termcap + + # b) if you are using terminfo on a XENIX machine, enable the following lines + #TFLAG=-DM_TERMINFO +@@ -41,8 +41,8 @@ TLIB=termcap + + # c) if you use terminfo on any other type of machine, + # enable the following lines +-#TFLAG=-DM_TERMINFO +-#TLIB=curses ++TFLAG=-DM_TERMINFO ++TLIB=ncurses + + # + # 3) SELECTION OF WINDOW MANAGER AVAILABILITY +@@ -73,6 +73,7 @@ CFILES= spiff.c output.c compare.c float.c strings.c exact.c miller.c parse.c co + HFILES=misc.h strings.h line.h float.h floatrep.h tol.h command.h comment.h token.h edit.h parse.h compare.h flagdefs.h exact.h miller.h visual.h output.h + OTHER=README Makefile Sample.1 Sample.2 Sample.3 Sample.4 paper.ms paper.out + MANPAGE=spiff.1 ++INSDIR=insDir + + CFLAGS=-O $(OSFLAG) $(TFLAG) $(VISFLAG) + +@@ -138,6 +139,7 @@ cpio: + cmd: + -$(CMD) $(CFILES) $(HFILES) $(OTHER) $(MANPAGE) + install: +- mv spiff $(INSDIR)/bin ++ mkdir -p $(INSDIR)/man/man1 ++ mv spiff $(INSDIR) + cp $(MANPAGE) $(INSDIR)/man/man1 + diff --git a/sys-apps/spiff/spiff-1.recipe b/sys-apps/spiff/spiff-1.recipe new file mode 100644 index 000000000..2662cb205 --- /dev/null +++ b/sys-apps/spiff/spiff-1.recipe @@ -0,0 +1,54 @@ +DESCRIPTION=" + 'spiff' is a command line program that compares the contents of two files + and prints a description of the important differences between them in a + form rather like the standard 'diff' utility. However, unlike diff, it is + not line oriented -- it compares word sequences with all white space and + newlines disregarded, so even if formatting is different you only see the + significant differences. It also compares floating-point values with a + tolerance, so you can look in data files for discrepancies." +SUMMARY="Advanced command line tool like standard 'diff'" +HOMEPAGE="https://github.com/HaikuArchives/Spiff" +SRC_URI="git+https://github.com/HaikuArchives/Spiff#50fa5e3cfe1431071b1de57828508f6903b052c2" +REVISION="1" +#STATUS_HAIKU="stable" +ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" + +PROVIDES=" + spiff = $portVersion + bin:spiff = $portVersion" + +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + makefile_engine + ncurses + cmd:gcc + cmd:make + cmd:mkdepend" + +BUILD_REQUIRES=" + haiku_devel >= $haikuVersion + devel:libncurses + " + +COPYRIGHT="1988 Bellcore" +LICENSE="SPIFF" + +PATCHES="Makefile.patch" + +BUILD() +{ + cd SRC + make + cd .. +} + +INSTALL() +{ + cd SRC + make install + mkdir -p $binDir + mkdir -p $documentationDir + cp insDir/spiff $binDir + cp -R insDir/man $documentationDir + cd .. +}