# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=libmcrypt
pkgver=2.5.8
pkgrel=10
pkgdesc="A library which provides a uniform interface to several symmetric encryption algorithms"
url="https://mcrypt.sourceforge.net/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="libtool"
subpackages="$pkgname-doc $pkgname-dev"
source="https://downloads.sourceforge.net/mcrypt/libmcrypt-$pkgver.tar.bz2
	fix_enigma.patch
	"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--disable-posix-threads
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="6c05c42767401d66af67b0922b207d17cdb1c3efdbfdfb5b0c2e651821c48a8a6c6749debfa0206091b8a801f538fabe9f7d95ebc86d82c6b84c8001031d50fe  libmcrypt-2.5.8.tar.bz2
d39ffc4cab1692159a93f9f4f9c8d7386be0135396bae95a06978288d8462241d1d17fbfaffce52dbec065667fb9e21c36b350a1710ccf7620611b4a80d511ab  fix_enigma.patch"
