Bug 40844 - Syntax error on german/BBBike/Makefile
Summary: Syntax error on german/BBBike/Makefile
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: Tetsurou Okazaki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-21 17:20 UTC by fullermd
Modified: 2002-09-06 14:00 UTC (History)
0 users

See Also:


Attachments
file.diff (498 bytes, patch)
2002-07-21 17:20 UTC, fullermd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fullermd 2002-07-21 17:20:01 UTC
	german/BBBike/Makefile has a syntax error which causes it to bomb out
	(which, among other things, breaks my 'make readmes').
	
	% make fetch
	"/usr/ports/german/BBBike/Makefile", line 24: warning: String
	comparison operator should be either == or !=
	"/usr/ports/german/BBBike/Makefile", line 24: Malformed conditional
	(!defined(PERL_VERSION) || ${PERL_VERSION} <= 5.00503)
	"/usr/ports/german/BBBike/Makefile", line 26: if-less endif
	"/usr/ports/german/BBBike/Makefile", line 26: Need an operator
	make: fatal errors encountered -- cannot continue

Fix: I'm not sure if this is exactly right, but it seems to handle things
	right for me (of course, I don't have an old version of Perl to test
	against).
How-To-Repeat: 	cd /usr/ports/german/BBBike && make fetch
Comment 1 fullermd 2002-07-28 11:54:30 UTC
> >Description:
> 	german/BBBike/Makefile has a syntax error which causes it to bomb out
> 	(which, among other things, breaks my 'make readmes').

Can somebody take a look at this?  'make readmes' takes long enough,
without bombing out partway through on a Make syntax mis-throw.



-- 
Matthew Fuller     (MF4839)   |  fullermd@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/

"The only reason I'm burning my candle at both ends, is because I
      haven't figured out how to light the middle yet"
Comment 2 Tetsurou Okazaki freebsd_committer freebsd_triage 2002-09-05 17:52:52 UTC
State Changed
From-To: open->analyzed

Caused by the syntax error in the port Makefile.  


Comment 3 Tetsurou Okazaki freebsd_committer freebsd_triage 2002-09-05 17:52:52 UTC
Responsible Changed
From-To: freebsd-ports->okazaki

I will handle this.
Comment 4 Tetsurou Okazaki freebsd_committer freebsd_triage 2002-09-05 18:14:42 UTC
Dear maintainer,

Would you approve for me to commit the patch below for the german/BBBike port?
This will fix the problem reported by PRs ports/33519 and ports/40844.


Tetsurou

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/german/BBBike/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- Makefile	30 Jul 2002 16:07:49 -0000	1.12
+++ Makefile	5 Sep 2002 16:36:14 -0000
@@ -22,7 +22,7 @@
 
 MYDESTDIR=	${PREFIX}/BBBike
 
-.if !defined(PERL_VERSION) || ${PERL_VERSION} <= 5.00503
+.if !defined(PERL_VER) || ${PERL_VER} == 5.005
 PLIST=		${PKGDIR}/pkg-plist.5005
 .endif
Comment 5 slaven.rezic 2002-09-05 18:54:07 UTC
Tetsurou Okazaki <okazaki@FreeBSD.org> writes:

> Dear maintainer,
> 
> Would you approve for me to commit the patch below for the german/BBBike port?
> This will fix the problem reported by PRs ports/33519 and ports/40844.
> 
> 
> Tetsurou
> 
> Index: Makefile
> ===================================================================
> RCS file: /home/ncvs/ports/german/BBBike/Makefile,v
> retrieving revision 1.12
> diff -u -r1.12 Makefile
> --- Makefile	30 Jul 2002 16:07:49 -0000	1.12
> +++ Makefile	5 Sep 2002 16:36:14 -0000
> @@ -22,7 +22,7 @@
>  
>  MYDESTDIR=	${PREFIX}/BBBike
>  
> -.if !defined(PERL_VERSION) || ${PERL_VERSION} <= 5.00503
> +.if !defined(PERL_VER) || ${PERL_VER} == 5.005
>  PLIST=		${PKGDIR}/pkg-plist.5005
>  .endif
>  
> 

Strange ... in my /usr/ports/Mk/bsd.port.mk PERL_VERSION and PERL_VER
are both defined and have the same value (5.6.1 for the current
FreeBSD version).

Regards,
	Slaven

-- 
Slaven Rezic - slaven.rezic@berlin.de
    babybike - routeplanner for cyclists in Berlin
	       handheld (e.g. Compaq iPAQ with Linux) version of bbbike
    http://bbbike.sourceforge.net
Comment 6 Tetsurou Okazaki freebsd_committer freebsd_triage 2002-09-05 20:40:34 UTC
At 05 Sep 2002 19:54:07 +0200,
Slaven Rezic wrote:
> 
> Tetsurou Okazaki <okazaki@FreeBSD.org> writes:
> 
> > Dear maintainer,
> > 
> > Would you approve for me to commit the patch below for the german/BBBike port?
> > This will fix the problem reported by PRs ports/33519 and ports/40844.
> > 
> > 
> > Tetsurou
> > 
> > Index: Makefile
> > ===================================================================
> > RCS file: /home/ncvs/ports/german/BBBike/Makefile,v
> > retrieving revision 1.12
> > diff -u -r1.12 Makefile
> > --- Makefile	30 Jul 2002 16:07:49 -0000	1.12
> > +++ Makefile	5 Sep 2002 16:36:14 -0000
> > @@ -22,7 +22,7 @@
> >  
> >  MYDESTDIR=	${PREFIX}/BBBike
> >  
> > -.if !defined(PERL_VERSION) || ${PERL_VERSION} <= 5.00503
> > +.if !defined(PERL_VER) || ${PERL_VER} == 5.005
> >  PLIST=		${PKGDIR}/pkg-plist.5005
> >  .endif
> >  
> > 
> 
> Strange ... in my /usr/ports/Mk/bsd.port.mk PERL_VERSION and PERL_VER
> are both defined and have the same value (5.6.1 for the current
> FreeBSD version).

Therefore we cannot use a numerical comparison operator '<=' for
a value like ${PERL_VERSION} or ${PERL_VER}, which may be a non-numeric.

Please read
  http://www.freebsd.org/cgi/query-pr.cgi?pr=33519
  http://www.freebsd.org/cgi/query-pr.cgi?pr=40844
  for a detail.

Tetsurou
Comment 7 slaven.rezic 2002-09-05 21:15:45 UTC
Tetsurou Okazaki <okazaki@FreeBSD.org> writes:

> At 05 Sep 2002 19:54:07 +0200,
> Slaven Rezic wrote:
> > 
> > Tetsurou Okazaki <okazaki@FreeBSD.org> writes:
> > 
> > > Dear maintainer,
> > > 
> > > Would you approve for me to commit the patch below for the german/BBBike port?
> > > This will fix the problem reported by PRs ports/33519 and ports/40844.
> > > 
> > > 
> > > Tetsurou
> > > 
> > > Index: Makefile
> > > ===================================================================
> > > RCS file: /home/ncvs/ports/german/BBBike/Makefile,v
> > > retrieving revision 1.12
> > > diff -u -r1.12 Makefile
> > > --- Makefile	30 Jul 2002 16:07:49 -0000	1.12
> > > +++ Makefile	5 Sep 2002 16:36:14 -0000
> > > @@ -22,7 +22,7 @@
> > >  
> > >  MYDESTDIR=	${PREFIX}/BBBike
> > >  
> > > -.if !defined(PERL_VERSION) || ${PERL_VERSION} <= 5.00503
> > > +.if !defined(PERL_VER) || ${PERL_VER} == 5.005
> > >  PLIST=		${PKGDIR}/pkg-plist.5005
> > >  .endif
> > >  
> > > 
> > 
> > Strange ... in my /usr/ports/Mk/bsd.port.mk PERL_VERSION and PERL_VER
> > are both defined and have the same value (5.6.1 for the current
> > FreeBSD version).
> 
> Therefore we cannot use a numerical comparison operator '<=' for
> a value like ${PERL_VERSION} or ${PERL_VER}, which may be a non-numeric.
> 
> Please read
>   http://www.freebsd.org/cgi/query-pr.cgi?pr=33519
>   http://www.freebsd.org/cgi/query-pr.cgi?pr=40844
>   for a detail.
> 

