View | Details | Raw Unified | Return to bug 186279 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-5 / +5 lines)
Lines 2-8 Link Here
2
# $FreeBSD: security/botan/Makefile 327769 2013-09-20 22:55:24Z bapt $
2
# $FreeBSD: security/botan/Makefile 327769 2013-09-20 22:55:24Z bapt $
3
3
4
PORTNAME=	botan
4
PORTNAME=	botan
5
PORTVERSION=	1.8.13
5
PORTVERSION=	1.8.14
6
CATEGORIES=	security
6
CATEGORIES=	security
7
MASTER_SITES=	http://files.randombit.net/botan/v1.8/
7
MASTER_SITES=	http://files.randombit.net/botan/v1.8/
8
DISTNAME=	Botan-${PORTVERSION}
8
DISTNAME=	Botan-${PORTVERSION}
Lines 14-19 Link Here
14
LICENSE=	BSD
14
LICENSE=	BSD
15
LICENSE_FILE=	${WRKSRC}/doc/license.txt
15
LICENSE_FILE=	${WRKSRC}/doc/license.txt
16
16
17
DEPRECATED=	Botan 1.8 have known bugs and is no longer supported upstream, migrate to security/botan110
18
17
OPTIONS_DEFINE=		SSL GMP ECC
19
OPTIONS_DEFINE=		SSL GMP ECC
18
OPTIONS_DEFAULT=	SSL GMP ECC
20
OPTIONS_DEFAULT=	SSL GMP ECC
19
ECC_DESC=	ECC support
21
ECC_DESC=	ECC support
Lines 22-29 Link Here
22
USE_PYTHON_BUILD=	yes
24
USE_PYTHON_BUILD=	yes
23
HAS_CONFIGURE=	yes
25
HAS_CONFIGURE=	yes
24
CONFIGURE_SCRIPT=	configure.py
26
CONFIGURE_SCRIPT=	configure.py
25
CONFIGURE_ARGS=	--prefix=${PREFIX} --with-tr1-implementation=boost \
27
CONFIGURE_ARGS=	--prefix=${PREFIX} --with-bzip2 --with-zlib
26
		--with-bzip2 --with-zlib
27
USE_GMAKE=	yes
28
USE_GMAKE=	yes
28
MAKE_ARGS=	CXX="${CXX}" LIB_OPT="${CXXFLAGS}"
29
MAKE_ARGS=	CXX="${CXX}" LIB_OPT="${CXXFLAGS}"
29
USE_LDCONFIG=	yes
30
USE_LDCONFIG=	yes
Lines 31-37 Link Here
31
32
32
PORTDOCS=	*
33
PORTDOCS=	*
33
34
34
NO_STAGE=	yes
35
.include <bsd.port.options.mk>
35
.include <bsd.port.options.mk>
36
36
37
.if ${PORT_OPTIONS:MSSL}
37
.if ${PORT_OPTIONS:MSSL}
Lines 63-69 Link Here
63
.endif
63
.endif
64
64
65
post-install:
65
post-install:
66
	@(cd ${PREFIX}; ${FIND} -s include/botan -not -type d) >> ${TMPPLIST}
66
	@(cd ${STAGEDIR}${PREFIX}; ${FIND} -s include/botan -not -type d) >> ${TMPPLIST}
67
	@${ECHO_CMD} @dirrm include/botan >> ${TMPPLIST}
67
	@${ECHO_CMD} @dirrm include/botan >> ${TMPPLIST}
68
68
69
.include <bsd.port.mk>
69
.include <bsd.port.mk>
(-)./distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (Botan-1.8.13.tbz) = 5593ce257d753c305ecf6f4d16e2f516f647bd6494f823fe9766a816ac439dba
1
SHA256 (Botan-1.8.14.tbz) = a67be92c38a221b4dff180e8721a763cb97a717cd93722b23900680bd4e49d7c
2
SIZE (Botan-1.8.13.tbz) = 2811686
2
SIZE (Botan-1.8.14.tbz) = 2397499
(-)./files/patch-configure.py (-201 lines)
Lines 1-201 Link Here
1
--- configure.py.orig	2011-10-24 19:51:31.000000000 +0000
2
+++ configure.py	2011-10-24 19:52:25.000000000 +0000
3
@@ -58,7 +58,7 @@
4
         self.include_dir = os.path.join(self.build_dir, 'include')
