mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 20:20:06 +02:00
nettle: bump to 3.3, enable x86_gcc2, add tiny gcc2 patch.
* Unlike 3.2, which would not build on x86_gcc2 without a patch, 3.3 builds fine without any patch. A tiny one is only required for "make check". * Update (GNU) LICENSE: LGPL v2.1 -> GPL v2 + GPL v3 + LGPL v3. * Switch SOURCE_URI to https. * Add $secondaryArchSuffix to cmd:libtoolize in BUILD_PREREQUIRES. * Drop PATCH(), previously used to skip -lm and add -lroot. * Drop unneeded calls to libtoolize and autoconf. * Add TEST() with "make check" (and an appropriate LIBRARY_PATH.) All tests are OK, except for the Camellia cipher on x86_gcc2.
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
SUMMARY="Low-level cryptographic library"
|
||||
DESCRIPTION="Nettle is a cryptographic library that is designed to fit easily \
|
||||
in more or less any context: In crypto toolkits for object-oriented languages \
|
||||
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel \
|
||||
space."
|
||||
HOMEPAGE="https://www.lysator.liu.se/~nisse/nettle/"
|
||||
COPYRIGHT="2001-2015 Niels Möller"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="ftp://ftp.gnu.org/gnu/nettle/nettle-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5fd4d25d64d8ddcb85d0d897572af73b05b4d163c6cc49438a5bfbb8ff293d4c"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
nettle$secondaryArchSuffix = $portVersion
|
||||
lib:libnettle$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libgmp$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
nettle${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libnettle$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_devel="
|
||||
nettle$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgmp$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i 's/-lm/-lroot/g' $sourceDir/Makefile.in
|
||||
sed -i 's/-lm/-lroot/g' $sourceDir/examples/Makefile.in
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
autoconf
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLibs libnettle
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel $developDir
|
||||
}
|
||||
@@ -5,18 +5,21 @@ in more or less any context: In crypto toolkits for object-oriented languages \
|
||||
space."
|
||||
HOMEPAGE="https://www.lysator.liu.se/~nisse/nettle/"
|
||||
COPYRIGHT="2001-2016 Niels Möller"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
LICENSE="GNU GPL v2
|
||||
GNU GPL v3
|
||||
GNU LGPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="ftp://ftp.gnu.org/gnu/nettle/nettle-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="ea4283def236413edab5a4cf9cf32adf540c8df1b9b67641cfc2302fca849d97"
|
||||
SOURCE_URI="https://ftp.gnu.org/gnu/nettle/nettle-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e"
|
||||
PATCHES="nettle-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
nettle$secondaryArchSuffix = $portVersion
|
||||
lib:libnettle$secondaryArchSuffix = 6.2 compat >= 6
|
||||
lib:libhogweed$secondaryArchSuffix = 4.2 compat >= 4
|
||||
lib:libnettle$secondaryArchSuffix = 6.3 compat >= 6
|
||||
lib:libhogweed$secondaryArchSuffix = 4.3 compat >= 4
|
||||
"
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
PROVIDES="$PROVIDES
|
||||
@@ -35,8 +38,8 @@ REQUIRES="
|
||||
|
||||
PROVIDES_devel="
|
||||
nettle${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libnettle$secondaryArchSuffix = 6.2 compat >= 6
|
||||
devel:libhogweed$secondaryArchSuffix = 4.2 compat >= 4
|
||||
devel:libnettle$secondaryArchSuffix = 6.3 compat >= 6
|
||||
devel:libhogweed$secondaryArchSuffix = 4.3 compat >= 4
|
||||
"
|
||||
REQUIRES_devel="
|
||||
nettle$secondaryArchSuffix == $portVersion base
|
||||
@@ -52,20 +55,12 @@ BUILD_PREREQUIRES="
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i 's/-lm/-lroot/g' $sourceDir/Makefile.in
|
||||
sed -i 's/-lm/-lroot/g' $sourceDir/examples/Makefile.in
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
autoconf
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
@@ -80,10 +75,13 @@ INSTALL()
|
||||
|
||||
packageEntries devel $developDir
|
||||
|
||||
# Remove stuff we don't need in the secondary architecture base package,
|
||||
# since we make it depend on the primary package.
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
rm -rf $binDir
|
||||
rm -rf $documentationDir
|
||||
fi
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
LIBRARY_PATH="$sourceDir/.lib:$LIBRARY_PATH" make check
|
||||
}
|
||||
28
net-libs/nettle/patches/nettle-3.3.patchset
Normal file
28
net-libs/nettle/patches/nettle-3.3.patchset
Normal file
@@ -0,0 +1,28 @@
|
||||
From ebb8c4bd54a701a4cd52afbe6e99d19a956e6d00 Mon Sep 17 00:00:00 2001
|
||||
From: fbrosson <fbrosson@localhost>
|
||||
Date: Sat, 1 Oct 2016 07:41:20 +0000
|
||||
Subject: gcc2 patch for testsuite/memeql-test.c
|
||||
|
||||
|
||||
diff --git a/testsuite/memeql-test.c b/testsuite/memeql-test.c
|
||||
index 356671d..c2b999d 100644
|
||||
--- a/testsuite/memeql-test.c
|
||||
+++ b/testsuite/memeql-test.c
|
||||
@@ -32,7 +32,7 @@ test_main(void)
|
||||
struct knuth_lfib_ctx random_ctx;
|
||||
|
||||
knuth_lfib_init (&random_ctx, 11);
|
||||
-
|
||||
+ {
|
||||
size_t size;
|
||||
for (size = 0; size < 50; size++)
|
||||
{
|
||||
@@ -50,4 +50,5 @@ test_main(void)
|
||||
b[i] = orig[i];
|
||||
}
|
||||
}
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
||||
Reference in New Issue
Block a user