[133076] trunk/dports/multimedia/VLC
mf2k at macports.org
mf2k at macports.org
Thu Feb 19 11:43:20 PST 2015
Revision: 133076
https://trac.macports.org/changeset/133076
Author: mf2k at macports.org
Date: 2015-02-19 11:43:20 -0800 (Thu, 19 Feb 2015)
Log Message:
-----------
vlc: Move pulseaudio to a variant. Enable qt4 ui plugin. Remove some sparkle code. Update configure options to match upstream recommended ones. (#46748)
Modified Paths:
--------------
trunk/dports/multimedia/VLC/Portfile
trunk/dports/multimedia/VLC/files/no-sparkle.patch
Added Paths:
-----------
trunk/dports/multimedia/VLC/files/patch-vlc-for-macports.diff
trunk/dports/multimedia/VLC/files/patch-vlc-qt4mac.diff
Modified: trunk/dports/multimedia/VLC/Portfile
===================================================================
--- trunk/dports/multimedia/VLC/Portfile 2015-02-19 19:13:21 UTC (rev 133075)
+++ trunk/dports/multimedia/VLC/Portfile 2015-02-19 19:43:20 UTC (rev 133076)
@@ -6,10 +6,10 @@
name VLC
version 2.1.5
-revision 2
+revision 3
categories multimedia
-maintainers nomaintainer
+maintainers gmail.com:rjvbertin nomaintainer
description VLC is a cross-platform media player and streaming server
long_description VLC media player is a highly portable multimedia player for \
various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, \
@@ -114,6 +114,7 @@
configure.args-append \
--with-contrib=${worksrcpath}/contrib \
+ --enable-shared \
--disable-debug \
--disable-update-check \
--disable-dbus \
@@ -254,15 +255,14 @@
# Audio Plugins
depends_lib-append \
- port:libsamplerate \
- port:pulseaudio
+ port:libsamplerate
configure.args-append \
- --disable-chromaprint \
+ --disable-chromaprint \
+ --disable-macosx-audio \
+ --enable-samplerate \
--disable-jack \
- --disable-macosx-audio \
- --enable-pulse \
- --enable-samplerate
+ --disable-pulse
# Interface Plugins
depends_lib-append \
@@ -292,6 +292,18 @@
--enable-bonjour \
--enable-upnp
+variant dbus description {Enable DBus support} {
+ depends_lib-append port:dbus
+ configure.args-delete --disable-dbus
+ configure.args-append --enable-dbus
+}
+
+variant pulse description {Enable PulseAudio support} {
+ depends_lib-append port:pulseaudio
+ configure.args-delete --disable-pulse
+ configure.args-append --enable-pulse
+}
+
variant eyetv description {Enable eyetv plugin} {
configure.args-delete --disable-macosx-eyetv
configure.args-append --enable-macosx-eyetv
@@ -396,9 +408,10 @@
--enable-xvideo
}
-variant qt4 description {Build using QT4 UI. This will use qt4-mac} {
+variant qt4 description {Build using QT4 UI. This will use qt4-mac} {
configure.args-delete --disable-qt
configure.args-append --enable-qt
+ patchfiles-append patch-vlc-qt4mac.diff
PortGroup qt4 1.0
@@ -410,25 +423,32 @@
}
variant quartz {
+ patchfiles-append patch-vlc-for-macports.diff
+
depends_lib-append port:BGHUDAppKit
+ depends_lib-delete port:libsamplerate
configure.args-delete --disable-macosx \
--disable-macosx-avfoundation \
- --disable-macosx-dialog-provider \
+ --enable-samplerate
configure.args-append --enable-macosx \
- --enable-macosx-avfoundation \
- --enable-macosx-dialog-provider
+ --enable-macosx-avfoundation
+ # taken from VLC's own configure.sh script for OS X:
+ configure.args-append --disable-samplerate \
+ --enable-merge-ffmpeg \
+ --enable-realrtsp \
+ --enable-libass
}
default_variants +mod +mpc +osd +quartz
variant huge \
- requires dvb eyetv fribidi jack mod mpc osd sdl shout speex svg vcd \
- description {Enable all variants except quartz, qt4, smb, and x11} {}
+ requires dvb eyetv fribidi jack mod mpc osd sdl shout speex svg vcd pulse \
+ description {Enable all variants except quartz, qt4, smb, and x11} {}
variant full \
requires huge qt4 quartz smb x11 \
- description {Enable all variants} {}
+ description {Enable all variants} {}
platform macosx {
default_variants-append +qtkit
@@ -489,6 +509,15 @@
# http://trac.macports.org/ticket/35131
ln -s ${prefix}/lib ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib
ln -s ${prefix}/lib/vlc/plugins ${destroot}${applications_dir}/VLC.app/Contents/MacOS/plugins
+ # the vlc executable needs to be started with a full path to the app bundle executable
+ # or else the Mac OS X interface will hang beyond even a ^C or ^\ :
+ file delete ${destroot}${prefix}/bin/vlc
+ set vlc [open "${filespath}/vlc" "w"]
+ puts ${vlc} "#!/bin/sh"
+ puts ${vlc} ""
+ puts ${vlc} "exec ${applications_dir}/VLC.app/Contents/MacOS/VLC \"$@\""
+ close ${vlc}
+ xinstall -m 755 ${filespath}/vlc ${destroot}${prefix}/bin
}
}
}
Modified: trunk/dports/multimedia/VLC/files/no-sparkle.patch
===================================================================
--- trunk/dports/multimedia/VLC/files/no-sparkle.patch 2015-02-19 19:13:21 UTC (rev 133075)
+++ trunk/dports/multimedia/VLC/files/no-sparkle.patch 2015-02-19 19:43:20 UTC (rev 133076)
@@ -66,6 +66,47 @@
<int key="objectID">3556</int>
<reference key="object" ref="243384014"/>
<object class="NSMutableArray" key="children">
+diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
+index 9c133df..8a2f5bd 100644
+--- extras/package/macosx/Resources/English.lproj/MainMenu.xib
++++ extras/package/macosx/Resources/English.lproj/MainMenu.xib
+@@ -4418,9 +4418,6 @@ LCAuLi4</string>
+ <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
+ <bool key="NSWindowIsRestorable">YES</bool>
+ </object>
+- <object class="NSCustomObject" id="1040926652">
+- <string key="NSClassName">SUUpdater</string>
+- </object>
+ <object class="NSCustomView" id="560875128">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">268</int>
+@@ -5907,14 +5904,6 @@ LCAuLi4</string>
+ <int key="connectionID">4256</int>
+ </object>
+ <object class="IBConnectionRecord">
+- <object class="IBActionConnection" key="connection">
+- <string key="label">checkForUpdates:</string>
+- <reference key="source" ref="1040926652"/>
+- <reference key="destination" ref="354414928"/>
+- </object>
+- <int key="connectionID">4371</int>
+- </object>
+- <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">o_outline_view</string>
+ <reference key="source" ref="998338913"/>
+@@ -9989,11 +9978,6 @@ LCAuLi4</string>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+- <int key="objectID">4370</int>
+- <reference key="object" ref="1040926652"/>
+- <reference key="parent" ref="0"/>
+- </object>
+- <object class="IBObjectRecord">
+ <int key="objectID">4397</int>
+ <reference key="object" ref="629699013"/>
+ <object class="NSMutableArray" key="children">
diff --git modules/gui/macosx/intf.m modules/gui/macosx/intf.m
index c5fced6..da7d001 100644
--- modules/gui/macosx/intf.m
Added: trunk/dports/multimedia/VLC/files/patch-vlc-for-macports.diff
===================================================================
--- trunk/dports/multimedia/VLC/files/patch-vlc-for-macports.diff (rev 0)
+++ trunk/dports/multimedia/VLC/files/patch-vlc-for-macports.diff 2015-02-19 19:43:20 UTC (rev 133076)
@@ -0,0 +1,160 @@
+diff --git modules/lua/vlc.c modules/lua/vlc.c
+index 14b5520..92668f1 100644
+--- modules/lua/vlc.c
++++ modules/lua/vlc.c
+@@ -234,10 +234,22 @@ int vlclua_dir_list( const char *luadirname, char ***pppsz_dir_list )
+ i++;
+
+ #if defined(__APPLE__)
+- if( likely(asprintf( &ppsz_dir_list[i],
++ if( strcasestr (psz_datapath, "/share") == NULL
++ && likely(asprintf( &ppsz_dir_list[i],
+ "%s"DIR_SEP"share"DIR_SEP"lua"DIR_SEP"%s",
+ psz_datapath, luadirname ) != -1) )
+ i++;
++ // When installed through MacPorts (or Fink, or HomeBrew, or...?) we do have
++ // meta/reader under LibDir/lua (/opt/local/lib/vlc/lua for MacPorts's standard install prefix)
++ // so we add that location at the end.
++ char *psz_libpath = config_GetLibDir();
++ if( likely(psz_libpath != NULL) )
++ {
++ if( likely(asprintf( &ppsz_dir_list[i], "%s"DIR_SEP"lua"DIR_SEP"%s",
++ psz_libpath, luadirname ) != -1) )
++ i++;
++ free( psz_libpath );
++ }
+ #endif
+ free( psz_datapath );
+ }
+diff --git src/darwin/dirs.c src/darwin/dirs.c
+index 83c27a4..7e8b0cb 100644
+--- src/darwin/dirs.c
++++ src/darwin/dirs.c
+@@ -42,6 +42,14 @@
+ # define MAXPATHLEN 1024
+ #endif
+
++// this is set to true in config_GetLibDir() if it detects we're installed
++// in a (linux-specific) posix way.
++static int libDirIsPosix = FALSE;
++
++// 20150205: we should do case-insensitive filename comparisons. HFS is case-insensitive by default,
++// and while it strives to preserve case there is no guarantee that case folding will never occur,
++// especially in directory components.
++
+ static char *config_GetLibPath (void)
+ {
+ /* Get the full program path and name */
+@@ -49,7 +57,7 @@ static char *config_GetLibPath (void)
+ for (unsigned i = 0; i < _dyld_image_count(); i++)
+ {
+ const char *psz_img_name = _dyld_get_image_name(i);
+- const char *p = strstr( psz_img_name, "VLCKit.framework/Versions/" );
++ const char *p = strcasestr( psz_img_name, "VLCKit.framework/Versions/" );
+
+ /* Check for "VLCKit.framework/Versions/Current/VLCKit",
+ * as well as "VLCKit.framework/Versions/A/VLCKit" and
+@@ -61,26 +69,26 @@ static char *config_GetLibPath (void)
+ p += strcspn( p, "/" );
+
+ /* If the string ends with VLC then we've found a winner */
+- if ( !strcmp( p, "/VLCKit" ) )
++ if ( !strcasecmp( p, "/VLCKit" ) )
+ return strdup( psz_img_name );
+ }
+
+- /* Do we end by "VLC"? If so we are the legacy VLC.app that doesn't
++ /* Do we end in "MacOS/VLC"? If so we are the legacy (?!) VLC.app that doesn't
+ * link to VLCKit. */
+ size_t len = strlen(psz_img_name);
+- if( len >= 3 && !strcmp( psz_img_name + len - 3, "VLC") )
++ if( len >= 9 && !strcasecmp( psz_img_name + len - 9, "MacOS/VLC") )
+ return strdup( psz_img_name );
+
+- /* Do we end by "VLC-Plugin"? oh, we must be the NPAPI plugin */
+- if( len >= 10 && !strcmp( psz_img_name + len - 10, "VLC-Plugin") )
++ /* Do we end in "VLC-Plugin"? oh, we must be the NPAPI plugin */
++ if( len >= 10 && !strcasecmp( psz_img_name + len - 10, "VLC-Plugin") )
+ return strdup( psz_img_name );
+ }
+
+- /* We are not linked to the VLC.framework, let's use dladdr to figure
+- * libvlc path */
++ /* We are not linked to the VLC.framework, we'rebreak not VLC.app either,
++ * so let's use dladdr to figure the libvlc path */
+ Dl_info info;
+ if( dladdr(system_Init, &info) )
+- return strdup(dirname( info.dli_fname ));
++ return strdup(dirname( (char*)info.dli_fname ));
+
+ char path[MAXPATHLEN+1];
+ uint32_t path_len = sizeof(path) - 1;
+@@ -99,6 +107,19 @@ char *config_GetLibDir (void)
+ if (p != NULL)
+ {
+ *p = '\0';
++ p = strrchr (path, '.');
++ if (p == NULL || !strcasestr(p, ".app/Contents/MacOS"))
++ {
++ // we're NOT running an OS X style app bundle;
++ // return the Linux/POSIX style LibDir.
++ free(path);
++ path = strdup (PKGLIBDIR);
++ libDirIsPosix = TRUE;
++ }
++ else
++ {
++ libDirIsPosix = FALSE;
++ }
+ return path;
+ }
+ free (path);
+@@ -115,8 +136,26 @@ char *config_GetDataDir (void)
+ return strdup (path);
+
+ char *vlcpath = config_GetLibDir ();
+- char *datadir;
++ char *datadir = NULL;
+
++ if (libDirIsPosix)
++ {
++ // vlcpath should point to something like /opt/local/lib/vlc
++ // if so, we can chop off the /lib/vlc bit, and then add /share
++ // like we would otherwise.
++ char *p = strcasestr (vlcpath, "/lib/");
++ if (p != NULL)
++ {
++ *p = '\0';
++ }
++ else
++ {
++ // something else ... return PKGDATADIR
++ free(vlcpath);
++ datadir = strdup(PKGDATADIR);
++ return datadir;
++ }
++ }
+ if (asprintf (&datadir, "%s/share", vlcpath) == -1)
+ datadir = NULL;
+
+diff --git src/interface/interface.c src/interface/interface.c
+index b1dcfaf..f31a4a5 100644
+--- src/interface/interface.c
++++ src/interface/interface.c
+@@ -113,8 +113,14 @@ int intf_Create( vlc_object_t *p_this, const char *chain )
+ char *module;
+ char *psz_tmp = config_ChainCreate( &module, &p_intf->p_cfg,
+ psz_parser );
+- free( psz_tmp );
+- free( psz_parser );
++ if (psz_tmp)
++ {
++ free( psz_tmp );
++ }
++ if (psz_parser)
++ {
++ free( psz_parser );
++ }
+ p_intf->p_module = module_need( p_intf, "interface", module, true );
+ free(module);
+ if( p_intf->p_module == NULL )
Added: trunk/dports/multimedia/VLC/files/patch-vlc-qt4mac.diff
===================================================================
--- trunk/dports/multimedia/VLC/files/patch-vlc-qt4mac.diff (rev 0)
+++ trunk/dports/multimedia/VLC/files/patch-vlc-qt4mac.diff 2015-02-19 19:43:20 UTC (rev 133076)
@@ -0,0 +1,97 @@
+diff --git modules/gui/qt4/util/searchlineedit.cpp modules/gui/qt4/util/searchlineedit.cpp
+index 94744ec..e83625d 100644
+--- modules/gui/qt4/util/searchlineedit.cpp
++++ modules/gui/qt4/util/searchlineedit.cpp
+@@ -103,7 +103,7 @@ void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
+ }
+ #endif
+
+-#ifndef Q_OS_MAC
++#ifndef Q_OS_MAC_UNUSED
+ SearchLineEdit::SearchLineEdit( QWidget *parent ) : QLineEdit( parent )
+ {
+ clearButton = new QFramelessButton( this );
+@@ -202,4 +202,14 @@ void SearchLineEdit::searchEditingFinished()
+ emit searchDelayedChanged( text() );
+ }
+
++// #else
++//
++// void SearchLineEdit::updateText( const QString& text )
++// {
++// }
++//
++// void SearchLineEdit::searchEditingFinished()
++// {
++// }
++
+ #endif
+diff --git modules/gui/qt4/util/searchlineedit.hpp modules/gui/qt4/util/searchlineedit.hpp
+index a09b9bc..8d9e2b7 100644
+--- modules/gui/qt4/util/searchlineedit.hpp
++++ modules/gui/qt4/util/searchlineedit.hpp
+@@ -72,7 +72,7 @@ private:
+ };
+ #endif
+
+-#ifndef Q_OS_MAC
++#ifndef Q_OS_MAC_UNUSED
+ class QFramelessButton;
+ class SearchLineEdit : public QLineEdit
+ {
+@@ -99,28 +99,33 @@ private slots:
+ signals:
+ void searchDelayedChanged( const QString& );
+ };
+-#else
+-
+-/* On Mac, we try to use the native NSSearchField */
+-#include <QMacCocoaViewContainer>
+-
+-class SearchLineEdit : public QMacCocoaViewContainer
+-{
+- Q_OBJECT
+-
+-public:
+- SearchLineEdit(QWidget *parent = 0);
+- virtual ~SearchLineEdit() {}
+-
+- virtual QSize sizeHint() const { return QSize(150, 40); }
+-
+-public slots:
+- void clear() {}
+-
+-signals:
+- void searchDelayedChanged( const QString& );
+- void textEdited( const QString& );
+-};
++// #else
++//
++// /* On Mac, we try to use the native NSSearchField */
++// #include <QMacCocoaViewContainer>
++//
++// class SearchLineEdit : public QMacCocoaViewContainer
++// {
++// Q_OBJECT
++//
++// public:
++// SearchLineEdit(QWidget *parent = 0);
++// virtual ~SearchLineEdit() {}
++//
++// virtual QSize sizeHint() const { return QSize(150, 40); }
++//
++// public slots:
++// void clear() {}
++//
++// // moc does not look at #ifdefs, so we must provide the same slots and signals
++// private slots:
++// void updateText( const QString& );
++// void searchEditingFinished();
++//
++// signals:
++// void searchDelayedChanged( const QString& );
++// void textEdited( const QString& );
++// };
+ #endif
+
+ #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150219/9b4ba4d4/attachment.html>
More information about the macports-changes
mailing list