Re: [UPDATE] graphics/libplacebo - v6.338.2

2024-02-19 Thread Jose Maldonado
El Mon, 19 Feb 2024 22:44:58 -0500
Brad Smith  escribió:
> On 2024-02-19 3:53 p.m., Jose Maldonado wrote:
> > El Mon, 19 Feb 2024 15:30:55 +
> > Stuart Henderson  escribió:
> >> You add "WANTLIB+= ${COMPILER_LIBCXX}" while keeping
> >> COMPILER_LANGS=c, which will probably fail on base-gcc archs. I
> >> think you'll need to remove the COMPILER_LANGS line.
> > Hi @sthen!
> >
> > Fixed, I send the new diff with corrections, newly tested in amd64,
> > build and work fine.
> 
> Hi Jose,Could you move the dlopen comment to the bottom and have a 
> separate line of just "WANTLIB += GL epoxy" below the comment. The
> rest looks good. Thanks.

Hi @Brad! 

I'll send you a new diff with the changes you request.

-- 
*
Dios en su cielo, todo bien en la Tierra
Index: Makefile
===
RCS file: /cvs/ports/graphics/libplacebo/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile	23 Jul 2022 05:16:05 -	1.11
+++ Makefile	20 Feb 2024 04:41:53 -
@@ -2,32 +2,52 @@ COMMENT=	reusable library for GPU-accele
 
 GH_ACCOUNT=	haasn
 GH_PROJECT=	libplacebo
-GH_TAGNAME=	v4.208.0
+GH_TAGNAME=	v6.338.2
 CATEGORIES=	graphics
 
-SHARED_LIBS=	placebo	7.0
+SHARED_LIBS=	placebo	8.0
 
 MAINTAINER=	Brad Smith 
 
 # LGPLv2.1+
 PERMIT_PACKAGE=	Yes
 
-WANTLIB=	epoxy execinfo lcms2 m pthread
+WANTLIB +=	${COMPILER_LIBCXX}
+WANTLIB +=	execinfo lcms2 m pthread
+WANTLIB +=	shaderc_shared vulkan
+# GL and epoxy are dlopened by libplacebo
+WANTLIB +=	epoxy GL
+
 
 MODULES=	devel/meson
 
-LIB_DEPENDS=	graphics/lcms2
+BUILD_DEPENDS=	devel/fast-float \
+		graphics/glad \
+		graphics/vulkan-headers
+
+LIB_DEPENDS=	graphics/lcms2 \
+		graphics/shaderc \
+		graphics/vulkan-loader
 
 COMPILER=	base-clang ports-gcc
-COMPILER_LANGS=	c
+
+CFLAGS +=		-I${X11BASE}/include
+LDFLAGS +=		-L${X11BASE}/lib
+
+MODMESON_CONFIGURE_ENV +=	CFLAGS="${CFLAGS}" \
+	LDFLAGS="${LDFLAGS}"
 
 CONFIGURE_ARGS+=-Ddefault_library=both \
 		-Dd3d11=disabled \
 		-Ddemos=false \
+		-Ddovi=disabled \
 		-Dglslang=disabled \
-		-Dshaderc=disabled \
+		-Dlibdovi=disabled \
+		-Dshaderc=enabled \
+		-Dopengl=enabled \
 		-Dunwind=disabled \
-		-Dvulkan=disabled
+		-Dvulkan=enabled \
+		-Dxxhash=disabled
 
 NO_TEST=	Yes
 
Index: distinfo
===
RCS file: /cvs/ports/graphics/libplacebo/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo	23 Jul 2022 05:16:05 -	1.9
+++ distinfo	20 Feb 2024 04:41:53 -
@@ -1,2 +1,2 @@
-SHA256 (libplacebo-4.208.0.tar.gz) = UJD7rU9luclQAoweDdhtIKpm0VnAhUqJs+uNQhCWa3M=
-SIZE (libplacebo-4.208.0.tar.gz) = 647068
+SHA256 (libplacebo-6.338.2.tar.gz) = Lx5iTgnXKoydtw+RD3Vg52ShwSba5CrMWzvO+DanrsY=
+SIZE (libplacebo-6.338.2.tar.gz) = 841168
Index: pkg/PLIST
===
RCS file: /cvs/ports/graphics/libplacebo/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- pkg/PLIST	11 Mar 2022 19:22:45 -	1.8
+++ pkg/PLIST	20 Feb 2024 04:41:53 -
@@ -1,20 +1,25 @@
 include/libplacebo/
