Subject: [alpine-aports] [PATCH v2] testing/double-conversion: new aport

From: David Huffman <[email-masked]>
Date: Sat, 9 Jan 2016 08:16:21 -0500

https://github.com/google/double-conversion
Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles
---
 testing/double-conversion/APKBUILD               | 51 ++++++++++++++++++++++++
 testing/double-conversion/dont_build_tests.patch | 11 +++++
 2 files changed, 62 insertions(+)
 create mode 100644 testing/double-conversion/APKBUILD
 create mode 100644 testing/double-conversion/dont_build_tests.patch

diff --git a/testing/double-conversion/APKBUILD b/testing/double-conversion/APKBUILD
new file mode 100644
index 0000000..d595ab5
--- /dev/null
+++ b/testing/double-conversion/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: David Huffman <[email-masked]>
+# Maintainer: David Huffman <[email-masked]>
+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"
+}
+
+package() {
+	local docdir="$pkgdir/usr/share/doc/$pkgname"
+	local incdir="$pkgdir/usr/include/$pkgname"
+	mkdir -p "$docdir" "$incdir"
+	
+	cd "$_builddir"
+	scons -j "$JOBS" DESTDIR="$pkgdir" prefix=/usr CXXFLAGS="$_cxxflags" install
+	find src -name '*.h' -exec cp {} "$incdir" \;
+	cp AUTHORS COPYING LICENSE README "$docdir"
+}
+
+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"
diff --git a/testing/double-conversion/dont_build_tests.patch b/testing/double-conversion/dont_build_tests.patch
new file mode 100644
index 0000000..c32d9ac
--- /dev/null
+++ b/testing/double-conversion/dont_build_tests.patch
@@ -0,0 +1,11 @@
+--- /SConstruct	2016-01-09 04:30:12.325136237 -0500
++++ /SConstruct	2016-01-09 04:36:53.218037606 -0500
+@@ -37,7 +37,7 @@ static_lib = env.StaticLibrary(library_n
+ static_lib_pic = env.StaticLibrary(library_name + '_pic', double_conversion_shared_objects)
+ shared_lib = env.SharedLibrary(library_name, double_conversion_shared_objects)
+ 
+-env.Program('run_tests', double_conversion_test_sources, LIBS=[static_lib])
++#env.Program('run_tests', double_conversion_test_sources, LIBS=[static_lib])
+ 
+ env.InstallVersionedLib(libdir, shared_lib)
+ env.Install(libdir, static_lib)
-- 
2.6.2

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---