Update to gcalctool-6.0.2p1 (merge from x11/gnome3). While here, add a

gtk2 FLAVOR.
Upstream will probably drop gtk+2 support for the next release but we'll
see then.

ok jasper@
This commit is contained in:
ajacoutot 2011-06-01 15:07:48 +00:00
parent 72c6360806
commit 0d7701f01a
4 changed files with 95 additions and 20 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.44 2011/05/28 08:15:53 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.45 2011/06/01 15:07:48 ajacoutot Exp $
COMMENT= GTK2 desktop calculator
COMMENT= GTK desktop calculator
GNOME_PROJECT= gcalctool
GNOME_VERSION= 5.32.2
GNOME_VERSION= 6.0.2
REVISION= 2
REVISION= 1
CATEGORIES= math
@ -15,13 +15,12 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB += X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext
WANTLIB += Xfixes Xi Xinerama Xrandr Xrender atk-1.0 c cairo
WANTLIB += expat fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0
WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
WANTLIB += gtk-x11-2.0 m pango-1.0 pangocairo-1.0 pangoft2-1.0
WANTLIB += pixman-1 png pthread pthread-stubs xcb z xcb-render
WANTLIB += xml2 GL Xxf86vm drm xcb-shm
WANTLIB += GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
WANTLIB += Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 c cairo
WANTLIB += drm expat fontconfig freetype gdk_pixbuf-2.0 gio-2.0
WANTLIB += glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 m pango-1.0
WANTLIB += pangocairo-1.0 pangoft2-1.0 pixman-1 png pthread pthread-stubs
WANTLIB += xcb xcb-render xcb-shm xml2 z
MODULES= devel/gettext \
x11/gnome \
@ -30,6 +29,10 @@ MODULES= devel/gettext \
LIB_DEPENDS= x11/gtk+2
BUILD_DEPENDS= devel/bison
YACC= bison
# needed to download IMF/ECB rates (Financial mode)
RUN_DEPENDS= x11/gnome/gvfs
MODGNOME_HELP_FILES= Yes
DESKTOP_FILES= Yes
@ -37,6 +40,17 @@ DESKTOP_FILES= Yes
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
USE_GROFF= Yes
FLAVORS= gtk2
FLAVOR?=
.if ${FLAVOR:L:Mgtk2}
CONFIGURE_ARGS+= --with-gtk=2.0
LIB_DEPENDS+= x11/gtk+2
WANTLIB += gdk-x11-2.0 gtk-x11-2.0
.else
CONFIGURE_ARGS+= --with-gtk=3.0
LIB_DEPENDS+= x11/gtk+3
WANTLIB += cairo-gobject gdk-3 gtk-3
.endif
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (gnome/gcalctool-5.32.2.tar.bz2) = P1aXZ1LcmQtPueXWDpoE6w==
RMD160 (gnome/gcalctool-5.32.2.tar.bz2) = 35j1/2WfiryHeiDhRup5G3QRqKI=
SHA1 (gnome/gcalctool-5.32.2.tar.bz2) = qJTZEKRaINTqscvV1Cd5ORRexkw=
SHA256 (gnome/gcalctool-5.32.2.tar.bz2) = soHMVF8ns3oP0SA2axvlF1dNn1BbWd/DT5hgAH3wt4g=
SIZE (gnome/gcalctool-5.32.2.tar.bz2) = 1178049
MD5 (gnome/gcalctool-6.0.2.tar.bz2) = UxVt2Wru7PaiZpKSAl3nXA==
RMD160 (gnome/gcalctool-6.0.2.tar.bz2) = xnM2Y2mT26Yd7d8jHBepMstVYl0=
SHA1 (gnome/gcalctool-6.0.2.tar.bz2) = eChe7tYdlQHnU0FhsU7sZ6OFiQs=
SHA256 (gnome/gcalctool-6.0.2.tar.bz2) = YxkP3hvlICq0N3R4W1Uh2PEVksap4SVnMCjFrCNckxY=
SIZE (gnome/gcalctool-6.0.2.tar.bz2) = 1275979

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-src_math-equation_c,v 1.1 2011/06/01 15:07:48 ajacoutot Exp $
Fix stackoverflow as the lexer wouldn't be able to fit on the stack.
https://bugzilla.gnome.org/show_bug.cgi?id=650174
--- src/math-equation.c.orig Tue May 24 05:20:42 2011
+++ src/math-equation.c Tue May 31 09:37:25 2011
@@ -1305,6 +1305,7 @@ void
math_equation_solve(MathEquation *equation)
{
GError *error = NULL;
+ gulong stacksize = 0;
g_return_if_fail(equation != NULL);
@@ -1326,7 +1327,14 @@ math_equation_solve(MathEquation *equation)
math_equation_set_number_mode(equation, NORMAL);
- g_thread_create(math_equation_solve_real, equation, false, &error);
+ if (GLIB_SIZEOF_LONG == 8) {
+ stacksize = 0x400000;
+ } else {
+ stacksize = 0x200000;
+ }
+
+ g_thread_create_full(math_equation_solve_real, equation, stacksize, false,
+ false, G_THREAD_PRIORITY_NORMAL, &error);
if (error)
g_warning("Error spawning thread for calculations: %s\n", error->message);

View File

@ -1,7 +1,9 @@
@comment $OpenBSD: PLIST,v 1.16 2011/05/28 08:15:34 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.17 2011/06/01 15:07:48 ajacoutot Exp $
@pkgpath x11/gnome/gcalctool
@bin bin/gcalccmd
@bin bin/gcalctool
bin/gnome-calculator
@man man/man1/gcalccmd.1
@man man/man1/gcalctool.1
share/applications/gcalctool.desktop
share/gcalctool/
@ -10,8 +12,6 @@ share/gcalctool/buttons-basic.ui
share/gcalctool/buttons-financial.ui
share/gcalctool/buttons-programming.ui
share/gcalctool/preferences.ui
share/glib-2.0/
share/glib-2.0/schemas/
share/glib-2.0/schemas/org.gnome.gcalctool.gschema.xml
share/gnome/help/gcalctool/
share/gnome/help/gcalctool/C/
@ -536,6 +536,35 @@ share/gnome/help/gcalctool/ru/scientific.page
share/gnome/help/gcalctool/ru/superscript.page
share/gnome/help/gcalctool/ru/trigonometry.page
share/gnome/help/gcalctool/ru/variables.page
share/gnome/help/gcalctool/sl/
share/gnome/help/gcalctool/sl/absolute.page
share/gnome/help/gcalctool/sl/base.page
share/gnome/help/gcalctool/sl/boolean.page
share/gnome/help/gcalctool/sl/complex.page
share/gnome/help/gcalctool/sl/conv-base.page
share/gnome/help/gcalctool/sl/conv-character.page
share/gnome/help/gcalctool/sl/conv-currency.page
share/gnome/help/gcalctool/sl/conv-length.page
share/gnome/help/gcalctool/sl/conv-time.page
share/gnome/help/gcalctool/sl/conv-weight.page
share/gnome/help/gcalctool/sl/equation.page
share/gnome/help/gcalctool/sl/factorial.page
share/gnome/help/gcalctool/sl/factorize.page
share/gnome/help/gcalctool/sl/financial.page
share/gnome/help/gcalctool/sl/functions.page
share/gnome/help/gcalctool/sl/index.page
share/gnome/help/gcalctool/sl/keyboard.page
share/gnome/help/gcalctool/sl/legal.xml
share/gnome/help/gcalctool/sl/logarithm.page
share/gnome/help/gcalctool/sl/modulus.page
share/gnome/help/gcalctool/sl/mouse.page
share/gnome/help/gcalctool/sl/number-display.page
share/gnome/help/gcalctool/sl/percentage.page
share/gnome/help/gcalctool/sl/power.page
share/gnome/help/gcalctool/sl/scientific.page
share/gnome/help/gcalctool/sl/superscript.page
share/gnome/help/gcalctool/sl/trigonometry.page
share/gnome/help/gcalctool/sl/variables.page
share/gnome/help/gcalctool/sv/
share/gnome/help/gcalctool/sv/absolute.page
share/gnome/help/gcalctool/sv/base.page
@ -739,6 +768,7 @@ share/locale/tk/
share/locale/tk/LC_MESSAGES/
share/locale/tk/LC_MESSAGES/gcalctool.mo
share/locale/tr/LC_MESSAGES/gcalctool.mo
share/locale/ug/LC_MESSAGES/gcalctool.mo
share/locale/uk/LC_MESSAGES/gcalctool.mo
share/locale/vi/LC_MESSAGES/gcalctool.mo
share/locale/xh/LC_MESSAGES/gcalctool.mo