+include/libplacebo/cache.h
 include/libplacebo/colorspace.h
 include/libplacebo/common.h
 include/libplacebo/config.h
-include/libplacebo/context.h
+include/libplacebo/d3d11.h
 include/libplacebo/dispatch.h
 include/libplacebo/dither.h
 include/libplacebo/dummy.h
 include/libplacebo/filters.h
+include/libplacebo/gamut_mapping.h
 include/libplacebo/gpu.h
 include/libplacebo/log.h
 include/libplacebo/opengl.h
+include/libplacebo/options.h
 include/libplacebo/renderer.h
 include/libplacebo/shaders/
 include/libplacebo/shaders.h
 include/libplacebo/shaders/colorspace.h
 include/libplacebo/shaders/custom.h
+include/libplacebo/shaders/deinterlacing.h
+include/libplacebo/shaders/dithering.h
 include/libplacebo/shaders/film_grain.h
 include/libplacebo/shaders/icc.h
 include/libplacebo/shaders/lut.h
@@ -24,10 +29,12 @@ include/libplacebo/tone_mapping.h
 include/libplacebo/utils/
 include/libplacebo/utils/dav1d.h
 include/libplacebo/utils/dav1d_internal.h
+include/libplacebo/utils/dolbyvision.h
 include/libplacebo/utils/frame_queue.h
 include/libplacebo/utils/libav.h
 include/libplacebo/utils/libav_internal.h
 include/libplacebo/utils/upload.h
+include/libplacebo/vulkan.h
 @static-lib lib/libplacebo.a
 @lib lib/libplacebo.so.${LIBplacebo_VERSION}
 lib/pkgconfig/libplacebo.pc


Re: [UPDATE] graphics/libplacebo - v6.338.2

2024-02-19 Thread Brad Smith

On 2024-02-19 3:53 p.m., Jose Maldonado wrote:

El Mon, 19 Feb 2024 15:30:55 +
Stuart Henderson  escribió:

You add "WANTLIB+= ${COMPILER_LIBCXX}" while keeping COMPILER_LANGS=c,
which will probably fail on base-gcc archs. I think you'll need to
remove the COMPILER_LANGS line.

Hi @sthen!

Fixed, I send the new diff with corrections, newly tested in amd64,
build and work fine.


Hi Jose,Could you move the dlopen comment to the bottom and have a 
separate line of just "WANTLIB += GL epoxy" below the comment. The rest 
looks good. Thanks.

Re: [UPDATE] graphics/libplacebo - v6.338.2

2024-02-19 Thread Jose Maldonado
El Mon, 19 Feb 2024 15:30:55 +
Stuart Henderson  escribió:
> You add "WANTLIB+= ${COMPILER_LIBCXX}" while keeping COMPILER_LANGS=c,
> which will probably fail on base-gcc archs. I think you'll need to
> remove the COMPILER_LANGS line.

Hi @sthen! 

Fixed, I send the new diff with corrections, newly tested in amd64,
build and work fine. 

-- 
*
Dios en su cielo, todo bien en la Tierra
Index: Makefile
===
RCS file: /cvs/ports/graphics/libplacebo/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile	23 Jul 2022 05:16:05 -	1.11
+++ Makefile	19 Feb 2024 20:50:24 -
@@ -2,32 +2,50 @@ COMMENT=	reusable library for GPU-accele
 
 GH_ACCOUNT=	haasn
 GH_PROJECT=	libplacebo
-GH_TAGNAME=	v4.208.0
+GH_TAGNAME=	v6.338.2
 CATEGORIES=	graphics
 
-SHARED_LIBS=	placebo	7.0
+SHARED_LIBS=	placebo	8.0
 
 MAINTAINER=	Brad Smith 
 
 # LGPLv2.1+
 PERMIT_PACKAGE=	Yes
 
-WANTLIB=	epoxy execinfo lcms2 m pthread
+# GL and epoxy are dlopened by libplacebo
+WANTLIB +=	${COMPILER_LIBCXX}
+WANTLIB +=	epoxy execinfo GL lcms2 m pthread
+WANTLIB +=	shaderc_shared vulkan 
 
 MODULES=	devel/meson
 
-LIB_DEPENDS=	graphics/lcms2
+BUILD_DEPENDS=	devel/fast-float \
+		graphics/glad \
+		graphics/vulkan-headers
+
+LIB_DEPENDS=	graphics/lcms2 \
+		graphics/shaderc \
+		graphics/vulkan-loader
 
 COMPILER=	base-clang ports-gcc
