diff options
-rw-r--r-- | botan_version.py | 8 | ||||
-rwxr-xr-x | configure.py | 29 | ||||
-rw-r--r-- | doc/manual/building.rst | 12 | ||||
-rw-r--r-- | src/build-data/botan.pc.in | 4 | ||||
-rw-r--r-- | src/build-data/os/aix.txt | 2 | ||||
-rw-r--r-- | src/build-data/os/android.txt | 4 | ||||
-rw-r--r-- | src/build-data/os/darwin.txt | 6 | ||||
-rw-r--r-- | src/build-data/os/dragonfly.txt | 2 | ||||
-rw-r--r-- | src/build-data/os/freebsd.txt | 4 | ||||
-rw-r--r-- | src/build-data/os/haiku.txt | 1 | ||||
-rw-r--r-- | src/build-data/os/hpux.txt | 3 | ||||
-rw-r--r-- | src/build-data/os/hurd.txt | 2 | ||||
-rw-r--r-- | src/build-data/os/irix.txt | 2 | ||||
-rw-r--r-- | src/build-data/os/linux.txt | 4 | ||||
-rw-r--r-- | src/build-data/os/nacl.txt | 2 | ||||
-rw-r--r-- | src/build-data/os/netbsd.txt | 2 | ||||
-rw-r--r-- | src/build-data/os/openbsd.txt | 2 | ||||
-rw-r--r-- | src/build-data/os/qnx.txt | 3 | ||||
-rw-r--r-- | src/build-data/os/solaris.txt | 2 | ||||
-rwxr-xr-x | src/python/botan.py | 4 |
20 files changed, 66 insertions, 32 deletions
diff --git a/botan_version.py b/botan_version.py index 74ba8b3d5..0188a470b 100644 --- a/botan_version.py +++ b/botan_version.py @@ -1,8 +1,8 @@ -release_major = 1 -release_minor = 11 -release_patch = 35 -release_so_abi_rev = release_patch +release_major = 2 +release_minor = 0 +release_patch = 0 +release_so_abi_rev = 0 # These are set by the distribution script release_vc_rev = None diff --git a/configure.py b/configure.py index 8690957aa..e583ac683 100755 --- a/configure.py +++ b/configure.py @@ -205,7 +205,7 @@ class BuildConfigurationInformation(object): return (self.test_sources, self.testobj_dir) def pkg_config_file(self): - return 'botan-%d.%d.pc' % (self.version_major, self.version_minor) + return 'botan-%d.pc' % (self.version_major) """ @@ -1078,6 +1078,7 @@ class OsInfo(object): { 'os_type': None, 'program_suffix': '', 'obj_suffix': 'o', + 'soname_suffix': '', 'soname_pattern_patch': '', 'soname_pattern_abi': '', 'soname_pattern_base': '', @@ -1094,6 +1095,22 @@ class OsInfo(object): 'install_cmd_exec': 'install -m 755' }) + if self.soname_pattern_base != '': + if self.soname_pattern_patch == '' and self.soname_pattern_abi == '': + self.soname_pattern_patch = self.soname_pattern_base + self.soname_pattern_patch_abi = self.soname_pattern_base + + elif self.soname_pattern_abi != '' and self.soname_pattern_abi != '': + pass # all 3 values set, nothing needs to happen here + else: + # base set, only one of patch/abi set + raise Exception("Invalid soname_patterns in %s" % (self.infofile)) + + if self.soname_pattern_base == '' and self.soname_suffix != '': + self.soname_pattern_base = "libbotan-{version_major}.%s" % (self.soname_suffix) + self.soname_pattern_abi = self.soname_pattern_base + ".{abi_rev}" + self.soname_pattern_patch = self.soname_pattern_abi + ".{version_minor}.{version_patch}" + self.ar_needs_ranlib = bool(self.ar_needs_ranlib) self.building_shared_supported = (True if self.building_shared_supported == 'yes' else False) @@ -1612,9 +1629,9 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): vars['botan_pkgconfig'] = prefix_with_build_dir(os.path.join(build_config.build_dir, build_config.pkg_config_file())) - # 'botan' or 'botan-1.11'. Used in Makefile and install script + # 'botan' or 'botan-2'. Used in Makefile and install script # This can be made consistent over all platforms in the future - vars['libname'] = 'botan-%d.%d' % (build_config.version_major, build_config.version_minor) + vars['libname'] = 'botan-%d' % (build_config.version_major) else: if options.with_debug_info: vars['libname'] = 'botand' @@ -2109,7 +2126,7 @@ def main(argv = None): if len(info) == 0: logging.warning('Failed to load any %s files' % (descr)) else: - logging.debug('Loaded %d %s files' % (len(info), descr)) + logging.debug('Loaded %d %s files (%s)' % (len(info), descr, ' '.join(sorted(map(str, info))))) return info @@ -2241,8 +2258,8 @@ def main(argv = None): raise Exception("--via-amalgamation was removed. Use --amalgamation instead.") if options.build_shared_lib and not osinfo.building_shared_supported: - raise Exception('Botan does not support building as shared library on the target os. ' - 'Build static using --disable-shared.') + logging.warning('Shared libs not supported on %s, disabling shared lib support' % (self.infofile)) + options.build_shared_lib = False loaded_mods = choose_modules_to_use(modules, module_policy, arch, cc, options) diff --git a/doc/manual/building.rst b/doc/manual/building.rst index c9e8a0bbd..5e09d1569 100644 --- a/doc/manual/building.rst +++ b/doc/manual/building.rst @@ -214,12 +214,12 @@ To compile for the iPhone Simulator, configure and make with:: Now create the universal binary and confirm the library is compiled for all three architectures:: - $ xcrun --sdk iphoneos lipo -create -output libbotan-1.11.a \ - iphone-32/lib/libbotan-1.11.a \ - iphone-64/lib/libbotan-1.11.a \ - iphone-simulator/lib/libbotan-1.11.a - $ xcrun --sdk iphoneos lipo -info libbotan-1.11.a - Architectures in the fat file: libbotan-1.11.a are: armv7 x86_64 armv64 + $ xcrun --sdk iphoneos lipo -create -output libbotan-2.a \ + iphone-32/lib/libbotan-2.a \ + iphone-64/lib/libbotan-2.a \ + iphone-simulator/lib/libbotan-2.a + $ xcrun --sdk iphoneos lipo -info libbotan-2.a + Architectures in the fat file: libbotan-2.a are: armv7 x86_64 armv64 The resulting static library can be linked to your app in Xcode. diff --git a/src/build-data/botan.pc.in b/src/build-data/botan.pc.in index 49d7cfb59..85943ab3f 100644 --- a/src/build-data/botan.pc.in +++ b/src/build-data/botan.pc.in @@ -1,12 +1,12 @@ prefix=%{prefix} exec_prefix=${prefix} libdir=${prefix}/%{libdir} -includedir=${prefix}/include/botan-%{version_major}.%{version_minor} +includedir=${prefix}/include/botan-%{version_major} Name: Botan Description: Crypto and TLS for C++11 Version: %{version} -Libs: -L${libdir} -lbotan-%{version_major}.%{version_minor} +Libs: -L${libdir} -lbotan-%{version_major} Libs.private: %{link_to} Cflags: -I${includedir} diff --git a/src/build-data/os/aix.txt b/src/build-data/os/aix.txt index de417ce90..70c37d39a 100644 --- a/src/build-data/os/aix.txt +++ b/src/build-data/os/aix.txt @@ -1,5 +1,7 @@ os_type unix +soname_suffix "so" + <target_features> gettimeofday threads diff --git a/src/build-data/os/android.txt b/src/build-data/os/android.txt index 64a639909..50d97fd8f 100644 --- a/src/build-data/os/android.txt +++ b/src/build-data/os/android.txt @@ -1,8 +1,6 @@ os_type unix -soname_pattern_base "libbotan-{version_major}.{version_minor}.so" -soname_pattern_abi "libbotan-{version_major}.{version_minor}.so.{abi_rev}" -soname_pattern_patch "libbotan-{version_major}.{version_minor}.so.{abi_rev}.{version_patch}" +soname_suffix "so" <target_features> clock_gettime diff --git a/src/build-data/os/darwin.txt b/src/build-data/os/darwin.txt index 662101b1c..a27259876 100644 --- a/src/build-data/os/darwin.txt +++ b/src/build-data/os/darwin.txt @@ -1,8 +1,8 @@ os_type unix -soname_pattern_base "libbotan-{version_major}.{version_minor}.dylib" -soname_pattern_abi "libbotan-{version_major}.{version_minor}.{abi_rev}.dylib" -soname_pattern_patch "libbotan-{version_major}.{version_minor}.{abi_rev}.{version_patch}.dylib" +soname_pattern_base "libbotan-{version_major}.dylib" +soname_pattern_abi "libbotan-{version_major}.{abi_rev}.dylib" +soname_pattern_patch "libbotan-{version_major}.{abi_rev}.{version_minor}.{version_patch}.dylib" # It doesn't have the 's' option; you need to use needs ranlib ar_command "ar cr" diff --git a/src/build-data/os/dragonfly.txt b/src/build-data/os/dragonfly.txt index 1ff2804b0..628ac7c98 100644 --- a/src/build-data/os/dragonfly.txt +++ b/src/build-data/os/dragonfly.txt @@ -1,5 +1,7 @@ os_type unix +soname_suffix "so" + <target_features> clock_gettime gettimeofday diff --git a/src/build-data/os/freebsd.txt b/src/build-data/os/freebsd.txt index 326e6661a..0e60abd2e 100644 --- a/src/build-data/os/freebsd.txt +++ b/src/build-data/os/freebsd.txt @@ -1,8 +1,6 @@ os_type unix -soname_pattern_base "libbotan-{version_major}.{version_minor}.so" -soname_pattern_abi "libbotan-{version_major}.{version_minor}.so.{abi_rev}" -soname_pattern_patch "libbotan-{version_major}.{version_minor}.so.{abi_rev}.{version_patch}" +soname_suffix "so" <target_features> clock_gettime diff --git a/src/build-data/os/haiku.txt b/src/build-data/os/haiku.txt index 9ad3f29f7..8b6f0641d 100644 --- a/src/build-data/os/haiku.txt +++ b/src/build-data/os/haiku.txt @@ -1,5 +1,6 @@ os_type unix +building_shared_supported no install_root /boot header_dir develop/headers lib_dir system/lib diff --git a/src/build-data/os/hpux.txt b/src/build-data/os/hpux.txt index 3f6f0d940..f8c2d0d2a 100644 --- a/src/build-data/os/hpux.txt +++ b/src/build-data/os/hpux.txt @@ -1,5 +1,8 @@ os_type unix +# It is "sl" on HP-PA, but HP-UX on PA is EOL +soname_suffix "so" + <target_features> gettimeofday threads diff --git a/src/build-data/os/hurd.txt b/src/build-data/os/hurd.txt index 35a65315d..846117805 100644 --- a/src/build-data/os/hurd.txt +++ b/src/build-data/os/hurd.txt @@ -1,5 +1,7 @@ os_type unix +soname_suffix "so" + <target_features> posix_mlock threads diff --git a/src/build-data/os/irix.txt b/src/build-data/os/irix.txt index de417ce90..70c37d39a 100644 --- a/src/build-data/os/irix.txt +++ b/src/build-data/os/irix.txt @@ -1,5 +1,7 @@ os_type unix +soname_suffix "so" + <target_features> gettimeofday threads diff --git a/src/build-data/os/linux.txt b/src/build-data/os/linux.txt index cb6c75df9..6bd81f7f2 100644 --- a/src/build-data/os/linux.txt +++ b/src/build-data/os/linux.txt @@ -1,8 +1,6 @@ os_type unix -soname_pattern_base "libbotan-{version_major}.{version_minor}.so" -soname_pattern_abi "libbotan-{version_major}.{version_minor}.so.{abi_rev}" -soname_pattern_patch "libbotan-{version_major}.{version_minor}.so.{abi_rev}.{version_patch}" +soname_suffix "so" <target_features> clock_gettime diff --git a/src/build-data/os/nacl.txt b/src/build-data/os/nacl.txt index e2e2f34be..c24413618 100644 --- a/src/build-data/os/nacl.txt +++ b/src/build-data/os/nacl.txt @@ -1,4 +1,6 @@ +building_shared_supported no + <target_features> gettimeofday threads diff --git a/src/build-data/os/netbsd.txt b/src/build-data/os/netbsd.txt index baf4b1a9c..4c82e6239 100644 --- a/src/build-data/os/netbsd.txt +++ b/src/build-data/os/netbsd.txt @@ -1,5 +1,7 @@ os_type unix +soname_suffix "so" + <target_features> clock_gettime gettimeofday diff --git a/src/build-data/os/openbsd.txt b/src/build-data/os/openbsd.txt index 0e18eb8e1..0e60abd2e 100644 --- a/src/build-data/os/openbsd.txt +++ b/src/build-data/os/openbsd.txt @@ -1,5 +1,7 @@ os_type unix +soname_suffix "so" + <target_features> clock_gettime gettimeofday diff --git a/src/build-data/os/qnx.txt b/src/build-data/os/qnx.txt index a2061594f..76a10f951 100644 --- a/src/build-data/os/qnx.txt +++ b/src/build-data/os/qnx.txt @@ -1,5 +1,8 @@ +# not really, but for our purposes os_type unix +soname_suffix "so" + <target_features> clock_gettime gettimeofday diff --git a/src/build-data/os/solaris.txt b/src/build-data/os/solaris.txt index 1e740aea7..49962e82c 100644 --- a/src/build-data/os/solaris.txt +++ b/src/build-data/os/solaris.txt @@ -1,5 +1,7 @@ os_type unix +soname_suffix "so" + install_cmd_data '/usr/ucb/install -m 644' install_cmd_exec '/usr/ucb/install -m 755' diff --git a/src/python/botan.py b/src/python/botan.py index 093359970..4da158285 100755 --- a/src/python/botan.py +++ b/src/python/botan.py @@ -27,9 +27,9 @@ import time Module initialization """ if sys.platform == 'darwin': - botan = CDLL('libbotan-1.11.dylib') + botan = CDLL('libbotan-2.dylib') else: - botan = CDLL('libbotan-1.11.so') + botan = CDLL('libbotan-2.so') expected_api_rev = 20151015 botan_api_rev = botan.botan_ffi_api_version() |