--- lang/python35/Makefile (revision 421281) +++ lang/python35/Makefile (working copy) @@ -104,6 +104,11 @@ PLIST_FILES+= libdata/pkgconfig/python-%%XYDOT%%%%ABI%%.pc .endif +# https://bugs.freebsd.org/209355 +.if exists(${LOCALBASE}/lib/liblzma.so) +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-lzmalib +.endif + # http://bugs.python.org/issue22521 # http://bugs.python.org/issue23042 .if ${ARCH} == i386 && !${PORT_OPTIONS:MLIBFFI} --- lang/python35/files/extra-patch-lzmalib (nonexistent) +++ lang/python35/files/extra-patch-lzmalib (working copy) @@ -0,0 +1,11 @@ +--- setup.py.orig 2016-09-03 05:52:07 UTC ++++ setup.py +@@ -1451,7 +1451,7 @@ class PyBuildExt(build_ext): + # LZMA compression support. + if self.compiler.find_library_file(lib_dirs, 'lzma'): + exts.append( Extension('_lzma', ['_lzmamodule.c'], +- libraries = ['lzma']) ) ++ extra_link_args = ('-l:liblzma.so.5',)) ) + else: + missing.append('_lzma') +