Commit 4b11c6e4 authored by damienf's avatar damienf
Browse files

mozilla: fix VLC Plugin.plugin target for MacOS X, added support for libvlc.dylib, etc..

parent a55589a0
...@@ -72,7 +72,7 @@ CPPFLAGS_mozilla_EXTRA = -I. -I$(top_builddir) -I$(srcdir)/../include -c \ ...@@ -72,7 +72,7 @@ CPPFLAGS_mozilla_EXTRA = -I. -I$(top_builddir) -I$(srcdir)/../include -c \
-DNO_X11=1 -DUSE_SYSTEM_CONSOLE=1 -pipe -fmessage-length=0 \ -DNO_X11=1 -DUSE_SYSTEM_CONSOLE=1 -pipe -fmessage-length=0 \
-include mozilla-config.h -include mozilla-config.h
LDFLAGS_mozilla_EXTRA = -no-undefined -bundle -Wl,-read_only_relocs -Wl,suppress \ LDFLAGS_mozilla_EXTRA = -no-undefined -bundle -Wl,-read_only_relocs -Wl,suppress \
-Wl,-headerpad_max_install_names -shrext $(LIBEXT) -framework Carbon -Wl,-headerpad_max_install_names -shrext $(LIBEXT) -Wl,-framework,Carbon -Wl,-framework,System
npvlc_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support) npvlc_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support)
npvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla` $(CPPFLAGS_mozilla_EXTRA) npvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla` $(CPPFLAGS_mozilla_EXTRA)
...@@ -107,25 +107,42 @@ endef ...@@ -107,25 +107,42 @@ endef
VLC\ Plugin.plugin: npvlc.rsrc $(lib_LTLIBRARIES) VLC\ Plugin.plugin: npvlc.rsrc $(lib_LTLIBRARIES)
rm -Rf "$@" rm -Rf "$@"
$(INSTALL) -d "./$@/Contents/MacOS" $(INSTALL) -d "$(srcdir)/$@/Contents/MacOS"
$(INSTALL) .libs/npvlc.dylib "./$@/Contents/MacOS/VLC Plugin" $(INSTALL) "$(srcdir)/.libs/npvlc.dylib" "$(srcdir)/$@/Contents/MacOS/VLC Plugin"
dylib="./$@/Contents/MacOS/VLC Plugin"; $(FIXEXECPATH) ; $(INSTALL) -d "$(srcdir)/$@/Contents/MacOS/lib"; \
$(INSTALL) -d "./$@/Contents/Resources" install_name_tool -change "$(libdir)/libvlc.1.dylib" \
$(INSTALL) npvlc.rsrc "./$@/Contents/Resources/VLC Plugin.rsrc" "@executable_path/lib/libvlc.dylib" \
cp -r "$(top_srcdir)/extras/MacOSX/plugin/English.lproj" "./$@/Contents/Resources/" "$(srcdir)/$@/Contents/MacOS/VLC Plugin"
$(INSTALL) "$(top_srcdir)/extras/MacOSX/plugin/Info.plist" "./$@/Contents/Info.plist" install_name_tool -change "$(libdir)/libvlc-control.0.dylib" \
$(INSTALL) -d "./$@/Contents/MacOS/modules" "@executable_path/lib/libvlc-control.dylib" \
"$(srcdir)/$@/Contents/MacOS/VLC Plugin"
$(INSTALL) "$(top_builddir)/src/.libs/libvlc.1.dylib" \
"$(srcdir)/$@/Contents/MacOS/lib/libvlc.dylib"
$(INSTALL) "$(top_builddir)/src/.libs/libvlc-control.0.dylib" \
"$(srcdir)/$@/Contents/MacOS/lib/libvlc-control.dylib"
install_name_tool -change "$(libdir)/libvlc.1.dylib" \
"@executable_path/lib/libvlc.dylib" \
"$(srcdir)/$@/Contents/MacOS/lib/libvlc-control.dylib"
dylib="$(srcdir)/$@/Contents/MacOS/VLC Plugin"; $(FIXEXECPATH) ;
dylib="$(srcdir)/$@/Contents/MacOS/lib/libvlc.dylib"; $(FIXEXECPATH) ;
dylib="$(srcdir)/$@/Contents/MacOS/lib/libvlc-control.dylib"; $(FIXEXECPATH) ;
$(INSTALL) -d "$(srcdir)/$@/Contents/Resources"
$(INSTALL) npvlc.rsrc "$(srcdir)/$@/Contents/Resources/VLC Plugin.rsrc"
cp -r "$(top_srcdir)/extras/MacOSX/plugin/English.lproj" "$(srcdir)/$@/Contents/Resources/"
$(INSTALL) "$(top_srcdir)/extras/MacOSX/plugin/Info.plist" "$(srcdir)/$@/Contents/Info.plist"
$(INSTALL) -d "$(srcdir)/$@/Contents/MacOS/modules"
for i in "" `$(VLC_CONFIG) --target plugin` ; do \ for i in "" `$(VLC_CONFIG) --target plugin` ; do \
if test -n "$$i" ; then \ if test -n "$$i" ; then \
dylib="./$@/Contents/MacOS/modules/`basename $$i$(LIBEXT)`"; \ dylib="$(srcdir)/$@/Contents/MacOS/modules/`basename $$i$(LIBEXT)`"; \
$(INSTALL) "$$i$(LIBEXT)" "$$dylib"; \ $(INSTALL) "`dirname $$i`/.libs/`basename $$i`$(LIBEXT)" "$$dylib"; \
install_name_tool -change "$(libdir)/libvlc.1.dylib" \
"@executable_path/lib/libvlc.dylib" "$$dylib"; \
$(FIXEXECPATH) ; \ $(FIXEXECPATH) ; \
fi ; \ fi ; \
done done
if test -d $(top_srcdir)/extras/contrib/vlc-lib; then \ if test -d $(top_srcdir)/extras/contrib/vlc-lib; then \
$(INSTALL) -d "./$@/Contents/MacOS/lib"; \
for i in $(top_srcdir)/extras/contrib/vlc-lib/*.dylib ; do \ for i in $(top_srcdir)/extras/contrib/vlc-lib/*.dylib ; do \
dylib="./$@/Contents/MacOS/lib/`basename $${i}`" ; \ dylib="$(srcdir)/$@/Contents/MacOS/lib/`basename $${i}`" ; \
$(INSTALL) -m 644 "$${i}" "$$dylib" ; \ $(INSTALL) -m 644 "$${i}" "$$dylib" ; \
$(FIXEXECPATH); \ $(FIXEXECPATH); \
done ; \ done ; \
...@@ -133,7 +150,7 @@ VLC\ Plugin.plugin: npvlc.rsrc $(lib_LTLIBRARIES) ...@@ -133,7 +150,7 @@ VLC\ Plugin.plugin: npvlc.rsrc $(lib_LTLIBRARIES)
# uncomment if dependencies on XPCOM libs is sought # uncomment if dependencies on XPCOM libs is sought
# if test -d "$(MOZILLA_SDK_PATH)/lib"; then \ # if test -d "$(MOZILLA_SDK_PATH)/lib"; then \
# for i in "$(MOZILLA_SDK_PATH)"/lib/*.dylib ; do \ # for i in "$(MOZILLA_SDK_PATH)"/lib/*.dylib ; do \
# dylib="./$@/Contents/MacOS/`basename $${i}`" ; \ # dylib="$(srcdir)/$@/Contents/MacOS/`basename $${i}`" ; \
# $(INSTALL) -m 644 "$${i}" "$$dylib" ; \ # $(INSTALL) -m 644 "$${i}" "$$dylib" ; \
# $(FIXEXECPATH); \ # $(FIXEXECPATH); \
# done ; \ # done ; \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment