Revision: 361 http://trac.macosforge.org/projects/xquartz/changeset/361 Author: jeremyhu@freedesktop.org Date: 2009-07-26 11:50:07 -0700 (Sun, 26 Jul 2009) Log Message: ----------- Added a script to help users bisect to a working version Modified Paths: -------------- trunk/compile-xserver.sh Added Paths: ----------- trunk/find_version_delta.sh Modified: trunk/compile-xserver.sh =================================================================== --- trunk/compile-xserver.sh 2009-07-24 13:15:47 UTC (rev 360) +++ trunk/compile-xserver.sh 2009-07-26 18:50:07 UTC (rev 361) @@ -1,7 +1,7 @@ #!/bin/bash -CONFIGURE="./autogen.sh" -#CONFIGURE="./configure" +#CONFIGURE="./autogen.sh" +CONFIGURE="./configure" #CONFOPT="--disable-xquartz --disable-launchd --enable-kdrive --disable-xsdl --enable-xnest --enable-xvfb" #CONFOPT="--disable-glx" @@ -15,15 +15,28 @@ . ~/src/strip.sh -export ACLOCAL="aclocal -I /usr/X11/share/aclocal" +ACLOCAL="aclocal -I /usr/X11/share/aclocal" +CFLAGS="-Wall -pipe -DNO_ALLOCA" +CFLAGS="$CFLAGS -O0 -ggdb3" +#CFLAGS="$CFLAGS -O2" +CFLAGS="$CFLAGS -arch i386 -arch ppc" + +LDFLAGS="$CFLAGS" + +CPPFLAGS="$CPPFLAGS -F/Applications/Utilities/X11.app/Contents/Frameworks" +LDFLAGS="$LDFLAGS -F/Applications/Utilities/X11.app/Contents/Frameworks" + +export ACLOCAL CPPFLAGS CFLAGS LDFLAGS + + die() { echo "${@}" >&2 exit 1 } docomp() { - ${CONFIGURE} --prefix=/usr/X11 --with-mesa-source="${MESA}" ${CONFOPT} --disable-dependency-tracking --enable-maintainer-mode --enable-record "${@}" || die "Could not configure xserver" + ${CONFIGURE} --prefix=/usr/X11 --with-mesa-source="${MESA}" ${CONFOPT} --disable-dependency-tracking --enable-maintainer-mode --enable-xcsecurity --enable-record --enable-sparkle "${@}" || die "Could not configure xserver" ${MAKE} clean || die "Unable to make clean" ${MAKE} ${MAKE_OPTS} || die "Could not make xserver" } @@ -35,7 +48,7 @@ dosign() { /opt/local/bin/gmd5sum $1 > $1.md5sum /opt/local/bin/gsha1sum $1 > $1.sha1sum - /opt/local/bin/gpg2 -b $1 + /opt/local/bin/gpg -b $1 } dodist() { Added: trunk/find_version_delta.sh =================================================================== --- trunk/find_version_delta.sh (rev 0) +++ trunk/find_version_delta.sh 2009-07-26 18:50:07 UTC (rev 361) @@ -0,0 +1,54 @@ +#!/bin/bash + +install_version () { + local version=$1 + if [[ ! -f X11.bin-${version} ]] ; then + if [[ ! -f X11.bin-${version}.bz2 ]] ; then + curl -LO http://static.macosforge.org/xquartz/downloads/archive/X11.bin-${version}.bz2 || die "Failed to fetch version ${version}" + fi + bunzip2 X11.bin-${version}.bz2 || die "Failed to decompress version ${version}" + fi + chmod 755 X11.bin-${version} || die "Failed to chmod version ${version}" + cp X11.bin-${version} /Applications/Utilities/X11.app/Contents/MacOS/X11.bin || die "Failed to install version ${version}. This needs to be done as root (run 'sudo ./find_version_delta.sh')" +} + +die() { + echo "${@}" >&2 + exit 1 +} + +((LO=18)) +((HI=45)) + +TMPDIR=/tmp/test_x11 + +if ! [[ -d ${TMPDIR} ]] ; then + mkdir ${TMPDIR} || die "Could not make #{TMPDIR}" +fi + +cd ${TMPDIR} + +while (( HI - LO > 1 )) ; do + (( TRY = (LO + HI) / 2)) + version="1.4.2-apple${TRY}" + echo "Trying ${version}" + + install_version ${version} + + echo "Please quit X11.app and restart it." + ANSWER="" + while ! [[ ${ANSWER} == "y" || ${ANSWER} == "n" ]] ; do + echo -n "Is this version working (y/n)? " + read ANSWER + done + + # Assuming newer is broken + if [[ ${ANSWER} == "y" ]] ; then + (( LO=TRY )) + else + (( HI=TRY )) + fi +done + +echo "1.4.2-apple${LO} was the last to work" +echo "1.4.2-apple${HI} was the first to break" Property changes on: trunk/find_version_delta.sh ___________________________________________________________________ Added: svn:executable + *