-COMPILER_LANGS=	c
+
+CFLAGS +=		-I${X11BASE}/include
+LDFLAGS +=		-L${X11BASE}/lib
+
+MODMESON_CONFIGURE_ENV +=	CFLAGS="${CFLAGS}" \
+	LDFLAGS="${LDFLAGS}"
 
 CONFIGURE_ARGS+=-Ddefault_library=both \
 		-Dd3d11=disabled \
 		-Ddemos=false \
+		-Ddovi=disabled \
 		-Dglslang=disabled \
-		-Dshaderc=disabled \
+		-Dlibdovi=disabled \
+		-Dshaderc=enabled \
+		-Dopengl=enabled \
 		-Dunwind=disabled \
-		-Dvulkan=disabled
+		-Dxxhash=disabled \
+		-Dvulkan=enabled
 
 NO_TEST=	Yes
 
Index: distinfo
===
RCS file: /cvs/ports/graphics/libplacebo/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo	23 Jul 2022 05:16:05 -	1.9
+++ distinfo	19 Feb 2024 20:50:24 -
@@ -1,2 +1,2 @@
-SHA256 (libplacebo-4.208.0.tar.gz) = UJD7rU9luclQAoweDdhtIKpm0VnAhUqJs+uNQhCWa3M=
-SIZE (libplacebo-4.208.0.tar.gz) = 647068
+SHA256 (libplacebo-6.338.2.tar.gz) = Lx5iTgnXKoydtw+RD3Vg52ShwSba5CrMWzvO+DanrsY=
+SIZE (libplacebo-6.338.2.tar.gz) = 841168
Index: pkg/PLIST
===
RCS file: /cvs/ports/graphics/libplacebo/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- pkg/PLIST	11 Mar 2022 19:22:45 -	1.8
+++ pkg/PLIST	19 Feb 2024 20:50:24 -
@@ -1,20 +1,25 @@
 include/libplacebo/
+include/libplacebo/cache.h
 include/libplacebo/colorspace.h
 include/libplacebo/common.h
 include/libplacebo/config.h
-include/libplacebo/context.h
+include/libplacebo/d3d11.h
 include/libplacebo/dispatch.h
 include/libplacebo/dither.h
 include/libplacebo/dummy.h
 include/libplacebo/filters.h
+include/libplacebo/gamut_mapping.h
 include/libplacebo/gpu.h
 include/libplacebo/log.h
 include/libplacebo/opengl.h
+include/libplacebo/options.h
 include/libplacebo/renderer.h
 include/libplacebo/shaders/
 include/libplacebo/shaders.h
 include/libplacebo/shaders/colorspace.h
 include/libplacebo/shaders/custom.h
+include/libplacebo/shaders/deinterlacing.h
+include/libplacebo/shaders/dithering.h
 include/libplacebo/shaders/film_grain.h
 include/libplacebo/shaders/icc.h
 include/libplacebo/shaders/lut.h
@@ -24,10 +29,12 @@ include/libplacebo/tone_mapping.h
 include/libplacebo/utils/
 include/libplacebo/utils/dav1d.h
 include/libplacebo/utils/dav1d_internal.h
+include/libplacebo/utils/dolbyvision.h
 include/libplacebo/utils/frame_queue.h
 include/libplacebo/utils/libav.h
 include/libplacebo/utils/libav_internal.h
 include/libplacebo/utils/upload.h
+include/libplacebo/vulkan.h
 @static-lib lib/libplacebo.a
 @lib lib/libplacebo.so.${LIBplacebo_VERSION}
 lib/pkgconfig/libplacebo.pc


Re: [UPDATE] graphics/libplacebo - v6.338.2

2024-02-19 Thread Stuart Henderson
You add "WANTLIB+= ${COMPILER_LIBCXX}" while keeping COMPILER_LANGS=c,
which will probably fail on base-gcc archs. I think you'll need to
remove the COMPILER_LANGS line.



Re: [UPDATE] graphics/libplacebo - v6.338.2

