On 10/30/2013 2:45 PM, Donovan Watteau wrote:
Hi,
x11/py-gtk2 is marked as BROKEN on alpha and mips64 (actually, it
should be marked as BROKEN on mips64el too) because ".got subsegment
exceeds 64K".
However, building the offending library with -mxgot lets it build
on mips64el. It looks like -mxgot makes it slower but, IHMO,
a) it's better to have a slower py-gtk2 than no py-gtk2, especially
as it's a common dependency, and b) these platforms are already
slow for most serious desktop usage anyway.
With this, Gimp builds and works on my loongson.
Woah. Cool! Got this built on my loongson.
One of the tests fails on loongson (I don't know what it looks like on
other archs) but I don't think that's a reason not to get this in.
ok for me if someone wants to commit.
~Brian
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/py-gtk2/Makefile,v
retrieving revision 1.57
diff -u -p -r1.57 Makefile
--- Makefile 16 Oct 2013 16:35:15 -0000 1.57
+++ Makefile 27 Oct 2013 21:00:42 -0000
@@ -2,7 +2,6 @@
SHARED_ONLY= Yes
BROKEN-alpha= .got subsegment exceeds 64K
-BROKEN-mips64= .got subsegment exceeds 64K
COMMENT= GTK+2 Python bindings
@@ -39,6 +38,10 @@ RUN_DEPENDS= graphics/py-cairo>=1.2 \
math/py-numpy
USE_GMAKE= No
+
+.if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
+PATCH_LIST= patch-* sup-mips64-*
+.endif
LIBTOOL_FLAGS+= --tag=disable-static
CONFIGURE_STYLE=gnu
Index: patches/sup-mips64-gtk_Makefile_in
===================================================================
RCS file: patches/sup-mips64-gtk_Makefile_in
diff -N patches/sup-mips64-gtk_Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/sup-mips64-gtk_Makefile_in 27 Oct 2013 21:00:42 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Work around "relocation truncated to fit: R_MIPS_CALL16" on mips64.
+
+--- gtk/Makefile.in.orig Fri Apr 1 12:41:04 2011
++++ gtk/Makefile.in Sun Oct 27 21:50:49 2013
+@@ -442,7 +442,7 @@ GTK_OVERRIDES = \
+ gtkwidget.override \
+ gtkwindow.override
+
+-_gtk_la_CFLAGS = $(PYCAIRO_CFLAGS) $(GTK_CFLAGS) $(am__append_33)
++_gtk_la_CFLAGS = $(PYCAIRO_CFLAGS) $(GTK_CFLAGS) -mxgot $(am__append_33)
+ _gtk_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gtk
+ _gtk_la_LIBADD = $(GTK_LIBS)
+ _gtk_la_SOURCES = \