Wednesday, January 31, 2018

Re: [UPDATE] textproc/py-podcastparser for net/gpodder update

On Tue, Jan 30, 2018 at 06:37:13PM -0500, trondd wrote:
> Daniel Jakots <danj+obsd@chown.me> wrote:
>
> > On Thu, 25 Jan 2018 20:06:29 -0500, trondd <trondd@kagu-tsuchi.com>
> > wrote:
> >
> > > +MODPY_VERSION= ${MODPY_DEFAULT_VERSION_3}
> >
> > As it's a library and the ports name is py- prefixed, we can easily go
> > with a flavour which is what our policy is :)
> > Any comment?
>
> Thanks. That was one of my questions. This is good, except for
> disambiguating the man page filename.
>
> Tim.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/textproc/py-podcastparser/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- Makefile 18 Apr 2017 02:13:26 -0000 1.1.1.1
> +++ Makefile 30 Jan 2018 23:28:59 -0000
> @@ -2,34 +2,37 @@
>
> COMMENT= simple, fast and efficient podcast parser
>
> -MODPY_EGG_VERSION= 0.6.1
> +MODPY_EGG_VERSION= 0.6.2
> DISTNAME= podcastparser-${MODPY_EGG_VERSION}
> PKGNAME= py-${DISTNAME}
> CATEGORIES= textproc
>
> -HOMEPAGE= http://gpodder.org/podcastparser/
> -
> MAINTAINER= Tim Meunier <trondd@kagu-tsuchi.com>
>
> # ISC
> PERMIT_PACKAGE_CDROM= Yes
>
> -MASTER_SITES= ${HOMEPAGE}
> -
> MODULES= lang/python
>
> -BUILD_DEPENDS= textproc/py-sphinx
> +MODPY_PI= Yes
> +
> +BUILD_DEPENDS= textproc/py-sphinx${MODPY_FLAVOR}
> +
> +TEST_DEPENDS= devel/py-nose${MODPY_FLAVOR} \
> + devel/py-coverage${MODPY_FLAVOR}
>
> -TEST_DEPENDS= devel/py-nose \
> - devel/py-coverage
> +FLAVORS= python3
> +FLAVOR?=
>
> MAKE_FILE= makefile
> MAKE_ENV= PYTHON=${MODPY_BIN}
>
> post-build:
> - cd ${WRKSRC}/doc && ${MAKE_ENV} ${MAKE_PROGRAM} man
> + cd ${WRKSRC}/doc && ${MAKE_ENV} ${MAKE_PROGRAM} man \
> + SPHINXBUILD=sphinx-build${MODPY_BIN_SUFFIX}
>
> post-install:
> - ${INSTALL_DATA} ${WRKSRC}/doc/_build/man/*.1 ${PREFIX}/man/man1/
> + ${INSTALL_DATA} ${WRKSRC}/doc/_build/man/podcastparser.1 \
> + ${PREFIX}/man/man1/podcastparser${MODPY_BIN_SUFFIX}.1
This can be simplified using ALL_TARGET, see below an updated diff for
Makefile only as I haven't tested all of it yet.

Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/py-podcastparser/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile 18 Apr 2017 02:13:26 -0000 1.1.1.1
+++ Makefile 31 Jan 2018 15:05:15 -0000
@@ -2,34 +2,35 @@

COMMENT= simple, fast and efficient podcast parser

-MODPY_EGG_VERSION= 0.6.1
+MODPY_EGG_VERSION= 0.6.2
DISTNAME= podcastparser-${MODPY_EGG_VERSION}
PKGNAME= py-${DISTNAME}
CATEGORIES= textproc

-HOMEPAGE= http://gpodder.org/podcastparser/
-
MAINTAINER= Tim Meunier <trondd@kagu-tsuchi.com>

# ISC
PERMIT_PACKAGE_CDROM= Yes

-MASTER_SITES= ${HOMEPAGE}
-
MODULES= lang/python

-BUILD_DEPENDS= textproc/py-sphinx
+MODPY_PI= Yes
+
+BUILD_DEPENDS= textproc/py-sphinx${MODPY_FLAVOR}
+
+TEST_DEPENDS= devel/py-nose${MODPY_FLAVOR} \
+ devel/py-coverage${MODPY_FLAVOR}

-TEST_DEPENDS= devel/py-nose \
- devel/py-coverage
+FLAVORS= python3
+FLAVOR?=

MAKE_FILE= makefile
-MAKE_ENV= PYTHON=${MODPY_BIN}
+MAKE_ENV= PYTHON=${MODPY_BIN} \
+ SPHINXBUILD=sphinx-build${MODPY_BIN_SUFFIX}

-post-build:
- cd ${WRKSRC}/doc && ${MAKE_ENV} ${MAKE_PROGRAM} man
+ALL_TARGET= all man

post-install:
- ${INSTALL_DATA} ${WRKSRC}/doc/_build/man/*.1 ${PREFIX}/man/man1/
+ mv ${PREFIX}/man/man1/podcastparser{,${MODPY_BIN_SUFFIX}}.1

.include <bsd.port.mk>

No comments:

Post a Comment