These routines will reflow the paragraphs in the given file, filehandle, string or array using Knuth's paragraphing algorithm (as used in TeX) to pick "good" places to break the lines.
--On vendredi 2 ao=FBt 2002 15:47 +0200 Mathieu Arnold <m@absolight.net> wrote: >=20 just found out that it "require 5.005_62" what is the best way to test the perl version ? shall I do something like : .if ${PERL_VER} =3D=3D 5.005 BROKEN=3D"Needs Perl 5.6, you can install it from ports (${PORTSDIR}/lang/perl5" .endif which does not work... help, someone ? --=20 Mathieu Arnold
On Sat, Aug 03, 2002 at 12:30:04AM -0700, Mathieu Arnold wrote: > just found out that it "require 5.005_62" > > what is the best way to test the perl version ? At the moment the best way is to make absolutely sure that the port in question indeed requires perl 5.6 or above. A lot of perl modules that require 5.005_62 do that for unimportant reasons like using `our' instead of `use vars', using `use warnings', and ...oh well, that's about it, I think. Such things can be trivially patched, even by oneliners in the port's Makefile. Some examples: textproc/p5-Text-FixedLength-Extra www/p5-WWW-Automate databases/p5-GraphViz-DBI If this is not the case, and the module indeed requires more substantial modifications to make it work with 5.005_03 (for example, some extended operations with fields.pm, the use of @+ and @- magic arrays, unicode stuff), the solution similar to the one you propose should work. > > shall I do something like : > > .if ${PERL_VER} =3D=3D 5.005 > BROKEN=3D"Needs Perl 5.6, you can install it from ports > (${PORTSDIR}/lang/perl5" > .endif > > which does not work... > > help, someone ? For example: pre-everything: @${PERL} -M5.006 -e1 2>/dev/null || \ ( ${ECHO_MSG} "===> Requires perl 5.6 or above (available from the ports collection)"; \ false ) This should, more or less, do what you want. That said, if perl5/perl5.8 ports were to run use.perl port automatically upon install, the easier solution would be to just include perl5 as a dependency. This might happen one day. =Anton. -- | Anton Berezin | FreeBSD: The power to serve | | catpipe Systems ApS _ _ |_ | http://www.FreeBSD.org | | tobez@catpipe.net (_(_|| | tobez@FreeBSD.org | | +45 7021 0050 | Private: tobez@tobez.org |
--On samedi 3 ao=FBt 2002 22:16 +0200 Anton Berezin <tobez@FreeBSD.org> = wrote: > On Sat, Aug 03, 2002 at 12:30:04AM -0700, Mathieu Arnold wrote: >=20 >> just found out that it "require 5.005_62" >> =20 >> what is the best way to test the perl version ? >=20 > At the moment the best way is to make absolutely sure that the port in > question indeed requires perl 5.6 or above. A lot of perl modules that > require 5.005_62 do that for unimportant reasons like using `our' > instead of `use vars', using `use warnings', and ...oh well, that's > about it, I think. Such things can be trivially patched, even by > oneliners in the port's Makefile. Some examples: >=20 > textproc/p5-Text-FixedLength-Extra > www/p5-WWW-Automate > databases/p5-GraphViz-DBI >=20 > If this is not the case, and the module indeed requires more substantial > modifications to make it work with 5.005_03 (for example, some extended > operations with fields.pm, the use of @+ and @- magic arrays, unicode > stuff), the solution similar to the one you propose should work. I can't be absolutly sure, the .xs is not even compiling (for a reason behind my knowledge), and the .pm is a bit tricky to hack to get it to work alone so, here is the new shar for it : # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # p5-Text-Reflow # p5-Text-Reflow/Makefile # p5-Text-Reflow/distinfo # p5-Text-Reflow/pkg-comment # p5-Text-Reflow/pkg-descr # p5-Text-Reflow/pkg-plist # echo c - p5-Text-Reflow mkdir -p p5-Text-Reflow > /dev/null 2>&1 echo x - p5-Text-Reflow/Makefile sed 's/^X//' >p5-Text-Reflow/Makefile << 'END-of-p5-Text-Reflow/Makefile' X# New ports collection makefile for: textproc/p5- Text-Reflow X# Date created: 2 August 2002 X# Whom: Mathieu Arnold <m@absolight.net> X# X# $FreeBSD$ X# X XPORTNAME=3D Text-Reflow XPORTVERSION=3D 1.04 XCATEGORIES=3D textproc perl5 XMASTER_SITES=3D ${MASTER_SITE_PERL_CPAN} XMASTER_SITE_SUBDIR=3D Text XPKGNAMEPREFIX=3D p5- X XMAINTAINER=3D m@absolight.net X XPERL_CONFIGURE=3D yes X XMAN3=3D Text::Reflow.3 XMANPREFIX=3D ${PREFIX}/lib/perl5/${PERL_VERSION} X Xpre-everything: X @${PERL} -M5.006 -e1 2>/dev/null || \ X ( ${ECHO_MSG} "=3D=3D=3D> Requires perl 5.6 or above (available from the = port collection)"; \ X false ) X X.include <bsd.port.mk> END-of-p5-Text-Reflow/Makefile echo x - p5-Text-Reflow/distinfo sed 's/^X//' >p5-Text-Reflow/distinfo << 'END-of-p5-Text-Reflow/distinfo' XMD5 (Text-Reflow-1.04.tar.gz) =3D 9b7d192cda3ffe8de76735c843352200 END-of-p5-Text-Reflow/distinfo echo x - p5-Text-Reflow/pkg-comment sed 's/^X//' >p5-Text-Reflow/pkg-comment << 'END-of-p5-Text-Reflow/pkg-comment' XPerl module for reflowing text files END-of-p5-Text-Reflow/pkg-comment echo x - p5-Text-Reflow/pkg-descr sed 's/^X//' >p5-Text-Reflow/pkg-descr << 'END-of-p5-Text-Reflow/pkg-descr' XThese routines will reflow the paragraphs in the given file, Xfilehandle, string or array using Knuth's paragraphing algorithm (as Xused in TeX) to pick "good" places to break the lines. END-of-p5-Text-Reflow/pkg-descr echo x - p5-Text-Reflow/pkg-plist sed 's/^X//' >p5-Text-Reflow/pkg-plist << 'END-of-p5-Text-Reflow/pkg-plist' Xlib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Text/Reflow/Reflow.so Xlib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Text/Reflow/Reflow.bs Xlib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Text/Reflow/.packlist Xlib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Text/Reflow.pm X@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Text/Reflow END-of-p5-Text-Reflow/pkg-plist exit --=20 Mathieu Arnold
State Changed From-To: open->closed Committed, Thanks!