diff options
author | Antonio Hernández Blas <hba.nihilismus@gmail.com> | 2010-05-12 18:40:14 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-16 22:24:28 -0500 |
commit | 19a7809b7aeabefeb78fd57fe0e9185c5a03856f (patch) | |
tree | 0d6342c61a53470e797e925c86b63c0aa80266eb | |
parent | 83d737b7f9b497acec23ef54af585e33f9102d97 (diff) |
development/xdebug: Added (PHP extension for debugging PHP scripts).
-rw-r--r-- | development/xdebug/README | 18 | ||||
-rw-r--r-- | development/xdebug/slack-desc | 19 | ||||
-rwxr-xr-x | development/xdebug/xdebug.SlackBuild | 119 | ||||
-rw-r--r-- | development/xdebug/xdebug.info | 10 |
4 files changed, 166 insertions, 0 deletions
diff --git a/development/xdebug/README b/development/xdebug/README new file mode 100644 index 000000000000..5ee9c66fadc8 --- /dev/null +++ b/development/xdebug/README @@ -0,0 +1,18 @@ +Xdebug (A PHP extension for debugging PHP scripts) + +The Xdebug extension helps you debugging your script by providing a lot of +valuable debug information. The debug information that Xdebug can provide +includes the following: stack traces and function traces in error messages, +memory allocation and protection for infinite recursions. Xdebug also +provides profiling information for PHP, scripts, code coverage analysis and +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" + +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 +in a browser and look for the info on the xdebug module. If you see it, +you have been successful!" diff --git a/development/xdebug/slack-desc b/development/xdebug/slack-desc new file mode 100644 index 000000000000..c77bc9a4aff0 --- /dev/null +++ b/development/xdebug/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +xdebug: Xdebug (A PHP extension for debuggin PHP scripts) +xdebug: +xdebug: The Xdebug extension helps you debugging your script by providing a +xdebug: lot of valuable debug information. The debug information that Xdebug +xdebug: can provide includes the following: stack traces and function traces +xdebug: in error messages, memory allocation and protection for infinite +xdebug: recursions. Xdebug also provides profiling information for PHP, +xdebug: scripts, code coverage analysis and capabilities to debug PHP scripts +xdebug: interactively with a debug client. +xdebug: +xdebug: Homepage: http://xdebug.org diff --git a/development/xdebug/xdebug.SlackBuild b/development/xdebug/xdebug.SlackBuild new file mode 100755 index 000000000000..d273d081f9de --- /dev/null +++ b/development/xdebug/xdebug.SlackBuild @@ -0,0 +1,119 @@ +#!/bin/sh + +# Slackware build script for xdebug + +# Copyright (c) 2010, Antonio Hernández Blas <hba.nihilismus@gmail.com> +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1.- Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=xdebug +VERSION=${VERSION:-2.0.5} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tgz +cd $PRGNAM-$VERSION + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Prepare a PHP extension for compiling +/usr/bin/phpize + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux \ + --enable-xdebug + +# Build xdebug +make + +# Build and install debugclient +( set -e + cd debugclient + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION/debugclient \ + --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 + +# 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 + +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 +cp -a CREDITS Changelog LICENSE NEWS README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +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 new file mode 100644 index 000000000000..5d44b64746fd --- /dev/null +++ b/development/xdebug/xdebug.info @@ -0,0 +1,10 @@ +PRGNAM="xdebug" +VERSION="2.0.5" +HOMEPAGE="http://xdebug.org" +DOWNLOAD="http://xdebug.org/files/xdebug-2.0.5.tgz" +MD5SUM="2d87dab7b6c499a80f0961af602d030c" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Antonio Hernández Blas" +EMAIL="hba.nihilismus@gmail.com" +APPROVED="rworkman" |