Hi,

py-slixmpp failed to build in the last sparc64 bulk:

  http://build-failures.rhaalovely.net//sparc64/2019-03-04/net/py-slixmpp.log

This can be reproduced on clang archs if both libidn and py3-cython are
installed.

The diff below adds the optional deps and the paths to /usr/local to
solve the build error.  Upstream says:

  Building

  Slixmpp can make use of cython to improve performance on critical
  modules. To do that, cython3 is necessary along with libidn headers.
  Otherwise, no compilation is needed.

make test doesn't show a performance improvement but maybe that's not
the point of a testsuite.

I should add that I have no idea whether python's "stringprep" and
libidn(1) are functionally equivalent.  If you prefer to disable cython
support instead then setup.py needs a patch.

Thoughts?


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/py-slixmpp/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile    7 Feb 2019 21:31:32 -0000       1.11
+++ Makefile    26 Mar 2019 15:03:43 -0000
@@ -3,6 +3,7 @@
 COMMENT =              slixmpp is an elegant Python library for XMPP
 
 MODPY_EGG_VERSION =    1.4.2
+REVISION =             0
 DISTNAME =             slixmpp-${MODPY_EGG_VERSION}
 PKGNAME =              py3-${DISTNAME}
 CATEGORIES =           net
@@ -12,6 +13,8 @@ MAINTAINER =          Kurt Mosiejczuk <kurt@cran
 # MIT
 PERMIT_PACKAGE_CDROM = Yes
 
+WANTLIB += idn pthread ${MODPY_WANTLIB}
+
 MODULES =              lang/python
 
 MODPY_PI =             Yes
@@ -19,12 +22,17 @@ MODPY_SETUPTOOLS =  Yes
 
 MODPY_VERSION =                ${MODPY_DEFAULT_VERSION_3}
 
+BUILD_DEPENDS =                lang/cython${MODPY_FLAVOR}
+LIB_DEPENDS =          devel/libidn
 RUN_DEPENDS =          devel/py-asn1${MODPY_FLAVOR} \
                        devel/py-asn1-modules${MODPY_FLAVOR} \
                        net/py-aiodns${MODPY_FLAVOR} \
                        www/py-aiohttp
 TEST_DEPENDS =         ${RUN_DEPENDS} \
                        security/gnupg
+
+MAKE_ENV =             CPPFLAGS="-I${LOCALBASE}/include" \
+                       LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}"
 
 do-test:
        @cd ${WRKSRC} && ${MODPY_BIN} run_tests.py
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/py-slixmpp/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- pkg/PLIST   7 Feb 2019 21:31:32 -0000       1.8
+++ pkg/PLIST   26 Mar 2019 15:03:43 -0000
@@ -851,6 +851,7 @@ lib/python${MODPY_VERSION}/site-packages
 lib/python${MODPY_VERSION}/site-packages/slixmpp/stanza/stream_error.py
 lib/python${MODPY_VERSION}/site-packages/slixmpp/stanza/stream_features.py
 lib/python${MODPY_VERSION}/site-packages/slixmpp/stringprep.py
+lib/python${MODPY_VERSION}/site-packages/slixmpp/stringprep.so
 lib/python${MODPY_VERSION}/site-packages/slixmpp/test/
 lib/python${MODPY_VERSION}/site-packages/slixmpp/test/__init__.py
 lib/python${MODPY_VERSION}/site-packages/slixmpp/test/${MODPY_PYCACHE}/


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to