From b4bb23f5c0e747e03c992c1409a5b533f2294b52 Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Mon, 21 Mar 2011 17:17:42 +0100 Subject: development/xdebug: New maintainer and updated for version 2.1.0 Signed-off-by: Heinz Wiesinger --- development/xdebug/README | 4 ++-- development/xdebug/doinst.sh | 15 +++++++++++++ development/xdebug/xdebug.SlackBuild | 34 +++++++++++++++------------- development/xdebug/xdebug.info | 10 ++++----- development/xdebug/xdebug.ini | 43 ++++++++++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 22 deletions(-) create mode 100644 development/xdebug/doinst.sh create mode 100644 development/xdebug/xdebug.ini (limited to 'development/xdebug') diff --git a/development/xdebug/README b/development/xdebug/README index 5ee9c66fad..f8cb67bcce 100644 --- a/development/xdebug/README +++ b/development/xdebug/README @@ -9,8 +9,8 @@ capabilities to debug PHP scripts interactively with a debug client. This requires libedit. -Once you install xdebug, add the following line to php.ini: - zend_extension = "/usr/lib/php/extensions/xdebug.so" +Once you've installed xdebug, uncomment the following line in /etc/php/xdebug.ini: +; zend_extension = "/usr/lib/php/extensions/xdebug.so" Restart your webserver if you're using php with it, and as a recomendation from xdebug's README: "Write a PHP page that calls "phpinfo();" Load it diff --git a/development/xdebug/doinst.sh b/development/xdebug/doinst.sh new file mode 100644 index 0000000000..ad09d3466f --- /dev/null +++ b/development/xdebug/doinst.sh @@ -0,0 +1,15 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD|md5sum)" = "$(cat $NEW|md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/php/xdebug.ini.new + diff --git a/development/xdebug/xdebug.SlackBuild b/development/xdebug/xdebug.SlackBuild index 034ba6c893..5be925b0af 100644 --- a/development/xdebug/xdebug.SlackBuild +++ b/development/xdebug/xdebug.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for xdebug # Copyright (c) 2010, Antonio Hernández Blas +# Copyright 2011 Heinz Wiesinger, Amsterdam, The Netherlands # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -22,16 +23,14 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=xdebug -VERSION=${VERSION:-2.0.5} +VERSION=${VERSION:-2.1.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -83,15 +82,22 @@ CXXFLAGS="$SLKCFLAGS" \ --localstatedir=/var \ --mandir=/usr/man \ --docdir=/usr/doc/$PRGNAM-$VERSION \ + --with-php-config=/usr/bin/php-config \ --build=$ARCH-slackware-linux \ --enable-xdebug # Build xdebug make +# Prepare for installation +EXTENSION_DIR="$PKG/$(/usr/bin/php-config --extension-dir)" +mkdir -p $EXTENSION_DIR + +# Install xdebug +make install DESTDIR=$PKG EXTENSION_DIR=$EXTENSION_DIR + # Build and install debugclient -( set -e - cd debugclient +cd debugclient CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -104,28 +110,26 @@ make --build=$ARCH-slackware-linux \ --with-libedit make - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/debugclient - cp -a INSTALL LICENSE $PKG/usr/doc/$PRGNAM-$VERSION/debugclient make install DESTDIR=$PKG -) || exit 1 +cd - -# Prepare for installation -EXTENSION_DIR=$PKG/$(/usr/bin/php-config --extension-dir) -mkdir -p $EXTENSION_DIR - -# Install xdebug -make install DESTDIR=$PKG EXTENSION_DIR=$EXTENSION_DIR +mkdir -p $PKG/etc/php +install -m 644 $CWD/xdebug.ini $PKG/etc/php/xdebug.ini.new +sed -i "s/LIBDIR/lib$LIBDIRSUFFIX/g" $PKG/etc/php/xdebug.ini.new find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/debugclient cp -a CREDITS Changelog LICENSE NEWS README \ $PKG/usr/doc/$PRGNAM-$VERSION +cp -a debugclient/INSTALL debugclient/LICENSE \ + $PKG/usr/doc/$PRGNAM-$VERSION/debugclient cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/xdebug/xdebug.info b/development/xdebug/xdebug.info index 5d44b64746..4ea66717bf 100644 --- a/development/xdebug/xdebug.info +++ b/development/xdebug/xdebug.info @@ -1,10 +1,10 @@ PRGNAM="xdebug" -VERSION="2.0.5" +VERSION="2.1.0" HOMEPAGE="http://xdebug.org" -DOWNLOAD="http://xdebug.org/files/xdebug-2.0.5.tgz" -MD5SUM="2d87dab7b6c499a80f0961af602d030c" +DOWNLOAD="http://xdebug.org/files/xdebug-2.1.0.tgz" +MD5SUM="2abf000f8d94af469773b31772aa96ab" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -MAINTAINER="Antonio Hernández Blas" -EMAIL="hba.nihilismus@gmail.com" +MAINTAINER="Heinz Wiesinger" +EMAIL="pprkut@liwjatan.at" APPROVED="rworkman" diff --git a/development/xdebug/xdebug.ini b/development/xdebug/xdebug.ini new file mode 100644 index 0000000000..3656277cbe --- /dev/null +++ b/development/xdebug/xdebug.ini @@ -0,0 +1,43 @@ +; Enable xdebug extension module +;zend_extension="/usr/LIBDIR/php/extensions/xdebug.so" + +; Enable xdebug +;xdebug.default_enable=On + +; Enable "fancy" output and also a bit of performance drawback. +; DISABLE on serious profiling +;xdebug.extended_info=Off + +; Enable the remote client +;xdebug.remote_enable=Off + +; Connect to debugclient only on error +;xdebug.remote_mode="jit" + +; Enable the profiler +;xdebug.profiler_enable=On + +; Enable the GET/POST trigger for the Profiler +;xdebug.profiler_enable_trigger=On + +; Define directory for storing profiler output +;xdebug.profiler_output_dir="/var/log/xdebug" + +; Filename of generated profiler files +;xdebug.profiler_output_name="cachegrind.out.%R" + +; collect full variable content for function parameters +;xdebug.collect_params="3" + +; collect return values of functions +;xdebug.collect_return=On + +; Define directory for storing trace output +;xdebug.trace_output_dir="/var/log/xdebug" + +; Filename of generated trace files +;xdebug.trace_output_name="trace.%R" + +; show memory usage differences between function calls +;xdebug.show_mem_delta=On + -- cgit v1.2.3