Re: NEW: graphics/pdfsandwich

2017-01-21 Thread Jiri B
On Fri, Jan 20, 2017 at 07:19:13PM +0100, Ingo Feinerer wrote:
> Hi,
> 
> please find attached a port for pdfsandwich,
> a tool to make "sandwich" OCR pdf files.
> 
> $ cat pkg/DESCR
> pdfsandwich generates "sandwich" OCR pdf files, i.e. pdf files which contain
> only images (no text) will be processed by optical character recognition (OCR)
> and the text will be added to each page invisibly "behind" the images.
> 
> pdfsandwich is a command line tool which is supposed to be useful to OCR
> scanned books or journals. It is able to recognize the page layout even for
> multicolumn text.
> 
> OK to import?
> 
> Best regards,
> Ingo

Hi,

I haven't tested pdfsandwich but I have WIP port for ocrmypdf, at least
python is more readable for me than ocalm :)

https://github.com/jbarlow83/OCRmyPDF

j.





Re: update: www/privoxy

2017-01-21 Thread Daniel Jakots
On Fri, 20 Jan 2017 18:06:33 +0100, Sebastien Marie 
wrote:

> Hi,
> 
> Someone told me that privoxy could be updated to 3.0.26. So here an
> update :)

Thanks, committed!

> See http://www.privoxy.org/announce.txt for changelog.
> 
> Please note that I didn't deeply checked the new version, but only
> ensuring the daemon works correctly.
> 
> Thanks.



Re: update devel/p5-Test-Script

2017-01-21 Thread Andrew Fresh
On Fri, Jan 20, 2017 at 02:35:54PM +0100, Alexander Bluhm wrote:
> Hi,
> 
> update p5-Test-Script to 1.14
> remove needless build dependency
> take maintainer
> 
> ok?

Tests pass, reverse dependency tests pass.  Looks good to me.

OK afresh1@


> bluhm
> 
> Index: devel/p5-Test-Script/Makefile
> ===
> RCS file: /data/mirror/openbsd/cvs/ports/devel/p5-Test-Script/Makefile,v
> retrieving revision 1.10
> diff -u -p -r1.10 Makefile
> --- devel/p5-Test-Script/Makefile 20 Mar 2016 19:56:38 -  1.10
> +++ devel/p5-Test-Script/Makefile 20 Jan 2017 13:20:37 -
> @@ -5,15 +5,16 @@ COMMENT=cross-platform basic tests for
>  MODULES= cpan
>  PKG_ARCH=*
>  
> -DISTNAME =   Test-Script-1.10
> +DISTNAME =   Test-Script-1.14
>  CATEGORIES=  devel
>  
> +MAINTAINER = Alexander Bluhm 
> +
>  # Perl
>  PERMIT_PACKAGE_CDROM=Yes
>  
>  RUN_DEPENDS= devel/p5-IPC-Run3>=0.034 \
>   devel/p5-Probe-Perl>=0.01
> -BUILD_DEPENDS = ${RUN_DEPENDS}
>  TEST_DEPENDS =   devel/p5-Test-Tester
>  
>  .include 
> Index: devel/p5-Test-Script/distinfo
> ===
> RCS file: /data/mirror/openbsd/cvs/ports/devel/p5-Test-Script/distinfo,v
> retrieving revision 1.4
> diff -u -p -r1.4 distinfo
> --- devel/p5-Test-Script/distinfo 15 Aug 2015 20:48:20 -  1.4
> +++ devel/p5-Test-Script/distinfo 20 Jan 2017 13:05:28 -
> @@ -1,2 +1,2 @@
> -SHA256 (Test-Script-1.10.tar.gz) = 
> 1h22prmKugI9pfjHqsa7MM5DynanoD1zsePYWouKq3M=
> -SIZE (Test-Script-1.10.tar.gz) = 19963
> +SHA256 (Test-Script-1.14.tar.gz) = 
> PymCThAeRAL0QXQnsVfucGm6XhJoMVOG9yRSk4aTzZk=
> +SIZE (Test-Script-1.14.tar.gz) = 22799
> 

-- 
andrew - http://afresh1.com

There are two ways to write error-free programs;
only the third one works.



converters/html2text add utf8 and other fixes

2017-01-21 Thread Davide Gerhard
hello,
just some fixes.

