polarssl: Introduce PolarSSL port, 1.3.7

* OpenSSL alternative with minimal patching
  for Haiku
* All tests passing on x86.
* Needs testing on x86_gcc2
This commit is contained in:
Alexander von Gluck IV
2014-06-21 23:52:26 +00:00
parent 027c78b333
commit fccfcddf34
2 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
From ec9957b03a66ec7a8656c75bb47f2937f62ff98b 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: [PATCH] library: Link in libnetwork on Haiku
---
library/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 86ccee1..1aaa421 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -75,6 +75,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

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="6beef0281160bf07fefefd6b412dd1ce4c39261cf5300835aef442253f0400e5"
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
"