[*.json]
indent_style = space
indent_size = 4
+
+[package.xml]
+indent_style = space
+indent_size = 1
+
+[config.w32]
+end_of_line = crlf
--- /dev/null
+presets/config.w32 eol=crlf
SRCFILE=$(dirname -- $0)/presets/$FILE
case $FILE in
.|..)
+ echo $FILE
continue
;;
composer.json)
SRCFILE=$(mktemp)
php -d variables_order=E $(dirname -- $0)/presets/composer.json >$SRCFILE
;;
- package.xml|CREDITS)
+ package.xml|CREDITS|config.*|Makefile.frag)
test "${PECL+set}" = "" && continue
SRCFILE=$(mktemp)
php -d variables_order=E $(dirname -- $0)/presets/$FILE >$SRCFILE
if test -e $FILE
then
DIFF="diff -udbBE -- $SRCFILE $FILE"
- # ignore changes with only additions or removals
- if ! $DIFF | awk '{if(NR<4){next}}/^-/{if(p){exit 1}m++}/^\+/{if(m){exit 1}p++}'
+ if ! $DIFF >/dev/null
then
while read -n 1 -p "File $FILE exists and differs (q,s,r,d,v,?) " ACTION
do
[*.json]
indent_style = space
indent_size = 4
+
+[package.xml]
+indent_style = space
+indent_size = 1
+
+[config.w32]
+end_of_line = crlf
--- /dev/null
+Yay, now known and unresolved issues yet!
--- /dev/null
+<?php extract($_ENV) ?>
+# provide headers in builddir, so they do not end up in /usr/include/ext/<?=$PECL?>/src
+
+PHP_<?=strtoupper($PECL)?>_HEADERS := $(addprefix $(PHP_<?=strtoupper($PECL)?>_BUILDDIR)/,$(PHP_<?=strtoupper($PECL)?>_HEADERS))
+
+$(PHP_<?=strtoupper($PECL)?>_BUILDDIR)/%.h: $(PHP_<?=strtoupper($PECL)?>_SRCDIR)/src/%.h
+ @cat >$@ <$<
+
+all: <?=$PECL?>-build-headers
+clean: <?=$PECL?>-clean-headers
+
+.PHONY: <?=$PECL?>-build-headers
+<?=$PECL?>-build-headers: $(PHP_<?=strtoupper($PECL)?>_HEADERS)
+
+.PHONY: <?=$PECL?>-clean-headers
+<?=$PECL?>-clean-headers:
+ -rm -f $(PHP_<?=strtoupper($PECL)?>_HEADERS)
--- /dev/null
+<?php extract($_ENV) ?>
+PHP_ARG_ENABLE(<?=$PECL?>, whether to enable <?=$PECL?> support,
+[ --enable-<?=$PECL?> Enable <?=$PECL?> support])
+
+if test "$PHP_<?=strtoupper($PECL)?>" != "no"; then
+ PHP_<?=strtoupper($PECL)?>_SRCDIR=PHP_EXT_SRCDIR(<?=$PECL?>)
+ PHP_<?=strtoupper($PECL)?>_BUILDDIR=PHP_EXT_BUILDDIR(<?=$PECL?>)
+
+ PHP_ADD_INCLUDE($PHP_<?=strtoupper($PECL)?>_SRCDIR/src)
+ PHP_ADD_BUILD_DIR($PHP_<?=strtoupper($PECL)?>_BUILDDIR/src)
+
+ PHP_<?=strtoupper($PECL)?>_HEADERS=`(cd $PHP_<?=strtoupper($PECL)?>_SRCDIR/src && echo *.h)`
+ PHP_<?=strtoupper($PECL)?>_SOURCES=`(cd $PHP_<?=strtoupper($PECL)?>_SRCDIR && echo src/*.c)`
+
+ PHP_NEW_EXTENSION(<?=$PECL?>, $PHP_<?=strtoupper($PECL)?>_SOURCES, $ext_shared)
+ PHP_INSTALL_HEADERS(ext/<?=$PECL?>, php_<?=$PECL?>.h $PHP_<?=strtoupper($PECL)?>_HEADERS)
+
+ PHP_SUBST(PHP_<?=strtoupper($PECL)?>_HEADERS)
+ PHP_SUBST(PHP_<?=strtoupper($PECL)?>_SOURCES)
+
+ PHP_SUBST(PHP_<?=strtoupper($PECL)?>_SRCDIR)
+ PHP_SUBST(PHP_<?=strtoupper($PECL)?>_BUILDDIR)
+
+ PHP_ADD_MAKEFILE_FRAGMENT
+fi
--- /dev/null
+<?php extract($_ENV) ?>\r
+ARG_ENABLE("<?=$PECL?>", "for <?=$PECL?> support", "no");\r
+\r
+if (PHP_<?=strtoupper($PECL)?> == "yes") {\r
+ var PHP_<?=strtoupper($PECL)?>_HEADERS=glob("src/*.h"), PHP_<?=strtoupper($PECL)?>_SOURCES=glob("src/*.c");\r
+\r
+ EXTENSION("<?=$PECL?>", PHP_<?=strtoupper($PECL)?>_SOURCES);\r
+ PHP_INSTALL_HEADERS("ext/<?=$PECL?>", "php_propro.h");\r
+ for (var i=0; i<PHP_<?=strtoupper($PECL)?>_HEADERS.length; ++i) {\r
+ var basename = FSO.GetFileName(PHP_<?=strtoupper($PECL)?>_HEADERS[i]);\r
+ copy_and_subst(PHP_<?=strtoupper($PECL)?>_HEADERS[i], basename, []);\r
+ PHP_INSTALL_HEADERS("ext/<?=$PECL?>", basename);\r
+ }\r
+\r
+ AC_DEFINE("HAVE_<?=strtoupper($PECL)?>", 1);\r
+}\r