Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 1997 22:39:39 +0100 (CET)
From:      Philippe Charnier <charnier@xp11.frmug.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/3125: inn-1.5.1 port incorrect use of perl5
Message-ID:  <199703272139.WAA13335@xp11.frmug.org>
Resent-Message-ID: <199703272200.OAA27178@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3125
>Category:       ports
>Synopsis:       inn port incorrect use of perl5
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 27 14:00:00 PST 1997
>Last-Modified:
>Originator:     Philippe Charnier
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	

>Description:

When trying to upgrade from inn-1.4 to inn-1.5.1 (using ports) I noticed
that PERL5 support is enabled by default even if Makefile defines:
 USE_PERL5?=     DONT

I added `echo USE_PERL5 is set to $USE_PERL5' in script/configure and got:

===>  Extracting for inn-1.5.1
===>  Patching for inn-1.5.1
===>  Applying FreeBSD patches for inn-1.5.1
===>  Configuring for inn-1.5.1
echo "-O2 -m486 -pipe" >/tmp/build-ports-news-inn-cflags
NEWSDIR is set to /var/news
PREFIX is set to /usr/local
CFLAGS is set to -O2 -m486 -pipe
PGPVERIFY is set to
USE_TCL is set to
USE_PERL5 is set to
cc -o subst subst.c
subst.c: In function `xstrerror':
subst.c:60: warning: return discards `const' from pointer target type
===>  Building for inn-1.5.1

As you can see, PGPVERIFY USE_TCL and USE_PERL5 are undefined so the file
config.data will not take the setting into account.

Running `make USE_PERL5=DONT' works as expected. 

The solution I found is to had SCRIPTS_ENV in Makefile (see patch)

But that's not enough, because TCL_INC TCL_LIB PERL_INC PERL_LIB *must* be
correctly set (see patch).

>How-To-Repeat:

>Fix:
	
Index: Makefile
===================================================================
RCS file: /home2h/FreeBSD.cvsroot/ports/news/inn/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile	1996/12/18 23:32:10	1.22
+++ Makefile	1997/03/27 21:28:29
@@ -22,6 +22,8 @@
 USE_TCL?=	DO
 USE_PERL5?=	DONT
 
+SCRIPTS_ENV+= PGPVERIFY=${PGPVERIFY} USE_TCL=${USE_TCL} USE_PERL5=${USE_PERL5}
+
 NO_PACKAGE=	"Too many compile-time options"
 MAN1=	convdate.1 getlist.1 grephistory.1 inews.1 innconfval.1 installit.1 \
 	nntpget.1 rnews.1 shlock.1 shrinkfile.1 subst.1
Index: files/config.data
===================================================================
RCS file: /home2h/FreeBSD.cvsroot/ports/news/inn/files/config.data,v
retrieving revision 1.8
diff -u -r1.8 config.data
--- config.data	1996/12/18 23:32:14	1.8
+++ config.data	1997/03/27 21:11:08
@@ -836,11 +836,11 @@
 TCL_SUPPORT		!!USETCL!!
 ##  Where your tcl header file live. Blank if no TCL
 ### =()<TCL_INC		@<TCL_INC>@>()=
-TCL_INC		
+TCL_INC			!!USETCLINC!!
 # TCL_INC		-I/usr/local/include
 ##  How do you get the TCL library?  Probably -ltcl -lm, blank if no TCL
 #### =()<TCL_LIB		@<TCL_LIB>@>()=
-TCL_LIB		-ltcl -lm
+TCL_LIB			!!USETCLLIB!!
 # TCL_LIB		-ltcl -lm
 ##  TCL Startup File. Should probably be prefixed with the same value as
 ##  _PATH_CONTROLPROGS. 
@@ -899,11 +899,11 @@
 PERL_SUPPORT		!!USEPERL5!!
 ##  How do you get the PERL libraries?  Probably -lperl -lm, blank if no PERL
 #### =()<PERL_LIB	@<PERL_LIB>@>()=
-PERL_LIB	-L/usr/local/lib/perl5/i386-freebsd/5.003/CORE -lperl -lm
+PERL_LIB		!!USEPERL5LIB!!
 #PERL_LIB	-L/usr/local/gnu/lib/perl5/i386-bsdos/5.003/CORE -lperl -lm
 ##  Core directory (includes, libs). See perlembed(1)
 #### =()<PERL_INC	@<PERL_INC>@>()=
-PERL_INC		-I/usr/local/lib/perl5/i386-freebsd/5.003/CORE
+PERL_INC		!!USEPERL5INC!!
 #PERL_INC		-I/usr/local/gnu/lib/perl5/i386-bsdos/5.003/CORE
 ##  Perl Filter Files. Should probably be prefixed with the same value as
 ##  _PATH_CONTROLPROGS.
Index: scripts/configure
===================================================================
RCS file: /home2h/FreeBSD.cvsroot/ports/news/inn/scripts/configure,v
retrieving revision 1.4
diff -u -r1.4 configure
--- configure	1996/12/18 23:32:32	1.4
+++ configure	1997/03/27 21:29:03
@@ -12,13 +12,22 @@
 	NEWSDIR=/var/news
 fi
 
+[ x$USE_TCL = xDO ] && USE_TCLINC=-I/usr/local/include
+[ x$USE_TCL = xDO ] && USE_TCLLIB="-ltcl -lm"
+[ x$USE_PERL5 = xDO ] && USE_PERL5INC=-I/usr/local/lib/perl5/i386-freebsd/5.003/CORE
+[ x$USE_PERL5 = xDO ] && USE_PERL5LIB="-L/usr/local/lib/perl5/i386-freebsd/5.003/CORE -lperl -lm"
+
 cat >/tmp/tmp.inn.sed.$$ << --EOF--
 s+!!NEWSSPOOL!!+$NEWSDIR+g
 s+!!PREFIX!!+$PREFIX+g
 s+!!CFLAGS!!+$CFLAGS+g
 s+!!PGPVERIFY!!+$PGPVERIFY+g
 s+!!USETCL!!+$USE_TCL+g
+s+!!USETCLINC!!+$USE_TCLINC+g
+s+!!USETCLLIB!!+$USE_TCLLIB+g
 s+!!USEPERL5!!+$USE_PERL5+g
+s+!!USEPERL5INC!!+$USE_PERL5INC+g
+s+!!USEPERL5LIB!!+$USE_PERL5LIB+g
 --EOF--
 
 sed <${FILESDIR}/config.data >${WRKSRC}/config/config.data -f /tmp/tmp.inn.sed.$$
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703272139.WAA13335>