1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

* Fix a crash in pygtk_generic_cell_renderer_get_size(). [1]

* Add an option to enable or disable pthread support.

PR:	45150
Submitted by:	Marc Recht <marc@informatik.uni-bremen.de>
Obtained from:	pygtk CVS [1]
This commit is contained in:
Joe Marcus Clarke 2002-11-11 19:50:48 +00:00
parent c71fcf8f8c
commit 156030da72
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=69922
3 changed files with 71 additions and 0 deletions

View File

@ -6,6 +6,7 @@
PORTNAME= gtk
PORTVERSION= 1.99.13
PORTREVISION= 1
CATEGORIES= x11-toolkits python
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/pygtk/1.99
@ -29,6 +30,19 @@ USE_LIBTOOL= yes
EG_SRC_DIR= ${WRKSRC}/examples
EG_DST_DIR= ${PREFIX}/share/examples/py-gtk
#
# Use the same way as the Python port to determine if we want
# threading support.
#
LIBC_R!= /sbin/ldconfig -r | grep c_r || true
.if (${LIBC_R} != "") && !defined(WITHOUT_THREADS)
CONFIGURE_ARGS+= --enable-thread
CFLAGS+= ${PTHREAD_CFLAGS}
CONFIGURE_ENV+= LDFLAGS="${PTHREAD_LIBS} ${LDFLAGS}"
.else
CONFIGURE_ARGS+= --disable-thread
.endif
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
pre-build:
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

View File

@ -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
;;
+ -pthread)
+ compile_command="$compile_command -pthread"
+ finalize_command="$finalize_command -pthread"
+ compiler_flags="$compiler_flags -pthread"
+ continue
+ ;;
+
-module)
module=yes
+ build_old_libs=no
continue
;;

View File

@ -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;
g_return_if_fail(PYGTK_IS_GENERIC_CELL_RENDERER (cell));
@@ -117,13 +118,26 @@
Py_DECREF(py_widget);
Py_DECREF(py_cell_area);
- if (!PyArg_ParseTuple(py_ret, "iiii", x_offset, y_offset, width, height)) {
+ 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 = my_x;
+
+ if (y_offset)
+ *y_offset = my_y;
+
+ if (width)
+ *width = my_width;
+
+ if (height)
+ *height = my_height;
/* success */
}