2024-02-13 Thread Jose Maldonado
El Tue, 13 Feb 2024 17:58:36 -0500
Thomas Frohwein  escribió:
> On Mon, Feb 12, 2024 at 01:51:30PM -0400, Jose Maldonado wrote:
> > 
> > Hello everyone!
> > 
> > This is an update for libplacebo. Our port version (v4.208.0) is
> > already two years old and we already have to make a small bump due
> > to the arrival of a new mpv (v0.37.0).
> > 
> > This new version of libplacebo requires a series of additional
> > dependencies that I have submitted as new ports to the list:
> > devel/fast-float and graphics/glad.
> > 
> > With this new version and its dependencies we can activate support
> > for Vulkan and OpenGL in the library, aiming to take advantage of
> > these capabilities.
> > 
> > In the future, when we have Mesa-23.2.1 and ffmpeg-6.1 on OpenBSD,
> > perhaps we can take advantage of the ability of ffmpeg, mpv, and
> > libplacebo to obtain hwaccel through Vulkan (for h264, h265 and AV1,
> > without needing go through VAAPI). For now, the latter is in the
> > future, it will depend on our versions of Mesa and ffmpeg, along
> > with the appropriate support.
> 
> Thanks for the diff, a few comments below inline and then an updated
> diff from me attached. Please remember to CC maintainer as they may
> not always be subscribed to ports@.
> 
> Also important to know if ports that depend on the library have been
> tested with the new version, and if any of them might need an update
> with the API changes. I can find only mpv and vlc when looking at
> WANTLIBs in sqlports, and I rebuilt mpv and it still works FWIW.
> 
> There was trailing whitespace - it's generally recommended to run
> portcheck(1) (in /usr/ports/infrastructure/bin/) which will catch that
> (among other things).
> 
> [...]
> 
> >  MAINTAINER=Brad Smith 
> 
> [...]
> 
> > -WANTLIB=   epoxy execinfo lcms2 m pthread
> > +WANTLIB+=  ${COMPILER_LIBCXX} epoxy execinfo GL lcms2 m
> > pthread +WANTLIB+=  shaderc_shared vulkan 
> 
> $ make port-lib-depends-check
> 
> libplacebo-6.338.2(graphics/libplacebo):
> Extra:  GL.19 epoxy.4
> 
> I assume these 2 libraries are dlopen'd? In that case it would be
> preferable to add a comment about this above the WANTLIB block.
> 
> >  MODULES=   devel/meson
> >  
> > -LIB_DEPENDS=   graphics/lcms2
> > +BUILD_DEPENDS= devel/fast-float \
> > +   graphics/glad \
> > +   graphics/shaderc \
> 
> A LIB_DEPENDS is automatically also a BUILD_DEPENDS, so no need to
> list shaderc here. (see bsd.port.mk(5))
> 
> > +   graphics/vulkan-headers \
> 
> I would avoid dangling '\' at the end.
> 
> > +LIB_DEPENDS=   graphics/lcms2 \
> > +   graphics/shaderc
> > +
> > +RUN_DEPENDS=   graphics/vulkan-loader
> 
> ===>  Verifying specs: [...] Missing library for vulkan>=0.0
> 
> vulkan-loader needs to be LIB_DEPENDS given the WANTLIB entry.
> 
> 

Hi Thomas!

Following your recommendations I send you the revised diff for
libplacebo. I have put it through portcheck and without problems.

I've also followed your recommendations for the new mpv, so I'll post
the new diff in that thread.



-- 
*
Dios en su cielo, todo bien en la Tierra


libplacebo_6_338_2
Description: Binary data


Re: [UPDATE] graphics/libplacebo - v6.338.2

2024-02-13 Thread Jose Maldonado
El Tue, 13 Feb 2024 17:58:36 -0500
Thomas Frohwein  escribió:
> 
> Also important to know if ports that depend on the library have been
> tested with the new version, and if any of them might need an update
> with the API changes. I can find only mpv and vlc when looking at
> WANTLIBs in sqlports, and I rebuilt mpv and it still works FWIW.
> 

Ok, about libplacebo and VLC. Bad news, if we set libplacebo(>=6), VLC
will simply fail to compile. This issue is known in VLC upstream.

Upstream solution? Wait for VLC4 to come out, which still has no
release date. This is because making the necessary changes for VLC3 to
work with libplacebo(>=6) is very complex for them [1]

However, VLC can be compiled without libplacebo support, and instead
aim to use graphics/lcms2, as a result you get a fully functional VLC
from ports without the need for major changes.

Given this I consider that compiling VLC without libplacebo support is a
better functional solution. First, because VLC without libplacebo is
fully functional, and second, because we can continue updating VLC (in
the ports that we have 3.0.18 and are going for 3.0.20) without
hindering libplacebo and mpv updates. In the end, both software remain
in ports with their respective functionalities for whoever needs them.

I've already tested the changes for VLC and built it, I'll pass the
message with the diff in a moment.

[1]
https://code.videolan.org/videolan/vlc/-/merge_requests/3950/diffs?commit_id=9134e2079b5a14ce852ceaf84515c8e4ae35580f


-- 
*
Dios en su cielo, todo bien en la Tierra



Re: [UPDATE] graphics/libplacebo - v6.338.2

