# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=openpgm
pkgver=5.3.128
pkgrel=1
pkgdesc="Implementation of the PGM reliable multicast protocol"
url="https://www.freshports.org/net/openpgm/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	autoconf
	automake
	libtool
	perl
	python3
	"
subpackages="$pkgname-dev"
source="https://github.com/steve-o/openpgm/archive/refs/tags/release-${pkgver//./-}.tar.gz
	32-bits-mmx.patch
	"
builddir="$srcdir/openpgm-release-${pkgver//./-}/openpgm/pgm"
options="!check" # no tests

prepare() {
	default_prepare
	mv openpgm-5.2.pc.in openpgm-5.3.pc.in
	./bootstrap.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-shared \
		--disable-static
	make
}

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

sha512sums="
ad1148cb01d982be48ca35c027938e60fc86f2da3de14e994c3d390a6c5b13385893f2bd87d23c2d6cbd9015770ff72ef6fb1090b6ccf3bfd0812189e67fd3bd  release-5-3-128.tar.gz
e28ef5cbea52209f0405fa50d479ed2c8cf7cc1fcd82d4aa44fa8857b6af91c7f352d7afefee216de7a5ce23af6ed190072c9f29b686021b61396bdcb86ac50d  32-bits-mmx.patch
"