5
         self.full_include_dir = os.path.join(self.include_dir, 'botan')
6
 
7
-        all_files = sum([mod.add for mod in modules], [])
8
+        all_files = sum([list(mod.add) for mod in modules], [])
9
 
10
         self.headers = sorted(
11
             [file for file in all_files if file.endswith('.h')])
12
@@ -290,7 +290,7 @@
13
 
14
     for group in allowed_groups:
15
         to_obj.__dict__[group] = []
16
-    for (key,val) in name_val_pairs.iteritems():
17
+    for (key,val) in list(name_val_pairs.items()):
18
         to_obj.__dict__[key] = val
19
 
20
     def lexed_tokens(): # Convert to an interator
21
@@ -320,7 +320,7 @@
22
                     raise LexerError('Group "%s" not terminated' % (group),
23
                                      lexer.lineno)
24
 
25
-        elif token in name_val_pairs.keys():
26
+        elif token in list(name_val_pairs.keys()):
27
             to_obj.__dict__[token] = lexer.get_token()
28
         else: # No match -> error
29
             raise LexerError('Bad token "%s"' % (token), lexer.lineno)
30
@@ -329,7 +329,7 @@
31
 Convert a lex'ed map (from build-data files) from a list to a dict
32
 """
33
 def force_to_dict(l):
34
-    return dict(zip(l[::3],l[2::3]))
35
+    return dict(list(zip(l[::3],l[2::3])))
36
 
37
 """
38
 Represents the information about a particular module
39
@@ -361,7 +361,7 @@
40
             return os.path.join(os.path.split(self.lives_in)[0],
41
                                 *filename.split(':'))
42
 
43
-        self.add = map(add_dir_name, self.add)
44
+        self.add = list(map(add_dir_name, self.add))
45
 
46
         self.mp_bits = int(self.mp_bits)
47
 
48
@@ -413,8 +413,8 @@
49
             self.unaligned_ok = 0
50
 
51
     def all_submodels(self):
52
-        return sorted(zip(self.submodels, self.submodels) +
53
-                          self.submodel_aliases.items(),
54
+        return sorted([(k,k) for k in self.submodels] +
55
+                      [k for k in list(self.submodel_aliases.items())],
56
                       key = lambda k: len(k[0]), reverse = True)
57
 
58
     def defines(self, target_submodel, with_endian):
59
@@ -574,13 +574,26 @@
60
                 for feat in self.target_features]
61
 
62
 def canon_processor(archinfo, proc):
63
-    for ainfo in archinfo.values():
64
+    # First, try to search for an exact match
65
+    for ainfo in list(archinfo.values()):
66
         if ainfo.basename == proc or proc in ainfo.aliases:
67
             return (ainfo.basename, ainfo.basename)
68
-        else:
69
-            for (match,submodel) in ainfo.all_submodels():
70
-                if re.search(match, proc) != None:
71
-                    return (ainfo.basename, submodel)
72
+
73
+        for (match,submodel) in ainfo.all_submodels():
74
+            if proc == submodel:
75
+                return (ainfo.basename, submodel)
76
+
77
+    # Now, try searching via regex match
78
+    for ainfo in list(archinfo.values()):
79
+        for (match,submodel) in ainfo.all_submodels():
80
+            if re.search(match, proc) != None:
81
+                return (ainfo.basename, submodel)
82
+
83
+    logging.debug('Known CPU names: ' + ' '.join(
84
+        sorted(sum([[ainfo.basename] + \
85
+                    ainfo.aliases + \
86
+                    [x for (x,_) in ainfo.all_submodels()]
87
+                    for ainfo in list(archinfo.values())], []))))
88
 
