hasufell 14/03/11 12:31:33 Added: polarssl-1.3.4-cflags.patch polarssl-1.3.4-zlib.patch polarssl-1.3.4-static.patch polarssl-1.3.4-out-of-source.patch Log: version bump wrt #503562, add myself as maintainer (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key BDEED020)
Revision Changes Path 1.1 net-libs/polarssl/files/polarssl-1.3.4-cflags.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.4-cflags.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.4-cflags.patch?rev=1.1&content-type=text/plain Index: polarssl-1.3.4-cflags.patch =================================================================== From: Julian Ospald <hasuf...@gentoo.org> Date: Thu Mar 6 14:37:25 UTC 2014 Subject: respect CFLAGS --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,8 @@ string(REGEX MATCH "clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER}") if(CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -Wextra -W -Wdeclaration-after-statement") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement") + set(CMAKE_C_FLAGS_RELEASE "-O2") set(CMAKE_C_FLAGS_DEBUG "-g3 -O0") set(CMAKE_C_FLAGS_COVERAGE "-g3 -O0 -fprofile-arcs -ftest-coverage -lgcov") set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS} -Werror -Wlogical-op -Wwrite-strings") @@ -14,7 +15,8 @@ endif(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_CLANG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -Wextra -W -Wdeclaration-after-statement") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement") + set(CMAKE_C_FLAGS_RELEASE "-O2") set(CMAKE_C_FLAGS_DEBUG "-g3 -O0") set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS} -Werror -Wpointer-arith -Wwrite-strings -Wdocumentation") endif(CMAKE_COMPILER_IS_CLANG) 1.1 net-libs/polarssl/files/polarssl-1.3.4-zlib.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.4-zlib.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.4-zlib.patch?rev=1.1&content-type=text/plain Index: polarssl-1.3.4-zlib.patch =================================================================== From: Julian Ospald <hasuf...@gentoo.org> Date: Thu Mar 6 13:52:39 UTC 2014 Subject: fix zlib include dir --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,7 @@ find_package(ZLIB) if(ZLIB_FOUND) - include_directories(ZLIB_INCLUDE_DIR) + include_directories(${ZLIB_INCLUDE_DIR}) endif(ZLIB_FOUND) endif(ENABLE_ZLIB_SUPPORT) 1.1 net-libs/polarssl/files/polarssl-1.3.4-static.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.4-static.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.4-static.patch?rev=1.1&content-type=text/plain Index: polarssl-1.3.4-static.patch =================================================================== From: Julian Ospald <hasuf...@gentoo.org> Date: Thu Mar 6 13:29:21 UTC 2014 Subject: support building static lib as well --- a/library/CMakeLists.txt +++ b/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 static library." ON) +option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF) set(src aes.c @@ -77,23 +78,38 @@ set(CMAKE_C_FLAGS_CHECKFULL "${CMAKE_C_FLAGS_CHECK} -Wcast-qual") endif(CMAKE_COMPILER_IS_GNUCC) -if(NOT USE_SHARED_POLARSSL_LIBRARY) - -add_library(polarssl STATIC ${src}) - -else(NOT USE_SHARED_POLARSSL_LIBRARY) - -add_library(polarssl SHARED ${src}) -set_target_properties(polarssl PROPERTIES VERSION 1.3.4 SOVERSION 5) - -endif(NOT USE_SHARED_POLARSSL_LIBRARY) - -target_link_libraries(polarssl ${libs}) - -if(ZLIB_FOUND) -target_link_libraries(polarssl ${ZLIB_LIBRARIES}) -endif(ZLIB_FOUND) - -install(TARGETS polarssl - DESTINATION ${LIB_INSTALL_DIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +if (NOT USE_STATIC_POLARSSL_LIBRARY AND NOT USE_SHARED_POLARSSL_LIBRARY) + message(FATAL_ERROR "Need to choose static or shared polarssl build!") +endif(NOT USE_STATIC_POLARSSL_LIBRARY AND NOT USE_SHARED_POLARSSL_LIBRARY) + +if(USE_STATIC_POLARSSL_LIBRARY AND USE_SHARED_POLARSSL_LIBRARY) + # if we build both static an shared, then let + # tests and programs link to the shared lib target + set(polarssl_static_target "polarssl_static") +elseif(USE_STATIC_POLARSSL_LIBRARY) + set(polarssl_static_target "polarssl") +endif() + +if(USE_STATIC_POLARSSL_LIBRARY) + add_library(${polarssl_static_target} STATIC ${src}) + set_target_properties(${polarssl_static_target} PROPERTIES OUTPUT_NAME polarssl) + + install(TARGETS ${polarssl_static_target} + DESTINATION ${LIB_INSTALL_DIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +endif() + +if(USE_SHARED_POLARSSL_LIBRARY) + add_library(polarssl SHARED ${src}) + set_target_properties(polarssl PROPERTIES VERSION 1.3.4 SOVERSION 5) + + target_link_libraries(polarssl ${libs}) + + if(ZLIB_FOUND) + target_link_libraries(polarssl ${ZLIB_LIBRARIES}) + endif(ZLIB_FOUND) + + install(TARGETS polarssl + DESTINATION ${LIB_INSTALL_DIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +endif(USE_SHARED_POLARSSL_LIBRARY) 1.1 net-libs/polarssl/files/polarssl-1.3.4-out-of-source.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.4-out-of-source.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/polarssl/files/polarssl-1.3.4-out-of-source.patch?rev=1.1&content-type=text/plain Index: polarssl-1.3.4-out-of-source.patch =================================================================== >From cd6d69a414711be7a66f676f685aab007592dbbc Mon Sep 17 00:00:00 2001 From: Paul Bakker <p.j.bak...@polarssl.org> Date: Thu, 6 Feb 2014 15:43:21 +0100 Subject: [PATCH] Fixed testing with out-of-source builds using cmake ChangeLog part stripped, because of collision, by hasuf...@gentoo.org --- ChangeLog | 1 + tests/CMakeLists.txt | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cf05bce..00e15e5 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -83,3 +83,25 @@ add_test_suite(version) add_test_suite(xtea) add_test_suite(x509parse) add_test_suite(x509write) + +# Make data_files available in an out-of-source build +if (NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) + # Get OS dependent path to use in `execute_process` + file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/data_files" link) + file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/data_files" target) + + if (UNIX) + set(command ln -s ${target} ${link}) + else() + set(command cmd.exe /c mklink ${link} ${target}) + endif() + + execute_process(COMMAND ${command} + RESULT_VARIABLE result + ERROR_VARIABLE output) + + if (NOT ${result} EQUAL 0) + message(FATAL_ERROR "Could not create symbolic link for: ${target} --> ${output}") + endif() +endif() + -- 1.8.5.5