update to libbluray-1.3.3, from Brad

This commit is contained in:
sthen 2022-11-25 11:20:07 +00:00
parent 9c24455c69
commit 8d4ce3ee6c
5 changed files with 4 additions and 113 deletions

View File

@ -1,6 +1,6 @@
COMMENT = library supporting Blu-ray playback
V = 1.3.1
V = 1.3.3
DISTNAME = libbluray-${V}
CATEGORIES = multimedia
@ -22,11 +22,8 @@ LIB_DEPENDS = converters/libiconv \
textproc/libxml
BUILD_DEPENDS = devel/bison
AUTOCONF_VERSION = 2.69
AUTOMAKE_VERSION = 1.16
SEPARATE_BUILD = Yes
CONFIGURE_STYLE = autoreconf
CONFIGURE_STYLE = gnu
YACC = ${LOCALBASE}/bin/bison -y
CONFIGURE_ARGS += --disable-bdjava-jar \
--disable-doxygen-doc \

View File

@ -1,2 +1,2 @@
SHA256 (libbluray-1.3.1.tar.bz2) = wksPQcW3N7u2XFRP5jSVY3p3HBClGd/IAudp8RK0O3U=
SIZE (libbluray-1.3.1.tar.bz2) = 754867
SHA256 (libbluray-1.3.3.tar.bz2) = WP9Szc7mTFXcw8d3ocOftBq9lRuSeXjk0raBG5GTpIg=
SIZE (libbluray-1.3.3.tar.bz2) = 761335

View File

@ -1,24 +0,0 @@
- 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 \
@@ -203,7 +202,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

View File

@ -1,14 +0,0 @@
Point to a real file.
Index: jni/jni.h
--- jni/jni.h.orig
+++ jni/jni.h
@@ -43,7 +43,7 @@
/* jni_md.h contains the machine-dependent typedefs for jbyte, jint
and jlong */
-#include "jni_md.h"
+#include "netbsd/jni_md.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,68 +0,0 @@
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);
+}