[vlc-devel] [PATCH 2/3] macOS: Add breakpad to buildsystem

Marvin Scholz epirat07 at gmail.com
Fri Feb 17 00:36:04 CET 2017


---
 bin/Makefile.am                   |  8 ++++++++
 configure.ac                      | 16 ++++++++++++++++
 extras/package/macosx/package.mak |  5 +++--
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/bin/Makefile.am b/bin/Makefile.am
index 6033e50..98ed2c2 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -36,6 +36,10 @@ endif
 if HAVE_DARWIN
 vlc_osx_SOURCES = darwinvlc.m
 vlc_osx_LDFLAGS = $(LDFLAGS_vlc) -Wl,-framework,CoreFoundation,-framework,Cocoa
+if HAVE_BREAKPAD
+vlc_osx_LDFLAGS += -Wl,-framework,Breakpad
+vlc_osx_OBJCFLAGS = -F$(CONTRIB_DIR)
+endif
 vlc_osx_LDADD = ../lib/libvlc.la
 
 vlc_osx_static_SOURCES = $(vlc_osx_SOURCES)
@@ -45,6 +49,10 @@ vlc_osx_static_OBJCFLAGS = $(AM_OBJCFLAGS) \
 	$(NULL)
 vlc_osx_static_LDFLAGS = $(vlc_osx_LDFLAGS) -static
 vlc_osx_static_LDADD = $(vlc_osx_LDADD)
+if HAVE_BREAKPAD
+vlc_osx_static_LDFLAGS += -Wl,-framework,Breakpad
+vlc_osx_static_OBJCFLAGS += -F$(CONTRIB_DIR)
+endif
 endif
 
 vlc_wrapper_SOURCES = rootwrap.c
diff --git a/configure.ac b/configure.ac
index 349121a..0b9f718 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3879,6 +3879,22 @@ then
 fi
 AM_CONDITIONAL(HAVE_SPARKLE, [test "$enable_sparkle" != "no"])
 
+dnl
+dnl  MacOS X breakpad update support
+dnl
+AC_ARG_ENABLE(breakpad,
+  [  --enable-breakpad       Breakpad crash reporter support for OS X (default enabled on Mac OS X)])
+if test "x${enable_breakpad}" != "xno" -a "${HAVE_OSX}" = "1"
+then
+  if test ! -d ${CONTRIB_DIR}/Breakpad.framework
+  then
+    AC_MSG_ERROR([Breakpad framework is required and was not found in ${CONTRIB_DIR}])
+  fi
+
+  AC_DEFINE([HAVE_BREAKPAD], [1], [Define to 1 if breakpad is enabled.])
+fi
+AM_CONDITIONAL(HAVE_BREAKPAD, [test "$enable_breakpad" != "no"])
+
 
 dnl
 dnl  Minimal Mac OS X module
diff --git a/extras/package/macosx/package.mak b/extras/package/macosx/package.mak
index 3556e36..373e414 100644
--- a/extras/package/macosx/package.mak
+++ b/extras/package/macosx/package.mak
@@ -46,6 +46,9 @@ VLC-tmp:
 if HAVE_SPARKLE
 	cp -R $(CONTRIB_DIR)/Sparkle.framework $@/Contents/Frameworks/
 endif
+if HAVE_BREAKPAD
+	cp -R $(CONTRIB_DIR)/Breakpad.framework $@/Contents/Frameworks/
+endif
 if BUILD_LUA
 	## Copy lua scripts
 	cp -r "$(prefix)/lib/vlc/lua" "$(prefix)/share/vlc/lua" $@/Contents/MacOS/share/
@@ -123,5 +126,3 @@ EXTRA_DIST += \
 	extras/package/macosx/vlc_app_icon.svg \
 	extras/package/macosx/VLC.entitlements \
 	extras/package/macosx/VLC.xcodeproj/project.pbxproj
-
-
-- 
2.10.1 (Apple Git-78)



More information about the vlc-devel mailing list