[vlc-commits] Adding FreeBSD support. (#76)
Hukadan
git at videolan.org
Sun Feb 24 16:23:28 CET 2019
vlc/python | branch: master | Hukadan <hukadan at protonmail.ch> | Sun Feb 24 16:16:08 2019 +0100| [e1318c9eff8b08ecc2bc8f9b8c20f9c76360ee96] | committer: Olivier Aubert
Adding FreeBSD support. (#76)
> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=e1318c9eff8b08ecc2bc8f9b8c20f9c76360ee96
---
Makefile | 8 +++++++-
generator/templates/header.py | 6 ++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index fd0d26d..9c61362 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,12 @@
GENERATE:=python3 generator/generate.py
DEV_INCLUDE_DIR=../../include/vlc
-INSTALLED_INCLUDE_DIR=/usr/include/vlc
+
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),FreeBSD)
+ INSTALLED_INCLUDE_DIR=/usr/local/include/vlc
+else
+ INSTALLED_INCLUDE_DIR=/usr/include/vlc
+endif
DEV_PATH=generated/dev
VERSIONED_PATH=generated/3.0
diff --git a/generator/templates/header.py b/generator/templates/header.py
index 397813c..7af23b8 100755
--- a/generator/templates/header.py
+++ b/generator/templates/header.py
@@ -127,6 +127,12 @@ def find_lib():
dll = ctypes.CDLL(p)
except OSError: # may fail
dll = ctypes.CDLL('libvlc.so.5')
+ elif sys.platform.startswith('freebsd'):
+ p = find_library('vlc')
+ try:
+ dll = ctypes.CDLL(p)
+ except OSError: # may fail
+ dll = ctypes.CDLL('libvlc.so.5')
elif sys.platform.startswith('win'):
libname = 'libvlc.dll'
p = find_library(libname)
More information about the vlc-commits
mailing list