[arch-commits] Commit in web-news/repos/community-any (5 files)

Sergej Pupykin spupykin at archlinux.org
Tue Feb 16 15:07:43 UTC 2016


    Date: Tuesday, February 16, 2016 @ 16:07:43
  Author: spupykin
Revision: 161846

archrelease: copy trunk to community-any

Added:
  web-news/repos/community-any/PKGBUILD
    (from rev 161845, web-news/trunk/PKGBUILD)
  web-news/repos/community-any/php7.patch
    (from rev 161845, web-news/trunk/php7.patch)
  web-news/repos/community-any/utf8.patch
    (from rev 161845, web-news/trunk/utf8.patch)
Deleted:
  web-news/repos/community-any/PKGBUILD
  web-news/repos/community-any/utf8.patch

------------+
 PKGBUILD   |   72 +++++++++++++++++++---------------
 php7.patch |   45 +++++++++++++++++++++
 utf8.patch |  124 +++++++++++++++++++++++++++++------------------------------
 3 files changed, 147 insertions(+), 94 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2016-02-16 15:07:31 UTC (rev 161845)
+++ PKGBUILD	2016-02-16 15:07:43 UTC (rev 161846)
@@ -1,32 +0,0 @@
-# $Id$
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-
-pkgname=web-news
-pkgver=1.6.4
-pkgrel=5
-pkgdesc="A PHP web-based NNTP client"
-arch=('any')
-url="http://sourceforge.net/projects/web-news"
-license=('GPL')
-depends=('php')
-backup=('etc/webapps/web-news/.htaccess'
-	'etc/webapps/web-news/webnews.cfg.php')
-source=(http://downloads.sourceforge.net/sourceforge/web-news/WebNews-$pkgver.tar.gz
-	utf8.patch)
-md5sums=('712ec4812bed52569ab83596dd2291a9'
-         '721064173f5b085c204b97c8bbe096e2')
-
-package() {
-  _instdir=$pkgdir/usr/share/webapps/web-news
-  mkdir -p ${_instdir} $pkgdir/etc/webapps/web-news
-  (cd $srcdir && patch -p1 <utf8.patch && rm -f utf8.patch)
-  cd ${_instdir}
-  rm -f $srcdir/WebNews-$pkgver.tar.gz
-  cp -ra $srcdir/* .
-
-  echo -e "deny from all\nAddDefaultCharset utf-8" >$pkgdir/etc/webapps/web-news/.htaccess
-  ln -s /etc/webapps/web-news/.htaccess .htaccess
-
-  mv config/webnews.cfg.php $pkgdir/etc/webapps/web-news/
-  ln -s /etc/webapps/web-news/webnews.cfg.php config/webnews.cfg.php
-}

Copied: web-news/repos/community-any/PKGBUILD (from rev 161845, web-news/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2016-02-16 15:07:43 UTC (rev 161846)
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+
+pkgname=web-news
+pkgver=1.6.4
+pkgrel=6
+pkgdesc="A PHP web-based NNTP client"
+arch=('any')
+url="http://sourceforge.net/projects/web-news"
+license=('GPL')
+depends=('php')
+backup=('etc/webapps/web-news/.htaccess'
+	'etc/webapps/web-news/webnews.cfg.php')
+source=(http://downloads.sourceforge.net/sourceforge/web-news/WebNews-$pkgver.tar.gz
+	utf8.patch
+	php7.patch)
+md5sums=('712ec4812bed52569ab83596dd2291a9'
+         '721064173f5b085c204b97c8bbe096e2'
+         '6908ee4cd9d5936507ff40f7bb18419b')
+
+prepare() {
+  cd $srcdir
+  patch -p1 <utf8.patch && rm -f utf8.patch
+  patch -p1 <php7.patch && rm -f php7.patch
+  find . -type f -name '*.orig' -exec rm -f {} \;
+}
+
+package() {
+  _instdir=$pkgdir/usr/share/webapps/web-news
+  mkdir -p ${_instdir} $pkgdir/etc/webapps/web-news
+  cd ${_instdir}
+  rm -f $srcdir/WebNews-$pkgver.tar.gz
+  cp -ra $srcdir/* .
+
+  echo -e "deny from all\nAddDefaultCharset utf-8" >$pkgdir/etc/webapps/web-news/.htaccess
+  ln -s /etc/webapps/web-news/.htaccess .htaccess
+
+  mv config/webnews.cfg.php $pkgdir/etc/webapps/web-news/
+  ln -s /etc/webapps/web-news/webnews.cfg.php config/webnews.cfg.php
+}

Copied: web-news/repos/community-any/php7.patch (from rev 161845, web-news/trunk/php7.patch)
===================================================================
--- php7.patch	                        (rev 0)
+++ php7.patch	2016-02-16 15:07:43 UTC (rev 161846)
@@ -0,0 +1,45 @@
+diff -wbBur src/webnews/MIME_Message.php src.my/webnews/MIME_Message.php
+--- src/webnews/MIME_Message.php	2004-09-20 15:58:04.000000000 +0400
++++ src.my/webnews/MIME_Message.php	2016-02-16 18:02:11.415650635 +0300
+@@ -64,7 +64,7 @@
+ 		function decode_header($headers) {
+ 			$header_want = "/^(From|Subject|Date|Newsgroups|References|Message-ID|Content-Type|Content-Transfer-Encoding|Content-Disposition|Content-ID): (.*$)/i";
+ 			
+-			$headers = split("\r\n", $headers);
++			$headers = explode("\r\n", $headers);
+ 
+ 			// Parse the header
+ 			for ($line_count = 0; $line_count < sizeof($headers);$line_count++) {
+@@ -88,7 +88,7 @@
+ 
+ 		// An article is a raw MIME message
+ 		function decode_article($article) {
+-			list($header, $body) = split("\r\n\r\n", $article, 2);
++			list($header, $body) = explode("\r\n\r\n", $article, 2);
+ 						
+ 			$header = $this->decode_header($header);
+ 
+diff -wbBur src/webnews/util.php src.my/webnews/util.php
+--- src/webnews/util.php	2006-03-28 21:59:23.000000000 +0400
++++ src.my/webnews/util.php	2016-02-16 18:02:11.415650635 +0300
+@@ -46,7 +46,10 @@
+ 			$str = $matches[1].quoted_printable_decode($str).$matches[3];
+ 		}
+ 		while (preg_match("/=\?.*\?b\?.*\?=/i", $str)) {
+-			$str = preg_replace("/(.*)=\?.*\?b\?(.*)\?=(.*)/ie", "'$1'.base64_decode('$2').'$3'", $str);
++			$str = preg_replace_callback("/(.*)=\?.*\?b\?(.*)\?=(.*)/i",
++				function ($matches) {
++					return $matches[1].base64_decode($matches[2]).$matches[3];
++				}, $str);
+ 		}
+ 
+ 		return $str;
+@@ -403,7 +406,7 @@
+ 						$ini[$section_name] = array();
+ 					}
+ 				} else if (strpos($buf, "=") !== FALSE) {
+-					list($key, $value) = split("=", $buf, 2);
++					list($key, $value) = explode("=", $buf, 2);
+ 					$value = preg_replace("/^(['|\"])?(.*?)(?(1)['|\"])$/", "\\2", trim($value));
+ 
+ 					if ((strlen($key) != 0) && (strlen($value) != 0)) {					

Deleted: utf8.patch
===================================================================
--- utf8.patch	2016-02-16 15:07:31 UTC (rev 161845)
+++ utf8.patch	2016-02-16 15:07:43 UTC (rev 161846)
@@ -1,62 +0,0 @@
-diff -wbBur web-news/webnews/nntp.php Web-News/webnews/nntp.php
---- web-news/webnews/nntp.php	2006-03-28 20:31:41.000000000 +0400
-+++ Web-News/webnews/nntp.php	2011-07-04 14:04:36.000000000 +0400
-@@ -468,7 +468,7 @@
- 						$boundary = "--".$boundary;
- 					} else {
- 						$boundary = "";
--						$send_message .= "Content-Type: text/plain\r\n";
-+						$send_message .= "Content-Type: text/plain; charset=UTF-8;\r\n";
- 					}
- 
- 					if ($references && (strlen($references) != 0)) {
-diff -wbBur web-news/webnews/rss.php Web-News/webnews/rss.php
---- web-news/webnews/rss.php	2006-03-27 18:27:29.000000000 +0400
-+++ Web-News/webnews/rss.php	2011-07-04 13:42:22.000000000 +0400
-@@ -38,7 +38,7 @@
- 
- 	ob_clean();
- 	header("Content-Type: application/xml");
--	echo '<?xml version="1.0" encoding="ISO-8859-1" ?>'."\n";
-+	echo '<?xml version="1.0" encoding="UTF-8" ?>'."\n";
- ?>
- <rss version="2.0">
- 	<channel>
-diff -wbBur web-news/webnews/util.php Web-News/webnews/util.php
---- web-news/webnews/util.php	2006-03-28 20:40:21.000000000 +0400
-+++ Web-News/webnews/util.php	2011-07-04 14:02:57.000000000 +0400
-@@ -54,24 +54,7 @@
- 	
- 	
- 	function encode_MIME_header($str) {
--		if (is_non_ASCII($str)) {
--			$result = "=?ISO-8859-1?Q?";
--			for ($i = 0;$i < strlen($str);$i++) {
--				$ascii = ord($str{$i});
--				if ($ascii == 0x20) {	// Space
--					$result .= "_";
--				} else if (($ascii == 0x3D) || ($ascii == 0x3F) || ($ascii == 0x5F) || ($ascii > 0x7F)) {	// =, ?, _, 8 bit
--					$result .= "=".dechex($ascii);
--				} else {
--					$result .= $str{$i};
--				}
--			}
--			$result .= "?=";
--		} else {
--			$result = $str;
--		}
--		
--		return $result;
-+		return "=?UTF-8?B?".base64_encode($str)."?=";
- 	}
- 	
- 	
-@@ -212,7 +195,7 @@
- 			$counter = 0;
- 			$message_body .= "This is a multi-part message in MIME format\r\n";
- 			$message_body .= $boundary."\r\n";
--			$message_body .= "Content-Type: text/plain\r\n";
-+			$message_body .= "Content-Type: text/plain; charset=UTF-8;\r\n";
- 			$message_body .= "\r\n";
- 			$message_body .= $message;
- 			$message_body .= "\r\n\r\n";

Copied: web-news/repos/community-any/utf8.patch (from rev 161845, web-news/trunk/utf8.patch)
===================================================================
--- utf8.patch	                        (rev 0)
+++ utf8.patch	2016-02-16 15:07:43 UTC (rev 161846)
@@ -0,0 +1,62 @@
+diff -wbBur web-news/webnews/nntp.php Web-News/webnews/nntp.php
+--- web-news/webnews/nntp.php	2006-03-28 20:31:41.000000000 +0400
++++ Web-News/webnews/nntp.php	2011-07-04 14:04:36.000000000 +0400
+@@ -468,7 +468,7 @@
+ 						$boundary = "--".$boundary;
+ 					} else {
+ 						$boundary = "";
+-						$send_message .= "Content-Type: text/plain\r\n";
++						$send_message .= "Content-Type: text/plain; charset=UTF-8;\r\n";
+ 					}
+ 
+ 					if ($references && (strlen($references) != 0)) {
+diff -wbBur web-news/webnews/rss.php Web-News/webnews/rss.php
+--- web-news/webnews/rss.php	2006-03-27 18:27:29.000000000 +0400
++++ Web-News/webnews/rss.php	2011-07-04 13:42:22.000000000 +0400
+@@ -38,7 +38,7 @@
+ 
+ 	ob_clean();
+ 	header("Content-Type: application/xml");
+-	echo '<?xml version="1.0" encoding="ISO-8859-1" ?>'."\n";
++	echo '<?xml version="1.0" encoding="UTF-8" ?>'."\n";
+ ?>
+ <rss version="2.0">
+ 	<channel>
+diff -wbBur web-news/webnews/util.php Web-News/webnews/util.php
+--- web-news/webnews/util.php	2006-03-28 20:40:21.000000000 +0400
++++ Web-News/webnews/util.php	2011-07-04 14:02:57.000000000 +0400
+@@ -54,24 +54,7 @@
+ 	
+ 	
+ 	function encode_MIME_header($str) {
+-		if (is_non_ASCII($str)) {
+-			$result = "=?ISO-8859-1?Q?";
+-			for ($i = 0;$i < strlen($str);$i++) {
+-				$ascii = ord($str{$i});
+-				if ($ascii == 0x20) {	// Space
+-					$result .= "_";
+-				} else if (($ascii == 0x3D) || ($ascii == 0x3F) || ($ascii == 0x5F) || ($ascii > 0x7F)) {	// =, ?, _, 8 bit
+-					$result .= "=".dechex($ascii);
+-				} else {
+-					$result .= $str{$i};
+-				}
+-			}
+-			$result .= "?=";
+-		} else {
+-			$result = $str;
+-		}
+-		
+-		return $result;
++		return "=?UTF-8?B?".base64_encode($str)."?=";
+ 	}
+ 	
+ 	
+@@ -212,7 +195,7 @@
+ 			$counter = 0;
+ 			$message_body .= "This is a multi-part message in MIME format\r\n";
+ 			$message_body .= $boundary."\r\n";
+-			$message_body .= "Content-Type: text/plain\r\n";
++			$message_body .= "Content-Type: text/plain; charset=UTF-8;\r\n";
+ 			$message_body .= "\r\n";
+ 			$message_body .= $message;
+ 			$message_body .= "\r\n\r\n";



More information about the arch-commits mailing list