commit 253bd29fbfd406efab618bb431505ac7c23d472b
Author: Elan Ruusamäe <[email protected]>
Date:   Fri Sep 4 12:39:36 2015 +0300

    fix syntax linting for various php versions

 php-phpmailer.spec | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/php-phpmailer.spec b/php-phpmailer.spec
index 451c3ef..4944cef 100644
--- a/php-phpmailer.spec
+++ b/php-phpmailer.spec
@@ -75,15 +75,29 @@ Dokumentacja do %{name}.
 %prep
 %setup -q -n PHPMailer-%{version}%{?subver:-%{subver}}
 
-%if "%{pld_release}" == "ac"
-# requires php5.3
-rm test/bootstrap.php
-%endif
-
 %build
 # syntax lint
-for a in $(find -name '*.php' -o -name '*.inc'); do
-       php -n -l $a
+for f in $(find -name '*.php' -o -name '*.inc'); do
+
+%if "%{php_major_version}.%{php_minor_version}" < "5.4"
+       case $(basename $f) in
+       class.oauth.php|get_oauth_token.php)
+               # needs php 5.4
+               continue
+       ;;
+       esac
+%endif
+
+%if "%{php_major_version}.%{php_minor_version}" < "5.3"
+       case $(basename $f) in
+       bootstrap.php|phpmailerTest.php)
+               # needs php 5.3
+               continue
+       ;;
+       esac
+%endif
+
+       %{__php} -n -l $f
 done
 
 %if %{with tests}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-phpmailer.git/commitdiff/db04397e96f185723f6031e444dd5d3b231cf47a

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to