Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jun 2000 00:28:39 -0300
From:      lioux@uol.com.br
To:        Stijn Hoop <stijn@win.tue.nl>
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: NOPORTDOCS variable
Message-ID:  <20000609002839.A2427@Fedaykin.here>
In-Reply-To: <20000608161444.D34730@pcwin002.win.tue.nl>; from stijn@win.tue.nl on Thu, Jun 08, 2000 at 04:14:44PM %2B0200
References:  <20000608161444.D34730@pcwin002.win.tue.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 08, 2000 at 04:14:44PM +0200, Stijn Hoop wrote:
> Hi,
> 
> I'm trying to make a port (of grdb, a GTK theme matcher for Motif/Athena/Tk
> apps) and want to install the README along with it (it's the only documentation
> available). I tried to follow the Porters Handbook suggestion and wrap
> the installation in a conditional:
> 
> post-install:
> .if !defined(NOPORTDOCS)
> 	${MKDIR} ${X11BASE}/share/doc/grdb
> 	${INSTALL_MAN} ${WRKSRC}/README ${X11BASE}/share/doc/grdb
> .endif
> 
> However, if I try to make a package this fails because pkg/PLIST does
> of course contain share/doc/grdb/README...
> 
> The handbook says I shouldn't worry about it, but this still seems strange
> to me. What did I miss?

	You could use Satoshi's adhoc hack. :)
	At least, till something following that line gets in .mk
	Or, modify the temporary PLIST before installing.
	The hack follows below
	
	Regards,
		mferreira

---

Hi folks,

How about the following patch?  By adding "%%PORTDOCS:%%" in front of
the PLIST lines for things that are not installed when NOPORTDOCS is
set, you get a correct /var/db/pkg/${PKGNAME}/+CONTENTS regardless of
the NOPORTDOCS setting.

Also attached is an example of its usage.  (Hey, she's cute!)

Satoshi

P.S. Yes, I prefer a space after the second %% but the PLIST_SUB
     implementation doesn't allow that....
-------
Index: Mk/bsd.port.mk
===================================================================
RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.338
diff -u -r1.338 bsd.port.mk
--- Mk/bsd.port.mk	2000/05/06 10:45:35	1.338
+++ Mk/bsd.port.mk	2000/06/02 19:28:40
@@ -675,6 +676,12 @@
 MAKE_ENV+=		PORTOBJFORMAT=${PORTOBJFORMAT}
 PLIST_SUB+=		PORTOBJFORMAT=${PORTOBJFORMAT}
 
+.if defined(NOPORTDOCS)
+PLIST_SUB+=		PORTDOCS:="@comment "
+.else
+PLIST_SUB+=		PORTDOCS:=
+.endif
+
 .if defined(MANCOMPRESSED)
 .if ${MANCOMPRESSED} != yes && ${MANCOMPRESSED} != no && \
 	${MANCOMPRESSED} != maybe
Index: games/xhime/pkg/PLIST
===================================================================
RCS file: /usr/cvs/ports/games/xhime/pkg/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- games/xhime/pkg/PLIST	1999/03/07 16:58:29	1.2
+++ games/xhime/pkg/PLIST	2000/06/02 19:28:49
@@ -1,7 +1,7 @@
 bin/xhime
-share/doc/ja/xhime/xhime-doc.euc
-share/doc/ja/xhime/xhime.doc
-share/doc/ja/xhime/rh110-doc.euc
-@dirrm share/doc/ja/xhime
+%%PORTDOCS:%%share/doc/ja/xhime/xhime-doc.euc
+%%PORTDOCS:%%share/doc/ja/xhime/xhime.doc
+%%PORTDOCS:%%share/doc/ja/xhime/rh110-doc.euc
+%%PORTDOCS:%%@dirrm share/doc/ja/xhime
 share/examples/xhime/rh110.xhm
 @dirrm share/examples/xhime


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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