Bug 45150

Summary: fixes to the py-gtk2 1.9.13 port
Product: Ports & Packages Reporter: Marc Recht <marc>
Component: Individual Port(s)Assignee: freebsd-ports (Nobody) <ports>
Status: Closed FIXED    
Severity: Affects Only Me CC: gnome
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Marc Recht 2002-11-08 20:40:01 UTC
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.

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



--=-5up8qEzo0Le/VHVIVoHy----CDpmbVS8KOnbTcLNS4sNZJ4IYmXDnnb1CSjLDHUmp6ZktnfZ
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

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
Comment 1 Joe Marcus Clarke 2002-11-08 20:53:43 UTC
Marc, your email is bouncing saying your username is not known.

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2002-11-11 04:21:09 UTC
State Changed
From-To: open->feedback

I was just about to commit this, but you didn't really mention what bug this 
fixes.  Can you provide more details on the mailing list bug that this fixes? 
Thanks.
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2002-11-11 19:53:15 UTC
State Changed
From-To: feedback->closed

Committed, thanks!