From owner-freebsd-ports@FreeBSD.ORG Sat Jul 30 20:04:02 2005 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04EB916A41F for ; Sat, 30 Jul 2005 20:04:02 +0000 (GMT) (envelope-from pauls@utdallas.edu) Received: from mail.stovebolt.com (mail.stovebolt.com [66.221.101.248]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABB8E43D45 for ; Sat, 30 Jul 2005 20:04:01 +0000 (GMT) (envelope-from pauls@utdallas.edu) Received: from [192.168.2.101] (adsl-65-71-93-204.dsl.rcsntx.swbell.net [65.71.93.204]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.stovebolt.com (Postfix) with ESMTP id B16BD3FC39 for ; Sat, 30 Jul 2005 15:03:55 -0500 (CDT) Date: Sat, 30 Jul 2005 15:03:35 -0500 From: Paul Schmehl To: ports@freebsd.org Message-ID: <0B689B1DF466EF5C97989D7C@Paul-Schmehls-Computer.local> In-Reply-To: <20050730092605.GB79432@isis.sigpipe.cz> References: <20050730092605.GB79432@isis.sigpipe.cz> X-Mailer: Mulberry/4.0.0 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Re: Fixing up man pages X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2005 20:04:02 -0000 --On July 30, 2005 11:26:05 AM +0200 Roman Neuhauser wrote: ># pauls@utdallas.edu / 2005-07-29 19:10:59 -0500: >> I'm working on updating the x11-toolkits/iwidgets port, and I've run >> into a problem. The man pages install fine, but they aren't formatted >> correctly. > > What does "formatted correctly" mean? Can you paste the output, and > what you want it to look like instead? > >> In the Makefile for the source, there is a section that deals with the >> man pages like this: >> >> @cd $(TOP_DIR)/doc; for i in *.n; \ >> do \ >> rm -f $(MAN_INSTALL_DIR)/`basename $$i`; \ >> rm -f $(MAN_INSTALL_DIR)/`basename iwidgets_$$i`; \ >> sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ >> $$i > $(MAN_INSTALL_DIR)/`basename iwidgets_$$i`; \ >> chmod 444 $(MAN_INSTALL_DIR)/`basename iwidgets_$$i`; \ >> done; >> >> How can I incorporate this into the port Makefile so that the man pages >> will be properly formatted? > > The only "formatting" this does is replace the first occurrence > of "man.macros" on any line with the contents of > $(TOP_DIR)/doc/man.macros. Is that's what you mean? > I posted a question about the sed script in questions, and once I understood the guy's answer (which took a while), I got it working. Here's the working version: @${SED} -e '/man\.macros/r ${WRKSRC}/doc/man.macros' \ -e '/man\.macros/d' ${WRKSRC}/doc/${f} > ${WRKDIR}/${f} What this does is parse man.macros for the string man\.macros and, if found, use it as input to the second part that removes the string man\.macros from the input stream and then feeds it to the file ${f}, which is the manpage in the source. Once the macro is in the manpage, man can display it properly. Now I have a "philosophical" question. The iwidgets source creates the manpages with the name "iwidgets_{manpage name}" (e.g. toolbar.n becomes iwidgets_toolbar.n). In the source, the manpages are named "toolbar", and the src Makefile changes the name to iwidgets_toolbar. Should I create the man pages with the same names? Or prefix the iwidgets_ to them? One final question. Do I submit this as patches to the existing port? Or just submit it as if it's a new port? (It's completely different from the existing port in the way it handles the install.) Paul Schmehl (pauls@utdallas.edu) Adjunct Information Security Officer University of Texas at Dallas AVIEN Founding Member http://www.utdallas.edu/