Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jun 2026 02:40:45 +0000
From:      Jason E. Hale <jhale@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 4a2ab125bf7f - main - multimedia/gavl: Update to 2.0.1
Message-ID:  <6a2cc32d.3319e.421ab2a6@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4a2ab125bf7ff04b21d74371e7260c5d9c3b439e

commit 4a2ab125bf7ff04b21d74371e7260c5d9c3b439e
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2026-06-12 21:00:43 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2026-06-12 21:44:47 +0000

    multimedia/gavl: Update to 2.0.1
    
    Project migrated to Github.
    
    Remvove PNG option for simplicity as most consumers of this will have
    ulitimately have graphics/png installed anyways.
    
    Remove old cruft that doesn't apply to any supported version of FreeBSD
    like CFLAGS+= -D_WITH_CPU_SET_T. We've had clock_nanosleep(2) since
    11.1 too, so files/patch-gavl-time.c has been removed.
---
 multimedia/gavl/Makefile                     | 31 +++++++++--------
 multimedia/gavl/distinfo                     |  5 +--
 multimedia/gavl/files/patch-configure        | 28 +++++++++++++++
 multimedia/gavl/files/patch-gavl-time.c      | 24 -------------
 multimedia/gavl/files/patch-gavl_http.c      | 27 +++++++++++++++
 multimedia/gavl/files/patch-gavl_io__stdio.c | 51 ++++++++++++++++++++++++++++
 multimedia/gavl/files/patch-gavl_socket.c    | 25 ++++++++++++++
 multimedia/gavl/files/patch-gavl_utils.c     | 19 +++++++++++
 multimedia/gavl/pkg-plist                    | 31 +++++++++++++++--
 9 files changed, 197 insertions(+), 44 deletions(-)

diff --git a/multimedia/gavl/Makefile b/multimedia/gavl/Makefile
index 77d1b0ec758e..35400c794dc9 100644
--- a/multimedia/gavl/Makefile
+++ b/multimedia/gavl/Makefile
@@ -1,37 +1,38 @@
 PORTNAME=	gavl
-PORTVERSION=	1.4.0
-PORTREVISION=	4
+DISTVERSION=	2.0.1
 CATEGORIES=	multimedia
-MASTER_SITES=	SF/gmerlin/${PORTNAME}/${PORTVERSION}
+MASTER_SITES=	https://github.com/bplaum/gavl/releases/download/v${DISTVERSION}/
 
 MAINTAINER=	jhale@FreeBSD.org
 COMMENT=	Library for handling uncompressed video and audio data
-WWW=		https://gmerlin.sourceforge.net/
+WWW=		https://github.com/bplaum/gavl
 
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		libtool localbase pathfix pkgconfig
+BUILD_DEPENDS=	v4l_compat>0:multimedia/v4l_compat
+LIB_DEPENDS=	libdrm.so:graphics/libdrm \
+		libgnutls.so:security/gnutls \
+		libnettle.so:security/nettle \
+		libpng.so:graphics/png \
+		libva.so:multimedia/libva
+
+USES=		gl libtool localbase pkgconfig
+USE_GL=		egl gl
 USE_LDCONFIG=	yes
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-cpuflags=none --without-doxygen
 INSTALL_TARGET=	install-strip
 
-# Opt-in to sched* functions
-# https://cgit.freebsd.org/src/commit/?id=90fa9705d5cd29cf11c5dc7319299788dec2546a
-CFLAGS+=	-D_WITH_CPU_SET_T
-LIBS+=		-lm
-
 PORTDOCS=	README
 
-OPTIONS_DEFINE=	OPTIMIZED_CFLAGS PNG DOCS
-OPTIONS_DEFAULT=	OPTIMIZED_CFLAGS PNG
-PNG_LIB_DEPENDS=	libpng.so:graphics/png
-PNG_CONFIGURE_OFF=	--disable-libpng
+OPTIONS_DEFINE=		OPTIMIZED_CFLAGS DOCS
+OPTIONS_DEFAULT=	OPTIMIZED_CFLAGS
 
 post-patch-OPTIMIZED_CFLAGS-off:
 	@${REINPLACE_CMD} -e \
-		's|-O3 -funroll-all-loops -fomit-frame-pointer -ffast-math||g' \
+		's|-O3 -fomit-frame-pointer||g' \
 		${WRKSRC}/configure
 
 post-install:
diff --git a/multimedia/gavl/distinfo b/multimedia/gavl/distinfo
index fea464393e17..822d1a3dffc7 100644
--- a/multimedia/gavl/distinfo
+++ b/multimedia/gavl/distinfo
@@ -1,2 +1,3 @@
-SHA256 (gavl-1.4.0.tar.gz) = 51aaac41391a915bd9bad07710957424b046410a276e7deaff24a870929d33ce
-SIZE (gavl-1.4.0.tar.gz) = 4592701
+TIMESTAMP = 1780472796
+SHA256 (gavl-2.0.1.tar.gz) = 628728ef170d2fcc1b74f2668ad49aa18fc08fda26d7c35013c7aebefdd935c2
+SIZE (gavl-2.0.1.tar.gz) = 4903435
diff --git a/multimedia/gavl/files/patch-configure b/multimedia/gavl/files/patch-configure
new file mode 100644
index 000000000000..c79aa6fe211c
--- /dev/null
+++ b/multimedia/gavl/files/patch-configure
@@ -0,0 +1,28 @@
+Remove check for getaddrinfo_a() which is glibc-specific and not used
+anywhere in the codebase. This fuction was incorporated into glibc >=
+2.34 (released 2021-08-01) [1], so even on systems that use glibc,
+this check is moot.
+
+[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=2ace57217028da99fc98f79ae0a625a1ec842724
+
+--- configure.orig	2026-01-16 20:31:09 UTC
++++ configure
+@@ -13887,18 +13887,6 @@ fi
+ fi
+ 
+ 
+-ANL_LIBS=""
+-OLD_LIBS=$LIBS
+-LIBS="$LIBS -lanl"
+-ac_fn_c_check_func "$LINENO" "getaddrinfo_a" "ac_cv_func_getaddrinfo_a"
+-if test "x$ac_cv_func_getaddrinfo_a" = xyes
+-then :
+-  LIBGAVL_LIBS="${LIBGAVL_LIBS} -lanl"
+-else $as_nop
+-  as_fn_error $? "\"getaddrinfo_a not found in libanl\"" "$LINENO" 5
+-fi
+-
+-LIBS=$OLD_LIBS
+ 
+ 
+ 
diff --git a/multimedia/gavl/files/patch-gavl-time.c b/multimedia/gavl/files/patch-gavl-time.c
deleted file mode 100644
index a436568a1769..000000000000
--- a/multimedia/gavl/files/patch-gavl-time.c
+++ /dev/null
@@ -1,24 +0,0 @@
---- gavl/time.c.orig	2010-01-14 19:32:51.000000000 +0100
-+++ gavl/time.c	2010-03-30 13:55:24.113853853 +0200
-@@ -44,7 +44,7 @@
- 
- 
- /* Sleep for a specified time */
--#ifdef HAVE_CLOCK_MONOTONIC
-+#if defined(HAVE_CLOCK_MONOTONIC) || defined(__FreeBSD__)
- void gavl_time_delay(gavl_time_t * t)
-   {
-   struct timespec tm;
-@@ -53,8 +53,12 @@
-   tm.tv_sec = *t / 1000000;
-   tm.tv_nsec = (*t % 1000000)*1000;
-   
-+#if defined(__FreeBSD__)
-+  while(nanosleep(&tm, &rem))
-+#else
-   while(clock_nanosleep(CLOCK_MONOTONIC, 0,
-                         &tm, &rem))
-+#endif
-     {
-     if(errno == EINTR)
-       {
diff --git a/multimedia/gavl/files/patch-gavl_http.c b/multimedia/gavl/files/patch-gavl_http.c
new file mode 100644
index 000000000000..02059c076590
--- /dev/null
+++ b/multimedia/gavl/files/patch-gavl_http.c
@@ -0,0 +1,27 @@
+Fix conflicting types between declaration and implementation for
+gavl_http_response_get_status_int().
+
+http.c:595:11: error: conflicting types for 'gavl_http_response_from_string'
+  595 | const int gavl_http_response_from_string(gavl_dictionary_t * res, const char * buf)
+      |           ^
+../include/gavl/http.h:120:5: note: previous declaration is here
+  120 | int gavl_http_response_from_string(gavl_dictionary_t * res, const char * buf);
+      |     ^
+http.c:634:5: error: conflicting types for 'gavl_http_response_get_status_int'
+  634 | int gavl_http_response_get_status_int(const gavl_dictionary_t * res)
+      |     ^
+../include/gavl/http.h:133:11: note: previous declaration is here
+  133 | const int gavl_http_response_get_status_int(const gavl_dictionary_t * res);
+      |           ^
+
+--- gavl/http.c.orig	2026-06-03 09:06:45 UTC
++++ gavl/http.c
+@@ -631,7 +631,7 @@ const char * gavl_http_response_get_protocol(const gav
+   return gavl_dictionary_get_string(res, GAVL_HTTP_META_PROTOCOL);
+   }
+ 
+-int gavl_http_response_get_status_int(const gavl_dictionary_t * res)
++const int gavl_http_response_get_status_int(const gavl_dictionary_t * res)
+   {
+   int ret = 0;
+   gavl_dictionary_get_int(res, GAVL_HTTP_META_STATUS_INT, &ret);
diff --git a/multimedia/gavl/files/patch-gavl_io__stdio.c b/multimedia/gavl/files/patch-gavl_io__stdio.c
new file mode 100644
index 000000000000..4b3118939cf8
--- /dev/null
+++ b/multimedia/gavl/files/patch-gavl_io__stdio.c
@@ -0,0 +1,51 @@
+Fix compiler errors due to void pointer in stdio macros
+
+Cast the `priv` void pointer to `FILE *` before passing it to `feof()`,
+`clearerr()` and GAVL_FSEEK()`.
+
+On platforms where standard I/O operations are implemented as macros
+(such as FreeBSD), these macros directly dereference the underlying
+struct members (e.g., `(p)->_flags`). Passing a `void *` directly to
+them triggers a compilation failure: "member reference base type 'void'
+is not a structure or union".
+
+io_stdio.c:67:6: error: member reference base type 'void' is not a structure or union
+   67 |   if(feof(priv))
+      |      ^~~~~~~~~~
+/usr/include/stdio.h:505:35: note: expanded from macro 'feof'
+  505 | #define feof(p)         (!__isthreaded ? __sfeof(p) : (feof)(p))
+      |                                          ^~~~~~~~~~
+/usr/include/stdio.h:499:25: note: expanded from macro '__sfeof'
+  499 | #define __sfeof(p)      (((p)->_flags & __SEOF) != 0)
+      |                           ~~~^ ~~~~~~
+io_stdio.c:68:5: error: member reference base type 'void' is not a structure or union
+   68 |     clearerr(priv);
+      |     ^~~~~~~~~~~~~~
+/usr/include/stdio.h:507:38: note: expanded from macro 'clearerr'
+  507 | #define clearerr(p)     (!__isthreaded ? __sclearerr(p) : (clearerr)(p))
+      |                                          ^~~~~~~~~~~~~~
+/usr/include/stdio.h:501:35: note: expanded from macro '__sclearerr'
+  501 | #define __sclearerr(p)  ((void)((p)->_flags &= ~(__SERR|__SEOF)))
+      |                                 ~~~^ ~~~~~~
+
+--- gavl/io_stdio.c.orig	2025-04-18 11:16:35 UTC
++++ gavl/io_stdio.c
+@@ -64,11 +64,13 @@ static int64_t seek_file(void * priv, int64_t pos, int
+ 
+ static int64_t seek_file(void * priv, int64_t pos, int whence)
+   {
+-  if(feof(priv))
+-    clearerr(priv);
+-  
+-  GAVL_FSEEK(priv, pos, whence);
+-  return GAVL_FTELL(priv);
++  FILE * f = priv;
++
++  if(feof(f))
++    clearerr(f);
++
++  GAVL_FSEEK(f, pos, whence);
++  return GAVL_FTELL(f);
+   }
+ 
+ static int flush_file(void * priv)
diff --git a/multimedia/gavl/files/patch-gavl_socket.c b/multimedia/gavl/files/patch-gavl_socket.c
new file mode 100644
index 000000000000..e37335506ae0
--- /dev/null
+++ b/multimedia/gavl/files/patch-gavl_socket.c
@@ -0,0 +1,25 @@
+Add missing header and fix undeclared variable.
+
+socket.c:836:56: error: use of undeclared identifier 'addr'
+  836 |                           gavl_socket_address_get_port(addr), SOCK_DGRAM);
+      |                                                        ^
+
+--- gavl/socket.c.orig	2025-01-05 16:14:44 UTC
++++ gavl/socket.c
+@@ -48,6 +48,7 @@
+ #include <sys/sendfile.h>
+ #endif
+ 
++#include <netinet/in.h> // IPPROTO_IP
+ #include <netinet/tcp.h> // IPPROTO_TCP, TCP_MAXSEG
+ 
+ #include <unistd.h>
+@@ -832,7 +833,7 @@ int gavl_udp_socket_create_multicast(gavl_socket_addre
+ #else
+   memset(&bind_addr, 0, sizeof(bind_addr));
+   gavl_socket_address_set(&bind_addr, "0.0.0.0",
+-                          gavl_socket_address_get_port(addr), SOCK_DGRAM);
++                          gavl_socket_address_get_port(multicast_addr), SOCK_DGRAM);
+   err = bind(ret, (struct sockaddr*)&bind_addr.addr, bind_addr.len);
+ #endif
+   //  err = bind(ret, (struct sockaddr*)&addr->addr, addr->len);
diff --git a/multimedia/gavl/files/patch-gavl_utils.c b/multimedia/gavl/files/patch-gavl_utils.c
new file mode 100644
index 000000000000..e8f4ce2dc74d
--- /dev/null
+++ b/multimedia/gavl/files/patch-gavl_utils.c
@@ -0,0 +1,19 @@
+FreeBSD doesn't define HOST_NAME_MAX anymore, so provide a fallback for
+it and other systems that don't define this macro.
+
+--- gavl/utils.c.orig	2026-01-14 23:43:54 UTC
++++ gavl/utils.c
+@@ -36,6 +36,13 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ 
++#ifndef HOST_NAME_MAX
++#  ifdef _POSIX_HOST_NAME_MAX
++#    define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
++#  else
++#    define HOST_NAME_MAX 255
++#  endif
++#endif
+ 
+ #include <gavl/gavl.h>
+ #include <gavl/utils.h>
diff --git a/multimedia/gavl/pkg-plist b/multimedia/gavl/pkg-plist
index 28b6b566ba7e..ea855f460720 100644
--- a/multimedia/gavl/pkg-plist
+++ b/multimedia/gavl/pkg-plist
@@ -1,13 +1,38 @@
+include/gavl/buffer.h
+include/gavl/chapterlist.h
 include/gavl/compression.h
+include/gavl/connectors.h
+include/gavl/edl.h
 include/gavl/gavl.h
-include/gavl/gavl_version.h
 include/gavl/gavldefs.h
 include/gavl/gavldsp.h
+include/gavl/gavlsocket.h
 include/gavl/gavltime.h
+include/gavl/http.h
+include/gavl/hw.h
+include/gavl/hw_dmabuf.h
+include/gavl/hw_egl.h
+include/gavl/hw_gl.h
+include/gavl/hw_shm.h
+include/gavl/hw_v4l2.h
+include/gavl/hw_vaapi.h
+include/gavl/io.h
+include/gavl/keycodes.h
+include/gavl/log.h
 include/gavl/metatags.h
 include/gavl/metadata.h
+include/gavl/msg.h
+include/gavl/numptr.h
+include/gavl/packetindex.h
+include/gavl/parameter.h
+include/gavl/peakdetector.h
+include/gavl/state.h
+include/gavl/threadpool.h
 include/gavl/timecode.h
+include/gavl/trackinfo.h
+include/gavl/utils.h
+include/gavl/value.h
 lib/libgavl.so
-lib/libgavl.so.1
-lib/libgavl.so.1.0.0
+lib/libgavl.so.3
+lib/libgavl.so.3.0.0
 libdata/pkgconfig/gavl.pc


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a2cc32d.3319e.421ab2a6>