# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Cág <ca6c@bitmessage.ch>
pkgname=pcc-libs
pkgver=20171006
pkgrel=0
pkgdesc="The portable C compiler support libraries."
url="http://pcc.ludd.ltu.se/"
arch="x86 x86_64"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev"
source="ftp://pcc.ludd.ltu.se/pub/$pkgname/pcc-libs-$pkgver.tgz
	musl-fixes.patch"

builddir="$srcdir/"$pkgname-$pkgver
prepare() {
	default_prepare || return 1

	cd "$builddir"
	update_config_sub || return 1
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		|| return 1
	make -j1 || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="04f59205866a71f88c48793573b662280a69f1f32767e9f9260c1f48bf296f397affd98a50229f6181f5e30a8c4c96dcafd5a91db36b97f4bc10bcf6b462ffe4  pcc-libs-20171006.tgz
fd8c71cd583c6be29553f2b7e6ce66073afd6d0406ae86f6fbb6a36efe8685be4732d2989180a9b31af734cc9a0973c1c731472f02bad076121f6c3c58391fc4  musl-fixes.patch"
