PYDISTUTILS_AUTOPLIST, stage, man pages

Marcus von Appen mva at FreeBSD.org
Fri Oct 18 06:44:17 UTC 2013


On, Fri Oct 18, 2013, Andriy Gapon wrote:

> on 18/10/2013 01:07 Marcus von Appen said the following:
> > Except for the fact that 'share/' is wrong for FreeBSD (which you know,
> > I guess ;-), I see what you mean. A fix for that might be to check the
> > directory for something matching on
> >
> >           man/man[0-9]/*.[0-9]
> >
> > and append it automatically with a .gz in the ${_PYTHONPKGLIST} record
> > file within the add-plist-pymod target in bsd.python.mk
> >
> > Can you upload the port shar somewhere for a test?
>
> The port is here:
> https://redports.org/browser/avg/sysutils/py-obnam
> It also depends on the following four new ports (all matching py-*):
> https://redports.org/browser/avg/devel
>
> In the current shape the port "works", but installs the man pages into a wrong
> place.  If I fix it like this:
>
> Index: Makefile
> ===================================================================
> --- Makefile	(revision 18184)
> +++ Makefile	(working copy)
> @@ -26,4 +26,7 @@
>  USE_PYDISTUTILS=	yes
>  PYDISTUTILS_AUTOPLIST=	yes
>
> +post-patch:
> +	${REINPLACE_CMD} 's#share/man#man#' ${WRKSRC}/${PYSETUP}
> +
>  .include <bsd.port.mk>
>
> Then installation fails because auto-generated plist and what's in stage
> directory do not match.
>
> Thank you!

Can you give the following change to Mk/bsd.python.mk a try:

Index: Mk/bsd.python.mk
===================================================================
--- Mk/bsd.python.mk	(revision 330721)
+++ Mk/bsd.python.mk	(working copy)
@@ -528,7 +528,9 @@
 		${SED} '/^\.$$/d' > ${WRKDIR}/.localmtree
 	@${ECHO_CMD} "${_RELSITELIBDIR}" >> ${WRKDIR}/.localmtree
 	@${ECHO_CMD} "${_RELLIBDIR}" >> ${WRKDIR}/.localmtree
-	@${SED} 's|^${PREFIX}/||' ${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST}
+	@${SED} -e 's|^${PREFIX}/||' \
+		-e 's|^\(man/man[0-9]\)/\(.*.[0-9]\)|\1/\2${MANEXT}|' \
+		${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST}
 	@${SED} -e 's|^${PREFIX}/\(.*\)/\(.*\)|\1|' ${_PYTHONPKGLIST} | \
 		${AWK} '{ num = split($$0, a, "/"); res=""; \
 					for(i = 1; i <= num; ++i) { \

It adds the .gz to every man/manX/*.X, if it is defined (depending on
the NO_MANCOMPRESS setting).

Cheers
Marcus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-python/attachments/20131018/35d468ed/attachment.sig>


More information about the freebsd-python mailing list