From: Michael Wallner Date: Wed, 30 Sep 2015 09:02:38 +0000 (+0200) Subject: update X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=8d5467b5d250ad94e7677a763abf1bbd8535fcae;p=m6w6%2Frepo-template update --- diff --git a/.editorconfig b/.editorconfig index 84c9933..9b444ae 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,3 +14,10 @@ trim_trailing_whitespace = false [*.json] indent_style = space indent_size = 4 + +[package.xml] +indent_style = space +indent_size = 1 + +[config.w32] +end_of_line = crlf diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..58415df --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +presets/config.w32 eol=crlf diff --git a/init b/init index f172675..cbf6dc0 100755 --- a/init +++ b/init @@ -15,6 +15,7 @@ do SRCFILE=$(dirname -- $0)/presets/$FILE case $FILE in .|..) + echo $FILE continue ;; composer.json) @@ -22,7 +23,7 @@ do 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 @@ -38,8 +39,7 @@ do 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 diff --git a/presets/.editorconfig b/presets/.editorconfig index 84c9933..9b444ae 100644 --- a/presets/.editorconfig +++ b/presets/.editorconfig @@ -14,3 +14,10 @@ trim_trailing_whitespace = false [*.json] indent_style = space indent_size = 4 + +[package.xml] +indent_style = space +indent_size = 1 + +[config.w32] +end_of_line = crlf diff --git a/presets/BUGS b/presets/BUGS new file mode 100644 index 0000000..75711d2 --- /dev/null +++ b/presets/BUGS @@ -0,0 +1 @@ +Yay, now known and unresolved issues yet! diff --git a/presets/Makefile.frag b/presets/Makefile.frag new file mode 100644 index 0000000..c5ba809 --- /dev/null +++ b/presets/Makefile.frag @@ -0,0 +1,17 @@ + +# provide headers in builddir, so they do not end up in /usr/include/ext//src + +PHP__HEADERS := $(addprefix $(PHP__BUILDDIR)/,$(PHP__HEADERS)) + +$(PHP__BUILDDIR)/%.h: $(PHP__SRCDIR)/src/%.h + @cat >$@ <$< + +all: -build-headers +clean: -clean-headers + +.PHONY: -build-headers +-build-headers: $(PHP__HEADERS) + +.PHONY: -clean-headers +-clean-headers: + -rm -f $(PHP__HEADERS) diff --git a/presets/TODO b/presets/TODO new file mode 100644 index 0000000..e69de29 diff --git a/presets/config.m4 b/presets/config.m4 new file mode 100644 index 0000000..f608ae1 --- /dev/null +++ b/presets/config.m4 @@ -0,0 +1,25 @@ + +PHP_ARG_ENABLE(, whether to enable support, +[ --enable- Enable support]) + +if test "$PHP_" != "no"; then + PHP__SRCDIR=PHP_EXT_SRCDIR() + PHP__BUILDDIR=PHP_EXT_BUILDDIR() + + PHP_ADD_INCLUDE($PHP__SRCDIR/src) + PHP_ADD_BUILD_DIR($PHP__BUILDDIR/src) + + PHP__HEADERS=`(cd $PHP__SRCDIR/src && echo *.h)` + PHP__SOURCES=`(cd $PHP__SRCDIR && echo src/*.c)` + + PHP_NEW_EXTENSION(, $PHP__SOURCES, $ext_shared) + PHP_INSTALL_HEADERS(ext/, php_.h $PHP__HEADERS) + + PHP_SUBST(PHP__HEADERS) + PHP_SUBST(PHP__SOURCES) + + PHP_SUBST(PHP__SRCDIR) + PHP_SUBST(PHP__BUILDDIR) + + PHP_ADD_MAKEFILE_FRAGMENT +fi diff --git a/presets/config.w32 b/presets/config.w32 new file mode 100644 index 0000000..b361abf --- /dev/null +++ b/presets/config.w32 @@ -0,0 +1,16 @@ + +ARG_ENABLE("", "for support", "no"); + +if (PHP_ == "yes") { + var PHP__HEADERS=glob("src/*.h"), PHP__SOURCES=glob("src/*.c"); + + EXTENSION("", PHP__SOURCES); + PHP_INSTALL_HEADERS("ext/", "php_propro.h"); + for (var i=0; i_HEADERS.length; ++i) { + var basename = FSO.GetFileName(PHP__HEADERS[i]); + copy_and_subst(PHP__HEADERS[i], basename, []); + PHP_INSTALL_HEADERS("ext/", basename); + } + + AC_DEFINE("HAVE_", 1); +}