From 24a283cefb374e3056070b4c6dab7ef85eece621 Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Mon, 29 Jul 2013 14:23:11 +0000 Subject: - Expand creator's name in the Makefile header - Fix the build on recent versions of FreeBSD (against Clang) - Add a patch from Gentoo to unbreak GTK+ program build - Fix potential buffer overflow (also obtained from Gentoo) - Convert to OptionsNG, utilize new option helpers - Drop WANT_GNOME and USE_GNOME, they are useless - Define LICENSE (GPLv2), remove COPYING from the docs - Make pkg-message word substitution actually work - Generally sanitize and cleanup the Makefile Reported by: pointyhat-west --- emulators/vba/Makefile | 76 ++- emulators/vba/files/patch-deprecatedsigc++ | 702 +++++++++++++++++++++++++ emulators/vba/files/patch-src-Util.cpp | 11 +- emulators/vba/files/patch-src-sdl_debugger.cpp | 9 + emulators/vba/files/pkg-message.in | 9 + emulators/vba/pkg-message | 9 - emulators/vba/pkg-plist | 13 +- 7 files changed, 766 insertions(+), 63 deletions(-) create mode 100644 emulators/vba/files/patch-deprecatedsigc++ create mode 100644 emulators/vba/files/pkg-message.in delete mode 100644 emulators/vba/pkg-message (limited to 'emulators') diff --git a/emulators/vba/Makefile b/emulators/vba/Makefile index 8b38a18b601b..b98531627271 100644 --- a/emulators/vba/Makefile +++ b/emulators/vba/Makefile @@ -1,7 +1,4 @@ -# New ports collection makefile for: vba -# Date Created: 02 September 2003 -# Whom: -# +# Created by: Alexander Best # $FreeBSD$ PORTNAME= vba @@ -12,74 +9,67 @@ MASTER_SITES= SF/${PORTNAME}/VisualBoyAdvance/${PORTVERSION} DISTNAME= VisualBoyAdvance-src-${PORTVERSION} MAINTAINER= arundel@h3c.de -COMMENT= Open Source Gameboy Advance emulator +COMMENT= Open source Gameboy Advance emulator + +LICENSE= GPLv2 BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm LIB_DEPENDS= png15:${PORTSDIR}/graphics/png -WANT_GNOME= yes -USE_GMAKE= yes +USES= gettext gmake GNU_CONFIGURE= yes USE_SDL= sdl -USES= gettext -LDFLAGS+= -L${LOCALBASE}/lib -CPPFLAGS+= -I${LOCALBASE}/include CONFIGURE_ARGS= LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" LIBS="-lintl" -WRKSRC= ${WRKDIR}/VisualBoyAdvance-${PORTVERSION} -PLIST_SUB= INSTALL_GTK2="@comment " +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +WRKSRC= ${WRKDIR}/VisualBoyAdvance-${PORTVERSION} +SUB_FILES= pkg-message DATA_FILES= ${WRKSRC}/src/VisualBoyAdvance.cfg PROG_FILES= ${WRKSRC}/src/sdl/VisualBoyAdvance -DOC_FILES= COPYING AUTHORS NEWS README ChangeLog INSTALL +PORTDOCS= AUTHORS NEWS README ChangeLog -.include +OPTIONS_DEFINE= GTK2 PROFILING DOCS +OPTIONS_SUB= yes -.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" -BROKEN= Runaway cc1plus process -.endif +GTK2_CONFIGURE_ON= --enable-gtk=2.4 +PROFILING_CONFIGURE_ENABLE= profiling -.ifdef(WITH_GTK2) -PLIST_SUB= INSTALL_GTK2="" -CONFIGURE_ARGS+= --enable-gtk=2.4 -USE_GNOME= gnomelibs gtk20 +.include + +.if ${PORT_OPTIONS:MGTK2} LIB_DEPENDS+= gtkmm-2.4:${PORTSDIR}/x11-toolkits/gtkmm24 \ glademm-2.4:${PORTSDIR}/devel/libglademm24 PROG_FILES+= ${WRKSRC}/src/gtk/gvba GTK2_DATA_FILES= ${WRKSRC}/src/gtk/vba.glade .endif -.ifndef(PROFILING) -CONFIGURE_ARGS+= --disable-profiling +.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" +BROKEN= Runaway cc1plus process .endif -pre-everything:: -.ifndef(PROFILING) - @${ECHO_MSG} "" - @${ECHO_MSG} "You can enable profiling by defining PROFILING." -.endif -.ifndef(WITH_GTK2) - @${ECHO_MSG} "" - @${ECHO_MSG} "You can install the GTK2 based X version by defining WITH_GTK2." -.endif - @${ECHO_MSG} "" +post-patch: + @${REINPLACE_CMD} -e '/for(int i = 0; i < 16; i++/s| i|&_|g' \ + ${WRKSRC}/src/sdl/debugger.cpp + @${REINPLACE_CMD} -e '/^namespace std/ { x; \ + s|^|#include |; H; x; }' ${WRKSRC}/src/expr.cpp do-install: ${INSTALL_PROGRAM} ${PROG_FILES} ${PREFIX}/bin -.ifdef(WITH_GTK2) - ${INSTALL} -d ${PREFIX}/share/VisualBoyAdvance +.if ${PORT_OPTIONS:MGTK2} + @${MKDIR} ${PREFIX}/share/VisualBoyAdvance ${INSTALL_DATA} ${GTK2_DATA_FILES} ${PREFIX}/share/VisualBoyAdvance .endif ${SED} -e 's|filter=0|filter=1|' ${DATA_FILES} > ${DATA_FILES}-default ${INSTALL_DATA} ${DATA_FILES}-default ${PREFIX}/bin - -post-install: -.ifndef(NOPORTDOCS) - ${INSTALL} -d ${DOCSDIR} -.for filename in ${DOC_FILES} - ${INSTALL_MAN} ${WRKSRC}/${filename} ${DOCSDIR} -.endfor +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR} .endif - ${CAT} ${PKGMESSAGE} + @${ECHO_MSG} + @${CAT} ${PKGMESSAGE} + @${ECHO_MSG} .include diff --git a/emulators/vba/files/patch-deprecatedsigc++ b/emulators/vba/files/patch-deprecatedsigc++ new file mode 100644 index 000000000000..796c4ba8dada --- /dev/null +++ b/emulators/vba/files/patch-deprecatedsigc++ @@ -0,0 +1,702 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 09_deprecatedsigc++.dpatch by Kjang Gwreuung-Kuq +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Inject deprecated libsigc++ code. +## DP: From http://bugs.gentoo.org/215985 +## DP: From ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo/distfiles/visualboyadvance-1.7.2-deprecatedsigc++.patch.bz2 + + +@DPATCH@ +--- src/gtk/sigccompat.h.orig 2008-05-02 10:46:45.000000000 +0200 ++++ src/gtk/sigccompat.h 2008-05-02 10:47:08.000000000 +0200 +@@ -20,7 +20,7 @@ + #ifndef __VBA_SIGCCOMPAT_H__ + #define __VBA_SIGCCOMPAT_H__ + +-#undef LIBSIGC_DISABLE_DEPRECATED ++#define LIBSIGC_DISABLE_DEPRECATED + #include + #include + +@@ -28,9 +28,679 @@ + #include + #include + +-namespace SigC ++ ++// From sigc++/bind.h ++namespace SigC { ++ ++template ++inline ::sigc::bind_functor<-1, T_functor, ++ typename ::sigc::unwrap_reference::type> ++bind(const T_functor& _A_functor, T_bound1 _A_b1) ++{ return ::sigc::bind_functor<-1, T_functor, ++ typename ::sigc::unwrap_reference::type> ++ (_A_functor, _A_b1); ++} ++ ++template ++inline ::sigc::bind_functor<-1, T_functor, ++ typename ::sigc::unwrap_reference::type, ++ typename ::sigc::unwrap_reference::type> ++bind(const T_functor& _A_functor, T_bound1 _A_b1, T_bound2 _A_b2) ++{ return ::sigc::bind_functor<-1, T_functor, ++ typename ::sigc::unwrap_reference::type, ++ typename ::sigc::unwrap_reference::type> ++ (_A_functor, _A_b1, _A_b2); ++} ++ ++template ++inline ::sigc::bind_functor<-1, T_functor, ++ typename ::sigc::unwrap_reference::type, ++ typename ::sigc::unwrap_reference::type, ++ typename ::sigc::unwrap_reference::type> ++bind(const T_functor& _A_functor, T_bound1 _A_b1, T_bound2 _A_b2,T_bound3 _A_b3) ++{ return ::sigc::bind_functor<-1, T_functor, ++ typename ::sigc::unwrap_reference::type, ++ typename ::sigc::unwrap_reference::type, ++ typename ::sigc::unwrap_reference::type> ++ (_A_functor, _A_b1, _A_b2, _A_b3); ++} ++ ++} ++ ++// From sigc++/connection.h ++namespace SigC { ++ ++/** Convinience class for safe disconnection. ++ * Iterators must not be used beyond the lifetime of the list ++ * they work on. A connection object can be created from a ++ * slot list iterator and may safely be used to disconnect ++ * the referred slot at any time (disconnect()). If the slot ++ * has already been destroyed, disconnect() does nothing. empty() or ++ * operator bool() can be used to test whether the connection is ++ * still active. The connection can be blocked (block(), unblock()). ++ * ++ * This is possible because the connection object gets notified ++ * when the referred slot dies (notify()). ++ * ++ * @deprecated Use sigc::connection instead. ++ * @ingroup compat ++ */ ++typedef ::sigc::connection Connection; ++ ++} ++ ++// From sigc++/slot.h ++namespace SigC { ++ ++// SlotN ++/** Converts an arbitrary functor to a unified type which is opaque. ++ * Slot0 itself is a functor or to be more precise a closure. It contains ++ * a single, arbitrary functor (or closure) that is executed in operator()(). ++ * ++ * The template arguments determine the function signature of operator()(): ++ * - @e T_return The return type of operator()(). ++ * ++ * To use simply assign the slot to the desired functor. If the functor ++ * is not compatible with the parameter list defined with the template ++ * arguments compiler errors are triggered. When called the slot ++ * will invoke the functor with minimal copies. ++ * block() and unblock() can be used to block the functor's invocation ++ * from operator()() temporarily. ++ * ++ * @par Example: ++ * @code ++ * #include ++ * void foo(int) {} ++ * SigC::Slot1 s = SigC::slot(&foo); ++ * s(19); ++ * @endcode ++ * ++ * @deprecated Use the unnumbered template sigc::slot instead. ++ * @ingroup compat ++ */ ++template ++class Slot0 ++ : public ::sigc::slot ++{ ++public: ++ typedef ::sigc::slot parent_type; ++ ++ /// Constructs an empty slot. ++ Slot0() {} ++ ++ /** Constructs a slot from an arbitrary functor. ++ * @param _A_func The desired functor the new slot should be assigned to. ++ */ ++ template ++ Slot0(const T_functor& _A_func) ++ : ::sigc::slot(_A_func) {} ++ ++ /** Constructs a slot, copying an existing one. ++ * @param src The existing slot to copy. ++ */ ++ Slot0(const parent_type& src) ++ : parent_type(src) {} ++ ++ /** Overrides this slot making a copy from another slot. ++ * @param src The slot from which to make a copy. ++ * @return @p this. ++ */ ++ Slot0& operator=(const parent_type& src) ++ { parent_type::operator=(src); return *this; } ++}; ++ ++/** Converts an arbitrary functor to a unified type which is opaque. ++ * Slot1 itself is a functor or to be more precise a closure. It contains ++ * a single, arbitrary functor (or closure) that is executed in operator()(). ++ * ++ * The template arguments determine the function signature of operator()(): ++ * - @e T_return The return type of operator()(). ++ * - @e T_arg1 Argument type used in the definition of operator()(). ++ * ++ * To use simply assign the slot to the desired functor. If the functor ++ * is not compatible with the parameter list defined with the template ++ * arguments compiler errors are triggered. When called the slot ++ * will invoke the functor with minimal copies. ++ * block() and unblock() can be used to block the functor's invocation ++ * from operator()() temporarily. ++ * ++ * @par Example: ++ * @code ++ * #include ++ * void foo(int) {} ++ * SigC::Slot1 s = SigC::slot(&foo); ++ * s(19); ++ * @endcode ++ * ++ * @deprecated Use the unnumbered template sigc::slot instead. ++ * @ingroup compat ++ */ ++template ++class Slot1 ++ : public ::sigc::slot ++{ ++public: ++ typedef ::sigc::slot parent_type; ++ ++ /// Constructs an empty slot. ++ Slot1() {} ++ ++ /** Constructs a slot from an arbitrary functor. ++ * @param _A_func The desired functor the new slot should be assigned to. ++ */ ++ template ++ Slot1(const T_functor& _A_func) ++ : ::sigc::slot(_A_func) {} ++ ++ /** Constructs a slot, copying an existing one. ++ * @param src The existing slot to copy. ++ */ ++ Slot1(const parent_type& src) ++ : parent_type(src) {} ++ ++ /** Overrides this slot making a copy from another slot. ++ * @param src The slot from which to make a copy. ++ * @return @p this. ++ */ ++ Slot1& operator=(const parent_type& src) ++ { parent_type::operator=(src); return *this; } ++}; ++ ++/** Converts an arbitrary functor to a unified type which is opaque. ++ * Slot2 itself is a functor or to be more precise a closure. It contains ++ * a single, arbitrary functor (or closure) that is executed in operator()(). ++ * ++ * The template arguments determine the function signature of operator()(): ++ * - @e T_return The return type of operator()(). ++ * - @e T_arg1 Argument type used in the definition of operator()(). ++ * - @e T_arg2 Argument type used in the definition of operator()(). ++ * ++ * To use simply assign the slot to the desired functor. If the functor ++ * is not compatible with the parameter list defined with the template ++ * arguments compiler errors are triggered. When called the slot ++ * will invoke the functor with minimal copies. ++ * block() and unblock() can be used to block the functor's invocation ++ * from operator()() temporarily. ++ * ++ * @par Example: ++ * @code ++ * #include ++ * void foo(int) {} ++ * SigC::Slot1 s = SigC::slot(&foo); ++ * s(19); ++ * @endcode ++ * ++ * @deprecated Use the unnumbered template sigc::slot instead. ++ * @ingroup compat ++ */ ++template ++class Slot2 ++ : public ::sigc::slot ++{ ++public: ++ typedef ::sigc::slot parent_type; ++ ++ /// Constructs an empty slot. ++ Slot2() {} ++ ++ /** Constructs a slot from an arbitrary functor. ++ * @param _A_func The desired functor the new slot should be assigned to. ++ */ ++ template ++ Slot2(const T_functor& _A_func) ++ : ::sigc::slot(_A_func) {} ++ ++ /** Constructs a slot, copying an existing one. ++ * @param src The existing slot to copy. ++ */ ++ Slot2(const parent_type& src) ++ : parent_type(src) {} ++ ++ /** Overrides this slot making a copy from another slot. ++ * @param src The slot from which to make a copy. ++ * @return @p this. ++ */ ++ Slot2& operator=(const parent_type& src) ++ { parent_type::operator=(src); return *this; } ++}; ++ ++/** Converts an arbitrary functor to a unified type which is opaque. ++ * Slot3 itself is a functor or to be more precise a closure. It contains ++ * a single, arbitrary functor (or closure) that is executed in operator()(). ++ * ++ * The template arguments determine the function signature of operator()(): ++ * - @e T_return The return type of operator()(). ++ * - @e T_arg1 Argument type used in the definition of operator()(). ++ * - @e T_arg2 Argument type used in the definition of operator()(). ++ * - @e T_arg3 Argument type used in the definition of operator()(). ++ * ++ * To use simply assign the slot to the desired functor. If the functor ++ * is not compatible with the parameter list defined with the template ++ * arguments compiler errors are triggered. When called the slot ++ * will invoke the functor with minimal copies. ++ * block() and unblock() can be used to block the functor's invocation ++ * from operator()() temporarily. ++ * ++ * @par Example: ++ * @code ++ * #include ++ * void foo(int) {} ++ * SigC::Slot1 s = SigC::slot(&foo); ++ * s(19); ++ * @endcode ++ * ++ * @deprecated Use the unnumbered template sigc::slot instead. ++ * @ingroup compat ++ */ ++template ++class Slot3 ++ : public ::sigc::slot ++{ ++public: ++ typedef ::sigc::slot parent_type; ++ ++ /// Constructs an empty slot. ++ Slot3() {} ++ ++ /** Constructs a slot from an arbitrary functor. ++ * @param _A_func The desired functor the new slot should be assigned to. ++ */ ++ template ++ Slot3(const T_functor& _A_func) ++ : ::sigc::slot(_A_func) {} ++ ++ /** Constructs a slot, copying an existing one. ++ * @param src The existing slot to copy. ++ */ ++ Slot3(const parent_type& src) ++ : parent_type(src) {} ++ ++ /** Overrides this slot making a copy from another slot. ++ * @param src The slot from which to make a copy. ++ * @return @p this. ++ */ ++ Slot3& operator=(const parent_type& src) ++ { parent_type::operator=(src); return *this; } ++}; ++ ++/** Converts an arbitrary functor to a unified type which is opaque. ++ * Slot4 itself is a functor or to be more precise a closure. It contains ++ * a single, arbitrary functor (or closure) that is executed in operator()(). ++ * ++ * The template arguments determine the function signature of operator()(): ++ * - @e T_return The return type of operator()(). ++ * - @e T_arg1 Argument type used in the definition of operator()(). ++ * - @e T_arg2 Argument type used in the definition of operator()(). ++ * - @e T_arg3 Argument type used in the definition of operator()(). ++ * - @e T_arg4 Argument type used in the definition of operator()(). ++ * ++ * To use simply assign the slot to the desired functor. If the functor ++ * is not compatible with the parameter list defined with the template ++ * arguments compiler errors are triggered. When called the slot ++ * will invoke the functor with minimal copies. ++ * block() and unblock() can be used to block the functor's invocation ++ * from operator()() temporarily. ++ * ++ * @par Example: ++ * @code ++ * #include ++ * void foo(int) {} ++ * SigC::Slot1 s = SigC::slot(&foo); ++ * s(19); ++ * @endcode ++ * ++ * @deprecated Use the unnumbered template sigc::slot instead. ++ * @ingroup compat ++ */ ++template ++class Slot4 ++ : public ::sigc::slot ++{ ++public: ++ typedef ::sigc::slot parent_type; ++ ++ /// Constructs an empty slot. ++ Slot4() {} ++ ++ /** Constructs a slot from an arbitrary functor. ++ * @param _A_func The desired functor the new slot should be assigned to. ++ */ ++ template ++ Slot4(const T_functor& _A_func) ++ : ::sigc::slot(_A_func) {} ++ ++ /** Constructs a slot, copying an existing one. ++ * @param src The existing slot to copy. ++ */ ++ Slot4(const parent_type& src) ++ : parent_type(src) {} ++ ++ /** Overrides this slot making a copy from another slot. ++ * @param src The slot from which to make a copy. ++ * @return @p this. ++ */ ++ Slot4& operator=(const parent_type& src) ++ { parent_type::operator=(src); return *this; } ++}; ++ ++/** Converts an arbitrary functor to a unified type which is opaque. ++ * Slot5 itself is a functor or to be more precise a closure. It contains ++ * a single, arbitrary functor (or closure) that is executed in operator()(). ++ * ++ * The template arguments determine the function signature of operator()(): ++ * - @e T_return The return type of operator()(). ++ * - @e T_arg1 Argument type used in the definition of operator()(). ++ * - @e T_arg2 Argument type used in the definition of operator()(). ++ * - @e T_arg3 Argument type used in the definition of operator()(). ++ * - @e T_arg4 Argument type used in the definition of operator()(). ++ * - @e T_arg5 Argument type used in the definition of operator()(). ++ * ++ * To use simply assign the slot to the desired functor. If the functor ++ * is not compatible with the parameter list defined with the template ++ * arguments compiler errors are triggered. When called the slot ++ * will invoke the functor with minimal copies. ++ * block() and unblock() can be used to block the functor's invocation ++ * from operator()() temporarily. ++ * ++ * @par Example: ++ * @code ++ * #include ++ * void foo(int) {} ++ * SigC::Slot1 s = SigC::slot(&foo); ++ * s(19); ++ * @endcode ++ * ++ * @deprecated Use the unnumbered template sigc::slot instead. ++ * @ingroup compat ++ */ ++template ++class Slot5 ++ : public ::sigc::slot ++{ ++public: ++ typedef ::sigc::slot parent_type; ++ ++ /// Constructs an empty slot. ++ Slot5() {} ++ ++ /** Constructs a slot from an arbitrary functor. ++ * @param _A_func The desired functor the new slot should be assigned to. ++ */ ++ template ++ Slot5(const T_functor& _A_func) ++ : ::sigc::slot(_A_func) {} ++ ++ /** Constructs a slot, copying an existing one. ++ * @param src The existing slot to copy. ++ */ ++ Slot5(const parent_type& src) ++ : parent_type(src) {} ++ ++ /** Overrides this slot making a copy from another slot. ++ * @param src The slot from which to make a copy. ++ * @return @p this. ++ */ ++ Slot5& operator=(const parent_type& src) ++ { parent_type::operator=(src); return *this; } ++}; ++ ++/** Converts an arbitrary functor to a unified type which is opaque. ++ * Slot6 itself is a functor or to be more precise a closure. It contains ++ * a single, arbitrary functor (or closure) that is executed in operator()(). ++ * ++ * The template arguments determine the function signature of operator()(): ++ * - @e T_return The return type of operator()(). ++ * - @e T_arg1 Argument type used in the definition of operator()(). ++ * - @e T_arg2 Argument type used in the definition of operator()(). ++ * - @e T_arg3 Argument type used in the definition of operator()(). ++ * - @e T_arg4 Argument type used in the definition of operator()(). ++ * - @e T_arg5 Argument type used in the definition of operator()(). ++ * - @e T_arg6 Argument type used in the definition of operator()(). ++ * ++ * To use simply assign the slot to the desired functor. If the functor ++ * is not compatible with the parameter list defined with the template ++ * arguments compiler errors are triggered. When called the slot ++ * will invoke the functor with minimal copies. ++ * block() and unblock() can be used to block the functor's invocation ++ * from operator()() temporarily. ++ * ++ * @par Example: ++ * @code ++ * #include ++ * void foo(int) {} ++ * SigC::Slot1 s = SigC::slot(&foo); ++ * s(19); ++ * @endcode ++ * ++ * @deprecated Use the unnumbered template sigc::slot instead. ++ * @ingroup compat ++ */ ++template ++class Slot6 ++ : public ::sigc::slot ++{ ++public: ++ typedef ::sigc::slot parent_type; ++ ++ /// Constructs an empty slot. ++ Slot6() {} ++ ++ /** Constructs a slot from an arbitrary functor. ++ * @param _A_func The desired functor the new slot should be assigned to. ++ */ ++ template ++ Slot6(const T_functor& _A_func) ++ : ::sigc::slot(_A_func) {} ++ ++ /** Constructs a slot, copying an existing one. ++ * @param src The existing slot to copy. ++ */ ++ Slot6(const parent_type& src) ++ : parent_type(src) {} ++ ++ /** Overrides this slot making a copy from another slot. ++ * @param src The slot from which to make a copy. ++ * @return @p this. ++ */ ++ Slot6& operator=(const parent_type& src) ++ { parent_type::operator=(src); return *this; } ++}; ++ ++/** Converts an arbitrary functor to a unified type which is opaque. ++ * Slot7 itself is a functor or to be more precise a closure. It contains ++ * a single, arbitrary functor (or closure) that is executed in operator()(). ++ * ++ * The template arguments determine the function signature of operator()(): ++ * - @e T_return The return type of operator()(). ++ * - @e T_arg1 Argument type used in the definition of operator()(). ++ * - @e T_arg2 Argument type used in the definition of operator()(). ++ * - @e T_arg3 Argument type used in the definition of operator()(). ++ * - @e T_arg4 Argument type used in the definition of operator()(). ++ * - @e T_arg5 Argument type used in the definition of operator()(). ++ * - @e T_arg6 Argument type used in the definition of operator()(). ++ * - @e T_arg7 Argument type used in the definition of operator()(). ++ * ++ * To use simply assign the slot to the desired functor. If the functor ++ * is not compatible with the parameter list defined with the template ++ * arguments compiler errors are triggered. When called the slot ++ * will invoke the functor with minimal copies. ++ * block() and unblock() can be used to block the functor's invocation ++ * from operator()() temporarily. ++ * ++ * @par Example: ++ * @code ++ * #include ++ * void foo(int) {} ++ * SigC::Slot1 s = SigC::slot(&foo); ++ * s(19); ++ * @endcode ++ * ++ * @deprecated Use the unnumbered template sigc::slot instead. ++ * @ingroup compat ++ */ ++template ++class Slot7 ++ : public ::sigc::slot + { ++public: ++ typedef ::sigc::slot parent_type; ++ ++ /// Constructs an empty slot. ++ Slot7() {} ++ ++ /** Constructs a slot from an arbitrary functor. ++ * @param _A_func The desired functor the new slot should be assigned to. ++ */ ++ template ++ Slot7(const T_functor& _A_func) ++ : ::sigc::slot(_A_func) {} ++ ++ /** Constructs a slot, copying an existing one. ++ * @param src The existing slot to copy. ++ */ ++ Slot7(const parent_type& src) ++ : parent_type(src) {} ++ ++ /** Overrides this slot making a copy from another slot. ++ * @param src The slot from which to make a copy. ++ * @return @p this. ++ */ ++ Slot7& operator=(const parent_type& src) ++ { parent_type::operator=(src); return *this; } ++}; ++ ++ ++ ++#ifndef DOXYGEN_SHOULD_SKIP_THIS ++/* gcc 3.2 reports a strange conflict between SigC::slot() and sigc::slot<> ++ * when "using namespace SigC" and later using a slot(obj,func) overload ++ * without the prefix "SigC::". Probably a compiler bug. I will investigate. ++ * ++ * This ugly hack avoids the error: ++ */ ++// #define slot(...) make_slot(__VA_ARGS__) /* only works for gcc */ ++#endif + ++ ++// slot() ++/** Creates a functor of type SigC::Slot0 that wraps an existing non-member function. ++ * ++ * @param _A_func Pointer to function that should be wrapped. ++ * @return Functor that executes _A_func on invokation. ++ * ++ * @deprecated Use sigc::ptr_fun() instead. ++ * @ingroup compat ++ */ ++template ++inline Slot0 ++slot(T_return (*_A_func)()) ++{ return Slot0(_A_func); } ++ ++/** Creates a functor of type SigC::Slot1 that wraps an existing non-member function. ++ * ++ * @param _A_func Pointer to function that should be wrapped. ++ * @return Functor that executes _A_func on invokation. ++ * ++ * @deprecated Use sigc::ptr_fun() instead. ++ * @ingroup compat ++ */ ++template ++inline Slot1 ++slot(T_return (*_A_func)(T_arg1)) ++{ return Slot1(_A_func); } ++ ++/** Creates a functor of type SigC::Slot2 that wraps an existing non-member function. ++ * ++ * @param _A_func Pointer to function that should be wrapped. ++ * @return Functor that executes _A_func on invokation. ++ * ++ * @deprecated Use sigc::ptr_fun() instead. ++ * @ingroup compat ++ */ ++template ++inline Slot2 ++slot(T_return (*_A_func)(T_arg1,T_arg2)) ++{ return Slot2(_A_func); } ++ ++/** Creates a functor of type SigC::Slot3 that wraps an existing non-member function. ++ * ++ * @param _A_func Pointer to function that should be wrapped. ++ * @return Functor that executes _A_func on invokation. ++ * ++ * @deprecated Use sigc::ptr_fun() instead. ++ * @ingroup compat ++ */ ++template ++inline Slot3 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3)) ++{ return Slot3(_A_func); } ++ ++/** Creates a functor of type SigC::Slot4 that wraps an existing non-member function. ++ * ++ * @param _A_func Pointer to function that should be wrapped. ++ * @return Functor that executes _A_func on invokation. ++ * ++ * @deprecated Use sigc::ptr_fun() instead. ++ * @ingroup compat ++ */ ++template ++inline Slot4 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4)) ++{ return Slot4(_A_func); } ++ ++/** Creates a functor of type SigC::Slot5 that wraps an existing non-member function. ++ * ++ * @param _A_func Pointer to function that should be wrapped. ++ * @return Functor that executes _A_func on invokation. ++ * ++ * @deprecated Use sigc::ptr_fun() instead. ++ * @ingroup compat ++ */ ++template ++inline Slot5 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5)) ++{ return Slot5(_A_func); } ++ ++/** Creates a functor of type SigC::Slot6 that wraps an existing non-member function. ++ * ++ * @param _A_func Pointer to function that should be wrapped. ++ * @return Functor that executes _A_func on invokation. ++ * ++ * @deprecated Use sigc::ptr_fun() instead. ++ * @ingroup compat ++ */ ++template ++inline Slot6 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6)) ++{ return Slot6(_A_func); } ++ ++/** Creates a functor of type SigC::Slot7 that wraps an existing non-member function. ++ * ++ * @param _A_func Pointer to function that should be wrapped. ++ * @return Functor that executes _A_func on invokation. ++ * ++ * @deprecated Use sigc::ptr_fun() instead. ++ * @ingroup compat ++ */ ++template ++inline Slot7 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7)) ++{ return Slot7(_A_func); } ++ ++ ++ ++} ++ ++// From sigc++/object.h ++namespace SigC { ++ ++// Object ++typedef ::sigc::trackable Object; ++ ++} ++ ++namespace SigC ++{ + template + inline Slot0 + slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)() ) diff --git a/emulators/vba/files/patch-src-Util.cpp b/emulators/vba/files/patch-src-Util.cpp index d9c2d7f2ed3e..6fc6be57bffa 100644 --- a/emulators/vba/files/patch-src-Util.cpp +++ b/emulators/vba/files/patch-src-Util.cpp @@ -1,6 +1,6 @@ --- src/Util.cpp.orig 2004-05-20 19:42:37.000000000 +0200 +++ src/Util.cpp 2012-05-02 20:49:07.000000000 +0200 -@@ -79,7 +79,7 @@ +@@ -79,7 +79,7 @@ bool utilWritePNGFile(const char *fileNa return false; } @@ -9,3 +9,12 @@ png_destroy_write_struct(&png_ptr,NULL); fclose(fp); return false; +@@ -984,7 +984,7 @@ void utilWriteData(gzFile gzFile, variab + + gzFile utilGzOpen(const char *file, const char *mode) + { +- utilGzWriteFunc = (int (*)(void *,void * const, unsigned int))gzwrite; ++ utilGzWriteFunc = (int (*)(gzFile, voidp const, unsigned int))gzwrite; + utilGzReadFunc = gzread; + utilGzCloseFunc = gzclose; + diff --git a/emulators/vba/files/patch-src-sdl_debugger.cpp b/emulators/vba/files/patch-src-sdl_debugger.cpp index 4a787d1ff294..d37b0260ac67 100644 --- a/emulators/vba/files/patch-src-sdl_debugger.cpp +++ b/emulators/vba/files/patch-src-sdl_debugger.cpp @@ -12,3 +12,12 @@ if(size == 2) printf("Breakpoint (on write) address %08x old:%08x new:%08x\n", +@@ -1389,7 +1389,7 @@ + { + char buffer[10]; + printf("Are you sure you want to quit (y/n)? "); +- fgets(buffer, 1024, stdin); ++ fgets(buffer, sizeof(buffer), stdin); + + if(buffer[0] == 'y' || buffer[0] == 'Y') { + debugger = false; diff --git a/emulators/vba/files/pkg-message.in b/emulators/vba/files/pkg-message.in new file mode 100644 index 000000000000..cb364d43a385 --- /dev/null +++ b/emulators/vba/files/pkg-message.in @@ -0,0 +1,9 @@ +----------------------------------------------------------------- +The default configuration file has been installed as +%%LOCALBASE%%/bin/VisualBoyAdvance.cfg-default. Please copy it to +%%LOCALBASE%%/bin/VisualBoyAdvance.cfg before you start the emulator. + +If all you see after loading a ROM is a black screen and/or +VisualBoy Advance crashes, try switching the video filter. +Either change it in the global config file or use the -f switch. +----------------------------------------------------------------- diff --git a/emulators/vba/pkg-message b/emulators/vba/pkg-message deleted file mode 100644 index cb364d43a385..000000000000 --- a/emulators/vba/pkg-message +++ /dev/null @@ -1,9 +0,0 @@ ------------------------------------------------------------------ -The default configuration file has been installed as -%%LOCALBASE%%/bin/VisualBoyAdvance.cfg-default. Please copy it to -%%LOCALBASE%%/bin/VisualBoyAdvance.cfg before you start the emulator. - -If all you see after loading a ROM is a black screen and/or -VisualBoy Advance crashes, try switching the video filter. -Either change it in the global config file or use the -f switch. ------------------------------------------------------------------ diff --git a/emulators/vba/pkg-plist b/emulators/vba/pkg-plist index 5fb3d2987c58..8934d55becb9 100644 --- a/emulators/vba/pkg-plist +++ b/emulators/vba/pkg-plist @@ -1,12 +1,5 @@ bin/VisualBoyAdvance bin/VisualBoyAdvance.cfg-default -%%INSTALL_GTK2%%bin/gvba -%%INSTALL_GTK2%%share/VisualBoyAdvance/vba.glade -%%PORTDOCS%%%%DOCSDIR%%/COPYING -%%PORTDOCS%%%%DOCSDIR%%/AUTHORS -%%PORTDOCS%%%%DOCSDIR%%/NEWS -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/ChangeLog -%%PORTDOCS%%%%DOCSDIR%%/INSTALL -%%INSTALL_GTK2%%@dirrm share/VisualBoyAdvance -%%PORTDOCS%%@dirrm %%DOCSDIR%% +%%GTK2%%bin/gvba +%%GTK2%%share/VisualBoyAdvance/vba.glade +%%GTK2%%@dirrm share/VisualBoyAdvance -- cgit v1.2.3