On Sat, Mar 03, 2012 at 08:25:17PM +1100, Jonathan Gray wrote:
> The configure script for sdl selects the wrong libraries to dlopen,
> ie it picked libX11.so.10.0 on a system with libX11.so.9 -> 15
>
> With the following diff sdl programs no longer segfault here.
This is great, just there is a typo with one entry. x11_libs vs x11_lib.
Here is an updated diff as well as re-adding the WANTLIB entries with a
comment so it is obvious why they were there in the first place.
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/devel/sdl/Makefile,v
retrieving revision 1.82
diff -u -p -r1.82 Makefile
--- Makefile 2 Mar 2012 09:10:38 -0000 1.82
+++ Makefile 3 Mar 2012 10:25:45 -0000
@@ -5,6 +5,7 @@ COMMENT= cross-platform multimedia libra
VERSION= 1.2.15
DISTNAME= SDL-${VERSION}
PKGNAME= ${DISTNAME:L}
+REVISION= 0
CATEGORIES= devel
MASTER_SITES= ${HOMEPAGE}release/
@@ -58,6 +59,11 @@ CONFIGURE_ARGS+= --enable-video-aalib
.if ${FLAVOR:L:Mno_x11}
CONFIGURE_ARGS+= --without-x \
--disable-video-x11
+.else
+#
+# X11/Xext/Xrender/Xrandr are dlopen'd by SDL
+#
+WANTLIB+= X11 Xau Xdmcp Xext Xrandr Xrender pthread-stubs xcb
.endif
NO_REGRESS= Yes
Index: patches/patch-configure
===================================================================
RCS file: /home/cvs/ports/devel/sdl/patches/patch-configure,v
retrieving revision 1.22
diff -u -p -r1.22 patch-configure
--- patches/patch-configure 2 Mar 2012 09:10:38 -0000 1.22
+++ patches/patch-configure 3 Mar 2012 10:22:30 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-configure,v 1.22 2012/03/02 09:10:38 dcoppa Exp $
--- configure.orig Thu Jan 19 01:30:12 2012
-+++ configure Wed Feb 22 13:39:54 2012
++++ configure Sat Mar 3 05:22:20 2012
@@ -21000,6 +21000,20 @@ _ACEOF
fi
}
@@ -22,7 +22,20 @@ $OpenBSD: patch-configure,v 1.22 2012/03
CheckPulseAudio()
{
# Check whether --enable-pulseaudio was given.
-@@ -29551,6 +29565,7 @@ _ACEOF
+@@ -24073,6 +24087,12 @@ fi
+ x11_lib='libX11.so'
+ x11ext_lib='libXext.so'
+ ;;
++ *-*-openbsd*)
++ x11_lib='libX11.so'
++ x11ext_lib='libXext.so'
++ xrender_lib='libXrender.so'
++ xrander_lib='libXrandr.so'
++ ;;
+ *)
+ x11_lib=`find_lib "libX11.so.*" "$X_LIBS
-L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
+ x11ext_lib=`find_lib "libXext.so.*" "$X_LIBS
-L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
+@@ -29551,6 +29571,7 @@ _ACEOF
CheckALSA
CheckARTSC
CheckESD
@@ -30,7 +43,7 @@ $OpenBSD: patch-configure,v 1.22 2012/03
CheckPulseAudio
CheckNAS
CheckX11
-@@ -29586,7 +29601,7 @@ _ACEOF
+@@ -29586,7 +29607,7 @@ _ACEOF
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
have_audio=yes
;;
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.