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

Collapse All | Expand All

(-)./Makefile (-9 / +10 lines)
Lines 1-10 Link Here
1
# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
1
# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
2
# $FreeBSD: security/botan/Makefile 315566 2013-03-29 19:33:41Z cs $
2
# $FreeBSD: security/botan/Makefile 315566 2013-03-29 19:33:41Z cs $
3
3
4
PORTNAME=	botan
4
PORTNAME=	botan110
5
PORTVERSION=	1.8.13
5
PORTVERSION=	1.10.5
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.10/
8
DISTNAME=	Botan-${PORTVERSION}
8
DISTNAME=	Botan-${PORTVERSION}
9
EXTRACT_SUFX=	.tbz
9
EXTRACT_SUFX=	.tbz
10
10
Lines 27-33 Link Here
27
USE_GMAKE=	yes
27
USE_GMAKE=	yes
28
MAKE_ARGS=	CXX="${CXX}" LIB_OPT="${CXXFLAGS}"
28
MAKE_ARGS=	CXX="${CXX}" LIB_OPT="${CXXFLAGS}"
29
USE_LDCONFIG=	yes
29
USE_LDCONFIG=	yes
30
PLIST_FILES=	bin/botan-config lib/libbotan.a lib/libbotan.so lib/libbotan.so.0 libdata/pkgconfig/botan-1.8.pc
30
PLIST_FILES=	bin/botan-config-1.10 lib/libbotan-1.10.a lib/libbotan-1.10.so lib/libbotan-1.10.so.0 \
31
		lib/libbotan-1.10.so.0.5 libdata/pkgconfig/botan-1.10.pc
31
32
32
PORTDOCS=	*
33
PORTDOCS=	*
33
34
Lines 39-45 Link Here
39
.endif
40
.endif
40
41
41
.if ${PORT_OPTIONS:MGMP}
42
.if ${PORT_OPTIONS:MGMP}
42
LIB_DEPENDS+=	gmp.10:${PORTSDIR}/math/gmp
43
LIB_DEPENDS+=	gmp:${PORTSDIR}/math/gmp
43
CONFIGURE_ARGS+=--with-gnump
44
CONFIGURE_ARGS+=--with-gnump
44
MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib"
45
MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib"
45
.endif
46
.endif
Lines 56-68 Link Here
56
	${REINPLACE_CMD} -e "s|#!/usr/bin/env python|#!${PYTHON_CMD}|" \
57
	${REINPLACE_CMD} -e "s|#!/usr/bin/env python|#!${PYTHON_CMD}|" \
57
			${WRKSRC}/configure.py
58
			${WRKSRC}/configure.py
58
.if ${PORT_OPTIONS:MDOCS}
59
.if ${PORT_OPTIONS:MDOCS}
59
	${REINPLACE_CMD} -e '/$$(MKDIR_INSTALL) $$(DOCDIR)/d' \
60
	${REINPLACE_CMD} -e '/DOCDIR/d' \
60
			-e '/$$(INSTALL_CMD_DATA) $$$$i $$(DOCDIR); /d' \
61
			${WRKSRC}/src/build-data/makefile/unix_shr.in
61
			${WRKSRC}/src/build-data/makefile/unix_shr.in
62
.endif
62
.endif
63
63
64
post-install:
64
post-install:
65
	@(cd ${PREFIX}; ${FIND} -s include/botan -not -type d) >> ${TMPPLIST}
65
	@(cd ${PREFIX}; ${FIND} -s include/botan-1.10 -not -type d) >> ${TMPPLIST}
66
	@${ECHO_CMD} @dirrm include/botan >> ${TMPPLIST}
66
	@${ECHO_CMD} @dirrm include/botan-1.10/botan >> ${TMPPLIST}
67
	@${ECHO_CMD} @dirrm include/botan-1.10 >> ${TMPPLIST}
67
68
68
.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.10.5.tbz) = 2934c00533847dc93c485081d3ce6aae4a110151a69b587b895241159da77cf3
2
SIZE (Botan-1.8.13.tbz) = 2811686
2
SIZE (Botan-1.10.5.tbz) = 2214817
(-)./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 (-18 / +5 lines)
Lines 1-24 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	2011-09-02 19:36:47.671575619 +0000
2
+++ src/build-data/makefile/unix_shr.in	2009-10-27 14:30:46.000000000 +0100
2
+++ src/build-data/makefile/unix_shr.in	2011-09-02 19:37:32.341486166 +0000
3
@@ -25,8 +25,8 @@
3
@@ -20,7 +20,7 @@
4
 BINDIR        = $(DESTDIR)/bin
5
 LIBDIR        = $(DESTDIR)/%{libdir}
4
 LIBDIR        = $(DESTDIR)/%{libdir}
6
 HEADERDIR     = $(DESTDIR)/%{includedir}/botan
5
 HEADERDIR     = $(DESTDIR)/%{includedir}/botan-$(SERIES)/botan
7
-DOCDIR        = $(DESTDIR)/%{docdir}/Botan-$(VERSION)
6
 DOCDIR        = $(DESTDIR)/%{docdir}/botan-$(VERSION)
8
-PKGCONF_DIR   = $(LIBDIR)/pkgconfig
7
-PKGCONF_DIR   = $(LIBDIR)/pkgconfig
9
+DOCDIR        = $(DESTDIR)/%{docdir}/botan
10
+PKGCONF_DIR   = $(DESTDIR)/libdata/pkgconfig
8
+PKGCONF_DIR   = $(DESTDIR)/libdata/pkgconfig
11
 
9
 
12
 CONFIG_SCRIPT = %{botan_config}
10
 CONFIG_SCRIPT = %{botan_config}
13
 PKGCONFIG     = %{botan_pkgconfig}
11
 PKGCONFIG     = %{botan_pkgconfig}
14
@@ -67,8 +67,8 @@
15
 LIBNAME       = %{lib_prefix}libbotan
16
 STATIC_LIB    = $(LIBNAME).a
17
 
18
-SHARED_LIB    = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
19
-SONAME        = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
20
+SHARED_LIB    = $(LIBNAME).%{so_suffix}.0
21
+SONAME        = $(LIBNAME).%{so_suffix}.0
22
 
23
 SYMLINK       = libbotan.%{so_suffix}
24
 

Return to bug 178812