From lapo@lapo.it  Tue May 21 14:16:04 2013
Return-Path: <lapo@lapo.it>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id BD3473F6
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 May 2013 14:16:04 +0000 (UTC)
	(envelope-from lapo@lapo.it)
Received: from relay.andxor.it (relay.andxor.it [195.223.2.3])
	by mx1.freebsd.org (Postfix) with ESMTP id A481A36B
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 May 2013 14:16:02 +0000 (UTC)
Received: (qmail 24137 invoked from network); 21 May 2013 14:09:19 -0000
Received: from lapo.andxor.it (192.168.2.22)
  by relay.andxor.it with ESMTPS; 21 May 2013 14:09:19 -0000
Received: from lapo.andxor.it (localhost.andxor.it [127.0.0.1])
	by lapo.andxor.it (8.14.5/8.14.5) with ESMTP id r4LE9J6i093159;
	Tue, 21 May 2013 16:09:19 +0200 (CEST)
	(envelope-from lapo@lapo.andxor.it)
Received: (from lapo@localhost)
	by lapo.andxor.it (8.14.5/8.14.5/Submit) id r4LE9Jai093158;
	Tue, 21 May 2013 16:09:19 +0200 (CEST)
	(envelope-from lapo)
Message-Id: <201305211409.r4LE9Jai093158@lapo.andxor.it>
Date: Tue, 21 May 2013 16:09:19 +0200 (CEST)
From: Lapo Luchini <lapo@lapo.it>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Lapo Luchini <lapo@lapo.it>, Guido Falso <madpilot@freebsd.org>
Subject: [MAINTAINER] security/botan110: new port (version 1.10.5)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         178812
>Category:       ports
>Synopsis:       [MAINTAINER] security/botan110: new port (version 1.10.5)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    madpilot
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 21 14:20:00 UTC 2013
>Closed-Date:    Wed May 22 18:08:06 UTC 2013
>Last-Modified:  Wed May 22 18:10:00 UTC 2013
>Originator:     Lapo Luchini
>Release:        FreeBSD 8.3-RELEASE-p3 amd64
>Organization:
>Environment:
System: FreeBSD lapo.andxor.it 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Tue Jun 12 00:39:29 UTC 2012
>Description:

I'd like to have a new security/botan110 port (svn cp security/botan security/botan110 + this patch).
This way dependent ports can test and upgrade when they're ready.
I will shortly provide an update to ports/178316 to use this new port.

This patch is also (tested and) available on RedPorts as:
https://redports.org/browser/lapo/security/botan110?rev=12349

Generated with FreeBSD Port Tools 0.99_7 (mode: update, diff: ports)
>How-To-Repeat:
>Fix:

--- botan110-1.10.5.patch begins here ---
diff -ruN /usr/ports/security/botan/Makefile ./Makefile
--- /usr/ports/security/botan/Makefile	2013-03-29 20:33:41.000000000 +0100
+++ ./Makefile	2013-05-21 14:57:13.769014185 +0200
@@ -1,10 +1,10 @@
 # Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
 # $FreeBSD: security/botan/Makefile 315566 2013-03-29 19:33:41Z cs $
 
-PORTNAME=	botan
-PORTVERSION=	1.8.13
+PORTNAME=	botan110
+PORTVERSION=	1.10.5
 CATEGORIES=	security
-MASTER_SITES=	http://files.randombit.net/botan/v1.8/
+MASTER_SITES=	http://files.randombit.net/botan/v1.10/
 DISTNAME=	Botan-${PORTVERSION}
 EXTRACT_SUFX=	.tbz
 
@@ -27,7 +27,8 @@
 USE_GMAKE=	yes
 MAKE_ARGS=	CXX="${CXX}" LIB_OPT="${CXXFLAGS}"
 USE_LDCONFIG=	yes
-PLIST_FILES=	bin/botan-config lib/libbotan.a lib/libbotan.so lib/libbotan.so.0 libdata/pkgconfig/botan-1.8.pc
+PLIST_FILES=	bin/botan-config-1.10 lib/libbotan-1.10.a lib/libbotan-1.10.so lib/libbotan-1.10.so.0 \
+		lib/libbotan-1.10.so.0.5 libdata/pkgconfig/botan-1.10.pc
 
 PORTDOCS=	*
 
@@ -39,7 +40,7 @@
 .endif
 
 .if ${PORT_OPTIONS:MGMP}
-LIB_DEPENDS+=	gmp.10:${PORTSDIR}/math/gmp
+LIB_DEPENDS+=	gmp:${PORTSDIR}/math/gmp
 CONFIGURE_ARGS+=--with-gnump
 MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib"
 .endif
@@ -56,13 +57,13 @@
 	${REINPLACE_CMD} -e "s|#!/usr/bin/env python|#!${PYTHON_CMD}|" \
 			${WRKSRC}/configure.py
 .if ${PORT_OPTIONS:MDOCS}
-	${REINPLACE_CMD} -e '/$$(MKDIR_INSTALL) $$(DOCDIR)/d' \
-			-e '/$$(INSTALL_CMD_DATA) $$$$i $$(DOCDIR); /d' \
+	${REINPLACE_CMD} -e '/DOCDIR/d' \
 			${WRKSRC}/src/build-data/makefile/unix_shr.in
 .endif
 
 post-install:
-	@(cd ${PREFIX}; ${FIND} -s include/botan -not -type d) >> ${TMPPLIST}
-	@${ECHO_CMD} @dirrm include/botan >> ${TMPPLIST}
+	@(cd ${PREFIX}; ${FIND} -s include/botan-1.10 -not -type d) >> ${TMPPLIST}
+	@${ECHO_CMD} @dirrm include/botan-1.10/botan >> ${TMPPLIST}
+	@${ECHO_CMD} @dirrm include/botan-1.10 >> ${TMPPLIST}
 
 .include <bsd.port.mk>
diff -ruN /usr/ports/security/botan/distinfo ./distinfo
--- /usr/ports/security/botan/distinfo	2012-07-14 16:29:18.000000000 +0200
+++ ./distinfo	2013-04-23 15:32:21.292830916 +0200
@@ -1,2 +1,2 @@
-SHA256 (Botan-1.8.13.tbz) = 5593ce257d753c305ecf6f4d16e2f516f647bd6494f823fe9766a816ac439dba
-SIZE (Botan-1.8.13.tbz) = 2811686
+SHA256 (Botan-1.10.5.tbz) = 2934c00533847dc93c485081d3ce6aae4a110151a69b587b895241159da77cf3
+SIZE (Botan-1.10.5.tbz) = 2214817
diff -ruN /usr/ports/security/botan/files/patch-configure.py ./files/patch-configure.py
--- /usr/ports/security/botan/files/patch-configure.py	2012-07-14 16:29:18.000000000 +0200
+++ ./files/patch-configure.py	1970-01-01 01:00:00.000000000 +0100
@@ -1,201 +0,0 @@
---- configure.py.orig	2011-10-24 19:51:31.000000000 +0000
-+++ configure.py	2011-10-24 19:52:25.000000000 +0000
-@@ -58,7 +58,7 @@
-         self.include_dir = os.path.join(self.build_dir, 'include')
-         self.full_include_dir = os.path.join(self.include_dir, 'botan')
- 
--        all_files = sum([mod.add for mod in modules], [])
-+        all_files = sum([list(mod.add) for mod in modules], [])
- 
-         self.headers = sorted(
-             [file for file in all_files if file.endswith('.h')])
-@@ -290,7 +290,7 @@
- 
-     for group in allowed_groups:
-         to_obj.__dict__[group] = []
--    for (key,val) in name_val_pairs.iteritems():
-+    for (key,val) in list(name_val_pairs.items()):
-         to_obj.__dict__[key] = val
- 
-     def lexed_tokens(): # Convert to an interator
-@@ -320,7 +320,7 @@
-                     raise LexerError('Group "%s" not terminated' % (group),
-                                      lexer.lineno)
- 
--        elif token in name_val_pairs.keys():
-+        elif token in list(name_val_pairs.keys()):
-             to_obj.__dict__[token] = lexer.get_token()
-         else: # No match -> error
-             raise LexerError('Bad token "%s"' % (token), lexer.lineno)
-@@ -329,7 +329,7 @@
- Convert a lex'ed map (from build-data files) from a list to a dict
- """
- def force_to_dict(l):
--    return dict(zip(l[::3],l[2::3]))
-+    return dict(list(zip(l[::3],l[2::3])))
- 
- """
- Represents the information about a particular module
-@@ -361,7 +361,7 @@
-             return os.path.join(os.path.split(self.lives_in)[0],
-                                 *filename.split(':'))
- 
--        self.add = map(add_dir_name, self.add)
-+        self.add = list(map(add_dir_name, self.add))
- 
-         self.mp_bits = int(self.mp_bits)
- 
-@@ -413,8 +413,8 @@
-             self.unaligned_ok = 0
- 
-     def all_submodels(self):
--        return sorted(zip(self.submodels, self.submodels) +
--                          self.submodel_aliases.items(),
-+        return sorted([(k,k) for k in self.submodels] +
-+                      [k for k in list(self.submodel_aliases.items())],
-                       key = lambda k: len(k[0]), reverse = True)
- 
-     def defines(self, target_submodel, with_endian):
-@@ -574,13 +574,26 @@
-                 for feat in self.target_features]
- 
- def canon_processor(archinfo, proc):
--    for ainfo in archinfo.values():
-+    # First, try to search for an exact match
-+    for ainfo in list(archinfo.values()):
-         if ainfo.basename == proc or proc in ainfo.aliases:
-             return (ainfo.basename, ainfo.basename)
--        else:
--            for (match,submodel) in ainfo.all_submodels():
--                if re.search(match, proc) != None:
--                    return (ainfo.basename, submodel)
-+
-+        for (match,submodel) in ainfo.all_submodels():
-+            if proc == submodel:
-+                return (ainfo.basename, submodel)
-+
-+    # Now, try searching via regex match
-+    for ainfo in list(archinfo.values()):
-+        for (match,submodel) in ainfo.all_submodels():
-+            if re.search(match, proc) != None:
-+                return (ainfo.basename, submodel)
-+
-+    logging.debug('Known CPU names: ' + ' '.join(
-+        sorted(sum([[ainfo.basename] + \
-+                    ainfo.aliases + \
-+                    [x for (x,_) in ainfo.all_submodels()]
-+                    for ainfo in list(archinfo.values())], []))))
- 
-     raise Exception('Unknown or unidentifiable processor "%s"' % (proc))
- 
-@@ -597,7 +610,7 @@
-     if full_proc == '':
-         full_proc = base_proc
- 
--    for ainfo in archinfo.values():
-+    for ainfo in list(archinfo.values()):
-         if ainfo.basename == base_proc or base_proc in ainfo.aliases:
-             for (match,submodel) in ainfo.all_submodels():
-                 if re.search(match, full_proc) != None:
-@@ -626,7 +639,7 @@
-     try:
-         template = PercentSignTemplate(slurp_file(template_file))
-         return template.substitute(variables)
--    except KeyError, e:
-+    except KeyError as e:
-         raise Exception('Unbound var %s in template %s' % (e, template_file))
- 
- """
-@@ -642,7 +655,7 @@
-     def link_to():
-         libs = set()
-         for module in modules:
--            for (osname,link_to) in module.libs.iteritems():
-+            for (osname,link_to) in list(module.libs.items()):
-                 if osname == 'all' or osname == osinfo.basename:
-                     libs.add(link_to)
-                 else:
-@@ -798,8 +811,7 @@
- 
-         'doc_files': makefile_list(build_config.doc_files()),
- 
--        'mod_list': '\n'.join(['%s (%s)' % (m.basename, m.realname)
--                               for m in sorted(modules)]),
-+        'mod_list': '\n'.join(sorted([m.basename for m in modules])),
-         }
- 
- """
-@@ -814,7 +826,7 @@
-     def cannot_use_because(mod, reason):
-         not_using_because.setdefault(reason, []).append(mod)
- 
--    for (modname, module) in modules.iteritems():
-+    for (modname, module) in list(modules.items()):
-         if modname in options.disabled_modules:
-             cannot_use_because(modname, 'disabled by user')
-         elif modname in options.enabled_modules:
-@@ -862,8 +874,7 @@
-     while dependency_failure:
-         dependency_failure = False
-         for modname in to_load:
--            for deplist in map(lambda s: s.split('|'),
--                               modules[modname].dependencies()):
-+            for deplist in [s.split('|') for s in modules[modname].dependencies()]:
- 
-                 dep_met = False
-                 for mod in deplist:
-@@ -1020,7 +1031,7 @@
-     # First delete the build tree, if existing
-     try:
-         shutil.rmtree(build_config.build_dir)
--    except OSError, e:
-+    except OSError as e:
-         logging.debug('Error while removing build dir: %s' % (e))
- 
-     for dirs in [build_config.checkobj_dir,
-@@ -1055,7 +1066,7 @@
-             sink = os.path.join(build_config.build_dir, sink)
-         templates_to_proc[source] = sink
- 
--    for (template, sink) in templates_to_proc.items():
-+    for (template, sink) in list(templates_to_proc.items()):
-         try:
-             f = open(sink, 'w')
-             f.write(process_template(template, template_vars))
-@@ -1128,7 +1139,7 @@
-     if options.os not in osinfo:
- 
-         def find_canonical_os_name(os):
--            for (name, info) in osinfo.items():
-+            for (name, info) in list(osinfo.items()):
-                 if os in info.aliases:
-                     return name
-             return os # not found
-@@ -1166,13 +1177,13 @@
-                 matching_version = '(4\.[01234]\.)|(3\.[34]\.)|(2\.95\.[0-4])'
- 
-                 gcc_version = ''.join(
--                    subprocess.Popen(['g++', '-v'],
-+                    str(subprocess.Popen(['g++', '-v'],
-                                      stdout=subprocess.PIPE,
--                                     stderr=subprocess.PIPE).communicate())
-+                                     stderr=subprocess.PIPE).communicate()))
- 
-                 if re.search(matching_version, gcc_version):
-                     options.dumb_gcc = True
--            except OSError, e:
-+            except OSError as e:
-                 logging.info('Could not execute GCC for version check')
- 
-         if options.dumb_gcc is True:
-@@ -1206,8 +1217,8 @@
- if __name__ == '__main__':
-     try:
-         main()
--    except Exception, e:
--        print >>sys.stderr, e
-+    except Exception as e:
-+        logging.error(str(e))
-         #import traceback
-         #traceback.print_exc(file=sys.stderr)
-         sys.exit(1)
diff -ruN /usr/ports/security/botan/files/patch-src_build_data_makefile_unix_shr.in ./files/patch-src_build_data_makefile_unix_shr.in
--- /usr/ports/security/botan/files/patch-src_build_data_makefile_unix_shr.in	2012-07-14 16:29:18.000000000 +0200
+++ ./files/patch-src_build_data_makefile_unix_shr.in	2011-09-22 12:16:09.194374951 +0200
@@ -1,24 +1,11 @@
---- src/build-data/makefile/unix_shr.in.orig	2009-09-10 02:29:34.000000000 +0200
-+++ src/build-data/makefile/unix_shr.in	2009-10-27 14:30:46.000000000 +0100
-@@ -25,8 +25,8 @@
- BINDIR        = $(DESTDIR)/bin
+--- src/build-data/makefile/unix_shr.in.orig	2011-09-02 19:36:47.671575619 +0000
++++ src/build-data/makefile/unix_shr.in	2011-09-02 19:37:32.341486166 +0000
+@@ -20,7 +20,7 @@
  LIBDIR        = $(DESTDIR)/%{libdir}
- HEADERDIR     = $(DESTDIR)/%{includedir}/botan
--DOCDIR        = $(DESTDIR)/%{docdir}/Botan-$(VERSION)
+ HEADERDIR     = $(DESTDIR)/%{includedir}/botan-$(SERIES)/botan
+ DOCDIR        = $(DESTDIR)/%{docdir}/botan-$(VERSION)
 -PKGCONF_DIR   = $(LIBDIR)/pkgconfig
-+DOCDIR        = $(DESTDIR)/%{docdir}/botan
 +PKGCONF_DIR   = $(DESTDIR)/libdata/pkgconfig
  
  CONFIG_SCRIPT = %{botan_config}
  PKGCONFIG     = %{botan_pkgconfig}
-@@ -67,8 +67,8 @@
- LIBNAME       = %{lib_prefix}libbotan
- STATIC_LIB    = $(LIBNAME).a
- 
--SHARED_LIB    = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
--SONAME        = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
-+SHARED_LIB    = $(LIBNAME).%{so_suffix}.0
-+SONAME        = $(LIBNAME).%{so_suffix}.0
- 
- SYMLINK       = libbotan.%{so_suffix}
- 
--- botan110-1.10.5.patch ends here ---

>Release-Note:
>Audit-Trail:
Class-Changed-From-To: maintainer-update->change-request 
Class-Changed-By: edwin 
Class-Changed-When: Tue May 21 14:20:10 UTC 2013 
Class-Changed-Why:  
Fix category (new ports should be change-requests) (via the GNATS Auto 
Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178812 
Responsible-Changed-From-To: freebsd-ports-bugs->madpilot 
Responsible-Changed-By: madpilot 
Responsible-Changed-When: Tue May 21 14:25:09 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178812 

From: Guido Falsi <madpilot@FreeBSD.org>
To: bug-followup@FreeBSD.org, lapo@lapo.it
Cc:  
Subject: Re: ports/178812: [MAINTAINER] security/botan110: new port (version
 1.10.5)
Date: Wed, 22 May 2013 00:58:07 +0200

 This is a multi-part message in MIME format.
 --------------050200030806070004020207
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Hi,
 
 I made a few changes to your patch.
 
 I made the port use a PKG suffix and the same portname, I also added a 
 LATEST_LINK.
 
 I had to define DOCSDIR to match where docs are really installed.
 
 I also fixed the DOCS conditional.
 
 Can you approve this diff?
 
 Thanks.
 
 -- 
 Guido Falsi <madpilot@FreeBSD.org>
 
 --------------050200030806070004020207
 Content-Type: text/x-patch;
  name="botan110.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="botan110.diff"
 
 Index: Makefile
 ===================================================================
 --- Makefile	(working copy)
 +++ Makefile	(working copy)
 @@ -2,9 +2,10 @@
  # $FreeBSD$
  
  PORTNAME=	botan
 -PORTVERSION=	1.8.13
 +PORTVERSION=	1.10.5
  CATEGORIES=	security
 -MASTER_SITES=	http://files.randombit.net/botan/v1.8/
 +MASTER_SITES=	http://files.randombit.net/botan/v1.10/
 +PKGNAMESUFFIX=	110
  DISTNAME=	Botan-${PORTVERSION}
  EXTRACT_SUFX=	.tbz
  
 @@ -14,6 +15,8 @@
  LICENSE=	BSD
  LICENSE_FILE=	${WRKSRC}/doc/license.txt
  
 +LATEST_LINK=	botan${PKGNAMESUFFIX}
 +
  OPTIONS_DEFINE=		SSL GMP ECC
  OPTIONS_DEFAULT=	SSL GMP ECC
  ECC_DESC=	ECC support
 @@ -27,8 +30,10 @@
  USE_GMAKE=	yes
  MAKE_ARGS=	CXX="${CXX}" LIB_OPT="${CXXFLAGS}"
  USE_LDCONFIG=	yes
 -PLIST_FILES=	bin/botan-config lib/libbotan.a lib/libbotan.so lib/libbotan.so.0 libdata/pkgconfig/botan-1.8.pc
 +PLIST_FILES=	bin/botan-config-1.10 lib/libbotan-1.10.a lib/libbotan-1.10.so lib/libbotan-1.10.so.0 \
 +		lib/libbotan-1.10.so.0.5 libdata/pkgconfig/botan-1.10.pc
  
 +DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
  PORTDOCS=	*
  
  .include <bsd.port.options.mk>
 @@ -39,7 +44,7 @@
  .endif
  
  .if ${PORT_OPTIONS:MGMP}
 -LIB_DEPENDS+=	gmp.10:${PORTSDIR}/math/gmp
 +LIB_DEPENDS+=	gmp:${PORTSDIR}/math/gmp
  CONFIGURE_ARGS+=--with-gnump
  MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib"
  .endif
 @@ -55,14 +60,14 @@
  post-patch:
  	${REINPLACE_CMD} -e "s|#!/usr/bin/env python|#!${PYTHON_CMD}|" \
  			${WRKSRC}/configure.py
 -.if ${PORT_OPTIONS:MDOCS}
 -	${REINPLACE_CMD} -e '/$$(MKDIR_INSTALL) $$(DOCDIR)/d' \
 -			-e '/$$(INSTALL_CMD_DATA) $$$$i $$(DOCDIR); /d' \
 +.if ! ${PORT_OPTIONS:MDOCS}
 +	${REINPLACE_CMD} -e '/DOCDIR/d' \
  			${WRKSRC}/src/build-data/makefile/unix_shr.in
  .endif
  
  post-install:
 -	@(cd ${PREFIX}; ${FIND} -s include/botan -not -type d) >> ${TMPPLIST}
 -	@${ECHO_CMD} @dirrm include/botan >> ${TMPPLIST}
 +	@(cd ${PREFIX}; ${FIND} -s include/botan-1.10 -not -type d) >> ${TMPPLIST}
 +	@${ECHO_CMD} @dirrm include/botan-1.10/botan >> ${TMPPLIST}
 +	@${ECHO_CMD} @dirrm include/botan-1.10 >> ${TMPPLIST}
  
  .include <bsd.port.mk>
 Index: distinfo
 ===================================================================
 --- distinfo	(working copy)
 +++ distinfo	(working copy)
 @@ -1,2 +1,2 @@
 -SHA256 (Botan-1.8.13.tbz) = 5593ce257d753c305ecf6f4d16e2f516f647bd6494f823fe9766a816ac439dba
 -SIZE (Botan-1.8.13.tbz) = 2811686
 +SHA256 (Botan-1.10.5.tbz) = 2934c00533847dc93c485081d3ce6aae4a110151a69b587b895241159da77cf3
 +SIZE (Botan-1.10.5.tbz) = 2214817
 Index: files/patch-configure.py
 ===================================================================
 --- files/patch-configure.py	(revision 318712)
 +++ files/patch-configure.py	(working copy)
 @@ -1,201 +0,0 @@
 ---- configure.py.orig	2011-10-24 19:51:31.000000000 +0000
 -+++ configure.py	2011-10-24 19:52:25.000000000 +0000
 -@@ -58,7 +58,7 @@
 -         self.include_dir = os.path.join(self.build_dir, 'include')
 -         self.full_include_dir = os.path.join(self.include_dir, 'botan')
 - 
 --        all_files = sum([mod.add for mod in modules], [])
 -+        all_files = sum([list(mod.add) for mod in modules], [])
 - 
 -         self.headers = sorted(
 -             [file for file in all_files if file.endswith('.h')])
 -@@ -290,7 +290,7 @@
 - 
 -     for group in allowed_groups:
 -         to_obj.__dict__[group] = []
 --    for (key,val) in name_val_pairs.iteritems():
 -+    for (key,val) in list(name_val_pairs.items()):
 -         to_obj.__dict__[key] = val
 - 
 -     def lexed_tokens(): # Convert to an interator
 -@@ -320,7 +320,7 @@
 -                     raise LexerError('Group "%s" not terminated' % (group),
 -                                      lexer.lineno)
 - 
 --        elif token in name_val_pairs.keys():
 -+        elif token in list(name_val_pairs.keys()):
 -             to_obj.__dict__[token] = lexer.get_token()
 -         else: # No match -> error
 -             raise LexerError('Bad token "%s"' % (token), lexer.lineno)
 -@@ -329,7 +329,7 @@
 - Convert a lex'ed map (from build-data files) from a list to a dict
 - """
 - def force_to_dict(l):
 --    return dict(zip(l[::3],l[2::3]))
 -+    return dict(list(zip(l[::3],l[2::3])))
 - 
 - """
 - Represents the information about a particular module
 -@@ -361,7 +361,7 @@
 -             return os.path.join(os.path.split(self.lives_in)[0],
 -                                 *filename.split(':'))
 - 
 --        self.add = map(add_dir_name, self.add)
 -+        self.add = list(map(add_dir_name, self.add))
 - 
 -         self.mp_bits = int(self.mp_bits)
 - 
 -@@ -413,8 +413,8 @@
 -             self.unaligned_ok = 0
 - 
 -     def all_submodels(self):
 --        return sorted(zip(self.submodels, self.submodels) +
 --                          self.submodel_aliases.items(),
 -+        return sorted([(k,k) for k in self.submodels] +
 -+                      [k for k in list(self.submodel_aliases.items())],
 -                       key = lambda k: len(k[0]), reverse = True)
 - 
 -     def defines(self, target_submodel, with_endian):
 -@@ -574,13 +574,26 @@
 -                 for feat in self.target_features]
 - 
 - def canon_processor(archinfo, proc):
 --    for ainfo in archinfo.values():
 -+    # First, try to search for an exact match
 -+    for ainfo in list(archinfo.values()):
 -         if ainfo.basename == proc or proc in ainfo.aliases:
 -             return (ainfo.basename, ainfo.basename)
 --        else:
 --            for (match,submodel) in ainfo.all_submodels():
 --                if re.search(match, proc) != None:
 --                    return (ainfo.basename, submodel)
 -+
 -+        for (match,submodel) in ainfo.all_submodels():
 -+            if proc == submodel:
 -+                return (ainfo.basename, submodel)
 -+
 -+    # Now, try searching via regex match
 -+    for ainfo in list(archinfo.values()):
 -+        for (match,submodel) in ainfo.all_submodels():
 -+            if re.search(match, proc) != None:
 -+                return (ainfo.basename, submodel)
 -+
 -+    logging.debug('Known CPU names: ' + ' '.join(
 -+        sorted(sum([[ainfo.basename] + \
 -+                    ainfo.aliases + \
 -+                    [x for (x,_) in ainfo.all_submodels()]
 -+                    for ainfo in list(archinfo.values())], []))))
 - 
 -     raise Exception('Unknown or unidentifiable processor "%s"' % (proc))
 - 
 -@@ -597,7 +610,7 @@
 -     if full_proc == '':
 -         full_proc = base_proc
 - 
 --    for ainfo in archinfo.values():
 -+    for ainfo in list(archinfo.values()):
 -         if ainfo.basename == base_proc or base_proc in ainfo.aliases:
 -             for (match,submodel) in ainfo.all_submodels():
 -                 if re.search(match, full_proc) != None:
 -@@ -626,7 +639,7 @@
 -     try:
 -         template = PercentSignTemplate(slurp_file(template_file))
 -         return template.substitute(variables)
 --    except KeyError, e:
 -+    except KeyError as e:
 -         raise Exception('Unbound var %s in template %s' % (e, template_file))
 - 
 - """
 -@@ -642,7 +655,7 @@
 -     def link_to():
 -         libs = set()
 -         for module in modules:
 --            for (osname,link_to) in module.libs.iteritems():
 -+            for (osname,link_to) in list(module.libs.items()):
 -                 if osname == 'all' or osname == osinfo.basename:
 -                     libs.add(link_to)
 -                 else:
 -@@ -798,8 +811,7 @@
 - 
 -         'doc_files': makefile_list(build_config.doc_files()),
 - 
 --        'mod_list': '\n'.join(['%s (%s)' % (m.basename, m.realname)
 --                               for m in sorted(modules)]),
 -+        'mod_list': '\n'.join(sorted([m.basename for m in modules])),
 -         }
 - 
 - """
 -@@ -814,7 +826,7 @@
 -     def cannot_use_because(mod, reason):
 -         not_using_because.setdefault(reason, []).append(mod)
 - 
 --    for (modname, module) in modules.iteritems():
 -+    for (modname, module) in list(modules.items()):
 -         if modname in options.disabled_modules:
 -             cannot_use_because(modname, 'disabled by user')
 -         elif modname in options.enabled_modules:
 -@@ -862,8 +874,7 @@
 -     while dependency_failure:
 -         dependency_failure = False
 -         for modname in to_load:
 --            for deplist in map(lambda s: s.split('|'),
 --                               modules[modname].dependencies()):
 -+            for deplist in [s.split('|') for s in modules[modname].dependencies()]:
 - 
 -                 dep_met = False
 -                 for mod in deplist:
 -@@ -1020,7 +1031,7 @@
 -     # First delete the build tree, if existing
 -     try:
 -         shutil.rmtree(build_config.build_dir)
 --    except OSError, e:
 -+    except OSError as e:
 -         logging.debug('Error while removing build dir: %s' % (e))
 - 
 -     for dirs in [build_config.checkobj_dir,
 -@@ -1055,7 +1066,7 @@
 -             sink = os.path.join(build_config.build_dir, sink)
 -         templates_to_proc[source] = sink
 - 
 --    for (template, sink) in templates_to_proc.items():
 -+    for (template, sink) in list(templates_to_proc.items()):
 -         try:
 -             f = open(sink, 'w')
 -             f.write(process_template(template, template_vars))
 -@@ -1128,7 +1139,7 @@
 -     if options.os not in osinfo:
 - 
 -         def find_canonical_os_name(os):
 --            for (name, info) in osinfo.items():
 -+            for (name, info) in list(osinfo.items()):
 -                 if os in info.aliases:
 -                     return name
 -             return os # not found
 -@@ -1166,13 +1177,13 @@
 -                 matching_version = '(4\.[01234]\.)|(3\.[34]\.)|(2\.95\.[0-4])'
 - 
 -                 gcc_version = ''.join(
 --                    subprocess.Popen(['g++', '-v'],
 -+                    str(subprocess.Popen(['g++', '-v'],
 -                                      stdout=subprocess.PIPE,
 --                                     stderr=subprocess.PIPE).communicate())
 -+                                     stderr=subprocess.PIPE).communicate()))
 - 
 -                 if re.search(matching_version, gcc_version):
 -                     options.dumb_gcc = True
 --            except OSError, e:
 -+            except OSError as e:
 -                 logging.info('Could not execute GCC for version check')
 - 
 -         if options.dumb_gcc is True:
 -@@ -1206,8 +1217,8 @@
 - if __name__ == '__main__':
 -     try:
 -         main()
 --    except Exception, e:
 --        print >>sys.stderr, e
 -+    except Exception as e:
 -+        logging.error(str(e))
 -         #import traceback
 -         #traceback.print_exc(file=sys.stderr)
 -         sys.exit(1)
 Index: files/patch-src_build_data_makefile_unix_shr.in
 ===================================================================
 --- files/patch-src_build_data_makefile_unix_shr.in	(working copy)
 +++ files/patch-src_build_data_makefile_unix_shr.in	(working copy)
 @@ -1,24 +1,11 @@
 ---- src/build-data/makefile/unix_shr.in.orig	2009-09-10 02:29:34.000000000 +0200
 -+++ src/build-data/makefile/unix_shr.in	2009-10-27 14:30:46.000000000 +0100
 -@@ -25,8 +25,8 @@
 - BINDIR        = $(DESTDIR)/bin
 +--- src/build-data/makefile/unix_shr.in.orig	2011-09-02 19:36:47.671575619 +0000
 ++++ src/build-data/makefile/unix_shr.in	2011-09-02 19:37:32.341486166 +0000
 +@@ -20,7 +20,7 @@
   LIBDIR        = $(DESTDIR)/%{libdir}
 - HEADERDIR     = $(DESTDIR)/%{includedir}/botan
 --DOCDIR        = $(DESTDIR)/%{docdir}/Botan-$(VERSION)
 + HEADERDIR     = $(DESTDIR)/%{includedir}/botan-$(SERIES)/botan
 + DOCDIR        = $(DESTDIR)/%{docdir}/botan-$(VERSION)
  -PKGCONF_DIR   = $(LIBDIR)/pkgconfig
 -+DOCDIR        = $(DESTDIR)/%{docdir}/botan
  +PKGCONF_DIR   = $(DESTDIR)/libdata/pkgconfig
   
   CONFIG_SCRIPT = %{botan_config}
   PKGCONFIG     = %{botan_pkgconfig}
 -@@ -67,8 +67,8 @@
 - LIBNAME       = %{lib_prefix}libbotan
 - STATIC_LIB    = $(LIBNAME).a
 - 
 --SHARED_LIB    = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
 --SONAME        = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
 -+SHARED_LIB    = $(LIBNAME).%{so_suffix}.0
 -+SONAME        = $(LIBNAME).%{so_suffix}.0
 - 
 - SYMLINK       = libbotan.%{so_suffix}
 - 
 
 --------------050200030806070004020207--

From: Lapo Luchini <lapo@lapo.it>
To: Guido Falsi <madpilot@FreeBSD.org>, bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/178812: [MAINTAINER] security/botan110: new port (version
 1.10.5)
Date: Wed, 22 May 2013 10:04:27 +0200

 I tested it locally again too, and I approve.
State-Changed-From-To: open->closed 
State-Changed-By: madpilot 
State-Changed-When: Wed May 22 18:08:03 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178812 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/178812: commit references a PR
Date: Wed, 22 May 2013 18:08:02 +0000 (UTC)

 Author: madpilot
 Date: Wed May 22 18:07:53 2013
 New Revision: 318782
 URL: http://svnweb.freebsd.org/changeset/ports/318782
 
 Log:
   Copy botan port to new port for botan 1.10 which can coexist with
   the old port.
   
   PR:		ports/178812
   Submitted by:	Lapo Luchini <lapo@lapo.it> (maintainer of security/botan)
 
 Added:
   head/security/botan110/
      - copied from r318712, head/security/botan/
 Deleted:
   head/security/botan110/files/patch-configure.py
 Modified:
   head/security/Makefile
   head/security/botan110/Makefile
   head/security/botan110/distinfo   (contents, props changed)
   head/security/botan110/files/patch-src_build_data_makefile_unix_shr.in   (contents, props changed)
 
 Modified: head/security/Makefile
 ==============================================================================
 --- head/security/Makefile	Wed May 22 17:42:46 2013	(r318781)
 +++ head/security/Makefile	Wed May 22 18:07:53 2013	(r318782)
 @@ -42,6 +42,7 @@
      SUBDIR += bioapi
      SUBDIR += blindelephant
      SUBDIR += botan
 +    SUBDIR += botan110
      SUBDIR += bro
      SUBDIR += bruteblock
      SUBDIR += bruteforceblocker
 
 Modified: head/security/botan110/Makefile
 ==============================================================================
 --- head/security/botan/Makefile	Tue May 21 14:58:55 2013	(r318712)
 +++ head/security/botan110/Makefile	Wed May 22 18:07:53 2013	(r318782)
 @@ -2,9 +2,10 @@
  # $FreeBSD$
  
  PORTNAME=	botan
 -PORTVERSION=	1.8.13
 +PORTVERSION=	1.10.5
  CATEGORIES=	security
 -MASTER_SITES=	http://files.randombit.net/botan/v1.8/
 +MASTER_SITES=	http://files.randombit.net/botan/v1.10/
 +PKGNAMESUFFIX=	110
  DISTNAME=	Botan-${PORTVERSION}
  EXTRACT_SUFX=	.tbz
  
 @@ -14,6 +15,8 @@ COMMENT=	Portable, easy to use, and effi
  LICENSE=	BSD
  LICENSE_FILE=	${WRKSRC}/doc/license.txt
  
 +LATEST_LINK=	botan${PKGNAMESUFFIX}
 +
  OPTIONS_DEFINE=		SSL GMP ECC
  OPTIONS_DEFAULT=	SSL GMP ECC
  ECC_DESC=	ECC support
 @@ -27,8 +30,10 @@ CONFIGURE_ARGS=	--prefix=${PREFIX} --wit
  USE_GMAKE=	yes
  MAKE_ARGS=	CXX="${CXX}" LIB_OPT="${CXXFLAGS}"
  USE_LDCONFIG=	yes
 -PLIST_FILES=	bin/botan-config lib/libbotan.a lib/libbotan.so lib/libbotan.so.0 libdata/pkgconfig/botan-1.8.pc
 +PLIST_FILES=	bin/botan-config-1.10 lib/libbotan-1.10.a lib/libbotan-1.10.so lib/libbotan-1.10.so.0 \
 +		lib/libbotan-1.10.so.0.5 libdata/pkgconfig/botan-1.10.pc
  
 +DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
  PORTDOCS=	*
  
  .include <bsd.port.options.mk>
 @@ -39,7 +44,7 @@ CONFIGURE_ARGS+=--with-openssl
  .endif
  
  .if ${PORT_OPTIONS:MGMP}
 -LIB_DEPENDS+=	gmp.10:${PORTSDIR}/math/gmp
 +LIB_DEPENDS+=	gmp:${PORTSDIR}/math/gmp
  CONFIGURE_ARGS+=--with-gnump
  MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib"
  .endif
 @@ -55,14 +60,14 @@ CONFIGURE_ARGS+=--with-tr1-implementatio
  post-patch:
  	${REINPLACE_CMD} -e "s|#!/usr/bin/env python|#!${PYTHON_CMD}|" \
  			${WRKSRC}/configure.py
 -.if ${PORT_OPTIONS:MDOCS}
 -	${REINPLACE_CMD} -e '/$$(MKDIR_INSTALL) $$(DOCDIR)/d' \
 -			-e '/$$(INSTALL_CMD_DATA) $$$$i $$(DOCDIR); /d' \
 +.if ! ${PORT_OPTIONS:MDOCS}
 +	${REINPLACE_CMD} -e '/DOCDIR/d' \
  			${WRKSRC}/src/build-data/makefile/unix_shr.in
  .endif
  
  post-install:
 -	@(cd ${PREFIX}; ${FIND} -s include/botan -not -type d) >> ${TMPPLIST}
 -	@${ECHO_CMD} @dirrm include/botan >> ${TMPPLIST}
 +	@(cd ${PREFIX}; ${FIND} -s include/botan-1.10 -not -type d) >> ${TMPPLIST}
 +	@${ECHO_CMD} @dirrm include/botan-1.10/botan >> ${TMPPLIST}
 +	@${ECHO_CMD} @dirrm include/botan-1.10 >> ${TMPPLIST}
  
  .include <bsd.port.mk>
 
 Modified: head/security/botan110/distinfo
 ==============================================================================
 --- head/security/botan/distinfo	Tue May 21 14:58:55 2013	(r318712)
 +++ head/security/botan110/distinfo	Wed May 22 18:07:53 2013	(r318782)
 @@ -1,2 +1,2 @@
 -SHA256 (Botan-1.8.13.tbz) = 5593ce257d753c305ecf6f4d16e2f516f647bd6494f823fe9766a816ac439dba
 -SIZE (Botan-1.8.13.tbz) = 2811686
 +SHA256 (Botan-1.10.5.tbz) = 2934c00533847dc93c485081d3ce6aae4a110151a69b587b895241159da77cf3
 +SIZE (Botan-1.10.5.tbz) = 2214817
 
 Modified: head/security/botan110/files/patch-src_build_data_makefile_unix_shr.in
 ==============================================================================
 --- head/security/botan/files/patch-src_build_data_makefile_unix_shr.in	Tue May 21 14:58:55 2013	(r318712)
 +++ head/security/botan110/files/patch-src_build_data_makefile_unix_shr.in	Wed May 22 18:07:53 2013	(r318782)
 @@ -1,24 +1,11 @@
 ---- src/build-data/makefile/unix_shr.in.orig	2009-09-10 02:29:34.000000000 +0200
 -+++ src/build-data/makefile/unix_shr.in	2009-10-27 14:30:46.000000000 +0100
 -@@ -25,8 +25,8 @@
 - BINDIR        = $(DESTDIR)/bin
 +--- src/build-data/makefile/unix_shr.in.orig	2011-09-02 19:36:47.671575619 +0000
 ++++ src/build-data/makefile/unix_shr.in	2011-09-02 19:37:32.341486166 +0000
 +@@ -20,7 +20,7 @@
   LIBDIR        = $(DESTDIR)/%{libdir}
 - HEADERDIR     = $(DESTDIR)/%{includedir}/botan
 --DOCDIR        = $(DESTDIR)/%{docdir}/Botan-$(VERSION)
 + HEADERDIR     = $(DESTDIR)/%{includedir}/botan-$(SERIES)/botan
 + DOCDIR        = $(DESTDIR)/%{docdir}/botan-$(VERSION)
  -PKGCONF_DIR   = $(LIBDIR)/pkgconfig
 -+DOCDIR        = $(DESTDIR)/%{docdir}/botan
  +PKGCONF_DIR   = $(DESTDIR)/libdata/pkgconfig
   
   CONFIG_SCRIPT = %{botan_config}
   PKGCONFIG     = %{botan_pkgconfig}
 -@@ -67,8 +67,8 @@
 - LIBNAME       = %{lib_prefix}libbotan
 - STATIC_LIB    = $(LIBNAME).a
 - 
 --SHARED_LIB    = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
 --SONAME        = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
 -+SHARED_LIB    = $(LIBNAME).%{so_suffix}.0
 -+SONAME        = $(LIBNAME).%{so_suffix}.0
 - 
 - SYMLINK       = libbotan.%{so_suffix}
 - 
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
