Hi,

The diff below fixes graphics/hugin linking problems.

This message put me on the right track:

http://marc.info/?l=openbsd-misc&m=125552372620228

So credits for this really go to naddy@.

In the end, it seems this is more a binutils problem than a PIE
problem or, at least, a binutils bug exposed by PIE...

A question: should I bump shared libs version numbers for x11/wxWidgets?

Ciao,
David

P.S.: I've added a "-DCMAKE_BUILD_TYPE:STRING=Release" to zap a
bogus "-g" that was being passed to cflags.

Index: graphics/hugin/Makefile
===================================================================
RCS file: /cvs/ports/graphics/hugin/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- graphics/hugin/Makefile     5 Nov 2012 11:15:11 -0000       1.29
+++ graphics/hugin/Makefile     5 Nov 2012 19:13:35 -0000
@@ -1,11 +1,5 @@
 # $OpenBSD: Makefile,v 1.29 2012/11/05 11:15:11 sthen Exp $
 
-# can't build with PIE, can't build either hugin or wxWidgets with
-# CFLAGS+=-fno-pie LDFLAGS+=-nopie
-.for i in alpha amd64 hppa mips64 mips64el sh sparc64
-BROKEN-$i =            hugin or possibly wxWidgets is broken with PIE
-.endfor
-
 VMEM_WARNING =         Yes
 SHARED_ONLY =          Yes
 
@@ -13,6 +7,7 @@ COMMENT =              panorama image stitcher
 
 DISTNAME =             hugin-2011.4.0
 EXTRACT_SUFX =         .tar.bz2
+REVISION =             0
 
 TAR =                  ${LOCALBASE}/bin/gtar
 BUILD_DEPENDS +=       archivers/gtar
@@ -65,7 +60,7 @@ LIB_DEPENDS =         devel/boost \
                        graphics/openexr \
                        graphics/png \
                        graphics/tiff \
-                       x11/wxWidgets>=2.7
+                       x11/wxWidgets>=2.8.12p7
 BUILD_DEPENDS +=       devel/tclap
 
 USE_GROFF =            Yes
@@ -73,8 +68,9 @@ MODULES +=            devel/cmake
 SEPARATE_BUILD =       Yes
 CONFIGURE_STYLE =      cmake
 CONFIGURE_ENV =                MANDIR=man
+CONFIGURE_ARGS +=      -DCMAKE_BUILD_TYPE:STRING=Release
 NO_REGRESS =           Yes
-CFLAGS +=              -pthread -fno-pie -fPIC
+CFLAGS +=              -pthread
 LDFLAGS +=             -L${X11BASE}/lib
 
 pre-patch:
Index: x11/wxWidgets/Makefile
===================================================================
RCS file: /cvs/ports/x11/wxWidgets/Makefile,v
retrieving revision 1.42
diff -u -p -r1.42 Makefile
--- x11/wxWidgets/Makefile      6 Sep 2012 12:38:35 -0000       1.42
+++ x11/wxWidgets/Makefile      5 Nov 2012 19:14:51 -0000
@@ -9,8 +9,8 @@ V =             2.8.12
 DISTNAME =     wxWidgets-${V}
 PKGNAME-main = wxWidgets-gtk2-${V}
 PKGNAME-media =        wxWidgets-media-${V}
-REVISION-main =        6
-REVISION-media =2
+REVISION-main =        7
+REVISION-media =3
 CATEGORIES =   x11
 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=wxwindows/}
 
@@ -94,6 +94,10 @@ CONFIGURE_ARGS =--disable-backtrace \
 CONFIGURE_ENV =        CPPFLAGS="-I${LOCALBASE}/include 
-I${LOCALBASE}/include/libpng -I${X11BASE}/include" \
                LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
                ac_cv_lib_esd_esd_close=no
+
+# XXX: symbol versioning triggers weird linking problems in dependent
+# ports.
+CONFIGURE_ENV += wx_cv_version_script=no
 
 .ifdef DEBUG
 CONFIGURE_ARGS += --enable-debug

Reply via email to