# # # patch "m4/botan.m4" # from [079240fafb6bd2a80cbd0dd35501b76b1b3d362a] # to [fbd01796c67e82be2e1209b3b4026f80c9572b56] # # patch "monotone.cc" # from [a056cecce3061cd85df559e3598c6e66f75db3e9] # to [7503506de8c31d035c2148cf3431ab7eb49d5c40] # ============================================================ --- m4/botan.m4 079240fafb6bd2a80cbd0dd35501b76b1b3d362a +++ m4/botan.m4 fbd01796c67e82be2e1209b3b4026f80c9572b56 @@ -1,6 +1,6 @@ -# Currently we accept botan version 1.6.3 and newer, limited to the -# development branch 1.7, emitting a warning if the found botan is -# newer than 1.7.23. +# We accept botan versions 1.6.3 and newer, including most of the +# (unstable) 1.7.x branch, preferrably 1.8.x. The next development +# branch 1.9.x is not supported for now. AC_DEFUN([MTN_FIND_BOTAN], [ @@ -12,7 +12,7 @@ AC_DEFUN([MTN_FIND_BOTAN], found_botan=yes - # make sure we have to do with botan version 1.7 + # make sure we have to do with a supported botan version save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOTAN_CPPFLAGS" AC_PREPROC_IFELSE([ @@ -23,7 +23,7 @@ AC_DEFUN([MTN_FIND_BOTAN], #endif #if BOTAN_VERSION_CODE == BOTAN_VERSION_CODE_FOR(1,7,14) -#error "Botan 1.7.14 is unusable" +#error "Botan 1.7.14 is unusable for monotone" #endif], [botan_version_match=yes], [botan_version_match=no]) @@ -36,7 +36,7 @@ AC_DEFUN([MTN_FIND_BOTAN], AC_PREPROC_IFELSE([ #include -#if BOTAN_VERSION_CODE > BOTAN_VERSION_CODE_FOR(1,7,23) +#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,0) #error "Botan from the future" #endif], [botan_version_match=yes], ============================================================ --- monotone.cc a056cecce3061cd85df559e3598c6e66f75db3e9 +++ monotone.cc 7503506de8c31d035c2148cf3431ab7eb49d5c40 @@ -214,28 +214,24 @@ cpp_main(int argc, char ** argv) #endif // check the botan library version we got linked against. -#if BOTAN_VERSION_MAJOR == 1 && BOTAN_VERSION_MINOR == 6 - N(Botan::version_major() == 1 && Botan::version_minor() == 6, - F("This monotone binary requires Botan 1.6.x.")); + u32 linked_botan_version = BOTAN_VERSION_CODE_FOR( + Botan::version_major(), Botan::version_minor(), + Botan::version_patch()); -#elif BOTAN_VERSION_MAJOR == 1 && BOTAN_VERSION_MINOR == 7 - N(Botan::version_major() == 1 && Botan::version_minor() == 7, - F("This monotone binary requires Botan 1.7.x.")); + // Botan 1.7.14 has an incompatible API change, which got reverted + // again in 1.7.15. Thus we do not care to support 1.7.14. + N(linked_botan_version != BOTAN_VERSION_CODE_FOR(1,7,14), + F("Monotone does not support Botan 1.7.14.")); - // Remember that botan 1.7 is a development branch, so its API might - // be changing. However, besides the glitch of 1.7.14, no API changes - // affect monotone. - N(Botan::version_patch() != 14, - F("This monotone binary does not support Botan 1.7.14.")); - -#if BOTAN_VERSION_PATCH < 7 - N(Botan::version_patch() < 7, - F("This monotone binary requires Botan 1.7.6 or before.")); +#if BOTAN_VERSION_CODE <= BOTAN_VERSION_CODE_FOR(1,7,6) + N(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,6,3), + F("This monotone binary requires Botan 1.6.3 or newer.")); + N(linked_botan_version <= BOTAN_VERSION_CODE_FOR(1,7,6), + F("This monotone binary does not work with Botan newer than 1.7.6."); #else - N(Botan::version_patch() >= 7, - F("This monotone binary requires Botan 1.7.7 or newer.")); + N(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,7,22), + F("This monotone binary requires Botan 1.7.22 or newer.")); #endif -#endif app_state app; try