First Commit

This commit is contained in:
leeboby
2020-10-30 09:50:39 +08:00
commit e5f9bb65ac
845 changed files with 177861 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/src/vdpau_wrapper.c b/src/vdpau_wrapper.c
index 722576e..66969f8 100644
--- a/src/vdpau_wrapper.c
+++ b/src/vdpau_wrapper.c
@@ -137,7 +137,7 @@ static VdpStatus _vdp_open_driver(
_vdp_get_driver_name_from_dri2(display, screen);
}
if (!vdpau_driver) {
- vdpau_driver = "nvidia";
+ vdpau_driver = "sunxi";
}
_vdp_driver_dll = NULL;

View File

@@ -0,0 +1,14 @@
Author: Andreas Beckmann <anbe@debian.org>
Description: disable timestamps in documentation for reproducible builds
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -10,6 +10,8 @@
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (" ")
+HTML_TIMESTAMP = NO
+
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------

View File

@@ -0,0 +1,28 @@
Subject: Link libvdpao with libX11 since it uses symbols from it
Author: Russ Allbery <rra@debian.org>
Forwarded: no
libvdpau uses the symbols:
_XEatData
_XReply
_XFlush
_XReadPad
XFree
which are provided by libX11, but wasn't linking with it directly, resulting
in warnings during the package build (and possibly errors later with better
linkers).
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,7 +22,8 @@ endif
libvdpau_la_LIBADD = \
$(DLOPEN_LIBS) \
$(PTHREAD_LIBS) \
- $(XEXT_LIBS)
+ $(XEXT_LIBS) \
+ $(X11_LIBS)
libvdpau_la_LDFLAGS = -version-info 1:0:0 -no-undefined

View File

@@ -0,0 +1,5 @@
link-with-libx11.patch
simplify-dlopen-path-length-error-handling.patch
vdpau-module-searchpath.patch
doxygen-no-timestamps.patch
default-driver-sunxi.patch

View File

@@ -0,0 +1,47 @@
From: Andreas Beckmann <debian@abeckmann.de>
Subject: simplify path overflow error handling
"path too long" is not a fatal error, there may be other search paths
that don't overflow, so try them as well
--- a/src/vdpau_wrapper.c
+++ b/src/vdpau_wrapper.c
@@ -132,6 +132,8 @@ static VdpStatus _vdp_open_driver(
vdpau_driver = "nvidia";
}
+ _vdp_driver_dll = NULL;
+
/* Don't allow setuid apps to use VDPAU_DRIVER_PATH */
vdpau_driver_path = secure_getenv("VDPAU_DRIVER_PATH");
if (vdpau_driver_path &&
@@ -141,12 +143,6 @@ static VdpStatus _vdp_open_driver(
DRIVER_LIB_FORMAT, VDPAU_MODULEDIR, vdpau_driver) >=
sizeof(vdpau_driver_lib)) {
fprintf(stderr, "Failed to construct driver path: path too long\n");
- if (vdpau_driver_dri2) {
- XFree(vdpau_driver_dri2);
- vdpau_driver_dri2 = NULL;
- }
- _VDP_ERROR_BREAKPOINT();
- return VDP_STATUS_NO_IMPLEMENTATION;
}
else {
_vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
@@ -154,11 +150,12 @@ static VdpStatus _vdp_open_driver(
}
if (!_vdp_driver_dll) {
- /* Try again using the old path, which is guaranteed to fit in PATH_MAX
- * if the complete path fit above. */
- snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib),
- DRIVER_FALLBACK_LIB_FORMAT, vdpau_driver);
- _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
+ /* Try again using the old path. */
+ if (snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib),
+ DRIVER_FALLBACK_LIB_FORMAT, vdpau_driver) <
+ sizeof(vdpau_driver_lib)) {
+ _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
+ }
}
if (vdpau_driver_dri2) {

View File

@@ -0,0 +1,43 @@
From: Andreas Beckmann <debian@abeckmann.de>
Subject: search the vdpau module in multiple directories
start searching the vdpau module in ${ORIGIN}/vdpau, then the MODULEDIR and
finally fall back to /usr/lib/vdpau
--- a/src/vdpau_wrapper.c
+++ b/src/vdpau_wrapper.c
@@ -103,6 +103,13 @@ static char * _vdp_get_driver_name_from_
return driver_name;
}
+static char const * _vdpau_module_search_paths[] = {
+ "${ORIGIN}/vdpau",
+ VDPAU_MODULEDIR,
+ "/usr/lib/vdpau",
+ NULL
+};
+
static VdpStatus _vdp_open_driver(
Display * display,
int screen)
@@ -117,6 +127,7 @@ static VdpStatus _vdp_open_driver(
char vdpau_driver_lib[PATH_MAX];
char const * vdpau_trace;
char const * func_name;
+ char const ** module_path;
vdpau_driver = secure_getenv("VDPAU_DRIVER");
if (vdpau_driver) {
@@ -138,9 +146,11 @@ static VdpStatus _vdp_open_driver(
/* Fallback to VDPAU_MODULEDIR when VDPAU_DRIVER_PATH is not set,
* or if we fail to create the driver path/dlopen the library. */
- if (!_vdp_driver_dll) {
+ for (module_path = _vdpau_module_search_paths;
+ !_vdp_driver_dll && *module_path;
+ ++module_path) {
if (snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib),
- DRIVER_LIB_FORMAT, VDPAU_MODULEDIR, vdpau_driver) >=
+ DRIVER_LIB_FORMAT, *module_path, vdpau_driver) >=
sizeof(vdpau_driver_lib)) {
fprintf(stderr, "Failed to construct driver path: path too long\n");
}