diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-04-10 18:05:28 +0200 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2012-04-15 09:15:17 +0200 |
commit | 31993b329ee676d9f0bece894eee39b1243cfd90 (patch) | |
tree | aecb3d1a3ebc758bf16c1b11b2af88959e606f7e /package/polarssl/polarssl-shared-and-static-library.patch | |
parent | b163ca39320e54192102218ee137b13b7828695e (diff) | |
download | buildroot-novena-31993b329ee676d9f0bece894eee39b1243cfd90.tar.gz buildroot-novena-31993b329ee676d9f0bece894eee39b1243cfd90.zip |
polarssl: new package
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/polarssl/polarssl-shared-and-static-library.patch')
-rw-r--r-- | package/polarssl/polarssl-shared-and-static-library.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/package/polarssl/polarssl-shared-and-static-library.patch b/package/polarssl/polarssl-shared-and-static-library.patch new file mode 100644 index 000000000..3ad3334c4 --- /dev/null +++ b/package/polarssl/polarssl-shared-and-static-library.patch @@ -0,0 +1,52 @@ +Allow both shared and static PolarSSL library + +By default, PolarSSL is built as a static library. If the option +USE_SHARED_POLARSSL_LIBRARY is set, then it is build as a shared +library. But there is no way of building both the shared and static +versions. + +This patch adds the USE_STATIC_POLARSSL_LIBRARY (which defaults to ON) +in addition to the existing USE_SHARED_POLARSSL_LIBRARY (which +defaults to OFF). Both options can be manipulated independently. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> + +Index: polarssl-1.1.1/library/CMakeLists.txt +=================================================================== +--- polarssl-1.1.1.orig/library/CMakeLists.txt ++++ polarssl-1.1.1/library/CMakeLists.txt +@@ -1,4 +1,5 @@ + option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL as a shared library." OFF) ++option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL as a static library." ON) + + set(src + aes.c +@@ -40,17 +41,21 @@ + xtea.c + ) + +-if(NOT USE_SHARED_POLARSSL_LIBRARY) +- +-add_library(polarssl STATIC ${src}) +- +-else(NOT USE_SHARED_POLARSSL_LIBRARY) ++if(USE_SHARED_POLARSSL_LIBRARY) + + add_library(polarssl SHARED ${src}) + set_target_properties(polarssl PROPERTIES VERSION 1.1.1 SOVERSION 1) ++set_target_properties(polarssl PROPERTIES OUTPUT_NAME polarssl) ++ ++endif(USE_SHARED_POLARSSL_LIBRARY) ++ ++if(USE_STATIC_POLARSSL_LIBRARY) ++ ++add_library(polarssl-static STATIC ${src}) ++set_target_properties(polarssl-static PROPERTIES OUTPUT_NAME polarssl) + +-endif(NOT USE_SHARED_POLARSSL_LIBRARY) ++endif(USE_STATIC_POLARSSL_LIBRARY) + +-install(TARGETS polarssl ++install(TARGETS polarssl polarssl-static + DESTINATION ${LIB_INSTALL_DIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |