multimedia/obs-studio: Change FreeBSD and Dragonfly support in os_get_executable_path_ptr() from procfs(5) to sysctl/KERN_PROC_PATHNAME
PR: 245403 Submitted by: Ka Ho Ng <khng300@gmail.com>
This commit is contained in:
parent
3b6414d901
commit
bf813b6784
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=530917
@ -2,10 +2,12 @@
|
||||
|
||||
PORTNAME= obs-studio
|
||||
DISTVERSION= 25.0.4
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= multimedia
|
||||
|
||||
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
|
||||
PATCHFILES= e1de4e8a50b5e50f69214d3a4fd39b4b9b03e050.patch:-p1 # obs-studio-25.0.3-fix-compiler-warnings.patch
|
||||
PATCHFILES+= 9bd33f6fdebc47d17e3cc1f0122a1f784eebc507.patch:-p1 # https://github.com/obsproject/obs-studio/pull/2663 (Add FreeBSD and Dragonfly support in os_get_executable_path_ptr())
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
COMMENT= Open source streaming/recording software
|
||||
|
@ -1,5 +1,7 @@
|
||||
TIMESTAMP = 1586152652
|
||||
TIMESTAMP = 1586197157
|
||||
SHA256 (obsproject-obs-studio-25.0.4_GH0.tar.gz) = c8db224d2ee4d9b91448be9e47414398e570eebe4a59ff9fd19b066789d1ccdb
|
||||
SIZE (obsproject-obs-studio-25.0.4_GH0.tar.gz) = 8367681
|
||||
SHA256 (e1de4e8a50b5e50f69214d3a4fd39b4b9b03e050.patch) = 3efc78daa680c40130a0dfccac0d3ef522619afb46558cd52db9e67ec41e696b
|
||||
SIZE (e1de4e8a50b5e50f69214d3a4fd39b4b9b03e050.patch) = 1239
|
||||
SHA256 (9bd33f6fdebc47d17e3cc1f0122a1f784eebc507.patch) = 994ce2a44a141c61bad29e7ddfb2c9c9ef82bc86a3df51bd186cc53ac6cc24d2
|
||||
SIZE (9bd33f6fdebc47d17e3cc1f0122a1f784eebc507.patch) = 1423
|
||||
|
@ -1,22 +0,0 @@
|
||||
--- libobs/util/platform-nix.c.orig 2020-03-19 16:51:06 UTC
|
||||
+++ libobs/util/platform-nix.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/user.h>
|
||||
+#include <sys/sysctl.h>
|
||||
#include <unistd.h>
|
||||
#include <libprocstat.h>
|
||||
#else
|
||||
@@ -275,7 +276,11 @@ char *os_get_program_data_path_ptr(const char *name)
|
||||
char *os_get_executable_path_ptr(const char *name)
|
||||
{
|
||||
char exe[PATH_MAX];
|
||||
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
+ ssize_t count = readlink("/proc/curproc/file", exe, PATH_MAX);
|
||||
+#else
|
||||
ssize_t count = readlink("/proc/self/exe", exe, PATH_MAX);
|
||||
+#endif
|
||||
const char *path_out = NULL;
|
||||
struct dstr path;
|
||||
|
Loading…
Reference in New Issue
Block a user