Here is an update to libbluray 1.2.0.
Index: Makefile =================================================================== RCS file: /home/cvs/ports/multimedia/libbluray/Makefile,v retrieving revision 1.15 diff -u -p -u -p -r1.15 Makefile --- Makefile 24 Nov 2019 17:59:04 -0000 1.15 +++ Makefile 24 Mar 2020 04:18:27 -0000 @@ -2,11 +2,11 @@ COMMENT = library supporting Blu-ray playback -V = 1.1.2 +V = 1.2.0 DISTNAME = libbluray-${V} CATEGORIES = multimedia -HOMEPAGE = http://www.videolan.org/developers/libbluray.html +HOMEPAGE = https://www.videolan.org/developers/libbluray.html MASTER_SITES = https://download.videolan.org/pub/videolan/libbluray/${V}/ \ ftp://ftp.videolan.org/pub/videolan/libbluray/${V}/ @@ -18,14 +18,17 @@ PERMIT_PACKAGE = Yes WANTLIB += c expat fontconfig freetype iconv lzma m pthread WANTLIB += xml2 z -SHARED_LIBS += bluray 3.0 # 11.0 +SHARED_LIBS += bluray 3.1 # 11.0 LIB_DEPENDS = converters/libiconv \ textproc/libxml BUILD_DEPENDS = devel/bison +AUTOCONF_VERSION = 2.69 +AUTOMAKE_VERSION = 1.16 + SEPARATE_BUILD = Yes -CONFIGURE_STYLE = gnu +CONFIGURE_STYLE = autoreconf YACC = ${LOCALBASE}/bin/bison -y CONFIGURE_ARGS += --disable-bdjava-jar \ --disable-doxygen-doc \ Index: distinfo =================================================================== RCS file: /home/cvs/ports/multimedia/libbluray/distinfo,v retrieving revision 1.7 diff -u -p -u -p -r1.7 distinfo --- distinfo 24 Nov 2019 17:59:04 -0000 1.7 +++ distinfo 23 Mar 2020 18:44:41 -0000 @@ -1,2 +1,2 @@ -SHA256 (libbluray-1.1.2.tar.bz2) = o91FIjmxANydoNAbMOFpJpPiozKn0pkXv4S7EOp8C0I= -SIZE (libbluray-1.1.2.tar.bz2) = 745779 +SHA256 (libbluray-1.2.0.tar.bz2) = zUHqBv0lEqd+v2OHKHNkGQjvgc4v5OTIQvYDWkdpbBE= +SIZE (libbluray-1.2.0.tar.bz2) = 747265 Index: patches/patch-Makefile_am =================================================================== RCS file: patches/patch-Makefile_am diff -N patches/patch-Makefile_am --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-Makefile_am 24 Mar 2020 04:05:51 -0000 @@ -0,0 +1,26 @@ +$OpenBSD$ + +- Allow libbluray to be able to find mount points using the getfsstat() API. +- Remove setting _POSIX_C_SOURCE as that breaks building some of the BSD headers + due to BSD types. + +Index: Makefile.am +--- Makefile.am.orig ++++ Makefile.am +@@ -25,7 +25,6 @@ AM_CFLAGS = \ + + AM_CPPFLAGS = \ + -D_ISOC99_SOURCE \ +- -D_POSIX_C_SOURCE=$(POSIX_C_SOURCE) \ + -D_REENTRANT \ + \ + -I$(top_srcdir)/src \ +@@ -200,7 +199,7 @@ libbluray_la_SOURCES+= \ + src/file/dirs_xdg.c \ + src/file/dl_posix.c \ + src/file/file_posix.c \ +- src/file/mount.c ++ src/file/mount_getfsstat.c + endif + endif + Index: patches/patch-Makefile_in =================================================================== RCS file: patches/patch-Makefile_in diff -N patches/patch-Makefile_in --- patches/patch-Makefile_in 24 Nov 2019 17:59:04 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,35 +0,0 @@ -$OpenBSD: patch-Makefile_in,v 1.4 2019/11/24 17:59:04 bcallah Exp $ - -- Allow libbluray to be able to find mount points using the getfsstat() API. -- Remove setting _POSIX_C_SOURCE as that breaks building some of the BSD headers - due to BSD types. - -Index: Makefile.in ---- Makefile.in.orig -+++ Makefile.in -@@ -152,7 +152,7 @@ host_triplet = @host@ - @HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/dirs_xdg.c \ - @HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/dl_posix.c \ - @HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/file_posix.c \ --@HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/mount.c -+@HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/mount_darwin.c - - @USING_EXAMPLES_TRUE@noinst_PROGRAMS = bdj_test$(EXEEXT) \ - @USING_EXAMPLES_TRUE@ bdjo_dump$(EXEEXT) bdsplice$(EXEEXT) \ -@@ -327,7 +327,7 @@ am__dirstamp = $(am__leading_dot)dirstamp - @HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/libbluray_la-dirs_xdg.lo \ - @HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/libbluray_la-dl_posix.lo \ - @HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/libbluray_la-file_posix.lo \ --@HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/libbluray_la-mount.lo -+@HAVE_DARWIN_FALSE@@HAVE_WIN32_FALSE@ src/file/libbluray_la-mount_darwin.lo - am_libbluray_la_OBJECTS = src/file/libbluray_la-file.lo \ - src/file/libbluray_la-filesystem.lo \ - src/libbluray/libbluray_la-bluray.lo \ -@@ -845,7 +845,6 @@ AM_CFLAGS = \ - - AM_CPPFLAGS = \ - -D_ISOC99_SOURCE \ -- -D_POSIX_C_SOURCE=$(POSIX_C_SOURCE) \ - -D_REENTRANT \ - \ - -I$(top_srcdir)/src \ Index: patches/patch-jni_jni_h =================================================================== RCS file: /home/cvs/ports/multimedia/libbluray/patches/patch-jni_jni_h,v retrieving revision 1.1 diff -u -p -u -p -r1.1 patch-jni_jni_h --- patches/patch-jni_jni_h 24 Nov 2019 17:59:04 -0000 1.1 +++ patches/patch-jni_jni_h 24 Mar 2020 04:20:52 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-jni_jni_h,v 1.1 2019/11/24 17:59:04 bcallah Exp $ -Point to a real file +Point to a real file. Index: jni/jni.h --- jni/jni.h.orig Index: patches/patch-src_file_mount_getfsstat_c =================================================================== RCS file: patches/patch-src_file_mount_getfsstat_c diff -N patches/patch-src_file_mount_getfsstat_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_file_mount_getfsstat_c 24 Mar 2020 04:23:10 -0000 @@ -0,0 +1,70 @@ +$OpenBSD$ + +Re-add the old Darwin code which utilized getfsstat(). + +Index: src/file/mount_getfsstat.c +--- src/file/mount_getfsstat.c.orig ++++ src/file/mount_getfsstat.c +@@ -0,0 +1,62 @@ ++/* ++ * This file is part of libbluray ++ * Copyright (C) 2014 VideoLAN ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library. If not, see ++ * <http://www.gnu.org/licenses/>. ++ */ ++ ++#if HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include "mount.h" ++ ++#include "util/strutl.h" ++ ++#include <string.h> ++ ++#include <sys/stat.h> ++#include <sys/param.h> ++#include <sys/ucred.h> ++#include <sys/mount.h> ++ ++char *mount_get_mountpoint(const char *device_path) ++{ ++ struct stat st; ++ if (stat (device_path, &st) ) { ++ return str_dup(device_path); ++ } ++ ++ /* If it's a directory, all is good */ ++ if (S_ISDIR(st.st_mode)) { ++ return str_dup(device_path); ++ } ++ ++ struct statfs mbuf[128]; ++ int fs_count; ++ ++ if ( (fs_count = getfsstat (NULL, 0, MNT_NOWAIT)) != -1 ) { ++ ++ getfsstat (mbuf, fs_count * sizeof(mbuf[0]), MNT_NOWAIT); ++ ++ for ( int i = 0; i < fs_count; ++i) { ++ if (!strcmp (mbuf[i].f_mntfromname, device_path)) { ++ return str_dup (mbuf[i].f_mntonname); ++ } ++ } ++ } ++ ++ return str_dup (device_path); ++}