Fix NPAPI detection to use correct main declaration. Fix a bunch of C++11 issues and request it for Clang.diff -r1.68 -r1.69 pkgsrc/multimedia/gnash/Makefile
(joerg)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.68 2013/02/16 11:23:32 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.69 2013/02/26 11:04:25 joerg Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= gnash-0.8.10 | 4 | DISTNAME= gnash-0.8.10 | |
5 | PKGREVISION= 18 | 5 | PKGREVISION= 18 | |
6 | CATEGORIES= multimedia | 6 | CATEGORIES= multimedia | |
7 | MASTER_SITES= ${MASTER_SITE_GNU:=gnash/${PKGVERSION_NOREV}/} | 7 | MASTER_SITES= ${MASTER_SITE_GNU:=gnash/${PKGVERSION_NOREV}/} | |
8 | EXTRACT_SUFX= .tar.bz2 | 8 | EXTRACT_SUFX= .tar.bz2 | |
9 | 9 | |||
10 | MAINTAINER= pkgsrc-users@NetBSD.org | 10 | MAINTAINER= pkgsrc-users@NetBSD.org | |
11 | HOMEPAGE= http://www.gnashdev.org/ | 11 | HOMEPAGE= http://www.gnashdev.org/ | |
12 | COMMENT= GPL SWF player | 12 | COMMENT= GPL SWF player | |
13 | LICENSE= gnu-gpl-v3 | 13 | LICENSE= gnu-gpl-v3 | |
14 | 14 | |||
@@ -29,26 +29,31 @@ CONFIGURE_ARGS+= --with-x11-lib=${X11BAS | @@ -29,26 +29,31 @@ CONFIGURE_ARGS+= --with-x11-lib=${X11BAS | |||
29 | 29 | |||
30 | EGDIR= ${PREFIX}/share/examples/gnash | 30 | EGDIR= ${PREFIX}/share/examples/gnash | |
31 | INSTALLATION_DIRS= ${EGDIR} | 31 | INSTALLATION_DIRS= ${EGDIR} | |
32 | INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR} | 32 | INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR} | |
33 | CONF_FILES+= ${EGDIR}/gnashpluginrc ${PKG_SYSCONFDIR}/gnashpluginrc | 33 | CONF_FILES+= ${EGDIR}/gnashpluginrc ${PKG_SYSCONFDIR}/gnashpluginrc | |
34 | CONF_FILES+= ${EGDIR}/gnashrc ${PKG_SYSCONFDIR}/gnashrc | 34 | CONF_FILES+= ${EGDIR}/gnashrc ${PKG_SYSCONFDIR}/gnashrc | |
35 | 35 | |||
36 | .include "options.mk" | 36 | .include "options.mk" | |
37 | 37 | |||
38 | #ld: .libs/libgnashplugin_la-plugin.o(.text+0x5564): unresolvable relocation | 38 | #ld: .libs/libgnashplugin_la-plugin.o(.text+0x5564): unresolvable relocation | |
39 | # against symbol `_ZNKSs5c_strEv' | 39 | # against symbol `_ZNKSs5c_strEv' | |
40 | BUILDLINK_TRANSFORM+= rm:-fvisibility-inlines-hidden | 40 | BUILDLINK_TRANSFORM+= rm:-fvisibility-inlines-hidden | |
41 | 41 | |||
42 | .include "../../mk/compiler.mk" | |||
43 | .if !empty(PKGSRC_COMPILER:Mclang) | |||
44 | CXXFLAGS+= -std=c++11 | |||
45 | .endif | |||
46 | ||||
42 | .include "../../audio/speex/buildlink3.mk" | 47 | .include "../../audio/speex/buildlink3.mk" | |
43 | .include "../../devel/SDL/buildlink3.mk" | 48 | .include "../../devel/SDL/buildlink3.mk" | |
44 | .include "../../devel/boost-libs/buildlink3.mk" | 49 | .include "../../devel/boost-libs/buildlink3.mk" | |
45 | .include "../../devel/libltdl/buildlink3.mk" | 50 | .include "../../devel/libltdl/buildlink3.mk" | |
46 | .include "../../devel/zlib/buildlink3.mk" | 51 | .include "../../devel/zlib/buildlink3.mk" | |
47 | .include "../../mk/giflib.buildlink3.mk" | 52 | .include "../../mk/giflib.buildlink3.mk" | |
48 | .include "../../mk/jpeg.buildlink3.mk" | 53 | .include "../../mk/jpeg.buildlink3.mk" | |
49 | .include "../../graphics/png/buildlink3.mk" | 54 | .include "../../graphics/png/buildlink3.mk" | |
50 | .include "../../www/curl/buildlink3.mk" | 55 | .include "../../www/curl/buildlink3.mk" | |
51 | .include "../../x11/libXft/buildlink3.mk" | 56 | .include "../../x11/libXft/buildlink3.mk" | |
52 | .include "../../x11/libXi/buildlink3.mk" | 57 | .include "../../x11/libXi/buildlink3.mk" | |
53 | .include "../../mk/pthread.buildlink3.mk" | 58 | .include "../../mk/pthread.buildlink3.mk" | |
54 | .include "../../mk/bsd.pkg.mk" | 59 | .include "../../mk/bsd.pkg.mk" |
@@ -1,13 +1,18 @@ | @@ -1,13 +1,18 @@ | |||
1 | $NetBSD: distinfo,v 1.19 2012/09/21 15:44:54 ryoon Exp $ | 1 | $NetBSD: distinfo,v 1.20 2013/02/26 11:04:25 joerg Exp $ | |
2 | 2 | |||
3 | SHA1 (gnash-0.8.10.tar.bz2) = be3b12a5edcd3b05f2ae73d02f0991aa786e7300 | 3 | SHA1 (gnash-0.8.10.tar.bz2) = be3b12a5edcd3b05f2ae73d02f0991aa786e7300 | |
4 | RMD160 (gnash-0.8.10.tar.bz2) = 0093174ec0a912309772c033b5f1c1ad46ab41dc | 4 | RMD160 (gnash-0.8.10.tar.bz2) = 0093174ec0a912309772c033b5f1c1ad46ab41dc | |
5 | Size (gnash-0.8.10.tar.bz2) = 4238106 bytes | 5 | Size (gnash-0.8.10.tar.bz2) = 4238106 bytes | |
6 | SHA1 (patch-aa) = a2739f522d1c7a6680fd85a44eeae7267e0a4e8d | 6 | SHA1 (patch-aa) = 5e3cfa0c21f6bd9ad01ce4c9f68f245316d063a3 | |
7 | SHA1 (patch-ae) = ca44e2559a1ce0a24baf6d5479636f967e011202 | 7 | SHA1 (patch-ae) = ca44e2559a1ce0a24baf6d5479636f967e011202 | |
8 | SHA1 (patch-libbase_GnashSleep.h) = f713b29feb0153efa24c10df20e0ac8342b88265 | |||
8 | SHA1 (patch-libbase_Makefile.in) = c5b6533f5ac2b2ee26d0547c3054375e72512ccf | 9 | SHA1 (patch-libbase_Makefile.in) = c5b6533f5ac2b2ee26d0547c3054375e72512ccf | |
10 | SHA1 (patch-libbase_rc.cpp) = 2df75034a7f195864931504041ad956142495313 | |||
9 | SHA1 (patch-libcore_Makefile.in) = 6b92917f0be3779b7f6e1993ac29960cef50c736 | 11 | SHA1 (patch-libcore_Makefile.in) = 6b92917f0be3779b7f6e1993ac29960cef50c736 | |
12 | SHA1 (patch-libcore_movie__root.cpp) = 5ee7321011961427effd7951860cbf5f3c0b0a6f | |||
13 | SHA1 (patch-libcore_swf_DefineButtonTag.h) = 9306aab8a56e3447037d7aa1f9f67daec3c6c15a | |||
10 | SHA1 (patch-libmedia_Makefile.in) = 10fde4560a20dcb28599d8c51a4fc7af93109474 | 14 | SHA1 (patch-libmedia_Makefile.in) = 10fde4560a20dcb28599d8c51a4fc7af93109474 | |
11 | SHA1 (patch-librender_Makefile.in) = 25e38d82e3ecc156ff1f2b855a05437da015f3ce | 15 | SHA1 (patch-librender_Makefile.in) = 25e38d82e3ecc156ff1f2b855a05437da015f3ce | |
12 | SHA1 (patch-libsound_Makefile.in) = 26c7390196b7e0bb301427b27cf87a1ae52f0b87 | 16 | SHA1 (patch-libsound_Makefile.in) = 26c7390196b7e0bb301427b27cf87a1ae52f0b87 | |
13 | SHA1 (patch-plugin_klash4_Makefile.in) = 86c669eb0ed2478a6f4d328266af2188395f0f10 | 17 | SHA1 (patch-plugin_klash4_Makefile.in) = 86c669eb0ed2478a6f4d328266af2188395f0f10 | |
18 | SHA1 (patch-plugin_npapi_plugin.cpp) = 94b21a1717916aaaf35a5906ca3b893751803e30 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: patch-aa,v 1.15 2012/09/21 15:44:54 ryoon Exp $ | 1 | $NetBSD: patch-aa,v 1.16 2013/02/26 11:04:25 joerg Exp $ | |
2 | 2 | |||
3 | --- configure.orig 2012-01-19 19:19:29.000000000 +0000 | 3 | --- configure.orig 2012-01-19 19:19:29.000000000 +0000 | |
4 | +++ configure | 4 | +++ configure | |
5 | @@ -29366,7 +29366,7 @@ else | 5 | @@ -29366,7 +29366,7 @@ else | |
6 | ;; | 6 | ;; | |
7 | *) | 7 | *) | |
8 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | 8 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9 | -for as_dir in /usr/lib/qt-3.3/bin ${QTDIR}/bin${pathlist} | 9 | -for as_dir in /usr/lib/qt-3.3/bin ${QTDIR}/bin${pathlist} | |
10 | +for as_dir in /usr/lib/qt-3.3/bin ${QTDIR}/bin ${pathlist} | 10 | +for as_dir in /usr/lib/qt-3.3/bin ${QTDIR}/bin ${pathlist} | |
11 | do | 11 | do | |
12 | IFS=$as_save_IFS | 12 | IFS=$as_save_IFS | |
13 | test -z "$as_dir" && as_dir=. | 13 | test -z "$as_dir" && as_dir=. | |
14 | @@ -29661,9 +29661,9 @@ fi | 14 | @@ -29661,9 +29661,9 @@ fi | |
@@ -23,26 +23,35 @@ $NetBSD: patch-aa,v 1.15 2012/09/21 15:4 | @@ -23,26 +23,35 @@ $NetBSD: patch-aa,v 1.15 2012/09/21 15:4 | |||
23 | + KDE3_APPSDATADIR="${KDE3_PREFIX}/share/kde/apps/klash" | 23 | + KDE3_APPSDATADIR="${KDE3_PREFIX}/share/kde/apps/klash" | |
24 | 24 | |||
25 | if test x"${ac_cv_path_kde3_incl}" != x ; then | 25 | if test x"${ac_cv_path_kde3_incl}" != x ; then | |
26 | if test x"${ac_cv_path_kde3_incl}" != x"-I/usr/include"; then | 26 | if test x"${ac_cv_path_kde3_incl}" != x"-I/usr/include"; then | |
27 | @@ -30855,7 +30855,7 @@ fi | 27 | @@ -30855,7 +30855,7 @@ fi | |
28 | KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config" | 28 | KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config" | |
29 | fi | 29 | fi | |
30 | if test x"${KDE4_APPSDATADIR}" = x ; then | 30 | if test x"${KDE4_APPSDATADIR}" = x ; then | |
31 | - KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash" | 31 | - KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash" | |
32 | + KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde/apps/klash" | 32 | + KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde/apps/klash" | |
33 | fi | 33 | fi | |
34 | 34 | |||
35 | if test x"${ac_cv_path_kde4_incl}" != x ; then | 35 | if test x"${ac_cv_path_kde4_incl}" != x ; then | |
36 | @@ -30994,7 +30994,7 @@ $as_echo_n "checking whether NPString ha | |||
37 | ||||
38 | #include "npapi.h" | |||
39 | #include "npruntime.h" | |||
40 | - int main(int argc, char* argv){ | |||
41 | + int main(int argc, char** argv){ | |||
42 | NPString str; | |||
43 | uint32_t len = str.UTF8Length; | |||
44 | return 0; | |||
36 | @@ -31356,6 +31356,9 @@ else | 45 | @@ -31356,6 +31356,9 @@ else | |
37 | if test x"${with_x11_incl}" != x ; then | 46 | if test x"${with_x11_incl}" != x ; then | |
38 | if test -f ${with_x11_incl}/X11/X.h ; then | 47 | if test -f ${with_x11_incl}/X11/X.h ; then | |
39 | ac_cv_path_x11_incl="-I`(cd ${with_x11_incl}; pwd)`" | 48 | ac_cv_path_x11_incl="-I`(cd ${with_x11_incl}; pwd)`" | |
40 | + | 49 | + | |
41 | +$as_echo "#define HAVE_X11_X_H 1" >>confdefs.h | 50 | +$as_echo "#define HAVE_X11_X_H 1" >>confdefs.h | |
42 | + | 51 | + | |
43 | else | 52 | else | |
44 | as_fn_error "${with_x11_incl} directory doesn't contain X.h" "$LINENO" 5 | 53 | as_fn_error "${with_x11_incl} directory doesn't contain X.h" "$LINENO" 5 | |
45 | fi | 54 | fi | |
46 | @@ -44135,7 +44138,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu | 55 | @@ -44135,7 +44138,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
47 | dirname="" | 56 | dirname="" | |
48 | libname="" | 57 | libname="" |
$NetBSD: patch-libbase_GnashSleep.h,v 1.1 2013/02/26 11:04:25 joerg Exp $
--- libbase/GnashSleep.h.orig 2013-02-25 18:39:09.000000000 +0000
+++ libbase/GnashSleep.h
@@ -38,7 +38,7 @@ inline void gnashSleep(size_t useconds)
Sleep(useconds / 1000);
#else
const size_t m = 1000000;
- const struct timespec t = { useconds / m, (useconds % m) * 1000 };
+ const struct timespec t = { static_cast<time_t>(useconds / m), static_cast<long>((useconds % m) * 1000) };
::nanosleep(&t, 0);
#endif
}
$NetBSD: patch-libbase_rc.cpp,v 1.1 2013/02/26 11:04:25 joerg Exp $
--- libbase/rc.cpp.orig 2013-02-25 18:40:46.000000000 +0000
+++ libbase/rc.cpp
@@ -83,7 +83,7 @@ RcInitFile::RcInitFile()
DEFAULT_FLASH_REV_NUMBER ",0"),
// An empty string leaves detection to VM.cpp:
_flashSystemOS(""),
- _flashSystemManufacturer("Gnash "DEFAULT_FLASH_SYSTEM_OS),
+ _flashSystemManufacturer("Gnash " DEFAULT_FLASH_SYSTEM_OS),
_actionDump(false),
_parserDump(false),
_verboseASCodingErrors(false),
$NetBSD: patch-libcore_movie__root.cpp,v 1.1 2013/02/26 11:04:25 joerg Exp $
--- libcore/movie_root.cpp.orig 2013-02-25 18:54:08.000000000 +0000
+++ libcore/movie_root.cpp
@@ -156,7 +156,7 @@ movie_root::movie_root(VirtualClock& clo
_hostfd(-1),
_controlfd(-1),
_quality(QUALITY_HIGH),
- _alignMode(0),
+ _alignMode(0ULL),
_allowScriptAccess(SCRIPT_ACCESS_SAME_DOMAIN),
_showMenu(true),
_scaleMode(SCALEMODE_SHOWALL),
$NetBSD: patch-libcore_swf_DefineButtonTag.h,v 1.1 2013/02/26 11:04:25 joerg Exp $
--- libcore/swf/DefineButtonTag.h.orig 2013-02-25 19:42:00.000000000 +0000
+++ libcore/swf/DefineButtonTag.h
@@ -157,8 +157,6 @@ public:
return (_conditions & KEYPRESS);
}
-private:
-
/// Return the keycode triggering this action
//
/// Return 0 if no key is supposed to trigger us
@@ -166,6 +164,8 @@ private:
return (_conditions & KEYPRESS) >> 9;
}
+private:
+
enum Condition
{
IDLE_TO_OVER_UP = 1 << 0,
$NetBSD: patch-plugin_npapi_plugin.cpp,v 1.1 2013/02/26 11:04:26 joerg Exp $
--- plugin/npapi/plugin.cpp.orig 2012-01-19 19:17:50.000000000 +0000
+++ plugin/npapi/plugin.cpp
@@ -50,17 +50,17 @@
// The name must be this value to get flash movies that check the
// plugin version to load.
#define PLUGIN_NAME "Shockwave Flash"
-#define MIME_TYPES_DESCRIPTION MIME_TYPES_HANDLED":swf:"PLUGIN_NAME
+#define MIME_TYPES_DESCRIPTION MIME_TYPES_HANDLED ":swf:" PLUGIN_NAME
// Some javascript plugin detectors use the description
// to decide the flash version to display. They expect the
// form (major version).(minor version) r(revision).
// e.g. "8.0 r99."
-#define FLASH_VERSION DEFAULT_FLASH_MAJOR_VERSION"."\
- DEFAULT_FLASH_MINOR_VERSION" r"DEFAULT_FLASH_REV_NUMBER"."
+#define FLASH_VERSION DEFAULT_FLASH_MAJOR_VERSION "."\
+ DEFAULT_FLASH_MINOR_VERSION" r" DEFAULT_FLASH_REV_NUMBER "."
#define PLUGIN_DESCRIPTION \
- "Shockwave Flash "FLASH_VERSION"<br>Gnash "VERSION", the GNU SWF Player. \
+ "Shockwave Flash " FLASH_VERSION "<br>Gnash " VERSION ", the GNU SWF Player. \
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 \
<a href=\"http://www.fsf.org\">Free \
Software Foundation</a>, Inc. <br> \
@@ -71,7 +71,7 @@
href=\"http://www.gnu.org/software/gnash/\"> \
http://www.gnu.org/software/gnash</a>. \
<br>\
- Compatible Shockwave Flash "FLASH_VERSION
+ Compatible Shockwave Flash " FLASH_VERSION
#include "plugin.h"
#include "GnashSystemIOHeaders.h"