APKBUILD 1.53 KB
Newer Older
Jose-Luis Rivas's avatar
Jose-Luis Rivas committed
1
# Contributor: Jose-Luis Rivas <ghostbar@riseup.net>
Oleg Titov's avatar
Oleg Titov committed
2
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
Natanael Copa's avatar
Natanael Copa committed
3 4
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libuv
Leo's avatar
Leo committed
5
pkgver=1.33.1
A. Klitzing's avatar
A. Klitzing committed
6
pkgrel=0
Natanael Copa's avatar
Natanael Copa committed
7
pkgdesc="Cross-platform asychronous I/O"
8
url="https://libuv.org"
Natanael Copa's avatar
Natanael Copa committed
9
arch="all"
Sören Tempel's avatar
Sören Tempel committed
10
license="MIT BSD ISC"
11 12
makedepends_build="automake autoconf libtool"
makedepends_host="linux-headers"
Oleg Titov's avatar
Oleg Titov committed
13
subpackages="$pkgname-static $pkgname-dev $pkgname-dbg"
14 15 16
source="https://dist.libuv.org/dist/v$pkgver/libuv-v$pkgver.tar.gz
	revert-test-udp-multicast-join-1.31.patch
	"
Jakub Jirutka's avatar
Jakub Jirutka committed
17
builddir="$srcdir/$pkgname-v$pkgver"
Sören Tempel's avatar
Sören Tempel committed
18

Natanael Copa's avatar
Natanael Copa committed
19
prepare() {
20
	default_prepare
Jakub Jirutka's avatar
Jakub Jirutka committed
21
	cd "$builddir"
22
	sh autogen.sh
Natanael Copa's avatar
Natanael Copa committed
23 24 25
}

build() {
Jakub Jirutka's avatar
Jakub Jirutka committed
26
	cd "$builddir"
Sören Tempel's avatar
Sören Tempel committed
27 28 29 30 31 32
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
33 34 35 36 37 38
		--localstatedir=/var
	make CFLAGS="$CFLAGS -D__USE_MISC" BUILDTYPE=Release
}

check() {
	cd "$builddir"
39 40 41 42 43 44 45 46 47
	# see https://github.com/libuv/libuv/issues/2307
	case $CARCH in
		x86*)
			if test $DRONE; then
				sed -i "s/TEST_.*(ipc_closed_handle)//g" test/test-list.h
			fi
		;;
	esac

48
	make check
Natanael Copa's avatar
Natanael Copa committed
49 50 51
}

package() {
Jakub Jirutka's avatar
Jakub Jirutka committed
52
	cd "$builddir"
53
	make DESTDIR="$pkgdir" install
Sören Tempel's avatar
Sören Tempel committed
54 55
	install -Dm644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
Natanael Copa's avatar
Natanael Copa committed
56 57
}

58 59
sha512sums="58d1568beaec42052a2c11efdae9f75f4bf5d3e428c863d48cdc73874083b9395b509dac8b187524a09f4ceae1659ea1dfceb9ffb621e9a7574bb12ac76051d4  libuv-v1.33.1.tar.gz
f341410a6c693d4ef6c11b72d13d28690dcab3978b500c9cdf5ee5dbee0b9703b92d39f117109c5b3069831b5c92d804fc161de107a95f42dfdad0ffcb96868b  revert-test-udp-multicast-join-1.31.patch"