Bug 106379 - devel/m4 1.4.8_1 fails to build on FreeBSD 5.x
Summary: devel/m4 1.4.8_1 fails to build on FreeBSD 5.x
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: Ade Lovett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-05 16:20 UTC by Jonathan Lennox
Modified: 2006-12-05 18:40 UTC (History)
0 users

See Also:


Attachments
m4.patch (1.57 KB, patch)
2006-12-05 16:20 UTC, Jonathan Lennox
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lennox 2006-12-05 16:20:05 UTC
The texinfo documentation of m4 version 1.4.8 uses trailing @ for
continuation lines, a texinfo feature introduced in texinfo version 4.7.

/usr/src/contrib in FreeBSD 5 contains (a stripped-down version of) texinfo
4.6, and so the build of devel/m4 1.4.8 fails on those machines.

Fix: Patching the texinfo source to remove the continuation lines fixes the problem:
How-To-Repeat: On a FreeSBD 5.x machine:

cvsup your ports directory
cd /usr/ports/devel/m4
make

The make will fail with:

restore=: && backupdir=".am$$" &&  am__cwd=`pwd` && cd . &&  rm -rf $backupdir && mkdir $backupdir &&  if (/bin/sh /usr/ports/devel/m4/work/m4-1.4.8/missing --run makeinfo --no-split --version) >/dev/null 2>&1; then  for f in ./m4.info ./m4.info-[0-9] ./m4.info-[0-9][0-9] ./m4.i[0-9] ./m4.i[0-9][0-9]; do  if test -f $f; then mv $f $backupdir; restore=mv; else :; fi;  done;  else :; fi &&  cd "$am__cwd";  if /bin/sh /usr/ports/devel/m4/work/m4-1.4.8/missing --run makeinfo --no-split   -I .  -o ./m4.info ./m4.texinfo;  then  rc=0;  cd .;  else  rc=$?;  cd . &&  $restore $backupdir/* `echo "././m4.info" | sed 's|[^/]*$||'`;  fi;  rm -rf $backupdir; exit $rc
./m4.texinfo:451: Unknown command `'.
./m4.texinfo:1999: Unknown command `'.
./m4.texinfo:2001: Unknown command `'.
makeinfo: Removing output file `./m4.info' due to errors; use --force to preserve.
*** Error code 1

Stop in /usr/ports/devel/m4/work/m4-1.4.8/doc.
*** Error code 1

Stop in /usr/ports/devel/m4/work/m4-1.4.8.
*** Error code 1

Stop in /usr/ports/devel/m4.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-12-05 16:21:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ade

Over to maintainer
Comment 2 Jonathan Lennox 2006-12-05 18:05:05 UTC
Here's an alternate patch, which uses a more up-to-date version of texinfo
instead, and so is more robust to changes in the port's info files, and also
could be used more-or-less verbatim for other ports which require a newer
version of makeinfo.

(I wonder if a general USE_TEXINFO variable should be defined in
bsd.port.mk?)

--- m4.patch.2 begins here ---
--- Makefile.orig	Mon Dec  4 01:57:58 2006
+++ Makefile	Tue Dec  5 12:54:33 2006
@@ -24,6 +24,14 @@
 CONFIGURE_ARGS+=	--enable-changeword
 .endif
 
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 600000
+# Texinfo files use features of makeinfo not present in FreeBSD 5.x's makeinfo 4.6
+BUILD_DEPENDS  += ${LOCALBASE}/bin/makeinfo:${PORTSDIR}/print/texinfo
+CONFIGURE_ARGS += MAKEINFO=${LOCALBASE}/bin/makeinfo
+.endif
+
 INFO=	m4
 MAN1=	gm4.1
 
@@ -33,4 +41,4 @@
 	@${MKDIR} ${PREFIX}/${EXAMPLESDIR}
 	${INSTALL_DATA} ${WRKSRC}/examples/*.m4 ${PREFIX}/${EXAMPLESDIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
--- m4.patch.2 ends here ---
Comment 3 Ade Lovett freebsd_committer freebsd_triage 2006-12-05 18:36:22 UTC
State Changed
From-To: open->closed

Committed though using the correct CONFIGURE_ENV as opposed to CONFIGURE_ARGS.
Comment 4 dfilter service freebsd_committer freebsd_triage 2006-12-05 18:36:26 UTC
ade         2006-12-05 18:36:17 UTC

  FreeBSD ports repository

  Modified files:
    devel/m4             Makefile 
  Log:
  Unbreak on FreeBSD < 6.0
  
  PR:             106379 (with minor changes)
  Submitted by:   Jonathan Lennox <lennox@cs.columbia.edu>
  
  Revision  Changes    Path
  1.31      +8 -1      ports/devel/m4/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"