Subject: [alpine-aports] [PATCH] Adding XDebug for PHP

From: Michael Venezia <[email-masked]>
Date: Tue, 01 Sep 2015 22:20:34 +0000

---
 main/php-xdebug/APKBUILD   | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 main/php-xdebug/xdebug.ini |  6 ++++++
 2 files changed, 58 insertions(+)
 create mode 100644 main/php-xdebug/APKBUILD
 create mode 100644 main/php-xdebug/xdebug.ini

diff --git a/main/php-xdebug/APKBUILD b/main/php-xdebug/APKBUILD
new file mode 100644
index 0000000..26759d3
--- /dev/null
+++ b/main/php-xdebug/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor:
+# Maintainer:
+pkgname=php-xdebug
+pkgver=2.3.2
+pkgrel=0
+pkgdesc="PHP debugging extension"
+url="http://www.xdebug.org/"
+arch="x86_64"
+license="GPL"
+depends="php"
+depends_dev=""
+makedepends="$depends_dev php-dev autoconf automake flex bison gawk"
+install=""
+subpackages=""
+source="http://www.xdebug.org/files/xdebug-$pkgver.tgz
+        xdebug.ini"
+
+_builddir="$srcdir"/xdebug-$pkgver
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	phpize --clean && phpize || return 1
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		|| return 1
+	make -j1 || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make -j1 install INSTALL_ROOT="$pkgdir" || return 1
+	install -Dm644 "$srcdir"/xdebug.ini \
+		"$pkgdir"/etc/php/conf.d/xdebug.ini || return 1
+}
+
+md5sums="647b862291fe900f40d25a80fcf50026  xdebug-2.3.2.tgz
+7b9d54f22e1da3f13d4085d5c36999c4  xdebug.ini"
+sha256sums="f875d0f8c4e96fa7c698a461a14faa6331694be231e2ddc4f3de0733322fc6d0  xdebug-2.3.2.tgz
+fa6a3f4c141961379c37fc5bf43ac3b984bbae7e6aa522392fa502fcb810f0f6  xdebug.ini"
+sha512sums="28f6018d8b6acc31ee990651357968bfabec3cba4de8943a193c4b2fcc12a09886b29ea7158470f7ed2c76858b46da309a9f4d3aaf71c373c71774f29ba3aa5f  xdebug-2.3.2.tgz
+c74442d8b41420aa787d686b60cf843e2f7cde9f169a5d43be1f6a9cfb76f083792130643008cc099d4301aa7f89f4a27a75071a08495924801efb3130e3b11b  xdebug.ini"
diff --git a/main/php-xdebug/xdebug.ini b/main/php-xdebug/xdebug.ini
new file mode 100644
index 0000000..9a5878d
--- /dev/null
+++ b/main/php-xdebug/xdebug.ini
@@ -0,0 +1,6 @@
+zend_extension=/usr/lib/php/modules/xdebug.so
+xdebug.remote_enable=on
+xdebug.remote_host=127.0.0.1
+xdebug.remote_port=9000
+xdebug.remote_handler=dbgp
+
-- 
2.4.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Sören Tempel <[email-masked]>
Date: Thu, 3 Sep 2015 11:05:01 +0200

>  main/php-xdebug/xdebug.ini |  6 ++++++

Again: This needs to be committed to testing/ not to main/. Besides the
commit message should be "testing/php-xdebug: new aport".

> +# Maintainer:

It would be kind of great if this package had a maintainer, don't you
want to maintain this package?

> +arch="x86_64"

This package should work on x86 and arm too. Please verify this and use
arch="all" if it is the case.

> +license="GPL"

According to the website <http://www.xdebug.org/license.php> xdebug is
licensed under a custom license and not under the GPL. Even if it is
licensed under the GPL then please specify the GPL version e.g. GPL3.

> +makedepends="$depends_dev php-dev autoconf automake flex bison gawk"

Please move php-dev from makedepends to depends_dev.

> +	phpize --clean && phpize || return 1

Why did you explicitly set the amount of makejobs to 1? If more than one
makejob can be used than please add a comment explaining why this is the
case.

> +		"$pkgdir"/etc/php/conf.d/xdebug.ini || return 1

Again: Why did you limit the amount of makejobs to 1?

Sören.

---

---

From: Natanael Copa <[email-masked]>
Date: Sat, 5 Sep 2015 14:04:03 +0200

Michael,

Thank you for your patches.

Do you think you could fix the mentioned issues below and then send a
v2 patch? Same with the feedback on the glog patch.

Please see
http://wiki.alpinelinux.org/wiki/Creating_patches#Resend_an_updated_patch

Thanks!

-nc

On Thu, 3 Sep 2015 11:05:01 +0200

---