ports/contrib (3.6): obs-studio: fix build on crux 3.6
commit d1e3b446f75ec4e179dd2d35faf12f53d149eddc Author: Danny Rawlins <contact@romster.me> Date: Mon Dec 21 21:44:42 2020 +1100 obs-studio: fix build on crux 3.6 diff --git a/obs-studio/.footprint b/obs-studio/.footprint index 0fd4899da..6816e36aa 100644 --- a/obs-studio/.footprint +++ b/obs-studio/.footprint @@ -104,6 +104,7 @@ lrwxrwxrwx root/root usr/lib/libobs-frontend-api.so.0 -> libobs-frontend-api.so. lrwxrwxrwx root/root usr/lib/libobs-opengl.so -> libobs-opengl.so.0 lrwxrwxrwx root/root usr/lib/libobs-opengl.so.0 -> libobs-opengl.so.0.0 -rwxr-xr-x root/root usr/lib/libobs-opengl.so.0.0 +-rwxr-xr-x root/root usr/lib/libobs-scripting.so lrwxrwxrwx root/root usr/lib/libobs.so -> libobs.so.0 -rwxr-xr-x root/root usr/lib/libobs.so.0 lrwxrwxrwx root/root usr/lib/libobsglad.so -> libobsglad.so.0 @@ -115,6 +116,7 @@ drwxr-xr-x root/root usr/lib/obs-plugins/ -rwxr-xr-x root/root usr/lib/obs-plugins/linux-alsa.so -rwxr-xr-x root/root usr/lib/obs-plugins/linux-capture.so -rwxr-xr-x root/root usr/lib/obs-plugins/linux-decklink.so +-rwxr-xr-x root/root usr/lib/obs-plugins/linux-jack.so -rwxr-xr-x root/root usr/lib/obs-plugins/obs-ffmpeg.so -rwxr-xr-x root/root usr/lib/obs-plugins/obs-filters.so -rwxr-xr-x root/root usr/lib/obs-plugins/obs-libfdk.so @@ -123,6 +125,9 @@ drwxr-xr-x root/root usr/lib/obs-plugins/ -rwxr-xr-x root/root usr/lib/obs-plugins/obs-x264.so -rwxr-xr-x root/root usr/lib/obs-plugins/rtmp-services.so -rwxr-xr-x root/root usr/lib/obs-plugins/text-freetype2.so +drwxr-xr-x root/root usr/lib/obs-scripting/ +-rwxr-xr-x root/root usr/lib/obs-scripting/_obspython.so +-rw-r--r-- root/root usr/lib/obs-scripting/obspython.py drwxr-xr-x root/root usr/lib/pkgconfig/ -rw-r--r-- root/root usr/lib/pkgconfig/libobs.pc drwxr-xr-x root/root usr/share/ @@ -186,6 +191,9 @@ drwxr-xr-x root/root usr/share/obs/obs-plugins/linux-capture/locale/ drwxr-xr-x root/root usr/share/obs/obs-plugins/linux-decklink/ drwxr-xr-x root/root usr/share/obs/obs-plugins/linux-decklink/locale/ -rw-r--r-- root/root usr/share/obs/obs-plugins/linux-decklink/locale/en-US.ini +drwxr-xr-x root/root usr/share/obs/obs-plugins/linux-jack/ +drwxr-xr-x root/root usr/share/obs/obs-plugins/linux-jack/locale/ +-rw-r--r-- root/root usr/share/obs/obs-plugins/linux-jack/locale/en-US.ini drwxr-xr-x root/root usr/share/obs/obs-plugins/obs-ffmpeg/ drwxr-xr-x root/root usr/share/obs/obs-plugins/obs-ffmpeg/locale/ -rw-r--r-- root/root usr/share/obs/obs-plugins/obs-ffmpeg/locale/en-US.ini diff --git a/obs-studio/.signature b/obs-studio/.signature index 428d143f2..7a656add4 100644 --- a/obs-studio/.signature +++ b/obs-studio/.signature @@ -1,5 +1,7 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF30dutBfB6gbKnlLFcHtPmOYaS8IE/oiO0yvOYktZakr4U3k+5h1hSAs8XKrDkaX0anwVGyWLGt42GcxLVwkF6ws= -SHA256 (Pkgfile) = 4e3651cb7bbd6f96d7e6819507ed56df5e7c346b1c7514d537d257d0f818f930 -SHA256 (.footprint) = 8f267744499154d459b759e3fcd54b0a69e52054d327386da77360b24e8f7055 +RWSagIOpLGJF37B6eNMC2VdBQiI7XpR4b/2uGgPwtY+5fywP2/t56JD46bCRskSlcIxmZ8PwcLZVQfuJe7ojML9kkXYmnPQFyQQ= +SHA256 (Pkgfile) = 73a1d9b2f52e402f412d6006cd58612cacbd956578e8d9faa172b59c38698f00 +SHA256 (.footprint) = 00035b11b7d7a2514116fbc469fdaa648ed5aad6151b6de7e558c751cff6f609 SHA256 (obs-studio-25.0.8.tar.gz) = ef1179c23256c312212e3dce9083d4fa67751db05c3001ad824e2b6995943941 +SHA256 (c7f84f8fc4e90ef779a204ac268f5ee1a962e324.patch) = e4e1107d9c09c3cc252c44ee8c16995d6e4de0f57d8d34294ad60b3139536d80 +SHA256 (fix_python_binary_loading.patch) = bdfbd062f080bc925588aec1989bb1df34bf779cc2fc08ac27236679cf612abd diff --git a/obs-studio/Pkgfile b/obs-studio/Pkgfile index 43406599d..c9abb8d97 100644 --- a/obs-studio/Pkgfile +++ b/obs-studio/Pkgfile @@ -6,13 +6,19 @@ name=obs-studio version=25.0.8 -release=1 -source=(https://github.com/obsproject/$name/archive/$version/$name-$version.tar.gz) +release=2 +source=(https://github.com/obsproject/$name/archive/$version/$name-$version.tar.gz + c7f84f8fc4e90ef779a204ac268f5ee1a962e324.patch + fix_python_binary_loading.patch) build() { # cmake .. # cmake -LA + # https://github.com/obsproject/obs-studio/commit/c7f84f8fc4e90ef779a204ac268f... + patch -d $name-$version -p1 -i $SRC/c7f84f8fc4e90ef779a204ac268f5ee1a962e324.patch + patch -d $name-$version -p1 -i $SRC/fix_python_binary_loading.patch + cmake -S $name-$version -B build -G Ninja \ -D CMAKE_INSTALL_PREFIX=/usr \ -D CMAKE_INSTALL_LIBDIR=lib \ diff --git a/obs-studio/c7f84f8fc4e90ef779a204ac268f5ee1a962e324.patch b/obs-studio/c7f84f8fc4e90ef779a204ac268f5ee1a962e324.patch new file mode 100644 index 000000000..352ea2c93 --- /dev/null +++ b/obs-studio/c7f84f8fc4e90ef779a204ac268f5ee1a962e324.patch @@ -0,0 +1,30 @@ +From c7f84f8fc4e90ef779a204ac268f5ee1a962e324 Mon Sep 17 00:00:00 2001 +From: Jimi Huotari <chiitoo@gentoo.org> +Date: Sun, 9 Feb 2020 05:23:55 +0200 +Subject: [PATCH] deps/glad: Fix build with GCC-10 + +GCC-10 defaults to '-fno-common' [1], which triggers issues with +defining global variables multiple times. To fix the build, use +'extern' to turn the first definition of 'gladGetProcAddressPtr' +into a declaration. + +1. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678 + +Closes https://github.com/obsproject/obs-studio/issues/2828 +--- + deps/glad/src/glad_glx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deps/glad/src/glad_glx.c b/deps/glad/src/glad_glx.c +index 7c55b9fc01..58086f1039 100644 +--- a/deps/glad/src/glad_glx.c ++++ b/deps/glad/src/glad_glx.c +@@ -35,7 +35,7 @@ static void* libGL; + + #ifndef __APPLE__ + typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*); +-PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; ++extern PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; + #endif + + static diff --git a/obs-studio/fix_python_binary_loading.patch b/obs-studio/fix_python_binary_loading.patch new file mode 100644 index 000000000..6cba55f2f --- /dev/null +++ b/obs-studio/fix_python_binary_loading.patch @@ -0,0 +1,24 @@ +From c482159ce93deafc7f1fc5755ba15135709ae726 Mon Sep 17 00:00:00 2001 +From: Matt Gajownik <matt@obsproject.com> +Date: Tue, 25 Aug 2020 19:28:26 +1000 +Subject: [PATCH] libobs/util: Fix loading Python binary modules on *nix + +Fixes #2222 +--- + libobs/util/platform-nix.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libobs/util/platform-nix.c b/libobs/util/platform-nix.c +index 26800d52f7..997b62db1a 100644 +--- a/libobs/util/platform-nix.c ++++ b/libobs/util/platform-nix.c +@@ -71,7 +71,8 @@ void *os_dlopen(const char *path) + #ifdef __APPLE__ + void *res = dlopen(dylib_name.array, RTLD_LAZY | RTLD_FIRST); + #else +- void *res = dlopen(dylib_name.array, RTLD_LAZY); ++ void *res = dlopen(dylib_name.array, ++ RTLD_LAZY | RTLD_DEEPBIND | RTLD_GLOBAL); + #endif + if (!res) + blog(LOG_ERROR, "os_dlopen(%s->%s): %s\n", path,
participants (1)
-
crux@crux.nu