Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: UPDATE: libwebp - CMake
To:
Brad Smith <brad@comstyle.com>, Theo Buehler <tb@theobuehler.org>
Cc:
<ports@openbsd.org>
Date:
Thu, 22 Jan 2026 01:56:39 +0000

Download raw body.

Thread
  • Brad Smith:

    UPDATE: libwebp - CMake

  • I've added a ticket with distutils, the existing code is beyond my rather 
    limited python skills to change to do this
    
    https://github.com/pypa/distutils/issues/396
    
    -- 
      Sent from a phone, apologies for poor formatting.
    
    On 22 January 2026 00:29:24 Brad Smith <brad@comstyle.com> wrote:
    
    > On 2026-01-21 7:09 p.m., Theo Buehler wrote:
    >> On Wed, Jan 21, 2026 at 11:52:54PM +0000, Stuart Henderson wrote:
    >>> see patch-setup_py about tiff which had the same issue
    >> This works and passes regress (2 failures unrelated to libwebp).
    >>
    >> I think the webp diff should drop base-gcc and set COMPILER_LANGS=c
    >>
    >> Then all this is ok tb
    >
    > Thanks.
    >
    > Just fix the setup.py comment. It is graphics/libwebp.
    >
    >> Index: Makefile
    >> ===================================================================
    >> RCS file: /cvs/ports/graphics/py-Pillow/Makefile,v
    >> diff -u -p -r1.76 Makefile
    >> --- Makefile	5 Jan 2026 14:45:23 -0000	1.76
    >> +++ Makefile	21 Jan 2026 23:57:09 -0000
    >> @@ -37,6 +37,7 @@ TEST_DEPENDS=	${FULLPKGNAME}:${BUILD_PKG
    >>   # 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
    >> Index: patches/patch-setup_py
    >> ===================================================================
    >> RCS file: /cvs/ports/graphics/py-Pillow/patches/patch-setup_py,v
    >> diff -u -p -r1.19 patch-setup_py
    >> --- patches/patch-setup_py	18 Oct 2025 08:08:31 -0000	1.19
    >> +++ patches/patch-setup_py	22 Jan 2026 00:02:21 -0000
    >> @@ -1,10 +1,10 @@
    >>   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.
    >> +update of graphics/tiff and graphics/webp). Patch to workaround.
    >>
    >>   Index: setup.py
    >>   --- setup.py.orig
    >> @@ -22,12 +22,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")
    >>
    
    
  • Brad Smith:

    UPDATE: libwebp - CMake