Bug 31848 - [MAINTAINER UPDATE] Bug Fix for makepatch-2.00a
Summary: [MAINTAINER UPDATE] Bug Fix for makepatch-2.00a
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Anton Berezin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-08 05:10 UTC by John Merryweather Cooper
Modified: 2001-11-18 22:54 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Merryweather Cooper 2001-11-08 05:10:01 UTC
	Fix a bug and tweak dependencies:

	* under certain circumstances, makepatch would fail because -T and
	  -B operations on filehandles are not implemented (and not really
	  needed) under FreeBSD.  Fix by commenting out the test (which
	  would just issue a warning about detecting a binary file).

	* while making the above fix, I noticed that makepatch depends on
	  several modules whose latest versions are in ports.  Add
	  dependencies for these.

	P.S. Bento is whining to me about some bad sites in
	MASTER_PERL_SITES.  Perhaps some pruning needed?

Fix: makepatch -nomanifest -diff "diff -u" makepatch makepatch.new
	follows:

# This is a patch for makepatch to update it to makepatch.new
# 
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# If you have a decent Bourne-type shell:
# STEP 2: Run the shell with this file as input.
# If you don't have such a shell, you may need to manually create
# the files/directories as shown below.
# STEP 3: Run the 'patch' program with this file as input.
#
# These are the commands needed to create/delete files/directories:
#
mkdir 'files'
chmod 0755 'files'
touch 'files/patch-makepatch.PL'
chmod 0644 'files/patch-makepatch.PL'
#
# This command terminates the shell and need not be executed manually.
exit
#
#### End of Preamble ####

#### Patch data follows ####


#### ApplyPatch data follows ####
# Data version        : 1.0
# Date generated      : Mon Nov  5 19:56:26 2001
# Generated by        : makepatch 2.00
# Recurse directories : Yes
# p 'Makefile' 468 1005016601 0100644
# c 'files/patch-makepatch.PL' 0 1005018530 0100644
# C 'files' 0 1005018530 040755
#### End of ApplyPatch data ####

#### End of Patch kit [created: Mon Nov  5 19:56:26 2001] ####
#### Checksum: 99 3188 48526 ####--yb5FE2QF4iqTwn3qEbQ7sBiP68pjhZjlVVVyvwzMDpoARuEV
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -u 'makepatch/Makefile' 'makepatch.new/Makefile'
Index: ./Makefile
--- ./Makefile	Tue Oct 30 14:21:37 2001
+++ ./Makefile	Mon Nov  5 19:16:41 2001
@@ -2,16 +2,21 @@
 # Date created:				22 October 2001
 # Whom:					John Merryweather Cooper
 #
-# $FreeBSD: ports/textproc/makepatch/Makefile,v 1.1 2001/10/30 22:21:37 tobez Exp $
+# $FreeBSD$
 #
 
 PORTNAME=	makepatch
 PORTVERSION=	2.00a
+PORTREVISION=	1
 CATEGORIES=	textproc perl5
 MASTER_SITES=	${MASTER_SITE_PERL_CPAN}
 MASTER_SITE_SUBDIR=	../../authors/id/JV
 
 MAINTAINER=	jmcoopr@webmail.bmi.net
+
+BUILD_DEPENDS=	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Getopt/Long.pm:${PORTSDIR}/devel/p5-Getopt-Long \
+		${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/File/Spec.pm:${PORTSDIR}/devel/p5-File-Spec \
+		${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/IO.pm:${PORTSDIR}/devel/p5-IO
 
 PERL_CONFIGURE=	yes
 
diff -u /dev/null 'makepatch.new/files/patch-makepatch.PL'
Index: ./files/patch-makepatch.PL
--- ./files/patch-makepatch.PL	Wed Dec 31 16:00:00 1969
+++ ./files/patch-makepatch.PL	Mon Nov  5 19:48:50 2001
@@ -0,0 +1,22 @@
+--- makepatch.PL	Sun Dec  6 09:04:51 1998
++++ makepatch.PL.new	Mon Nov  5 19:47:17 2001
+@@ -670,11 +670,14 @@
+ 	$skipped++;
+ 	return 0;
+     }
+-    if ( -B $fh ) {
+-	verbose ("WARNING: Binary file $new -- skipped\n");
+-	$skipped++;
+-	return 0;
+-    }
++#  Binary/Text test on filehandle makes no sense (and causes failure)
++#  on FreeBSD
++#
++#    if ( -B $fh ) {
++#	verbose ("WARNING: Binary file $new -- skipped\n");
++#	$skipped++;
++#	return 0;
++#    }
+     my $pos = $fh->getpos;
+     while ( <$fh> ) {
+ 	$lines++;
#### End of Patch data ####
How-To-Repeat: 	I found the bug when trying to run makepatch on my upgrade from
	netrexx-1.160 to netrexx-2.02.
Comment 1 Anton Berezin freebsd_committer freebsd_triage 2001-11-18 22:37:01 UTC
Responsible Changed
From-To: freebsd-ports->tobez

I'll take care of this one.
Comment 2 Anton Berezin freebsd_committer freebsd_triage 2001-11-18 22:54:24 UTC
State Changed
From-To: open->closed

Fix committed, thanks!