Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2005 15:03:35 -0500
From:      Paul Schmehl <pauls@utdallas.edu>
To:        ports@freebsd.org
Subject:   Re: Fixing up man pages
Message-ID:  <0B689B1DF466EF5C97989D7C@Paul-Schmehls-Computer.local>
In-Reply-To: <20050730092605.GB79432@isis.sigpipe.cz>
References:  <E6D983675FE91A2A73A73A10@Paul-Schmehls-Computer.local> <20050730092605.GB79432@isis.sigpipe.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
--On July 30, 2005 11:26:05 AM +0200 Roman Neuhauser <neuhauser@sigpipe.cz> 
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/



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