2024-02-13 Thread Jose Maldonado
El Tue, 13 Feb 2024 17:58:36 -0500
Thomas Frohwein  escribió:
> 
> Thanks for the diff, a few comments below inline and then an updated
> diff from me attached. Please remember to CC maintainer as they may
> not always be subscribed to ports@.
> 

Ok, I'll keep that in mind next time.

> Also important to know if ports that depend on the library have been
> tested with the new version, and if any of them might need an update
> with the API changes. I can find only mpv and vlc when looking at
> WANTLIBs in sqlports, and I rebuilt mpv and it still works FWIW.
> 

In this case I have tried both approaches:

1.- With mpv-0.36.0 (current version in ports) using the new libplacebo
(v6.338.2). In this case I tried with the current compilation options
(only OpenGL support, no Vulkan support) and with Vulkan activated.
Everything works fine, when playing locally, via stream (both using
OpenGL, with Vulkan and even with the use of GLSL sharders).

2.- With mpv-0.37.0 (new version) the new libplacebo (v6.338.2) it is
indeed a hard dependency. In this second case, I did the same tests as
the previous case, with OpenGL, Vulkan and GLSL shaders tests.

I haven't tried VLC, but I'll give it a look since there is a recent
bug that is related to libplacebo and VLC. I'll give you a preview as I
can test this.

> There was trailing whitespace - it's generally recommended to run
> portcheck(1) (in /usr/ports/infrastructure/bin/) which will catch that
> (among other things).
> 
> [...]
> 
> >  MAINTAINER=Brad Smith 
> 
> [...]
> 
> > -WANTLIB=   epoxy execinfo lcms2 m pthread
> > +WANTLIB+=  ${COMPILER_LIBCXX} epoxy execinfo GL lcms2 m
> > pthread +WANTLIB+=  shaderc_shared vulkan 
> 
> $ make port-lib-depends-check
> 
> libplacebo-6.338.2(graphics/libplacebo):
> Extra:  GL.19 epoxy.4
> 
> I assume these 2 libraries are dlopen'd? In that case it would be
> preferable to add a comment about this above the WANTLIB block.
> 
> >  MODULES=   devel/meson
> >  
> > -LIB_DEPENDS=   graphics/lcms2
> > +BUILD_DEPENDS= devel/fast-float \
> > +   graphics/glad \
> > +   graphics/shaderc \
> 
> A LIB_DEPENDS is automatically also a BUILD_DEPENDS, so no need to
> list shaderc here. (see bsd.port.mk(5))
> 
> > +   graphics/vulkan-headers \
> 
> I would avoid dangling '\' at the end.
> 
> > +LIB_DEPENDS=   graphics/lcms2 \
> > +   graphics/shaderc
> > +
> > +RUN_DEPENDS=   graphics/vulkan-loader
> 
> ===>  Verifying specs: [...] Missing library for vulkan>=0.0
> 
> vulkan-loader needs to be LIB_DEPENDS given the WANTLIB entry.
> 
> [...]
> > +   
> >  
> >  COMPILER=  base-clang ports-gcc
> >  COMPILER_LANGS=c
> >  
> > +CFLAGS +=  -I${X11BASE}/include
> > +LDFLAGS += -L${X11BASE}/lib
> > +
> > +MODMESON_CONFIGURE_ENV +=  LDFLAGS="${LDFLAGS}"
> > +
> >  CONFIGURE_ARGS+=-Ddefault_library=both \
> > -Dd3d11=disabled \
> > -Ddemos=false \
> > +   -Ddovi=disabled \
> > -Dglslang=disabled \
> > -   -Dshaderc=disabled \
> > +   -Dlibdovi=disabled \
> > +   -Dshaderc=enabled \
> > +   -Dopengl=enabled \
> > -Dunwind=disabled \
> > -   -Dvulkan=disabled
> > +   -Dvulkan=enabled \
> > +   -Dxxhash=disabled
> >  
> >  NO_TEST=   Yes
> >  
> > Index: distinfo
> > ===
> > RCS file: /cvs/ports/graphics/libplacebo/distinfo,v
> > retrieving revision 1.9
> > diff -u -p -r1.9 distinfo
> > --- distinfo23 Jul 2022 05:16:05 -  1.9
> > +++ distinfo12 Feb 2024 17:49:43 -
> > @@ -1,2 +1,2 @@
> > -SHA256 (libplacebo-4.208.0.tar.gz) =
> > UJD7rU9luclQAoweDdhtIKpm0VnAhUqJs+uNQhCWa3M= -SIZE
> > (libplacebo-4.208.0.tar.gz) = 647068 +SHA256
> > (libplacebo-6.338.2.tar.gz) =
> > Lx5iTgnXKoydtw+RD3Vg52ShwSba5CrMWzvO+DanrsY= +SIZE
> > (libplacebo-6.338.2.tar.gz) = 841168 Index: pkg/PLIST
> > ===
> > RCS file: /cvs/ports/graphics/libplacebo/pkg/PLIST,v retrieving
> > revision 1.8 diff -u -p -r1.8 PLIST
> > --- pkg/PLIST   11 Mar 2022 19:22:45 -  1.8
> > +++ pkg/PLIST   12 Feb 2024 17:49:43 -
> > @@ -1,20 +1,25 @@
> >  include/libplacebo/
> > +include/libplacebo/cache.h
> >  include/libplacebo/colorspace.h
> >  include/libplacebo/common.h
> >  include/libplacebo/config.h
> > -include/libplacebo/context.h
> > +include/libplacebo/d3d11.h
> >  include/libplacebo/dispatch.h
> >  include/libplacebo/dither.h
> >  include/libplacebo/dummy.h
> >  include/libplacebo/filters.h
> > +include/libplacebo/gamut_mapping.h
> >  include/libplacebo/gpu.h
> >  include/libplacebo/log.h
> >  include/libplacebo/opengl.h
> > +include/libplacebo/options.h
> >  include/libplacebo/renderer.h
> >  include/libplacebo/shaders/
> >  include/libplacebo/shaders.h
> >  include/libplacebo/shaders/colorspace.h
> >  

