From 6c10db48c73531d30e2888be57c48b79224336f9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 31 Jul 2017 10:45:54 +0200 Subject: [PATCH] Fixup lua directory search path --- ...don-t-call-directly-config_GetLibDir.patch | 38 +++++++++++++++++++ vlc.spec | 2 + 2 files changed, 40 insertions(+) create mode 100644 0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch diff --git a/0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch b/0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch new file mode 100644 index 0000000..fa98769 --- /dev/null +++ b/0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch @@ -0,0 +1,38 @@ +From 9bec043da70def3adf0a69747ebe3601f1886fe1 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Mon, 31 Jul 2017 10:42:39 +0200 +Subject: [PATCH] Revert "lua: don't call directly config_GetLibDir" + +libdir and datadir are different kind of directories on Linux. +So they are unrelated + +This reverts commit d5ac6c4ce3d9f50b7bf9e9325b8c9f93b376c574. +--- + modules/lua/vlc.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c +index 512d9e505c..57dc7d8e49 100644 +--- a/modules/lua/vlc.c ++++ b/modules/lua/vlc.c +@@ -214,6 +214,17 @@ int vlclua_dir_list( const char *luadirname, char ***pppsz_dir_list ) + i++; + free( datadir ); + ++#if !(defined(__APPLE__) || defined(_WIN32)) ++ char *psz_libpath = config_GetLibDir(); ++ if( likely(psz_libpath != NULL) ) ++ { ++ if( likely(asprintf( &ppsz_dir_list[i], "%s"DIR_SEP"lua"DIR_SEP"%s", ++ psz_libpath, luadirname ) != -1) ) ++ i++; ++ free( psz_libpath ); ++ } ++#endif ++ + char *psz_datapath = config_GetDataDir(); + if( likely(psz_datapath != NULL) ) + { +-- +2.13.3 + diff --git a/vlc.spec b/vlc.spec index 6e45fba..65c5e48 100644 --- a/vlc.spec +++ b/vlc.spec @@ -46,6 +46,7 @@ URL: http://www.videolan.org Source0: %{vlc_url}/%{?!vlc_rc:%{version}/}vlc-%{version}%{?vlc_rc}.tar.xz #https://trac.videolan.org/vlc/ticket/18383 Patch0: 0001-qt-Prefer-XCB-over-Wayland.patch +Patch1: 0001-Revert-lua-don-t-call-directly-config_GetLibDir.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -253,6 +254,7 @@ VLC media player extras modules. %prep %setup -q -n %{name}-%{version}%{?vlc_rc:-git} %patch0 -p1 -b .wl +%patch1 -p1 -b .lua %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap