Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Oct 2007 12:55:16 -0700
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Pietro Cerutti <gahr@gahr.ch>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: sysutils/screen -- INFO issue
Message-ID:  <200710291955.l9TJtG2x075845@cwsys.cwsent.com>
In-Reply-To: Message from Pietro Cerutti <gahr@gahr.ch> "of Mon, 29 Oct 2007 20:21:59 BST." <472632D7.3@gahr.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <472632D7.3@gahr.ch>, Pietro Cerutti writes:
> This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
> --------------enig25037A9EB2B21A45B2ACF21A
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
> 
> Dear Cy, dear list
> 
> here I am to talk about the INFO issue of sysutils/screen [screen].
> 
> To summarize:
> screen has an option to [en|dis]able installation of an INFO page.
> If the option is set, WITH_INFO gets set accordingly, otherwise the
> port's Makefile sets the make argument NO_INFO.
> In turn, ${WRKSRC}/doc/Makefile checks for NO_INFO, and if it's not set,
> it prepares the INFO page for installation by running
> makeinfo --no-split ./screen.texinfo -o screen.info
> 
> The problem is that make.conf(5) documents the variable NO_INFO under
> the section "BUILDING THE WORLD - The following list provides a name and
> short description for variables that are used during the world build".
> 
> I think here we have a namespace collision problem for the variable NO_IN=
> FO.
> 
> If NO_INFO is set in make.conf and the WITH_INFO option is enabled while
> building screen, ${WRKSRC}/doc/Makefile won't prepare the info page but
> the port's Makefile will try to install it anyway. This leads to a "file
> not found" build error:
> 
> install-info --quiet /usr/local/info/screen.info /usr/local/info/dir
> install-info: No such file or directory for /usr/local/info/screen.info
> *** Error code 1
> 
> I suggest that we change ${WRKSRC}/doc/Makefile to check for WITH_INFO
> (used within ports) instead of !NO_INFO (used while building the world).
> In addition, we should change the port's Makefile to set the make
> argument WITH_INFO if the option was chosen instead of setting NO_INFO
> it it wasn't.
> 
> The same whole issue exists for the MAN page, for which I suggest the
> same modifications in the port's Makefile and in ${WRKSRC}/doc/Makefile.
> 
> The following patches to the port's Makefile and for
> files/patch-doc_Makefile.in implement the changes discussed above.
> 
> --- Makefile.orig	2007-10-29 19:18:41.000000000 +0100
> +++ Makefile	2007-10-29 20:15:20.000000000 +0100
> @@ -31,16 +31,14 @@
>  GNU_CONFIGURE=3D	yes
>  .if defined(WITH_MAN)
>  MAN1=3D		screen.1
> -.else
> -MAKE_ARGS+=3D	-DNO_MAN
> +MAKE_ARGS+=3D -DWITH_MAN
>  .endif
>  .if defined(WITH_INFO)
>  .if !exists(/usr/bin/install-info)
>  RUN_DEPENDS+=3D	install-info:${PORTSDIR}/print/texinfo
>  .endif
>  INFO=3D		screen
> -.else
> -MAKE_ARGS+=3D	-DNO_INFO
> +MAKE_ARGS+=3D -DWITH_INFO
>  .endif
> 
>  .if ${ARCH} =3D=3D "alpha"
> --- files/patch-doc_Makefile.in.orig	2007-10-29 19:40:13.000000000 +0100
> +++ files/patch-doc_Makefile.in	2007-10-29 20:11:43.000000000 +0100
> @@ -4,10 +4,10 @@
>   	$(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info
> 
>   install: installdirs
> -+.if !defined(NO_MAN)
> ++.if defined(WITH_MAN)
>   	$(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1
>  +.endif
> -+.if !defined(NO_INFO)
> ++.if defined(WITH_INFO)
>   	-$(MAKE) screen.info
>   	-if test -f screen.info; then d=3D.; else d=3D$(srcdir); fi; \
>   	if test -f $$d/screen.info; then \
> @@ -23,10 +23,10 @@
> 
>   installdirs:
>  -	$(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1
> $(DESTDIR)$(infodir)
> -+.if !defined(NO_MAN)
> ++.if defined(WITH_MAN)
>  +	$(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1
>  +.endif
> -+.if !defined(NO_INFO)
> ++.if defined(WITH_INFO)
>  +	$(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(infodir)
>  +.endif
> 
> 
> I would greatly appreciate input / clarification / feedback / ideas on
> the whole story before filling a PR.

What you're discussing is renaming NO_INFO and NO_MAN to WITHOUT_INFO and 
WITHOUT_MAN (or comparing for non-definition of WITH_MAN and WITH_INFO). 
Agreed something needs to be done about the namespace collision. There has 
been some discussion of make.conf files for src/ports/doc/etc, which I 
believe didn't result in any decision being made.


-- 
Cheers,
Cy Schubert <Cy.Schubert@komquats.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

			e**(i*pi)+1=0





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