it'll be due to dropping the static library, iirc something is messed up with detecting shared libs in python and it doesn't work correctly unless there's either a .a or .so symlink

--
 Sent from a phone, apologies for poor formatting.

On 21 January 2026 23:09:21 Brad Smith <[email protected]> wrote:

Here is a conversion of libwebp back to using CMake again.

I was wondering why OpenImageIO's WebP support wasn't being
built and its because of the missing CMake module in libwebp.

But as stated with the previous attempt something breaks in
py-Pillow. When I added webp=enable it complained about not
being able to find the library.

Could someone who understands Python / py-Pillow try to take
a look into what is going on?


Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/libwebp/Makefile,v
retrieving revision 1.38
diff -u -p -u -p -r1.38 Makefile
--- Makefile    22 Jul 2025 12:33:14 -0000      1.38
+++ Makefile    10 Jan 2026 04:13:21 -0000
@@ -3,7 +3,7 @@ COMMENT=        Google WebP image format conver
GH_ACCOUNT=     webmproject
GH_PROJECT=     libwebp
GH_TAGNAME=     v1.6.0
-REVISION=      0
+REVISION=      1
CATEGORIES=     graphics

SHARED_LIBS +=  sharpyuv             0.1      # 0.0
@@ -17,8 +17,9 @@ HOMEPAGE=     https://developers.google.com/
# BSD
PERMIT_PACKAGE= Yes

-WANTLIB=       ${COMPILER_LIBCXX} Lerc c gif jpeg lzma m png pthread \
-               tiff z zstd
+WANTLIB=       c gif jpeg m png pthread tiff z
+
+MODULES=       devel/cmake

COMPILER=       base-clang ports-gcc base-gcc

@@ -27,21 +28,8 @@ LIB_DEPENDS= graphics/giflib \
                graphics/png \
                graphics/tiff

-AUTOCONF_VERSION=      2.72
-AUTOMAKE_VERSION=      1.17
-
-CONFIGURE_STYLE=       autoreconf
-
-CONFIGURE_ARGS= --enable-everything
-
-# this will use libSDL to build stuff under extras otherwise
-# (a static webp viewer which is more or less useless, and not
-# even installed by default)
-CONFIGURE_ARGS +=--disable-gl \
-               --disable-sdl
-
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
-               LDFLAGS="-L${LOCALBASE}/lib"
+CONFIGURE_ARGS=        -DBUILD_SHARED_LIBS=ON \
+               -DWEBP_BUILD_VWEBP=OFF

DEBUG_PACKAGES= ${BUILD_PACKAGES}

Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/graphics/libwebp/pkg/PLIST,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 PLIST
--- pkg/PLIST   31 May 2025 04:34:57 -0000      1.14
+++ pkg/PLIST   10 Jan 2026 04:13:21 -0000
@@ -14,20 +14,10 @@ include/webp/sharpyuv/
include/webp/sharpyuv/sharpyuv.h
include/webp/sharpyuv/sharpyuv_csp.h
include/webp/types.h
-@static-lib lib/libsharpyuv.a
-lib/libsharpyuv.la
@lib lib/libsharpyuv.so.${LIBsharpyuv_VERSION}
-@static-lib lib/libwebp.a
-lib/libwebp.la
@lib lib/libwebp.so.${LIBwebp_VERSION}
-@static-lib lib/libwebpdecoder.a
-lib/libwebpdecoder.la
@lib lib/libwebpdecoder.so.${LIBwebpdecoder_VERSION}
-@static-lib lib/libwebpdemux.a
-lib/libwebpdemux.la
@lib lib/libwebpdemux.so.${LIBwebpdemux_VERSION}
-@static-lib lib/libwebpmux.a
-lib/libwebpmux.la
@lib lib/libwebpmux.so.${LIBwebpmux_VERSION}
lib/pkgconfig/libsharpyuv.pc
lib/pkgconfig/libwebp.pc
@@ -40,3 +30,9 @@ lib/pkgconfig/libwebpmux.pc
@man man/man1/img2webp.1
@man man/man1/webpinfo.1
@man man/man1/webpmux.1
+share/WebP/
+share/WebP/cmake/
+share/WebP/cmake/WebPConfig.cmake
+share/WebP/cmake/WebPConfigVersion.cmake
+share/WebP/cmake/WebPTargets${MODCMAKE_BUILD_SUFFIX}
+share/WebP/cmake/WebPTargets.cmake

Reply via email to