changes (most of them from debian[1]):
- close every file after processing, not at the end of program.
- remove limited built-in http support.
- support UTF-8 encoding when processing input.
- don't use backspaces.
- skip numbers in html tag.
- recognize all  tags, not just one.
- recode input according to 'meta http-equiv' in html document.
  (needs iconv)
- convert output to user's locale charset (needs iconv)
- correctly specify NULLs for 64-bit architectures.
- substituted 'char*' with 'const char*' in needed places to avoid
  'deprecated conversion from string constant to ‘char*’' warnings.
- validate --width parameter input.
- fix CXX variable on configure and now should compile with clang.

for conversion, I added iconv as WANTLIB; maybe we can create a FLAVOR
but I think that should be acceptable for everyday usage.

two questions:
- how can I test the port with clang/llvm? some nice mk.conf variable?
- would be nice to add -utf8 to man: I need to use mg/vi or there
  is another tool?

tested on amd64.

thanks
/davide

[1] http://sources.debian.net/patches/html2text/1.3.2a-18/

diff -Nrua -x CVS /usr/ports/converters/html2text/Makefile ./Makefile
--- /usr/ports/converters/html2text/Makefile	Sat Apr 25 23:58:01 2015
+++ ./Makefile	Sat Jan 21 21:48:09 2017
@@ -5,16 +5,16 @@
 COMMENT=		advanced HTML-to-text converter
 
 DISTNAME=		html2text-1.3.2a
-REVISION=		1
+REVISION=		2
 CATEGORIES=		converters textproc
 
-
 HOMEPAGE=		http://www.mbayer.de/html2text/
 
-# GPL
+# GPLv2
 PERMIT_PACKAGE_CDROM=	Yes
 
-WANTLIB += c m stdc++
+WANTLIB +=		c m stdc++ iconv
+LIB_DEPENDS +=		converters/libiconv
 
 MASTER_SITES=		http://www.mbayer.de/html2text/downloads/ \
 			ftp://ftp.ibiblio.org/pub/linux/apps/www/converters/
@@ -23,7 +23,9 @@
 
 MAKE_FLAGS=	PREFIX="${PREFIX}" \
 		CXXFLAGS="-DVERSION=1.3.2a -DAUTO_PTR_BROKEN ${CXXFLAGS}" \
-		CXX="${CXX}"
+		CXXFLAGS+="-I${LOCALBASE}/include" \
+		CXX="${CXX}" \
+		LDFLAGS="-L${LOCALBASE}/lib -liconv"
 
 NO_TEST=	Yes
 
diff -Nrua -x CVS /usr/ports/converters/html2text/patches/patch-Area_C ./patches/patch-Area_C
--- /usr/ports/converters/html2text/patches/patch-Area_C	Thu Jan  1 01:00:00 1970
+++ ./patches/patch-Area_C	Sat Jan 21 20:58:10 2017
@@ -0,0 +1,109 @@
+$OpenBSD$
+--- Area.C.orig	Sun Nov 23 12:05:29 2003
 Area.C	Sat Jan 21 20:57:57 2017
+@@ -36,10 +36,13 @@
+ #include 
+ 
+ #include "Area.h"
++#include "html.h"
+ #include "string.h"
+ 
+ #define LATIN1_nbsp 160
+ 
++extern int use_encoding;
++
+ /* - */
+ 
+ #define malloc_array(type, size)\
+@@ -81,6 +84,53 @@ Line::~Line()
+ 
+ /* - */
+ 
++/*   utf_length() and utf_width()   
++ *
++ * Very simplified algorithm of calculating length of UTF-8
++ *   string. No check for errors. Counting only ASCII bytes and
++ *   leading bytes of UTF-8 multibyte sequences. All bytes like
++ *   10xx are dropped. If USE_UTF8 is false then returns
++ *   usual length.   --YS
++ */
++
++size_t utf8_aux_count(char ch)
++{
++	if((ch & 0xe0) == 0xc0)
++	{
++		return 1;
++	}
++	else if((ch & 0xf0) == 0xe0)
++	{
++		return 2;
++	}
++	else if ((ch & 0xf8) == 0xf0)
++	{
++		return 3;
++	}
++	else
++	{
++		return 0;
++	}
++}
++
++unsigned int
++Line::utf_length(size_type f, size_type t) const
++{
++	size_type m = (t < length_ ? t : length_);
++	size_type r = m - f;
++	if(USE_UTF8)
++	{
++		for (int i = f; i < m; i++)
++		{
++			char& ch = cells_[i].character;
++			size_type aux_count = utf8_aux_count(ch);
++			r -= aux_count;
++			i += aux_count;
++		}
++	}
++	return r;
++}
++
+ void
+ Line::resize(size_type l)
+ {
+@@ -236,6 +286,28 @@ Area::operator>>=(size_type rs)
+   return *this;
+ }
+ 
++unsigned int
++Area::utf_width()
++{
++  size_type r = width_;
++  if(USE_UTF8) { r = 0;
++for (size_type yy = 0; yy < height_; yy++) {
++	  int i = width_ - 1;
++  while((i >= 0) && isspace(cells_[yy][i].character))
++	  {
++		  --i;
++	  }
++  size_type aux_count_sum = 0;
++  for (; i >= 0; i--) {
++		aux_count_sum += utf8_aux_count(cells_[yy][i].character);
++  }
++	  size_type r1 = width_ - aux_count_sum;
++  if(r < r1) r = r1;
++}
++  }
++  return r;
++}
++
+ void
+ Area::resize(size_type w, size_type h)
+ {
+@@ -439,7 +511,7 @@ operator<<(ostream &os, const Area &a)
+   char c = p->character;
+   char a = p->attribute;
+ 
+-  if (c == (char) LATIN1_nbsp) c = ' ';
++  if (c == (char) LATIN1_nbsp && !USE_UTF8) c = ' ';
+ 
+   if (a == Cell::NONE) {
+ os << c;
diff -Nrua -x CVS /usr/ports/converters/html2text/patches/patch-Area_h ./patches/patch-Area_h
--- /usr/ports/converters/html2text/patches/patch-Area_h	Thu Jan  1 01:00:00 1970
+++ ./patches/patch-Area_h	Sat Jan 21 20:58:10 2017
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- Area.h.orig	Sun Nov 23 12:05:29 2003
 Area.h	Sat Jan 21 20:57:57 201

mail/notmuch-0.23.5

2017-01-21 Thread Davide Gerhard
hello,
just an update of the port sent on ports@ by Timo Myyrä [1] and Jeremie
Courreges-Anglas [2]. I used the second one. Maybe someone need/use it.

Changes:
- removed --without-emacs
- added editors/emacs to BUILD_DEPENDS
- updated patches/

I enabled emacs because I want to test notmuch interface and I noticed
that:
if emacs is not present on build system the package contains only .el
else the build contains also .elc (byte-compiled code).

So, if we dislike emacs as build_depends we can remove it and notmuch
works flawless on emacs, only more slowly (I think).


/davide

[1] http://marc.info/?l=openbsd-ports&m=141961435426918&w=2
[2] http://marc.info/?l=openbsd-ports&m=141985835531257&w=2



notmuch.tgz
Description: Binary data


Re: [PATCH] update php to 5.6.30 and 7.0.15

2017-01-21 Thread Stuart Henderson
On 2017/01/20 08:26, Martijn van Duren wrote:
> Here's a simple update for PHP 5.6.30 and 7.0.15
> The 7.0.15 fixes quite a few serialize bugs.
> 
> OK?
> 
> martijn@

OK sthen@.

> Index: ./5.6//Makefile
> ===
> RCS file: /cvs/ports/lang/php/5.6/Makefile,v
> retrieving revision 1.42
> diff -u -p -r1.42 Makefile
> --- ./5.6//Makefile   19 Dec 2016 20:35:09 -  1.42
> +++ ./5.6//Makefile   20 Jan 2017 07:25:07 -
> @@ -1,7 +1,7 @@
>  # $OpenBSD: Makefile,v 1.42 2016/12/19 20:35:09 martijn Exp $
>  
>  PV=  5.6
> -V=   ${PV}.29
> +V=   ${PV}.30
>  
>  WANTLIB-main+=   stdc++ ncurses readline
>  
> Index: ./5.6//distinfo
> ===
> RCS file: /cvs/ports/lang/php/5.6/distinfo,v
> retrieving revision 1.25
> diff -u -p -r1.25 distinfo
> --- ./5.6//distinfo   19 Dec 2016 20:35:09 -  1.25
> +++ ./5.6//distinfo   20 Jan 2017 07:25:07 -
> @@ -1,4 +1,4 @@
> -SHA256 (php-5.6.29.tar.bz2) = SZuETIqnvgZMERaS5RoJO6lOVNLZq7AecOp2GDoYJbs=
> +SHA256 (php-5.6.30.tar.bz2) = oQXCk/odv/EYtbDKdAKebEYfjHj0mzN6Kpi+njLCeQY=
>  SHA256 (suhosin-0.9.38.tar.gz) = wC12xOfOd3kQo3wYGBy2f9npDv4BB/6rPeMTG1+JvOo=
> -SIZE (php-5.6.29.tar.bz2) = 14990883
> +SIZE (php-5.6.30.tar.bz2) = 15011816
>  SIZE (suhosin-0.9.38.tar.gz) = 122800
> Index: ./5.6//patches/patch-main_php_ini_c
> ===
> RCS file: /cvs/ports/lang/php/5.6/patches/patch-main_php_ini_c,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-main_php_ini_c
> --- ./5.6//patches/patch-main_php_ini_c   19 Dec 2016 20:35:09 -  
> 1.3
> +++ ./5.6//patches/patch-main_php_ini_c   20 Jan 2017 07:25:07 -
> @@ -1,6 +1,6 @@
>  $OpenBSD: patch-main_php_ini_c,v 1.3 2016/12/19 20:35:09 martijn Exp $
>  main/php_ini.c.orig.port Thu Dec  8 07:29:33 2016
> -+++ main/php_ini.c   Fri Dec  9 14:15:51 2016
> +--- main/php_ini.c.orig.port Thu Jan 19 01:17:47 2017
>  main/php_ini.c   Fri Jan 20 07:35:15 2017
>  @@ -576,7 +576,7 @@ int php_init_config(TSRMLS_D)
>   
>   /* If still no ini file found, search for php.ini file in 
> search path */
> Index: ./7.0//Makefile
> ===
> RCS file: /cvs/ports/lang/php/7.0/Makefile,v
> retrieving revision 1.24
> diff -u -p -r1.24 Makefile
> --- ./7.0//Makefile   19 Dec 2016 20:35:47 -  1.24
> +++ ./7.0//Makefile   20 Jan 2017 07:25:20 -
> @@ -3,7 +3,7 @@
>  BROKEN-sparc64=  SIGBUS during phar generation
>  
>  PV=  7.0
> -V=   ${PV}.14
> +V=   ${PV}.15
>  
>  WANTLIB-main+=   stdc++ ncurses readline
>  BUILD_DEPENDS+=  devel/bison
> Index: ./7.0//distinfo
> ===
> RCS file: /cvs/ports/lang/php/7.0/distinfo,v
> retrieving revision 1.13
> diff -u -p -r1.13 distinfo
> --- ./7.0//distinfo   19 Dec 2016 20:35:47 -  1.13
> +++ ./7.0//distinfo   20 Jan 2017 07:25:20 -
> @@ -1,4 +1,4 @@
> -SHA256 (php-7.0.14.tar.bz2) = +8Q2mg1CtV/RznXrTz0XsBLadUpnVn2OMoj7+7dJBTQ=
> +SHA256 (php-7.0.15.tar.bz2) = qMj5RzNWg/pt0bdEPtcPKkK8M+i2whXxOROM7onkfdk=
>  SHA256 (suhosin-0.9.38.tar.gz) = wC12xOfOd3kQo3wYGBy2f9npDv4BB/6rPeMTG1+JvOo=
> -SIZE (php-7.0.14.tar.bz2) = 15239441
> +SIZE (php-7.0.15.tar.bz2) = 15305062
>  SIZE (suhosin-0.9.38.tar.gz) = 122800
> Index: ./7.0//patches/patch-main_php_ini_c
> ===
> RCS file: /cvs/ports/lang/php/7.0/patches/patch-main_php_ini_c,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-main_php_ini_c
> --- ./7.0//patches/patch-main_php_ini_c   19 Dec 2016 20:35:47 -  
> 1.2
> +++ ./7.0//patches/patch-main_php_ini_c   20 Jan 2017 07:25:20 -
> @@ -1,6 +1,6 @@
>  $OpenBSD: patch-main_php_ini_c,v 1.2 2016/12/19 20:35:47 martijn Exp $
>  main/php_ini.c.orig.port Tue Dec  6 19:05:07 2016
> -+++ main/php_ini.c   Fri Dec  9 14:17:20 2016
> +--- main/php_ini.c.orig.port Tue Jan 17 12:53:05 2017
>  main/php_ini.c   Fri Jan 20 07:38:39 2017
>  @@ -572,7 +572,7 @@ int php_init_config(void)
>   
>   /* If still no ini file found, search for php.ini file in 
> search path */
>