mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
py-Pillow: like already done for tiff, stop searching for the libwebp
library and just assume that it's available if the header is present. the search uses find_library_file from distutils which only works if there's either a static library or a libfoo.so symlink. from tb@, I tweaked the comment
This commit is contained in:
@@ -37,6 +37,7 @@ TEST_DEPENDS= ${FULLPKGNAME}:${BUILD_PKGPATH} \
|
||||
# tiff/xcb: they'd be picked up anyway but set to enable to fail
|
||||
# if libs aren't found
|
||||
MODPY_PYBUILD_ARGS= -C tiff=enable \
|
||||
-C webp=enable \
|
||||
-C xcb=enable \
|
||||
-C parallel=${MAKE_JOBS}
|
||||
# can also use -C debug=true
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
hunk 1: allow finding X libs
|
||||
|
||||
hunk 2: find_library_file (which comes from distutils via setuptools)
|
||||
hunks 2-3: find_library_file (which comes from distutils via setuptools)
|
||||
has a hardcoded 'shared_lib_extension = ".so"' and only searches for the
|
||||
full filename, so it misses OpenBSD-style libfoo.so.X.Y unless there's
|
||||
also a static library with a matching name (but that was removed in an
|
||||
update of graphics/tiff). Patch to workaround.
|
||||
also a static library with a matching name. updates to graphics/tiff and
|
||||
graphics/libwebp removes static libraries; patch to workaround.
|
||||
https://github.com/pypa/distutils/issues/396
|
||||
|
||||
Index: setup.py
|
||||
--- setup.py.orig
|
||||
@@ -22,12 +23,21 @@ Index: setup.py
|
||||
elif sys.platform.startswith("netbsd"):
|
||||
_add_directory(library_dirs, "/usr/pkg/lib")
|
||||
_add_directory(include_dirs, "/usr/pkg/include")
|
||||
@@ -793,6 +799,8 @@ class pil_build_ext(build_ext):
|
||||
):
|
||||
@@ -794,6 +800,8 @@ class pil_build_ext(build_ext):
|
||||
feature.set("tiff", "libtiff")
|
||||
elif _find_library_file(self, "tiff"):
|
||||
+ feature.set("tiff", "tiff")
|
||||
+ elif sys.platform.startswith("openbsd"):
|
||||
feature.set("tiff", "tiff")
|
||||
+ elif sys.platform.startswith("openbsd"):
|
||||
+ feature.set("tiff", "tiff")
|
||||
|
||||
if feature.want("freetype"):
|
||||
_dbg("Looking for freetype")
|
||||
@@ -874,6 +882,8 @@ class pil_build_ext(build_ext):
|
||||
):
|
||||
feature.set("webp", prefix + "webp")
|
||||
break
|
||||
+ elif sys.platform.startswith("openbsd"):
|
||||
+ feature.set("webp", "webp")
|
||||
|
||||
if feature.want("xcb"):
|
||||
_dbg("Looking for xcb")
|
||||
|
||||
Reference in New Issue
Block a user