From bcf627f4735f6a6f291688913165b8f7251d4865 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 9 Nov 2013 14:59:21 +0200 Subject: [PATCH] fix syntax error; lint files --- paths.patch | 2 +- php-phpmailer.spec | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/paths.patch b/paths.patch index 80e00b5..2216acb 100644 --- a/paths.patch +++ b/paths.patch @@ -14,7 +14,7 @@ * @access public */ - public function setLanguage($langcode = 'en', $lang_path = 'language/') -+ public function setLanguage($langcode = 'en', $lang_path = '/usr/share/php/phpmailer/language/') { ++ public function setLanguage($langcode = 'en', $lang_path = '/usr/share/php/phpmailer/language/') { //Define full set of translatable strings $PHPMAILER_LANG = array( diff --git a/php-phpmailer.spec b/php-phpmailer.spec index de6ac6a..af75c26 100644 --- a/php-phpmailer.spec +++ b/php-phpmailer.spec @@ -11,7 +11,10 @@ Group: Development/Languages/PHP Source0: https://github.com/PHPMailer/PHPMailer/archive/v%{version}/%{pkgname}-%{version}.tar.gz # Source0-md5: b07621694679cd625af3f53771502677 Patch0: paths.patch +Patch1: https://github.com/glensc/PHPMailer/commit/f302f1d497469d81b13797b6f2fb986b729928f3.patch +# Patch1-md5: cfe92497baf90bcceb1ecc84c71b1f36 URL: https://github.com/PHPMailer/PHPMailer +%{?with_tests:BuildRequires: %{php_name}-cli} BuildRequires: php-pear-PhpDocumentor BuildRequires: rpm-php-pearprov >= 4.4.2-11 BuildRequires: rpmbuild(macros) >= 1.663 @@ -64,8 +67,14 @@ Dokumentacja do %{name}. %prep %setup -q -n PHPMailer-%{version}%{?subver:-%{subver}} %patch0 -p1 +%patch1 -p1 %build +# syntax lint +for a in $(find -name '*.php' -o -name '*.inc'); do + php -n -l $a +done + phpdoc --title 'PHPMailer version %{version}' --target phpdoc --defaultpackagename PHPMailer -f 'class.*.php' # nuke smarty cache rm -rf phpdoc/???????????????????????????????? -- 2.44.0