1SUMMARY = "Library of hashing algorithms."
2DESCRIPTION = "\
3  Mhash is a free (under GNU Lesser GPL) library \
4  which provides a uniform interface to a large number of hash \
5  algorithms. These algorithms can be used to compute checksums, \
6  message digests, and other signatures. \
7  "
8HOMEPAGE = "http://mhash.sourceforge.net/"
9
10LICENSE = "LGPL-2.0-only"
11LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
12
13S = "${UNPACKDIR}/mhash-${PV}"
14
15SECTION = "libs"
16
17SRC_URI = "${SOURCEFORGE_MIRROR}/mhash/mhash-${PV}.tar.bz2 \
18    file://Makefile.test \
19    file://mhash.c \
20    file://run-ptest \
21    "
22
23SRC_URI[md5sum] = "f91c74f9ccab2b574a98be5bc31eb280"
24SRC_URI[sha256sum] = "56521c52a9033779154432d0ae47ad7198914785265e1f570cee21ab248dfef0"
25
26inherit autotools-brokensep ptest multilib_header
27
28do_install:append() {
29    oe_multilib_header mutils/mhash_config.h
30}
31
32do_compile_ptest() {
33    if [ ! -d ${S}/demo ]; then mkdir ${S}/demo; fi
34    cp ${UNPACKDIR}/Makefile.test ${S}/demo/Makefile
35    cp ${UNPACKDIR}/mhash.c ${S}/demo/
36    make -C ${S}/demo CFLAGS="${CFLAGS} -I${S}/include/" LDFLAGS="${LDFLAGS} -L${S}/lib/.libs"
37}
38
39do_install_ptest() {
40    install -m 0755 ${S}/demo/mhash ${D}${PTEST_PATH}
41}
42
43BBCLASSEXTEND = "native"
44