libmd: new recipe (#1201)

This commit is contained in:
miqlas
2017-03-02 14:35:14 +01:00
committed by Jérôme Duval
parent 1159d206cd
commit b7b09f6106
3 changed files with 131 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
SUMMARY="Message Digest functions from BSD systems"
DESCRIPTION="This library provides message digest functions found on BSD \
systems either on their libc libraries and lacking on others like GNU systems.
The currently provided message digest algorithms are:
- MD2
- MD4
- MD5
- RIPEMD-160
- SHA-1
- SHA-2 (SHA-256, SHA-384 and SHA-512)
"
HOMEPAGE="https://www.hadrons.org/software/libmd/"
COPYRIGHT="2009, 2011, 2016 Guillem Jover
2000-2001 Aaron D. Gifford
2001 Markus Friedl
2001 The NetBSD Foundation
1997, 2003, 2004 Todd C. Miller
Poul-Henning Kamp
Colin Plumb
Steve Reid
"
LICENSE="BSD (3-clause)
BSD (2-clause)
ISC
Public Domain"
REVISION="1"
SOURCE_URI="https://libbsd.freedesktop.org/releases/libmd-$portVersion.tar.xz"
CHECKSUM_SHA256="fd3f2366236fb3fd0dac0c0a77ffff8511e2939c79d1d58daf56e3f5ee383a88"
PATCHES="libmd-$portVersion.patchset"
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
libmd$secondaryArchSuffix = $portVersion
lib:libmd$secondaryArchSuffix = $portVersion compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libmd${secondaryArchSuffix}_devel = $portVersion
devel:libmd$secondaryArchSuffix = $portVersion compat >= 0
"
REQUIRES_devel="
haiku${secondaryArchSuffix}_devel
libmd$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku_devel$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:autoheader
cmd:automake
cmd:autoreconf
cmd:awk
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:sed
"
BUILD()
{
autoreconf -fi
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm -f $libDir/libmd.la
prepareInstalledDevelLib libmd
fixPkgconfig
packageEntries devel \
$developDir
}
TEST()
{
make check
}

View File

@@ -0,0 +1,11 @@
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE

View File

@@ -0,0 +1,27 @@
From 5b8465a3d576188312c83e111039e7d1a1182161 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Thu, 2 Mar 2017 11:00:39 +0100
Subject: [PATCH] Endiannes support on Haiku
---
src/sha2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/sha2.c b/src/sha2.c
index 029d0d4..5cbbe2b 100644
--- a/src/sha2.c
+++ b/src/sha2.c
@@ -36,6 +36,10 @@
#include <sys/types.h>
+#ifdef __HAIKU__
+#include <posix/endian.h>
+#endif
+
#include <string.h>
#include <sha2.h>
--
2.11.0