freebsd-ports/devel/pydbus-common/Makefile
Tobias C. Berner 6e027a6563 devel/py-dbus,devel/pydbus-common: update to 1.2.18
Changelog [1]:

Build-time configuration changes:
    * dbus-python will be built for python3 if neither PYTHON nor
      PYTHON_VERSION is specified. Use a command like
      		./configure PYTHON=$(command -v python2)
      if installation for Python 2 (EOL 2020-01-01) is required.

Dependencies:
    * Python 2 reached end-of-life on 2020-01-01. A future version of
      dbus-python is likely to remove Python 2 support.

Fixes:
    * Move from collections.Sequence to collections.abc.Sequence on
      Python ≥ 3.3, for Python 3.10 compatibility (dbus-python#37; Simon
      McVittie)
    * Avoid another deprecation warning for inspect.getargspec(). This
      is similar to the one fixed in 1.2.4, but for
      dbus.decorators.signal rather than dbus.decorators.method.
      (dbus-python!8; Martin Stumpf)
    * Fix an unlikely fd leak if memory allocation fails for UnixFd
      (dbus-python!9, Red Hat #1938703; David King)
    * Fix memory and fd leak if UnixFd is given an invalid negative
      variant_level (Simon McVittie)
    * Avoid more deprecation warnings: - gi.repository.GObject.MainLoop
      etc. (now used via gi.repository.GLib) -
      gi.repository.GLib.threads_init (no longer necessary at all)
      (Simon McVittie)
    * Disable -Wdeclaration-after-statement. Python 3.9 relies on
      intermixed declarations and statements in its headers, so we can
      no longer enforce this. (Simon McVittie)
    * Convert examples to Python 3 (Simon McVittie)
    * Use the same Python executable for build and dist/distcheck by
      default (Simon McVittie)

[1] https://dbus.freedesktop.org/doc/dbus-python/news.html#dbus-python-bindings-1-2-18-2021-07-20
2021-07-23 16:45:15 +02:00

76 lines
2.3 KiB
Makefile

# Created by: Gustau Perez i Querol <gustau.perez@gmail.com>
PORTNAME= dbus
DISTVERSION= 1.2.18
PORTREVISION?= 0
CATEGORIES= devel gnome python
MASTER_SITES= http://dbus.freedesktop.org/releases/dbus-python/
PKGNAMEPREFIX?= py
PKGNAMESUFFIX?= -common
DISTNAME= dbus-python-${PORTVERSION}
MAINTAINER= desktop@FreeBSD.org
COMMENT?= Common files for the Python bindings for the D-BUS messaging system
BUILD_DEPENDS= dbus-glib>=0:devel/dbus-glib
SLAVE_PORT?= no
USES= gettext gmake libtool pathfix pkgconfig
GNU_CONFIGURE= yes
CPPFLAGS+= -I${PYTHON_INCLUDEDIR}
CONFIGURE_ARGS= --docdir=${DOCSDIR} \
--disable-api-docs
INSTALL_TARGET= install-strip
.if ${SLAVE_PORT} == no
USES+= python:build
DOCSDIR= ${PREFIX}/share/doc/py-${PORTNAME}
EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME}
OPTIONS_SUB= yes
OPTIONS_DEFINE= HTMLDOCS DOCS EXAMPLES
HTMLDOCS_DESC= build html documentation
HTMLDOCS_IMPLIES= DOCS
HTMLDOCS_CONFIGURE_ENABLE= documentation
HTMLDOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx \
${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR}
post-patch-DOCS-on:
@${REINPLACE_CMD} -e 's|HEADERS install-dist_docDATA|HEADERS|g ; \
s|PYTHON install-nodist_docDATA|PYTHON|g' \
${WRKSRC}/Makefile.in
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/include/dbus-1.0/dbus/
${INSTALL_DATA} ${WRKSRC}/include/dbus/dbus-python.h \
${STAGEDIR}${PREFIX}/include/dbus-1.0/dbus/dbus-python.h
${INSTALL_DATA} ${WRKSRC}/dbus-python.pc \
${STAGEDIR}${PREFIX}/libdata/pkgconfig/dbus-python.pc
${MKDIR} ${STAGEDIR}${EXAMPLESDIR} && \
${INSTALL_DATA} ${WRKSRC}/examples/*.py ${STAGEDIR}${EXAMPLESDIR}
${MKDIR} ${STAGEDIR}${DOCSDIR} && \
${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${STAGEDIR}${DOCSDIR} && \
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} && \
${INSTALL_DATA} ${WRKSRC}/NEWS ${STAGEDIR}${DOCSDIR}
do-install-HTMLDOCS-on:
${INSTALL_DATA} ${WRKSRC}/doc/_build/*.html ${STAGEDIR}${DOCSDIR}
.else # slave is defined
LIB_DEPENDS+= libdbus-glib-1.so:devel/dbus-glib
RUN_DEPENDS+= pydbus-common>=0:devel/pydbus-common
USE_LDCONFIG= yes
USES+= python:3.6+
USE_PYTHON= flavors py3kplist
post-install:
@${RM} -r ${STAGEDIR}${PREFIX}/include/dbus-1.0 \
${STAGEDIR}${PREFIX}/libdata/pkgconfig/dbus-python.pc
@${RM} -r ${STAGEDIR}/${DOCSDIR}
.endif # end of slaving block
.include <bsd.port.mk>