Re: [UPDATE] graphics/libplacebo - v6.338.2

2024-02-13 Thread Thomas Frohwein
On Mon, Feb 12, 2024 at 01:51:30PM -0400, Jose Maldonado wrote:
> 
> Hello everyone!
> 
> This is an update for libplacebo. Our port version (v4.208.0) is
> already two years old and we already have to make a small bump due to
> the arrival of a new mpv (v0.37.0).
> 
> This new version of libplacebo requires a series of additional
> dependencies that I have submitted as new ports to the list:
> devel/fast-float and graphics/glad.
> 
> With this new version and its dependencies we can activate support for
> Vulkan and OpenGL in the library, aiming to take advantage of these
> capabilities.
> 
> In the future, when we have Mesa-23.2.1 and ffmpeg-6.1 on OpenBSD,
> perhaps we can take advantage of the ability of ffmpeg, mpv, and
> libplacebo to obtain hwaccel through Vulkan (for h264, h265 and AV1,
> without needing go through VAAPI). For now, the latter is in the
> future, it will depend on our versions of Mesa and ffmpeg, along with
> the appropriate support.

Thanks for the diff, a few comments below inline and then an updated
diff from me attached. Please remember to CC maintainer as they may not
always be subscribed to ports@.

Also important to know if ports that depend on the library have been
tested with the new version, and if any of them might need an update
with the API changes. I can find only mpv and vlc when looking at
WANTLIBs in sqlports, and I rebuilt mpv and it still works FWIW.

There was trailing whitespace - it's generally recommended to run
portcheck(1) (in /usr/ports/infrastructure/bin/) which will catch that
(among other things).

[...]

>  MAINTAINER=  Brad Smith 

[...]

> -WANTLIB= epoxy execinfo lcms2 m pthread
> +WANTLIB+=${COMPILER_LIBCXX} epoxy execinfo GL lcms2 m pthread
> +WANTLIB+=shaderc_shared vulkan 

$ make port-lib-depends-check

libplacebo-6.338.2(graphics/libplacebo):
Extra:  GL.19 epoxy.4

I assume these 2 libraries are dlopen'd? In that case it would be
preferable to add a comment about this above the WANTLIB block.

>  MODULES= devel/meson
>  
> -LIB_DEPENDS= graphics/lcms2
> +BUILD_DEPENDS=   devel/fast-float \
> + graphics/glad \
> + graphics/shaderc \

A LIB_DEPENDS is automatically also a BUILD_DEPENDS, so no need to list
shaderc here. (see bsd.port.mk(5))

> + graphics/vulkan-headers \

I would avoid dangling '\' at the end.

> +LIB_DEPENDS= graphics/lcms2 \
> + graphics/shaderc
> +
> +RUN_DEPENDS= graphics/vulkan-loader

===>  Verifying specs: [...] Missing library for vulkan>=0.0

vulkan-loader needs to be LIB_DEPENDS given the WANTLIB entry.

