# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xvidcore
pkgver=1.3.7
pkgrel=2
pkgdesc="XviD is an open source MPEG-4 video codec"
url="https://www.xvid.com/"
arch="all"
options="!check"  # No test suite
license="GPL-2.0-or-later"
subpackages="$pkgname-static $pkgname-dev"
source="https://downloads.xvid.com/downloads/xvidcore-$pkgver.tar.bz2"
builddir="$srcdir/$pkgname/build/generic"

prepare() {
	default_prepare

	update_config_guess
	update_config_sub
}

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

package() {
	make DESTDIR="$pkgdir" install
}
sha512sums="e2b22e7a7e103af7adcc999d95484f991a0a33df02b912fe042b2e23d2af07381c737d23158dbf0fad770ee680572f86fbe04ab2ef33c81e2e0180ead2acc8ed  xvidcore-1.3.7.tar.bz2"
