Skip site navigation (1)Skip section navigation (2)
Date:      08 Nov 2002 21:34:55 +0100
From:      Marc Recht <marc@informatik.uni-bremen.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        gnome@FreeBSD.org
Subject:   ports/45150: py-gtk2 1.9.13 fixes
Message-ID:  <1036787696.746.21.camel@leeloo.intern.geht.de>

next in thread | raw e-mail | index | archive | help

>Number:         45150
>Category:       ports
>Synopsis:       fixes to the py-gtk2 1.9.13 port
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 08 12:40:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Marc Recht
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
FreeBSD leeloo.intern.geht.de 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Fri Nov  8 14:13:48 CET 2002     root@leeloo.intern.geht.de:/usr/obj/usr/src/sys/LEELOO  i386

>Description:
This add a bugfix from the pygtk mailing-list and adds threading support on systems with libc_r. 
A WITHOUT_THREADS knob is also added. The PORTREVISION has been bumped, because of the bug-fix.

>How-To-Repeat:

>Fix:


--=-5up8qEzo0Le/VHVIVoHy
Content-Disposition: attachment; filename=py-gtk2.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; name=py-gtk2.diff; charset=ISO-8859-1

diff -Nur py-gtk2.orig/Makefile py-gtk2/Makefile
--- py-gtk2.orig/Makefile	Fri Nov  8 20:56:29 2002
+++ py-gtk2/Makefile	Fri Nov  8 21:06:38 2002
@@ -6,6 +6,7 @@
=20
 PORTNAME=3D	gtk
 PORTVERSION=3D	1.99.13
+PORTREVISION=3D	1
 CATEGORIES=3D	x11-toolkits python
 MASTER_SITES=3D	${MASTER_SITE_GNOME}
 MASTER_SITE_SUBDIR=3D	sources/pygtk/1.99
@@ -28,6 +29,19 @@
=20
 EG_SRC_DIR=3D	${WRKSRC}/examples
 EG_DST_DIR=3D	${PREFIX}/share/examples/py-gtk
+
+#
+# Use the same way as the Python port to determine if we want
+# threading support.
+#
+LIBC_R!=3D	/sbin/ldconfig -r | grep c_r || true
+.if (${LIBC_R} !=3D "") && !defined(WITHOUT_THREADS)
+CONFIGURE_ARGS+=3D	--enable-thread
+CFLAGS+=3D		${PTHREAD_CFLAGS}
+CONFIGURE_ENV+=3D		LDFLAGS=3D"${PTHREAD_LIBS} ${LDFLAGS}"
+.else
+CONFIGURE_ARGS+=3D	--disable-thread
+.endif
=20
 .if !defined(BATCH) && !defined(PACKAGE_BUILDING)
 pre-build:
diff -Nur py-gtk2.orig/files/patch-ltmain.sh py-gtk2/files/patch-ltmain.sh
--- py-gtk2.orig/files/patch-ltmain.sh	Thu Jan  1 01:00:00 1970
+++ py-gtk2/files/patch-ltmain.sh	Fri Nov  8 20:57:36 2002
@@ -0,0 +1,19 @@
+--- ltmain.sh.orig	Mon May 27 06:33:15 2002
++++ ltmain.sh	Fri Nov  8 20:57:04 2002
+@@ -1073,8 +1073,16 @@
+ 	continue
+ 	;;
+=20
++      -pthread)
++	compile_command=3D"$compile_command -pthread"
++	finalize_command=3D"$finalize_command -pthread"
++	compiler_flags=3D"$compiler_flags -pthread"
++	continue
++	;;
++
+       -module)
+ 	module=3Dyes
++	build_old_libs=3Dno
+ 	continue
+ 	;;
+=20
diff -Nur py-gtk2.orig/files/patch-pygtkcellrenderer.c py-gtk2/files/patch-=
pygtkcellrenderer.c
--- py-gtk2.orig/files/patch-pygtkcellrenderer.c	Thu Jan  1 01:00:00 1970
+++ py-gtk2/files/patch-pygtkcellrenderer.c	Fri Nov  8 21:02:40 2002
@@ -0,0 +1,38 @@
+--- ./gtk/pygtkcellrenderer.c.orig	Sat Jul 20 07:37:29 2002
++++ ./gtk/pygtkcellrenderer.c	Fri Nov  8 21:01:20 2002
+@@ -94,6 +94,7 @@
+ 				      gint            *height)
+ {
+     PyObject *self, *py_ret, *py_widget, *py_cell_area;
++    gint my_x, my_y, my_width, my_height;
+=20
+     g_return_if_fail(PYGTK_IS_GENERIC_CELL_RENDERER (cell));
+=20
+@@ -117,13 +118,26 @@
+     Py_DECREF(py_widget);
+     Py_DECREF(py_cell_area);
+=20
+-    if (!PyArg_ParseTuple(py_ret, "iiii", x_offset, y_offset, width, heig=
ht)) {
++    if (!PyArg_ParseTuple(py_ret, "iiii",
++			  &my_x, &my_y, &my_width, &my_height)) {
+ 	PyErr_Clear();
+ 	Py_DECREF(py_ret);
+ 	g_warning("could not parse return value of get_size() method.  "
+ 		  "Should be of form (x_offset, y_offset, width, height)");
+ 	return;
+     }
++
++    if (x_offset)
++	*x_offset =3D my_x;
++
++    if (y_offset)
++	*y_offset =3D my_y;
++
++    if (width)
++	*width =3D my_width;
++
++    if (height)
++	*height =3D my_height;
+     /* success */
+ }
+=20

--=-5up8qEzo0Le/VHVIVoHy--

>Release-Note:
>Audit-Trail:
>Unformatted:
 --=-5up8qEzo0Le/VHVIVoHy
 Content-Type: text/plain
 Content-Transfer-Encoding: 7bit
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1036787696.746.21.camel>