From 3bbe3f672e37e4f609adb3be3a6476edce2243ec Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sat, 11 Mar 2017 05:01:29 +0000 Subject: Import diff from OpenBSD and remove GNU diff Some of the modifications from the previous summer of code has been integrated Modification for compatibility with GNU diff output has been added Main difference with OpenBSD: Implement multiple GNU diff options: * --ignore-file-name-case * --no-ignore-file-name-case * --normal * --tabsize * --strip-trailing-cr Make diff -p compatible with GNU diff Implement diff -l Make diff -r compatible with GNU diff Capsicumize diffing 2 regular files Add a simple test suite Approved by: AsiaBSDcon devsummit Obtained from: OpenBSD, GSoC Relnotes: yes --- gnu/usr.bin/Makefile | 2 +- gnu/usr.bin/diff/Makefile | 36 ---------------------------------- gnu/usr.bin/diff/Makefile.depend | 19 ------------------ gnu/usr.bin/diff/tests/Makefile | 15 -------------- gnu/usr.bin/diff/tests/Makefile.depend | 11 ----------- 5 files changed, 1 insertion(+), 82 deletions(-) delete mode 100644 gnu/usr.bin/diff/Makefile delete mode 100644 gnu/usr.bin/diff/Makefile.depend delete mode 100644 gnu/usr.bin/diff/tests/Makefile delete mode 100644 gnu/usr.bin/diff/tests/Makefile.depend (limited to 'gnu') diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index 6ed33cd1295d2..301da9b6e9f1d 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -17,7 +17,7 @@ SUBDIR.${MK_GDB}+= gdb .endif SUBDIR.${MK_GCC}+= cc -SUBDIR.${MK_GNU_DIFF}+= diff diff3 +SUBDIR.${MK_GNU_DIFF}+= diff3 SUBDIR.${MK_GNU_GREP}+= grep SUBDIR.${MK_GPL_DTC}+= dtc SUBDIR.${MK_TESTS}+= tests diff --git a/gnu/usr.bin/diff/Makefile b/gnu/usr.bin/diff/Makefile deleted file mode 100644 index f5b38f1db9a89..0000000000000 --- a/gnu/usr.bin/diff/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# $FreeBSD$ - -.include - -DIFFSRC=${.CURDIR}/../../../contrib/diff/src -.PATH: ${DIFFSRC} \ - ${.CURDIR}/../../../contrib/diff/lib \ - ${.CURDIR}/../../../contrib/diff/man \ - ${.CURDIR}/../../../contrib/diff/doc - -PROG= diff -SRCS= analyze.c context.c diff.c dir.c ed.c ifdef.c io.c \ - normal.c side.c util.c \ - xmalloc.c strtoumax.c cmpbuf.c exitfail.c error.c quotesys.c \ - strftime.c c-stack.c basename.c exclude.c hard-locale.c \ - file-type.c posixver.c prepargs.c version-etc.c - -# Important for ctype macros! -CFLAGS+=-funsigned-char - -CFLAGS+=-DHAVE_CONFIG_H -CFLAGS+=-DPR_PROGRAM=\"/usr/bin/pr\" -CFLAGS+=-I${.CURDIR}/../../../contrib/diff -CFLAGS+=-I${.CURDIR}/../../../contrib/diff/src -CFLAGS+=-I${.CURDIR}/../../../contrib/diff/lib -CFLAGS+=-I${DESTDIR}/usr/include/gnu - -MAN= diff.1 diff.7 - -LIBADD+= gnuregex - -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif - -.include diff --git a/gnu/usr.bin/diff/Makefile.depend b/gnu/usr.bin/diff/Makefile.depend deleted file mode 100644 index 1cce740db52b2..0000000000000 --- a/gnu/usr.bin/diff/Makefile.depend +++ /dev/null @@ -1,19 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - gnu/lib/libgcc \ - gnu/lib/libregex \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/gnu/usr.bin/diff/tests/Makefile b/gnu/usr.bin/diff/tests/Makefile deleted file mode 100644 index ffe31a6851e33..0000000000000 --- a/gnu/usr.bin/diff/tests/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $FreeBSD$ - -PACKAGE= tests - -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/usr.bin/diff - -NETBSD_ATF_TESTS_SH= diff_test -ATF_TESTS_SH_SED_diff_test= -e 's/t_diff/`basename $$0`/g' - -${PACKAGE}FILES+= d_mallocv1.in -${PACKAGE}FILES+= d_mallocv2.in - -.include - -.include diff --git a/gnu/usr.bin/diff/tests/Makefile.depend b/gnu/usr.bin/diff/tests/Makefile.depend deleted file mode 100644 index f80275d86ab17..0000000000000 --- a/gnu/usr.bin/diff/tests/Makefile.depend +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif -- cgit v1.3