diff options
-rw-r--r-- | media-libs/ufo/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/ufo/files/ufo-0.8.4-namespace.patch | 185 | ||||
-rw-r--r-- | media-libs/ufo/ufo-0.8.4.ebuild | 13 |
3 files changed, 201 insertions, 3 deletions
diff --git a/media-libs/ufo/ChangeLog b/media-libs/ufo/ChangeLog index 10a204fbe713..bb6b318fe7a0 100644 --- a/media-libs/ufo/ChangeLog +++ b/media-libs/ufo/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/ufo # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/ufo/ChangeLog,v 1.1 2007/04/12 19:54:50 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/ufo/ChangeLog,v 1.2 2007/04/12 20:07:00 jokey Exp $ + + 12 Apr 2007; Markus Ullmann <jokey@gentoo.org> + +files/ufo-0.8.4-namespace.patch, ufo-0.8.4.ebuild: + Add namespace patch *ufo-0.8.4 (12 Apr 2007) diff --git a/media-libs/ufo/files/ufo-0.8.4-namespace.patch b/media-libs/ufo/files/ufo-0.8.4-namespace.patch new file mode 100644 index 000000000000..23ef83511f6c --- /dev/null +++ b/media-libs/ufo/files/ufo-0.8.4-namespace.patch @@ -0,0 +1,185 @@ +diff -Naur /usr/src/ufo-0.8.4/include/ufo/config/stamp-h1 ./include/ufo/config/stamp-h1 +--- /usr/src/ufo-0.8.4/include/ufo/config/stamp-h1 1969-12-31 16:00:00.000000000 -0800 ++++ ./include/ufo/config/stamp-h1 2006-08-19 13:34:43.000000000 -0700 +@@ -0,0 +1 @@ ++timestamp for include/ufo/config/ufo_config_gnu.hpp +diff -Naur /usr/src/ufo-0.8.4/include/ufo/util/udimension.hpp ./include/ufo/util/udimension.hpp +--- /usr/src/ufo-0.8.4/include/ufo/util/udimension.hpp 2005-09-30 05:36:48.000000000 -0700 ++++ ./include/ufo/util/udimension.hpp 2006-08-19 13:34:40.000000000 -0700 +@@ -32,6 +32,8 @@ + + #include "uinsets.hpp" + ++using namespace std; ++ + namespace ufo { + + /** @short An abstraction to dimension (width and height). +@@ -239,14 +241,14 @@ + + inline void + UDimension::clamp(const UDimension & maxDim) { +- w = std::min(w, maxDim.w); +- h = std::min(h, maxDim.h); ++ w = min(w, maxDim.w); ++ h = min(h, maxDim.h); + } + + inline void + UDimension::expand(const UDimension & minDim) { +- w = std::max(w, minDim.w); +- h = std::max(h, minDim.h); ++ w = max(w, minDim.w); ++ h = max(h, minDim.h); + } + + inline void +diff -Naur /usr/src/ufo-0.8.4/include/ufo/util/urectangle.hpp ./include/ufo/util/urectangle.hpp +--- /usr/src/ufo-0.8.4/include/ufo/util/urectangle.hpp 2005-09-30 05:36:48.000000000 -0700 ++++ ./include/ufo/util/urectangle.hpp 2006-08-19 13:34:40.000000000 -0700 +@@ -218,10 +218,10 @@ + {} + + inline URectangle::URectangle(const UPoint & p1, const UPoint & p2) { +- x = std::min(p1.x, p2.x); +- y = std::min(p1.y, p2.y); +- w = std::abs(p2.x - p1.x); +- h = std::abs(p2.y - p1.y); ++ x = min(p1.x, p2.x); ++ y = min(p1.y, p2.y); ++ w = abs(p2.x - p1.x); ++ h = abs(p2.y - p1.y); + } + + inline URectangle::URectangle(const UDimension & d) +@@ -261,34 +261,34 @@ + + inline void + URectangle::clamp(const UDimension & maxDim) { +- w = std::min(w, maxDim.w); +- h = std::min(h, maxDim.h); ++ w = min(w, maxDim.w); ++ h = min(h, maxDim.h); + } + + inline void + URectangle::expand(const UDimension & minDim) { +- w = std::max(w, minDim.w); +- h = std::max(h, minDim.h); ++ w = max(w, minDim.w); ++ h = max(h, minDim.h); + } + + inline void + URectangle::intersect(const URectangle & rect) { +- int x1 = std::max(x, rect.x); +- int y1 = std::max(y, rect.y); +- int x2 = std::min(x + w, rect.x + rect.w); +- int y2 = std::min(y + h, rect.y + rect.h); ++ int x1 = max(x, rect.x); ++ int y1 = max(y, rect.y); ++ int x2 = min(x + w, rect.x + rect.w); ++ int y2 = min(y + h, rect.y + rect.h); + + setBounds(x1, y1, x2 - x1, y2 - y1); +- w = std::max(w, 0); +- h = std::max(h, 0); ++ w = max(w, 0); ++ h = max(h, 0); + } + + inline void + URectangle::unite(const URectangle & rect) { +- int x1 = std::min(x, rect.x); +- int y1 = std::min(y, rect.y); +- int x2 = std::max(x + w, rect.x + rect.w); +- int y2 = std::max(y + h, rect.y + rect.h); ++ int x1 = min(x, rect.x); ++ int y1 = min(y, rect.y); ++ int x2 = max(x + w, rect.x + rect.w); ++ int y2 = max(y + h, rect.y + rect.h); + + setBounds(x1, y1, x2 - x1 + 1, y2 - y1 + 1); + } +@@ -313,10 +313,10 @@ + const URectangle & src2, URectangle * dest) { + if (dest) { + // allow using src rectangle as dest rectangle +- int x = std::min(src1.x, src2.x); +- int y = std::min(src1.y, src2.y); +- dest->w = std::max(src1.x + src1.w, src2.x + src2.w) - x; +- dest->h = std::max(src1.y + src1.h, src2.y + src2.h) - y; ++ int x = min(src1.x, src2.x); ++ int y = min(src1.y, src2.y); ++ dest->w = max(src1.x + src1.w, src2.x + src2.w) - x; ++ dest->h = max(src1.y + src1.h, src2.y + src2.h) - y; + dest->x = x; + dest->y = y; + } +diff -Naur /usr/src/ufo-0.8.4/include/ufo/ux/ux_sdl_prototypes.hpp ./include/ufo/ux/ux_sdl_prototypes.hpp +--- /usr/src/ufo-0.8.4/include/ufo/ux/ux_sdl_prototypes.hpp 2005-02-13 09:49:30.000000000 -0800 ++++ ./include/ufo/ux/ux_sdl_prototypes.hpp 2006-08-19 13:34:40.000000000 -0700 +@@ -25,7 +25,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + ***************************************************************************/ + +- ++#include <SDL.h> + #define UFO_SDL_PROC_UNUSED(ret,func,params) + + UFO_SDL_PROC(SDL_Surface *,SDL_SetVideoMode,(int, int,int, Uint32)) +diff -Naur /usr/src/ufo-0.8.4/include/ufo/widgets/uradiobutton.hpp ./include/ufo/widgets/uradiobutton.hpp +--- /usr/src/ufo-0.8.4/include/ufo/widgets/uradiobutton.hpp 2005-05-21 08:19:54.000000000 -0700 ++++ ./include/ufo/widgets/uradiobutton.hpp 2006-08-19 13:34:43.000000000 -0700 +@@ -48,6 +48,12 @@ + public: + URadioButton(); + URadioButton(const std::string & text); ++ ++ std::string getValue() { return m_value; }; ++ void setValue(std::string v) { m_value = v; }; ++ ++private: ++ std::string m_value; + }; + + } // namespace ufo +diff -Naur /usr/src/ufo-0.8.4/src/widgets/upopupmenu.cpp ./src/widgets/upopupmenu.cpp +--- /usr/src/ufo-0.8.4/src/widgets/upopupmenu.cpp 2005-10-11 12:26:17.000000000 -0700 ++++ ./src/widgets/upopupmenu.cpp 2006-08-19 13:31:02.000000000 -0700 +@@ -86,7 +86,7 @@ + /*m_popup->sigPopupAboutToClose().disconnect(m_closeSlot); + m_sigMenuAboutToClose(this); + UWidget::setVisible(false);*/ +- m_popup->hide(); ++ //m_popup->hide(); + } + } + +diff -Naur /usr/src/ufo-0.8.4/src/xml/uxul.cpp ./src/xml/uxul.cpp +--- /usr/src/ufo-0.8.4/src/xml/uxul.cpp 2005-10-24 09:00:55.000000000 -0700 ++++ ./src/xml/uxul.cpp 2006-08-19 13:31:01.000000000 -0700 +@@ -330,6 +330,11 @@ + if ("radio" == value) { + URadioButton * radioButton = new URadioButton(); + genericButton(radioElement, radioButton); ++ ++ if (radioElement->Attribute("value")) { ++ radioButton->setValue(radioElement->Attribute("value")); ++ } ++ + radioButton->setButtonGroup(buttonGroup); + container->add(radioButton); + } +@@ -571,11 +576,6 @@ + genericWidget(widgetElement, tabBox); + container->add(tabBox); + } +- +- // generic widget attributes +- //if (widget) { +- // genericWidget(widgetElement, widget); +- //} + } + } + diff --git a/media-libs/ufo/ufo-0.8.4.ebuild b/media-libs/ufo/ufo-0.8.4.ebuild index 3837de78011f..14548d70bcf7 100644 --- a/media-libs/ufo/ufo-0.8.4.ebuild +++ b/media-libs/ufo/ufo-0.8.4.ebuild @@ -1,10 +1,12 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/ufo/ufo-0.8.4.ebuild,v 1.1 2007/04/12 19:54:50 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/ufo/ufo-0.8.4.ebuild,v 1.2 2007/04/12 20:07:00 jokey Exp $ + +inherit eutils DESCRIPTION="A platform and device independent core library for GUIs" HOMEPAGE="http://libufo.sourceforge.net/" -SRC_URI="mirror://sourceforge/libufo/$P.tar.gz" +SRC_URI="mirror://sourceforge/libufo/${P}.tar.gz" LICENSE="LGPL-2" SLOT="0" @@ -16,6 +18,13 @@ DEPEND="virtual/opengl x11-libs/libICE" RDEPEND="${DEPEND}" +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-namespace.patch +} + src_install() { emake DESTDIR="${D}" install || die "emake install failed" } |