aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/double-conversion/APKBUILD
blob: 2a39f240f795db7f8edf96d03f201c1bf0a16288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Contributor: David Huffman <storedbox@outlook.com>
# Maintainer: David Huffman <storedbox@outlook.com>
pkgname=double-conversion
pkgver=2.0.1
pkgrel=0
pkgdesc="Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles"
url="https://github.com/google/double-conversion"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev scons"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/google/double-conversion/archive/v$pkgver/$pkgname-$pkgver.tar.gz
        dont_build_tests.patch"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

_cxxflags="$CXXFLAGS $LDFLAGS -Wall -Werror -DNDEBUG"
build() {
	cd "$_builddir"
	scons -j "$JOBS" DESTDIR="$pkgdir" prefix=/usr CXXFLAGS="$_cxxflags" || return 1
}

package() {
	local docdir="$pkgdir/usr/share/doc/$pkgname"
	local incdir="$pkgdir/usr/include/$pkgname"
	mkdir -p "$docdir" "$incdir" || return 1
	
	cd "$_builddir"
	scons -j "$JOBS" DESTDIR="$pkgdir" prefix=/usr CXXFLAGS="$_cxxflags" install || return 1
	find src -name '*.h' -exec cp {} "$incdir" \; || return 1
	cp AUTHORS COPYING LICENSE README "$docdir" || return 1
}

md5sums="60c564ad17a19924bfec831ebd09edea  double-conversion-2.0.1.tar.gz
3e6e09b28b091d4fac9593b14721ae88  dont_build_tests.patch"
sha256sums="ca9ec6974eaaa29827b916c90666fba3b0b6641030fe2ab34a81e280187acdef  double-conversion-2.0.1.tar.gz
fc27718ca0179f8c1da181a6bff99aeea3faf0fcedb28af9fb554f87bcd9b49c  dont_build_tests.patch"
sha512sums="a4773dc95e9267d8426dda976586aa1ba968ead28b118caae9b1b7c123d1eea4aba5b588fde9a109a99a068a79a3a2426f12d6caadea8c548d4250e56eff33a4  double-conversion-2.0.1.tar.gz
fe0c3a2fb3d143e2278b46fee1c88cf1508eb0ba99081f702f3282fe2f674a479d8c2911d8f56778a3e73ac3735a223ee39d76d1e9d104f375f55016245149c4  dont_build_tests.patch"