[...]
> + 
>  
>  COMPILER=base-clang ports-gcc
>  COMPILER_LANGS=  c
>  
> +CFLAGS +=-I${X11BASE}/include
> +LDFLAGS +=   -L${X11BASE}/lib
> +
> +MODMESON_CONFIGURE_ENV +=LDFLAGS="${LDFLAGS}"
> +
>  CONFIGURE_ARGS+=-Ddefault_library=both \
>   -Dd3d11=disabled \
>   -Ddemos=false \
> + -Ddovi=disabled \
>   -Dglslang=disabled \
> - -Dshaderc=disabled \
> + -Dlibdovi=disabled \
> + -Dshaderc=enabled \
> + -Dopengl=enabled \
>   -Dunwind=disabled \
> - -Dvulkan=disabled
> + -Dvulkan=enabled \
> + -Dxxhash=disabled
>  
>  NO_TEST= Yes
>  
> Index: distinfo
> ===
> RCS file: /cvs/ports/graphics/libplacebo/distinfo,v
> retrieving revision 1.9
> diff -u -p -r1.9 distinfo
> --- distinfo  23 Jul 2022 05:16:05 -  1.9
> +++ distinfo  12 Feb 2024 17:49:43 -
> @@ -1,2 +1,2 @@
> -SHA256 (libplacebo-4.208.0.tar.gz) = 
> UJD7rU9luclQAoweDdhtIKpm0VnAhUqJs+uNQhCWa3M=
> -SIZE (libplacebo-4.208.0.tar.gz) = 647068
> +SHA256 (libplacebo-6.338.2.tar.gz) = 
> Lx5iTgnXKoydtw+RD3Vg52ShwSba5CrMWzvO+DanrsY=
> +SIZE (libplacebo-6.338.2.tar.gz) = 841168
> Index: pkg/PLIST
> ===
> RCS file: /cvs/ports/graphics/libplacebo/pkg/PLIST,v
> retrieving revision 1.8
> diff -u -p -r1.8 PLIST
> --- pkg/PLIST 11 Mar 2022 19:22:45 -  1.8
> +++ pkg/PLIST 12 Feb 2024 17:49:43 -
> @@ -1,20 +1,25 @@
>  include/libplacebo/
> +include/libplacebo/cache.h
>  include/libplacebo/colorspace.h
>  include/libplacebo/common.h
>  include/libplacebo/config.h
> -include/libplacebo/context.h
> +include/libplacebo/d3d11.h
>  include/libplacebo/dispatch.h
>  include/libplacebo/dither.h
>  include/libplacebo/dummy.h
>  include/libplacebo/filters.h
> +include/libplacebo/gamut_mapping.h
>  include/libplacebo/gpu.h
>  include/libplacebo/log.h
>  include/libplacebo/opengl.h
> +include/libplacebo/options.h
>  include/libplacebo/renderer.h
>  include/libplacebo/shaders/
>  include/libplacebo/shaders.h
>  include/libplacebo/shaders/colorspace.h
>  include/libplacebo/shaders/custom.h
> +include/libplacebo/shaders/deinterlacing.h
> +include/libplacebo/shaders/dithering.h
>  

[UPDATE] graphics/libplacebo - v6.338.2

2024-02-12 Thread Jose Maldonado

Hello everyone!

This is an update for libplacebo. Our port version (v4.208.0) is
already two years old and we already have to make a small bump due to
the arrival of a new mpv (v0.37.0).

This new version of libplacebo requires a series of additional
dependencies that I have submitted as new ports to the list:
devel/fast-float and graphics/glad.

With this new version and its dependencies we can activate support for
Vulkan and OpenGL in the library, aiming to take advantage of these
capabilities.

In the future, when we have Mesa-23.2.1 and ffmpeg-6.1 on OpenBSD,
perhaps we can take advantage of the ability of ffmpeg, mpv, and
libplacebo to obtain hwaccel through Vulkan (for h264, h265 and AV1,
without needing go through VAAPI). For now, the latter is in the
future, it will depend on our versions of Mesa and ffmpeg, along with
the appropriate support.


-- 
*
Dios en su cielo, todo bien en la Tierra
Index: Makefile
===
RCS file: /cvs/ports/graphics/libplacebo/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile	23 Jul 2022 05:16:05 -	1.11
+++ Makefile	12 Feb 2024 17:49:43 -
@@ -2,32 +2,51 @@ COMMENT=	reusable library for GPU-accele
 
 GH_ACCOUNT=	haasn
 GH_PROJECT=	libplacebo
