New port textproc/wiggle

Apply rejected patches and perform word-wise diffs.

The main function of wiggle is to apply a patch to a file in a similar
manner to the patch(1) program.

The distinctive difference of wiggle is that it will attempt to apply a
patch even if the before part of the patch doesn't match the target
file perfectly. This is achieved by breaking the file and patch into
words and finding the best alignment of words in the file with words in
the patch. Once this alignment has been found, any differences (word-
wise) in the patch are applied to the file as best as possible.
This commit is contained in:
Matthias Andree 2012-02-15 23:31:09 +00:00
parent 0cee5591d4
commit 2f7bcbb362
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=291491
3 changed files with 57 additions and 0 deletions

54
textproc/wiggle/Makefile Normal file
View File

@ -0,0 +1,54 @@
# New ports collection Makefile for: wiggle
# Date created: 2012-02-15
# Whom: mandree@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= wiggle
PORTVERSION= 0.8.0.${_GITDATE}
CATEGORIES= textproc
#MASTER_SITES= http://neil.brown.name/wiggle/
MASTER_SITES= LOCAL/mandree
DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.xz
MAINTAINER= mandree@FreeBSD.org
COMMENT= Apply rejected patches and perform word-wise diffs
LICENSE= GPLv2
BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
_GITDATE= 20111208
_GITVERSION= 405d8fe
WRKSRC= ${WRKDIR}/${PORTNAME}-${_GITVERSION}
USE_GMAKE= yes
USE_XZ= yes
CFLAGS+= -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter
MAKE_ENV+= CFLAGS="${CFLAGS}"
MAKE_ARGS+= -e
MAN1= wiggle.1
PLIST_FILES= bin/wiggle
build-tarball: ${DISTFILES}
${DISTFILES}.gz:
${FETCH_CMD} -o ${DISTFILES}.gz 'http://neil.brown.name/git?p=wiggle;a=snapshot;h=${_GITVERSION};sf=tgz'
${DISTFILES}: ${DISTFILES}.gz
${GZIP_CMD} -cd ${DISTFILES}.gz | ${XZ_CMD} -c --best >${DISTFILES}
upload-tarball: build-tarball
scp ${DISTFILES} freefall.freebsd.org:public_distfiles/
pre-patch:
${REINPLACE_CMD} -Ee 's/#include.*<malloc.h>/#include <stdlib.h>/' ${WRKSRC}/*.[ch]
${REINPLACE_CMD} -Ee 's,\./dotest,bash ./dotest,' ${WRKSRC}/Makefile
${REINPLACE_CMD} -Ee "s,/usr/bin/time -o .time -f '%U',," ${WRKSRC}/dotest
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/wiggle ${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/wiggle.1 ${PREFIX}/man/man1/
.include <bsd.port.mk>

2
textproc/wiggle/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (wiggle-0.8.0.20111208.tar.xz) = cd6fd35ff47dff4a36367d93ea982e79664402162156390a71e369e349f80882
SIZE (wiggle-0.8.0.20111208.tar.xz) = 286000

View File

@ -0,0 +1 @@
intentionally empty