polarssl: bump version

This commit is contained in:
Jerome Duval
2014-08-05 17:48:44 +00:00
parent e171990709
commit aabfe9e4ce
2 changed files with 157 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
From c2f45c3ce538e84287436cabf461b8fcef130cbe Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Sat, 21 Jun 2014 22:37:56 +0000
Subject: library: Link in libnetwork on Haiku
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index bc986ee..5812e35 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -77,6 +77,10 @@ if(WIN32)
set(libs ws2_32)
endif(WIN32)
+if(HAIKU)
+set(libs network)
+endif(HAIKU)
+
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS_CHECK} -Wmissing-declarations -Wmissing-prototypes")
set(CMAKE_C_FLAGS_CHECKFULL "${CMAKE_C_FLAGS_CHECK} -Wcast-qual")
--
1.8.3.4
From 876ce21944ebe3944ab1bb5d5bfecd7de3ec5738 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Sun, 22 Jun 2014 01:17:39 +0000
Subject: cmake: Detect old gcc and adjust flags
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86439ad..8778ad4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,14 @@ project(POLARSSL C)
string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")
if(CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement")
+ execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
+ OUTPUT_VARIABLE GCC_VERSION)
+ if(GCC_VERSION VERSION_GREATER 3.0)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement")
+ else()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W")
+ endif()
+
set(CMAKE_C_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_DEBUG "-g3 -O0")
set(CMAKE_C_FLAGS_COVERAGE "-g3 -O0 --coverage")
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index b8a125c..9586320 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -29,8 +29,13 @@ function(add_test_suite suite_name)
add_test(${data_name}-suite test_suite_${data_name})
endfunction(add_test_suite)
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-unused-value")
-set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS_CHECK} -Wno-unused-function -Wno-unused-value")
+execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
+ OUTPUT_VARIABLE GCC_VERSION)
+if(GCC_VERSION VERSION_GREATER 3.0)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-unused-value")
+ set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS_CHECK} -Wno-unused-function -Wno-unused-value")
+endif()
+
if(CMAKE_COMPILER_IS_CLANG)
set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS_CHECK} -Wno-unreachable-code")
endif(CMAKE_COMPILER_IS_CLANG)
--
1.8.3.4

View File

@@ -0,0 +1,83 @@
SUMMARY="An easy to understand, use, integrate, and expand SSL library"
DESCRIPTION="
PolarSSL is a official continuation fork of the XySSL SSL library. \
XySSL was created by the french white hat hacker Christophe Devine \
and was first released on November 1, 2006 under the GPL and BSD \
licenses. The core SSL library is written in C without external \
dependencies.
"
HOMEPAGE="https://www.polarssl.org"
SRC_URI="https://polarssl.org/download/polarssl-${portVersion}-gpl.tgz"
CHECKSUM_SHA256="318171db41335cacbb5b0047c94f1faf91442ab70a223b5223436703c9406ff1"
LICENSE="GNU GPL v2"
COPYRIGHT="
2008-2014 Offspark B.V.
"
REVISION="1"
ARCHITECTURES="?x86_gcc2 x86 x86_64 arm"
SECONDARY_ARCHITECTURES="?x86_gcc2 x86"
PATCHES="polarssl-$portVersion.patchset"
PROVIDES="
polarssl$secondaryArchSuffix = $portVersion compat >= 6
lib:libpolarssl$secondaryArchSuffix = $portVersion compat >= 6
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libz$secondaryArchSuffix >= 1.2.3
"
BUILD_REQUIRES="
devel:libz$secondaryArchSuffix >= 1.2.3
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:gcc${secondaryArchSuffix}
cmd:ld${secondaryArchSuffix}
cmd:cmake
cmd:make
cmd:perl >= 5
cmd:sed
"
BUILD()
{
# enable static and shared PolarSSL libraries
cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DENABLE_PROGRAMS=0 \
-DUSE_SHARED_POLARSSL_LIBRARY=1 -DUSE_STATIC_POLARSSL_LIBRARY=1 .
make ${jobArgs}
}
INSTALL()
{
make install
# move include dir to correct location
mkdir -p $(dirname $includeDir)
mv $prefix/include $includeDir
# prepare develop/lib
prepareInstalledDevelLibs libpolarssl
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}
TEST()
{
make test
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
polarssl${secondaryArchSuffix}_devel = $portVersion
devel:libpolarssl${secondaryArchSuffix} = $portVersion compat >= 6
"
REQUIRES_devel="
polarssl${secondaryArchSuffix} == $portVersion base
"