pkgsrc/pkgtools/pkgdiff/Makefile
seb a47d96ceb9 Update to version 0.118: pkgdiff fix and tuning.
Fix the automagic tuning of the number of unified diff context
lines.  It was broken since previous commit to files/pkgdiff.

Also arguments '-u' and '-U NUM' to GNU diffutils 2.8.1, as seen
in NetBSD 2.0_STABLE and current, are not intended to be used
together. Hence only '-U NUM' is now specified. I did not reverted
to the '-u -NUM' form used before as it seems undesirable.

Please note that if PKGDIFF_FMT is specified in the environment,
for testing or debugging purposes, we skip the automagic tuning of
the number of unified diff context lines.  The user probably wants
to try another diff format, as suggested in the commit log of
revision 1.12 of files/pkgdiff. So there is no point in adding '-U
NUM' to PKGDIFF_FMT: it may just not work. See:

$ diff -c -U 1 /dev/null /dev/null
diff: conflicting output style options
diff: Try `diff --help' for more information.

While here save a few basename(1) runs.
2005-08-02 12:16:19 +00:00

82 lines
2 KiB
Makefile

# $NetBSD: Makefile,v 1.57 2005/08/02 12:16:19 seb Exp $
#
DISTNAME= pkgdiff-0.118
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= wiz@NetBSD.org
HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html
COMMENT= Tools to create, maintain and send back patches for pkgsrc
PKG_INSTALLATION_TYPES= overwrite pkgviews
PERL5_REQD+= 5.6.0
EXTRACT_ONLY= # empty
NO_CHECKSUM= yes
NO_CONFIGURE= yes
WRKSRC= ${WRKDIR}
USE_LANGUAGES= # empty
USE_TOOLS+= perl:run
MAKE_ENV= PKGSRCDIR=${_PKGSRCDIR:Q}
.include "../../mk/bsd.prefs.mk"
BUILD_DEFS+= MANINSTALL
.if ${OPSYS} == "SunOS"
DEPENDS+= diffutils-[0-9]*:../../devel/diffutils
DIFF?= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}diff
MANINSTALL=
.else
DIFF?= diff
.endif
INSTALLATION_DIRS= bin
.if !empty(MANINSTALL:Mcatinstall)
INSTALLATION_DIRS+= man/cat1
.endif
.if !empty(MANINSTALL:Mmaninstall)
INSTALLATION_DIRS+= man/man1
.endif
do-build:
.for FILE in mkpatches patchdiff
${SED} -e 's|@PREFIX@|${PREFIX}|g' \
-e 's|@PERL5@|${PERL5}|g' \
-e 's|@MAKE@|${MAKE}|g' \
< ${FILESDIR}/${FILE}.pl \
> ${WRKSRC}/${FILE}
.endfor
${SED} -e 's|@DIFF@|${DIFF}|g' \
-e 's|@SH@|${SH}|g' \
< ${FILESDIR}/pkgdiff \
> ${WRKSRC}/pkgdiff
${CP} ${FILESDIR}/pkgvi ${WRKSRC}
${CP} ${FILESDIR}/feedback-patches ${WRKSRC}
.if !empty(MANINSTALL:Mcatinstall)
. for FILE in mkpatches patchdiff pkgdiff pkgvi feedback-patches
. if ${OPSYS} == "SunOS" || ${OPSYS} == "AIX"
nroff -man ${FILESDIR}/${FILE}.1 >${WRKSRC}/${FILE}.0
. else
${CP} ${FILESDIR}/${FILE}.0 ${WRKSRC}/${FILE}.0
. endif
. endfor
.endif
do-install:
.for FILE in mkpatches patchdiff pkgdiff pkgvi feedback-patches
${INSTALL_SCRIPT} ${WRKSRC}/${FILE} ${PREFIX}/bin
. if !empty(MANINSTALL:Mcatinstall)
${INSTALL_MAN} ${WRKSRC}/${FILE}.0 ${PREFIX}/man/cat1
. endif
. if !empty(MANINSTALL:Mmaninstall)
${INSTALL_MAN} ${FILESDIR}/${FILE}.1 ${PREFIX}/man/man1
. endif
.endfor
.include "../../mk/bsd.pkg.mk"