diff options
author | pav <pav@FreeBSD.org> | 2008-06-13 22:01:28 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2008-06-13 22:01:28 +0800 |
commit | b0fb24467ea9e7a1b39d82cff35a40cecd5e49fd (patch) | |
tree | 9abf2976d1edfcf9e0d31530c208e890175a11df /deskutils | |
parent | fcda2a43fc0ecdbd23f5905b61f8ad870fe4d4d7 (diff) | |
download | freebsd-ports-gnome-b0fb24467ea9e7a1b39d82cff35a40cecd5e49fd.tar.gz freebsd-ports-gnome-b0fb24467ea9e7a1b39d82cff35a40cecd5e49fd.tar.zst freebsd-ports-gnome-b0fb24467ea9e7a1b39d82cff35a40cecd5e49fd.zip |
- Fix build on 6.x and minor changes
Submitted by: Ashish Shukla <wahjava@gmail.com> (maintainer)
Diffstat (limited to 'deskutils')
4 files changed, 119 insertions, 7 deletions
diff --git a/deskutils/google-gadgets/Makefile b/deskutils/google-gadgets/Makefile index a914ee57d5c3..30daf23d4575 100644 --- a/deskutils/google-gadgets/Makefile +++ b/deskutils/google-gadgets/Makefile @@ -20,7 +20,8 @@ BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/dbus-1.pc:${PORTSDIR}/devel/dbus \ ${LOCALBASE}/libdata/pkgconfig/libxml-2.0.pc:${PORTSDIR}/textproc/libxml2 \ ${LOCALBASE}/libdata/pkgconfig/firefox-gtkmozembed.pc:${PORTSDIR}/www/firefox \ ${LOCALBASE}/libdata/pkgconfig/cairo.pc:${PORTSDIR}/graphics/cairo \ - ${LOCALBASE}/libdata/pkgconfig/librsvg-2.0.pc:${PORTSDIR}/graphics/librsvg2 + ${LOCALBASE}/libdata/pkgconfig/librsvg-2.0.pc:${PORTSDIR}/graphics/librsvg2 \ + zip:${PORTSDIR}/archivers/zip LIB_DEPENDS= cairo.2:${PORTSDIR}/graphics/cairo \ xml2.5:${PORTSDIR}/textproc/libxml2 \ dbus-1.3:${PORTSDIR}/devel/dbus \ @@ -33,9 +34,13 @@ USE_GMAKE= yes USE_GNOME= gnomehack gtk20 USE_GSTREAMER= yes GNU_CONFIGURE= yes -CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include" CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" +CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include -Wno-deprecated-declarations" CPPFLAGS="-I${LOCALBASE}/include -Wno-deprecated-declarations" LDFLAGS="-L${LOCALBASE}/lib" CONFIGURE_ARGS= --disable-qt-host --enable-ltdl-install=no -USE_AUTOTOOLS= libtool:15:env autoconf:261:env automake:110:env aclocal:110:env +USE_AUTOTOOLS= libtool:15:env autoconf:261:env automake:110:env aclocal:110:env libltdl:15 + +OPTIONS= DEBUGGING "Enable debug output on runtime" on + +.include <bsd.port.pre.mk> .if defined(WITH_DEBUGGING) CONFIGURE_ARGS+= --enable-debug @@ -47,4 +52,4 @@ post-patch: pre-configure: @cd ${WRKSRC} && ${SH} autotools/bootstrap.sh && ${CP} ${AUTOMAKE_DIR}/mkinstalldirs libltdl/ -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/deskutils/google-gadgets/files/patch-extensions_gst__mediaplayer__element_gadget__videosink.cc b/deskutils/google-gadgets/files/patch-extensions_gst__mediaplayer__element_gadget__videosink.cc index 47841b3f57bb..2b1a7798c7ad 100644 --- a/deskutils/google-gadgets/files/patch-extensions_gst__mediaplayer__element_gadget__videosink.cc +++ b/deskutils/google-gadgets/files/patch-extensions_gst__mediaplayer__element_gadget__videosink.cc @@ -3,7 +3,20 @@ $FreeBSD$ --- extensions/gst_mediaplayer_element/gadget_videosink.cc.orig +++ extensions/gst_mediaplayer_element/gadget_videosink.cc -@@ -454,10 +454,10 @@ +@@ -17,6 +17,12 @@ + #include "gadget_videosink.h" + #include <pthread.h> + ++#if __GNUC__ < 4 ++#define CAST_HACK(x) (x) ++#else ++#define CAST_HACK(x) reinterpret_cast<x> ++#endif ++ + namespace ggadget { + namespace gst { + +@@ -454,10 +460,10 @@ nom = gst_value_get_fraction_numerator(videosink->par_); den = gst_value_get_fraction_denominator(videosink->par_); gst_structure_set(structure, "pixel-aspect-ratio", @@ -16,7 +29,7 @@ $FreeBSD$ } } -@@ -669,18 +669,18 @@ +@@ -669,18 +675,18 @@ desired_caps = gst_caps_copy(caps); desired_struct = gst_caps_get_structure(desired_caps, 0); @@ -39,7 +52,16 @@ $FreeBSD$ } // see if peer accepts our new suggestion, if there is no peer, this -@@ -892,7 +892,7 @@ +@@ -859,7 +865,7 @@ + g_value_transform(videosink->par_, value); + break; + case PROP_RECEIVE_IMAGE_HANDLER: +- g_value_set_pointer(value, reinterpret_cast<void*>(&ReceiveImageHandler)); ++ g_value_set_pointer(value, CAST_HACK(void*)(&ReceiveImageHandler)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); +@@ -892,7 +898,7 @@ nom = gst_value_get_fraction_numerator(par_); den = gst_value_get_fraction_denominator(par_); gst_caps_set_simple(caps_, const_cast<gchar*>("pixel-aspect-ratio"), diff --git a/deskutils/google-gadgets/files/patch-ggadget_extension__manager.cc b/deskutils/google-gadgets/files/patch-ggadget_extension__manager.cc new file mode 100644 index 000000000000..c3b4a9d311fe --- /dev/null +++ b/deskutils/google-gadgets/files/patch-ggadget_extension__manager.cc @@ -0,0 +1,54 @@ + +$FreeBSD$ + +--- ggadget/extension_manager.cc.orig ++++ ggadget/extension_manager.cc +@@ -26,6 +26,12 @@ + #include "common.h" + #include "extension_manager.h" + ++#if __GNUC__ < 4 ++#define CAST_HACK(x) (x) ++#else ++#define CAST_HACK(x) reinterpret_cast<x> ++#endif ++ + namespace ggadget { + + ElementExtensionRegister::ElementExtensionRegister(ElementFactory *factory) +@@ -35,7 +41,7 @@ + bool ElementExtensionRegister::RegisterExtension(const Module *extension) { + ASSERT(extension); + RegisterElementExtensionFunc func = +- reinterpret_cast<RegisterElementExtensionFunc>( ++ CAST_HACK(RegisterElementExtensionFunc)( + extension->GetSymbol(kElementExtensionSymbolName)); + + return func ? func(factory_) : false; +@@ -48,7 +54,7 @@ + bool ScriptExtensionRegister::RegisterExtension(const Module *extension) { + ASSERT(extension); + RegisterScriptExtensionFunc func = +- reinterpret_cast<RegisterScriptExtensionFunc>( ++ CAST_HACK(RegisterScriptExtensionFunc)( + extension->GetSymbol(kScriptExtensionSymbolName)); + + return func ? func(context_) : false; +@@ -64,7 +70,7 @@ + bool FrameworkExtensionRegister::RegisterExtension(const Module *extension) { + ASSERT(extension); + RegisterFrameworkExtensionFunc func = +- reinterpret_cast<RegisterFrameworkExtensionFunc>( ++ CAST_HACK(RegisterFrameworkExtensionFunc)( + extension->GetSymbol(kFrameworkExtensionSymbolName)); + + return func ? func(framework_, gadget_) : false; +@@ -79,7 +85,7 @@ + ScriptRuntimeExtensionRegister::RegisterExtension(const Module *extension) { + ASSERT(extension); + RegisterScriptRuntimeExtensionFunc func = +- reinterpret_cast<RegisterScriptRuntimeExtensionFunc>( ++ CAST_HACK(RegisterScriptRuntimeExtensionFunc)( + extension->GetSymbol(kScriptRuntimeExtensionSymbolName)); + + return func ? func(manager_) : false; diff --git a/deskutils/google-gadgets/files/patch-ggadget_module.cc b/deskutils/google-gadgets/files/patch-ggadget_module.cc new file mode 100644 index 000000000000..4b987924f7c7 --- /dev/null +++ b/deskutils/google-gadgets/files/patch-ggadget_module.cc @@ -0,0 +1,31 @@ + +$FreeBSD$ + +--- ggadget/module.cc.orig ++++ ggadget/module.cc +@@ -34,6 +34,12 @@ + // #define DEBUG_MODULES + #endif + ++#if __GNUC__ < 4 ++#define CAST_HACK(x) (x) ++#else ++#define CAST_HACK(x) reinterpret_cast<x> ++#endif ++ + namespace ggadget { + + static const char *kModulePathEnv = "GGL_MODULE_PATH"; +@@ -117,10 +123,10 @@ + + NormalizeNameString(&module_name); + +- InitializeFunction new_initialize = reinterpret_cast<InitializeFunction>( ++ InitializeFunction new_initialize = CAST_HACK(InitializeFunction)( + GetModuleSymbol(new_handle, module_name.c_str(), + kModuleInitializeSymbol)); +- FinalizeFunction new_finalize = reinterpret_cast<FinalizeFunction>( ++ FinalizeFunction new_finalize = CAST_HACK(FinalizeFunction)( + GetModuleSymbol(new_handle, module_name.c_str(), + kModuleFinalizeSymbol)); + |