89
     raise Exception('Unknown or unidentifiable processor "%s"' % (proc))
90
 
91
@@ -597,7 +610,7 @@
92
     if full_proc == '':
93
         full_proc = base_proc
94
 
95
-    for ainfo in archinfo.values():
96
+    for ainfo in list(archinfo.values()):
97
         if ainfo.basename == base_proc or base_proc in ainfo.aliases:
98
             for (match,submodel) in ainfo.all_submodels():
99
                 if re.search(match, full_proc) != None:
100
@@ -626,7 +639,7 @@
101
     try:
102
         template = PercentSignTemplate(slurp_file(template_file))
103
         return template.substitute(variables)
104
-    except KeyError, e:
105
+    except KeyError as e:
106
         raise Exception('Unbound var %s in template %s' % (e, template_file))
107
 
108
 """
109
@@ -642,7 +655,7 @@
110
     def link_to():
111
         libs = set()
112
         for module in modules:
113
-            for (osname,link_to) in module.libs.iteritems():
114
+            for (osname,link_to) in list(module.libs.items()):
115
                 if osname == 'all' or osname == osinfo.basename:
116
                     libs.add(link_to)
117
                 else:
118
@@ -798,8 +811,7 @@
119
 
120
         'doc_files': makefile_list(build_config.doc_files()),
121
 
122
-        'mod_list': '\n'.join(['%s (%s)' % (m.basename, m.realname)
123
-                               for m in sorted(modules)]),
124
+        'mod_list': '\n'.join(sorted([m.basename for m in modules])),
125
         }
126
 
127
 """
128
@@ -814,7 +826,7 @@
129
     def cannot_use_because(mod, reason):
130
         not_using_because.setdefault(reason, []).append(mod)
131
 
132
-    for (modname, module) in modules.iteritems():
133
+    for (modname, module) in list(modules.items()):
134
         if modname in options.disabled_modules:
135
             cannot_use_because(modname, 'disabled by user')
136
         elif modname in options.enabled_modules:
137
@@ -862,8 +874,7 @@
138
     while dependency_failure:
139
         dependency_failure = False
140
         for modname in to_load:
141
-            for deplist in map(lambda s: s.split('|'),
142
-                               modules[modname].dependencies()):
143
+            for deplist in [s.split('|') for s in modules[modname].dependencies()]:
144
 
145
                 dep_met = False
146
                 for mod in deplist:
147
@@ -1020,7 +1031,7 @@
148
     # First delete the build tree, if existing
149
     try:
150
         shutil.rmtree(build_config.build_dir)
151
-    except OSError, e:
152
+    except OSError as e:
153
         logging.debug('Error while removing build dir: %s' % (e))
154
 
155
     for dirs in [build_config.checkobj_dir,
156
@@ -1055,7 +1066,7 @@
157
             sink = os.path.join(build_config.build_dir, sink)
158
         templates_to_proc[source] = sink
159
 
160
-    for (template, sink) in templates_to_proc.items():
161
+    for (template, sink) in list(templates_to_proc.items()):
162
         try:
163
             f = open(sink, 'w')
164
             f.write(process_template(template, template_vars))
165
@@ -1128,7 +1139,7 @@
166
     if options.os not in osinfo:
167
 
168
         def find_canonical_os_name(os):
169
-            for (name, info) in osinfo.items():
170
+            for (name, info) in list(osinfo.items()):
171
                 if os in info.aliases:
172
                     return name
173
             return os # not found
174
@@ -1166,13 +1177,13 @@
175
                 matching_version = '(4\.[01234]\.)|(3\.[34]\.)|(2\.95\.[0-4])'
176
 
177
                 gcc_version = ''.join(
178
-                    subprocess.Popen(['g++', '-v'],
179
+                    str(subprocess.Popen(['g++', '-v'],
180
                                      stdout=subprocess.PIPE,
181
-                                     stderr=subprocess.PIPE).communicate())
182
+                                     stderr=subprocess.PIPE).communicate()))
183
 
