diff options
author | Julian Ospald <hasufell@gentoo.org> | 2014-03-11 12:31:33 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2014-03-11 12:31:33 +0000 |
commit | f35002ded4ea451ecf5047a46f2f7b7a780cdae9 (patch) | |
tree | c3413ca28673e0f208db4aaaa87e430f1eab384d /net-libs/polarssl | |
parent | Fixed compilation with >=freetype-2.5.1 (bug #493604) (diff) | |
download | gentoo-2-f35002ded4ea451ecf5047a46f2f7b7a780cdae9.tar.gz gentoo-2-f35002ded4ea451ecf5047a46f2f7b7a780cdae9.tar.bz2 gentoo-2-f35002ded4ea451ecf5047a46f2f7b7a780cdae9.zip |
version bump wrt #503562, add myself as maintainer
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key BDEED020)
Diffstat (limited to 'net-libs/polarssl')
-rw-r--r-- | net-libs/polarssl/ChangeLog | 13 | ||||
-rw-r--r-- | net-libs/polarssl/files/polarssl-1.3.4-cflags.patch | 26 | ||||
-rw-r--r-- | net-libs/polarssl/files/polarssl-1.3.4-out-of-source.patch | 44 | ||||
-rw-r--r-- | net-libs/polarssl/files/polarssl-1.3.4-static.patch | 72 | ||||
-rw-r--r-- | net-libs/polarssl/files/polarssl-1.3.4-zlib.patch | 15 | ||||
-rw-r--r-- | net-libs/polarssl/metadata.xml | 9 | ||||
-rw-r--r-- | net-libs/polarssl/polarssl-1.3.4.ebuild | 92 |
7 files changed, 266 insertions, 5 deletions
diff --git a/net-libs/polarssl/ChangeLog b/net-libs/polarssl/ChangeLog index ada0bfb36de4..381791766714 100644 --- a/net-libs/polarssl/ChangeLog +++ b/net-libs/polarssl/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-libs/polarssl -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/polarssl/ChangeLog,v 1.67 2013/11/02 16:42:33 hwoarang Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/polarssl/ChangeLog,v 1.68 2014/03/11 12:31:32 hasufell Exp $ + +*polarssl-1.3.4 (11 Mar 2014) + + 11 Mar 2014; Julian Ospald <hasufell@gentoo.org> +polarssl-1.3.4.ebuild, + +files/polarssl-1.3.4-cflags.patch, + +files/polarssl-1.3.4-out-of-source.patch, + +files/polarssl-1.3.4-static.patch, +files/polarssl-1.3.4-zlib.patch, + metadata.xml: + version bump wrt #503562, add myself as maintainer 02 Nov 2013; Markos Chandras <hwoarang@gentoo.org> polarssl-1.3.0.ebuild: Add ~mips diff --git a/net-libs/polarssl/files/polarssl-1.3.4-cflags.patch b/net-libs/polarssl/files/polarssl-1.3.4-cflags.patch new file mode 100644 index 000000000000..6e4dc2cf840a --- /dev/null +++ b/net-libs/polarssl/files/polarssl-1.3.4-cflags.patch @@ -0,0 +1,26 @@ +From: Julian Ospald <hasufell@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) diff --git a/net-libs/polarssl/files/polarssl-1.3.4-out-of-source.patch b/net-libs/polarssl/files/polarssl-1.3.4-out-of-source.patch new file mode 100644 index 000000000000..0c4d05691033 --- /dev/null +++ b/net-libs/polarssl/files/polarssl-1.3.4-out-of-source.patch @@ -0,0 +1,44 @@ +From cd6d69a414711be7a66f676f685aab007592dbbc Mon Sep 17 00:00:00 2001 +From: Paul Bakker <p.j.bakker@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 hasufell@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 diff --git a/net-libs/polarssl/files/polarssl-1.3.4-static.patch b/net-libs/polarssl/files/polarssl-1.3.4-static.patch new file mode 100644 index 000000000000..1f268368f46b --- /dev/null +++ b/net-libs/polarssl/files/polarssl-1.3.4-static.patch @@ -0,0 +1,72 @@ +From: Julian Ospald <hasufell@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) diff --git a/net-libs/polarssl/files/polarssl-1.3.4-zlib.patch b/net-libs/polarssl/files/polarssl-1.3.4-zlib.patch new file mode 100644 index 000000000000..ddacfe0d34f0 --- /dev/null +++ b/net-libs/polarssl/files/polarssl-1.3.4-zlib.patch @@ -0,0 +1,15 @@ +From: Julian Ospald <hasufell@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) + diff --git a/net-libs/polarssl/metadata.xml b/net-libs/polarssl/metadata.xml index 1946720beeb7..1e313082357d 100644 --- a/net-libs/polarssl/metadata.xml +++ b/net-libs/polarssl/metadata.xml @@ -2,6 +2,9 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer> + <email>hasufell@gentoo.org</email> + </maintainer> + <maintainer> <email>tommy@gentoo.org</email> </maintainer> <longdescription lang="en"> @@ -9,9 +12,9 @@ cryptographic library written in C and targeted at embedded systems. </longdescription> <use> - <flag name="havege">Enable the HAVEGE random generator. - Warning: the HAVEGE random generator is not suitable for virtualized - environments + <flag name="havege">Enable the HAVEGE random generator. + Warning: the HAVEGE random generator is not suitable for + virtualized environments </flag> </use> </pkgmetadata> diff --git a/net-libs/polarssl/polarssl-1.3.4.ebuild b/net-libs/polarssl/polarssl-1.3.4.ebuild new file mode 100644 index 000000000000..ebf9747bd51b --- /dev/null +++ b/net-libs/polarssl/polarssl-1.3.4.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/polarssl/polarssl-1.3.4.ebuild,v 1.1 2014/03/11 12:31:32 hasufell Exp $ + +EAPI=5 + +inherit eutils multilib toolchain-funcs cmake-utils multilib-minimal + +DESCRIPTION="Cryptographic library for embedded systems" +HOMEPAGE="http://polarssl.org/" +SRC_URI="http://polarssl.org/download/${P}-gpl.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="examples havege sse2 static-libs zlib" + +RDEPEND=" + examples? ( + dev-libs/openssl:0 + amd64? ( abi_x86_32? ( + || ( + dev-libs/openssl:0[abi_x86_32] + app-emulation/emul-linux-x86-baselibs + ) + ) ) + ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND}" + +enable_polarssl_option() { + local myopt="$@" + # check that config.h syntax is the same at version bump + sed -i \ + -e "s://#define ${myopt}:#define ${myopt}:" \ + include/polarssl/config.h || die +} + +src_prepare() { + if use !examples ; then + >programs/CMakeLists.txt + fi + epatch "${FILESDIR}"/${P}-static.patch \ + "${FILESDIR}"/${P}-zlib.patch \ + "${FILESDIR}"/${P}-cflags.patch \ + "${FILESDIR}"/${P}-out-of-source.patch + + use sse2 && enable_polarssl_option POLARSSL_HAVE_SSE2 + use zlib && enable_polarssl_option POLARSSL_ZLIB_SUPPORT + use havege && enable_polarssl_option POLARSSL_HAVEGE_C +} + +multilib_src_configure() { + local mycmakeargs=( + $(cmake-utils_use_enable zlib ZLIB_SUPPORT) + $(cmake-utils_use_use static-libs STATIC_POLARSSL_LIBRARY) + -DUSE_SHARED_POLARSSL_LIBRARY=ON + -DINSTALL_POLARSSL_HEADERS=ON + -DLIB_INSTALL_DIR="/usr/$(get_libdir)" + ) + + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile +} + +multilib_src_test() { + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BUILD_DIR}/library" cmake-utils_src_test +} + +multilib_src_install() { + cmake-utils_src_install +} + +multilib_src_install_all() { + if use examples ; then + # avoid file collisions with sys-apps/coreutils + local p e + for p in "${ED%/}"/usr/bin/* ; do + if [[ -x "${p}" && ! -d "${p}" ]] ; then + mv "${p}" "${ED%/}"/usr/bin/polarssl_`basename "${p}"` || die + fi + done + for e in aes hash pkey ssl test ; do + docinto "${e}" + dodoc programs/"${e}"/*.c + dodoc programs/"${e}"/*.txt + done + fi +} |