Sorry, I saw only the change PERL_VERSION to PERL_VER, but not the
comparison change. But shouldn't this be better:

.if !defined(PERL_VER) || ${PERL_VER} == 5.005 || ${PERL_VER} == 5.00502 || ${PERL_VER} == 5.00503

to get all old perl versions mentioned in bsd.port.mk?

Regards,
	Slaven

-- 
Slaven Rezic - slaven.rezic@berlin.de

    tksm - Perl/Tk program for searching and replacing in multiple files
    http://ptktools.sourceforge.net/#tksm
Comment 8 Tetsurou Okazaki freebsd_committer freebsd_triage 2002-09-05 22:09:51 UTC
At 05 Sep 2002 22:15:45 +0200,
Slaven Rezic wrote:
> 
> Tetsurou Okazaki <okazaki@FreeBSD.org> writes:
> 
> > At 05 Sep 2002 19:54:07 +0200,
> > Slaven Rezic wrote:
> > > 
> > > Tetsurou Okazaki <okazaki@FreeBSD.org> writes:
> > > 
> > > > Dear maintainer,
> > > > 
> > > > Would you approve for me to commit the patch below for the german/BBBike port?
> > > > This will fix the problem reported by PRs ports/33519 and ports/40844.
> > > > 
> > > > 
> > > > Tetsurou
> > > > 
> > > > Index: Makefile
> > > > ===================================================================
> > > > RCS file: /home/ncvs/ports/german/BBBike/Makefile,v
> > > > retrieving revision 1.12
> > > > diff -u -r1.12 Makefile
> > > > --- Makefile	30 Jul 2002 16:07:49 -0000	1.12
> > > > +++ Makefile	5 Sep 2002 16:36:14 -0000
> > > > @@ -22,7 +22,7 @@
> > > >  
> > > >  MYDESTDIR=	${PREFIX}/BBBike
> > > >  
> > > > -.if !defined(PERL_VERSION) || ${PERL_VERSION} <= 5.00503
> > > > +.if !defined(PERL_VER) || ${PERL_VER} == 5.005
> > > >  PLIST=		${PKGDIR}/pkg-plist.5005
> > > >  .endif
> > > >  
> > > > 
> > > 
> > > Strange ... in my /usr/ports/Mk/bsd.port.mk PERL_VERSION and PERL_VER
> > > are both defined and have the same value (5.6.1 for the current
> > > FreeBSD version).
> > 
> > Therefore we cannot use a numerical comparison operator '<=' for
> > a value like ${PERL_VERSION} or ${PERL_VER}, which may be a non-numeric.
> > 
> > Please read
> >   http://www.freebsd.org/cgi/query-pr.cgi?pr=33519
> >   http://www.freebsd.org/cgi/query-pr.cgi?pr=40844
> >   for a detail.
> > 
> 
> Sorry, I saw only the change PERL_VERSION to PERL_VER, but not the
> comparison change. But shouldn't this be better:
> 
> .if !defined(PERL_VER) || ${PERL_VER} == 5.005 || ${PERL_VER} == 5.00502 || ${PERL_VER} == 5.00503
> 
> to get all old perl versions mentioned in bsd.port.mk?

No, since bsd.port.mk defines ${PERL_VER} as follows.

.if ${OSVERSION} >= 500032
PERL_VERSION?=  5.6.1
PERL_VER?=              5.6.1
PERL_ARCH?=             mach
.else
.if ${OSVERSION} >= 500007
PERL_VERSION?=  5.6.0
PERL_VER?=              5.6.0
PERL_ARCH?=             mach
.else
.if ${OSVERSION} >= 300000
PERL_VERSION?=  5.00503
.else
PERL_VERSION?=  5.00502
.endif
PERL_VER?=              5.005
PERL_ARCH?=             ${ARCH}-freebsd
.endif
.endif



Tetsurou
Comment 9 slaven.rezic 2002-09-06 07:23:24 UTC
Tetsurou Okazaki <okazaki@FreeBSD.org> writes:

> At 05 Sep 2002 22:15:45 +0200,
> Slaven Rezic wrote:
> > 
> > Tetsurou Okazaki <okazaki@FreeBSD.org> writes:
> > 
> > > At 05 Sep 2002 19:54:07 +0200,
> > > Slaven Rezic wrote:
> > > > 
> > > > Tetsurou Okazaki <okazaki@FreeBSD.org> writes:
> > > > 
> > > > > Dear maintainer,
> > > > > 
> > > > > Would you approve for me to commit the patch below for the german/BBBike port?
> > > > > This will fix the problem reported by PRs ports/33519 and ports/40844.
> > > > > 
> > > > > 
> > > > > Tetsurou
> > > > > 
> > > > > Index: Makefile
> > > > > ===================================================================
> > > > > RCS file: /home/ncvs/ports/german/BBBike/Makefile,v
> > > > > retrieving revision 1.12
> > > > > diff -u -r1.12 Makefile
> > > > > --- Makefile	30 Jul 2002 16:07:49 -0000	1.12
> > > > > +++ Makefile	5 Sep 2002 16:36:14 -0000
> > > > > @@ -22,7 +22,7 @@
> > > > >  
> > > > >  MYDESTDIR=	${PREFIX}/BBBike
> > > > >  
> > > > > -.if !defined(PERL_VERSION) || ${PERL_VERSION} <= 5.00503
> > > > > +.if !defined(PERL_VER) || ${PERL_VER} == 5.005
> > > > >  PLIST=		${PKGDIR}/pkg-plist.5005
> > > > >  .endif
> > > > >  
> > > > > 
> > > > 
> > > > Strange ... in my /usr/ports/Mk/bsd.port.mk PERL_VERSION and PERL_VER
> > > > are both defined and have the same value (5.6.1 for the current
> > > > FreeBSD version).
> > > 
> > > Therefore we cannot use a numerical comparison operator '<=' for
> > > a value like ${PERL_VERSION} or ${PERL_VER}, which may be a non-numeric.
> > > 
> > > Please read
> > >   http://www.freebsd.org/cgi/query-pr.cgi?pr=33519
> > >   http://www.freebsd.org/cgi/query-pr.cgi?pr=40844
> > >   for a detail.
> > > 
> > 
> > Sorry, I saw only the change PERL_VERSION to PERL_VER, but not the
> > comparison change. But shouldn't this be better:
> > 
> > .if !defined(PERL_VER) || ${PERL_VER} == 5.005 || ${PERL_VER} == 5.00502 || ${PERL_VER} == 5.00503
> > 
> > to get all old perl versions mentioned in bsd.port.mk?
> 
> No, since bsd.port.mk defines ${PERL_VER} as follows.
> 
> .if ${OSVERSION} >= 500032
> PERL_VERSION?=  5.6.1
> PERL_VER?=              5.6.1
> PERL_ARCH?=             mach
> .else
> .if ${OSVERSION} >= 500007
> PERL_VERSION?=  5.6.0
> PERL_VER?=              5.6.0
> PERL_ARCH?=             mach
> .else
> .if ${OSVERSION} >= 300000
> PERL_VERSION?=  5.00503
> .else
> PERL_VERSION?=  5.00502
> .endif
> PERL_VER?=              5.005
> PERL_ARCH?=             ${ARCH}-freebsd
> .endif
> .endif
> 

Then you got an OK for the proposed patch.

Regards,
	Slaven

-- 
Slaven Rezic - slaven.rezic@berlin.de

    tkruler - Perl/Tk program for measuring screen distances
    http://ptktools.sourceforge.net/#tkruler
Comment 10 Tetsurou Okazaki freebsd_committer freebsd_triage 2002-09-06 13:59:08 UTC
State Changed
From-To: analyzed->closed

Fixed, thanks!