-GH_TAGNAME=	v4.208.0
+GH_TAGNAME=	v6.338.2
 CATEGORIES=	graphics
 
-SHARED_LIBS=	placebo	7.0
+SHARED_LIBS=	placebo	8.0
 
 MAINTAINER=	Brad Smith 
 
 # LGPLv2.1+
 PERMIT_PACKAGE=	Yes
 
-WANTLIB=	epoxy execinfo lcms2 m pthread
+WANTLIB+=	${COMPILER_LIBCXX} epoxy execinfo GL lcms2 m pthread
+WANTLIB+=	shaderc_shared vulkan 
 
 MODULES=	devel/meson
 
-LIB_DEPENDS=	graphics/lcms2
+BUILD_DEPENDS=	devel/fast-float \
+		graphics/glad \
+		graphics/shaderc \
+		graphics/vulkan-headers \
+
+LIB_DEPENDS=	graphics/lcms2 \
+		graphics/shaderc
+
+RUN_DEPENDS=	graphics/vulkan-loader
+		
 
 COMPILER=	base-clang ports-gcc
 COMPILER_LANGS=	c
 
+CFLAGS +=		-I${X11BASE}/include
+LDFLAGS +=		-L${X11BASE}/lib
+
+MODMESON_CONFIGURE_ENV +=	LDFLAGS="${LDFLAGS}"
+
 CONFIGURE_ARGS+=-Ddefault_library=both \
 		-Dd3d11=disabled \
 		-Ddemos=false \
+		-Ddovi=disabled \
 		-Dglslang=disabled \
-		-Dshaderc=disabled \
+		-Dlibdovi=disabled \
+		-Dshaderc=enabled \
+		-Dopengl=enabled \
 		-Dunwind=disabled \
-		-Dvulkan=disabled
+		-Dvulkan=enabled \
+		-Dxxhash=disabled
 
 NO_TEST=	Yes
 
Index: distinfo
===
RCS file: /cvs/ports/graphics/libplacebo/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo	23 Jul 2022 05:16:05 -	1.9
+++ distinfo	12 Feb 2024 17:49:43 -
@@ -1,2 +1,2 @@
-SHA256 (libplacebo-4.208.0.tar.gz) = UJD7rU9luclQAoweDdhtIKpm0VnAhUqJs+uNQhCWa3M=
-SIZE (libplacebo-4.208.0.tar.gz) = 647068
+SHA256 (libplacebo-6.338.2.tar.gz) = Lx5iTgnXKoydtw+RD3Vg52ShwSba5CrMWzvO+DanrsY=
+SIZE (libplacebo-6.338.2.tar.gz) = 841168
Index: pkg/PLIST
===
RCS file: /cvs/ports/graphics/libplacebo/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- pkg/PLIST	11 Mar 2022 19:22:45 -	1.8
+++ pkg/PLIST	12 Feb 2024 17:49:43 -
@@ -1,20 +1,25 @@
 include/libplacebo/
+include/libplacebo/cache.h
 include/libplacebo/colorspace.h
 include/libplacebo/common.h
 include/libplacebo/config.h
-include/libplacebo/context.h
+include/libplacebo/d3d11.h
 include/libplacebo/dispatch.h
 include/libplacebo/dither.h
 include/libplacebo/dummy.h
 include/libplacebo/filters.h
+include/libplacebo/gamut_mapping.h
 include/libplacebo/gpu.h
 include/libplacebo/log.h
 include/libplacebo/opengl.h
+include/libplacebo/options.h
 include/libplacebo/renderer.h
 include/libplacebo/shaders/
 include/libplacebo/shaders.h
 include/libplacebo/shaders/colorspace.h
 include/libplacebo/shaders/custom.h
+include/libplacebo/shaders/deinterlacing.h
+include/libplacebo/shaders/dithering.h
 include/libplacebo/shaders/film_grain.h
 include/libplacebo/shaders/icc.h
 include/libplacebo/shaders/lut.h
@@ -24,10 +29,12 @@ include/libplacebo/tone_mapping.h
 include/libplacebo/utils/
 include/libplacebo/utils/dav1d.h
 include/libplacebo/utils/dav1d_internal.h
+include/libplacebo/utils/dolbyvision.h
 include/libplacebo/utils/frame_queue.h
 include/libplacebo/utils/libav.h
 include/libplacebo/utils/libav_internal.h
 include/libplacebo/utils/upload.h
+include/libplacebo/vulkan.h
 @static-lib lib/libplacebo.a
 @lib lib/libplacebo.so.${LIBplacebo_VERSION}
 lib/pkgconfig/libplacebo.pc