Some files refered to the .txt name of another file, so we change it
into the .md equivalent.
Some other files spoke about the same resource but with different
syntax, so we make them use the same syntax for the same resource.
The FindPolarSSL.cmake file was using bash to run a command in order to
find the polarssl/mbedtls version. When encountering environments where
bash isn't installed, the cmake command failed with a cryptic error.
On version 2.0.0 of mbedTLS, functions for AES or SHA have been put in a
different library than libmbedtls, namely, libmbedcrypto. However, a
typo in the CMakeLists.txt of the mbed archive prevents this
libmbedcrypto to be installed like the other libraries. Some packages
may not have shipped libmbedcrypto, such as the Homebrew PolarSSL
package.
We thus warn the user for this problem, next step is writing the
documentation on how to bypass this.
The mbedtls headers seem to change every name by prepending mbedtls_ to
functions names, MBEDTLS_ to #define-d, and so on. We thus put #define
to change the names.
Every #define-d variable in PolarSSL has been renamed with
s/POLARSSL/MBEDTLS/, so we now export POLARSSL_REAL_NAME out of the
FindPolarSSL.cmake file so that dislocker may use the correct name when
looking at the POLARSSL/MBEDTLS_VERSION_STRING or others.
Homebrew seems to have changed the polarssl/ folder into mbedtls/, so we
adapt the cmake/FindPolarSSL.cmake file to reflect this change. This
file now exports POLARSSL_INC_FOLDER, which take "polarssl" or "mbedtls"
for value according to the folder name in use on the system.
This is then used to include the correct files in dislocker.
When ruby is installed on the target machine, compile dislocker to have
bindings to it. This was done in the previous Makefile but not entirely
in the cmakelists toolchain.