184
                 if re.search(matching_version, gcc_version):
185
                     options.dumb_gcc = True
186
-            except OSError, e:
187
+            except OSError as e:
188
                 logging.info('Could not execute GCC for version check')
189
 
190
         if options.dumb_gcc is True:
191
@@ -1206,8 +1217,8 @@
192
 if __name__ == '__main__':
193
     try:
194
         main()
195
-    except Exception, e:
196
-        print >>sys.stderr, e
197
+    except Exception as e:
198
+        logging.error(str(e))
199
         #import traceback
200
         #traceback.print_exc(file=sys.stderr)
201
         sys.exit(1)
(-)./files/patch-src_build_data_makefile_unix_shr.in (-9 / +18 lines)
Lines 1-17 Link Here
1
--- src/build-data/makefile/unix_shr.in.orig	2009-09-10 02:29:34.000000000 +0200
1
--- src/build-data/makefile/unix_shr.in.orig	2012-07-18 21:59:04.000000000 +0200
2
+++ src/build-data/makefile/unix_shr.in	2009-10-27 14:30:46.000000000 +0100
2
+++ src/build-data/makefile/unix_shr.in	2014-01-30 11:02:22.250928231 +0100
3
@@ -25,8 +25,8 @@
3
@@ -20,13 +20,13 @@ SO_VERSION    = %{so_version}
4
 BINDIR        = $(DESTDIR)/bin
4
 ##################################################
5
 LIBDIR        = $(DESTDIR)/%{libdir}
5
 # Installation Settings                          #
6
 HEADERDIR     = $(DESTDIR)/%{includedir}/botan
6
 ##################################################
7
-DESTDIR       = %{prefix}
8
+PREFIX        = %{prefix}
9
 
10
-BINDIR        = $(DESTDIR)/bin
11
-LIBDIR        = $(DESTDIR)/%{libdir}
12
-HEADERDIR     = $(DESTDIR)/%{includedir}/botan
7
-DOCDIR        = $(DESTDIR)/%{docdir}/Botan-$(VERSION)
13
-DOCDIR        = $(DESTDIR)/%{docdir}/Botan-$(VERSION)
8
-PKGCONF_DIR   = $(LIBDIR)/pkgconfig
14
-PKGCONF_DIR   = $(LIBDIR)/pkgconfig
9
+DOCDIR        = $(DESTDIR)/%{docdir}/botan
15
+BINDIR        = $(DESTDIR)$(PREFIX)/bin
10
+PKGCONF_DIR   = $(DESTDIR)/libdata/pkgconfig
16
+LIBDIR        = $(DESTDIR)$(PREFIX)/%{libdir}
17
+HEADERDIR     = $(DESTDIR)$(PREFIX)/%{includedir}/botan
18
+DOCDIR        = $(DESTDIR)$(PREFIX)/%{docdir}/botan
19
+PKGCONF_DIR   = $(DESTDIR)$(PREFIX)/libdata/pkgconfig
11
 
20
 
12
 CONFIG_SCRIPT = %{botan_config}
21
 CONFIG_SCRIPT = %{botan_config}
13
 PKGCONFIG     = %{botan_pkgconfig}
22
 PKGCONFIG     = %{botan_pkgconfig}
14
@@ -67,8 +67,8 @@
23
@@ -67,8 +67,8 @@ LIBRARIES     = $(STATIC_LIB) $(SHARED_L
15
 LIBNAME       = %{lib_prefix}libbotan
24
 LIBNAME       = %{lib_prefix}libbotan
16
 STATIC_LIB    = $(LIBNAME).a
25
 STATIC_LIB    = $(LIBNAME).a

Return to bug 186279