Gentoo Archives: gentoo-musl

From: Nicholas Fish <gentoo@××××××××××.net>
To: gentoo-musl@l.g.o
Subject: [gentoo-musl] [PATCH] sci-libs/libqalculate: add with patch to include time.h
Date: Sat, 21 Jan 2017 13:46:42
Message-Id: 1208e3e5-f618-4752-b659-ea858d51247c@seaofdirac.net
1 ---
2 sci-libs/libqalculate/Manifest | 4 ++
3 .../files/libqalculate-0.9.10-timeh.patch | 52 +++++++++++++++++
4 sci-libs/libqalculate/libqalculate-0.9.10.ebuild | 67
5 ++++++++++++++++++++++
6 sci-libs/libqalculate/metadata.xml | 11 ++++
7 4 files changed, 134 insertions(+)
8 create mode 100644 sci-libs/libqalculate/Manifest
9 create mode 100644
10 sci-libs/libqalculate/files/libqalculate-0.9.10-timeh.patch
11 create mode 100644 sci-libs/libqalculate/libqalculate-0.9.10.ebuild
12 create mode 100644 sci-libs/libqalculate/metadata.xml
13
14 diff --git a/sci-libs/libqalculate/Manifest b/sci-libs/libqalculate/Manifest
15 new file mode 100644
16 index 0000000..0f42260
17 --- /dev/null
18 +++ b/sci-libs/libqalculate/Manifest
19 @@ -0,0 +1,4 @@
20 +AUX libqalculate-0.9.10-timeh.patch 1712 SHA256
21 73c3be9e7adc0df5a1ee0e7b1853fac7bab69681d60ac229e673e23d11233413 SHA512
22 a84e8ecaae4b032e9aa7d9533c22f8e315766d3f4807581d7df0d4e271e3c0d7d7f6097fd919cf3b2f08ce84d59683603b514a04924a2cced102096b65dfd746
23 WHIRLPOOL
24 1963fe0a7040269dafce723bfa66b0ad964aacf31567f0164248c16b683a37ffde299873339a0f407edfaafbcd264d5d6568ecc3762e231cd27f7327c9062eb5
25 +DIST libqalculate-0.9.10.tar.gz 1509229 SHA256
26 7d81e1b15bc1e674e3d4db71c4fc08dafcef830e6acd39f65034e3c0f694b3b9 SHA512
27 e7f39c5cc4cfdc0cdf9c4e7b79f95332170459fd93769043c43798377562ca939df49904fe4291371a4431a922c320a5f0dcce5f2bedbcdf0496723e125cd5c0
28 WHIRLPOOL
29 4974f7208654557074108801502fbec5178ba4eab936fd8a7fc88e8963dd83368ec8842c08f2f01146b66fa2cbb93e88572d857cd763594ea36663117250ba53
30 +EBUILD libqalculate-0.9.10.ebuild 1454 SHA256
31 2d38615b79dc843e198516c520eba7ee69d853a89f1540c45e4bed5b37f5e331 SHA512
32 04c5753d565413eabb0095ecb1dfc07bd803707326d780242e2bca4051b723b74e1a74204b41dd112a7f370caa3be2286ab0cc2ba7280fa27156780a2c286b65
33 WHIRLPOOL
34 c6549184e467a7b46f174fc00d900b4debf18f722ca3c51d9645a49afa242729a2c2bd6017f790d8b6d73073b44494d9f4d5d9f544b117fce991a0023a442471
35 +MISC metadata.xml 340 SHA256
36 beef99606b34e7d8d9e86bfe56b5f6f890cbdfbbea277c1c0a7e3e0eb0991ee6 SHA512
37 d002b696b1ce49bce80e4af12910f087acdb99edfe781b5fdaa219ca1e6c2fb271c737ff6ce7d4491d0b815075f97f7770937e5912fd199855b4ab4efc5327f8
38 WHIRLPOOL
39 33110873830579b7a32fbea44c82897fd595cf1413e294073d2b89bc9670c530d204d4e608a870d27c18e9e464e65528560dc3df58fc27da3258f98fdbe67a71
40 diff --git a/sci-libs/libqalculate/files/libqalculate-0.9.10-timeh.patch
41 b/sci-libs/libqalculate/files/libqalculate-0.9.10-timeh.patch
42 new file mode 100644
43 index 0000000..3707efe
44 --- /dev/null
45 +++ b/sci-libs/libqalculate/files/libqalculate-0.9.10-timeh.patch
46 @@ -0,0 +1,52 @@
47 +From ed69f7c667f4fe660584cf466728a46148aee9a2 Mon Sep 17 00:00:00 2001
48 +From: Nicholas Fish <github@××××××××××.net>
49 +Date: Sat, 21 Jan 2017 12:48:14 +0100
50 +Subject: [PATCH] add missing sys/time.h header
51 +
52 +struct timeval is defined in sys/time.h with a musl toolchain.
53 +
54 +Fixes:
55 +In file included from Function.cc:16:0:
56 +Calculator.h:241:17: error: field 't_print_end' has incomplete type
57 'timeval'
58 + struct timeval t_print_end;
59 + ^~~~~~~~~~~
60 +Calculator.h:241:9: note: forward declaration of 'struct timeval'
61 + struct timeval t_print_end;
62 + ^~~~~~~
63 +In file included from Calculator.cc:14:0:
64 +Calculator.h:241:17: error: field 't_print_end' has incomplete type
65 'timeval'
66 + struct timeval t_print_end;
67 + ^~~~~~~~~~~
68 +Calculator.h:241:9: note: forward declaration of 'struct timeval'
69 + struct timeval t_print_end;
70 + ^~~~~~~
71 +In file included from DataSet.cc:17:0:
72 +Calculator.h:241:17: error: field 't_print_end' has incomplete type
73 'timeval'
74 + struct timeval t_print_end;
75 + ^~~~~~~~~~~
76 +Calculator.h:241:9: note: forward declaration of 'struct timeval'
77 + struct timeval t_print_end;
78 + ^~~~~~~
79 +In file included from Variable.cc:16:0:
80 +Calculator.h:241:17: error: field 't_print_end' has incomplete type
81 'timeval'
82 + struct timeval t_print_end;
83 + ^~~~~~~~~~~
84 +---
85 + libqalculate/Calculator.h | 1 +
86 + 1 file changed, 1 insertion(+)
87 +
88 +diff --git a/libqalculate/Calculator.h b/libqalculate/Calculator.h
89 +index b4cfc57..2346e73 100644
90 +--- a/libqalculate/Calculator.h
91 ++++ b/libqalculate/Calculator.h
92 +@@ -14,6 +14,7 @@
93 +
94 + #include <libqalculate/includes.h>
95 + #include <libqalculate/util.h>
96 ++#include <sys/time.h>
97 + #include <pthread.h>
98 +
99 + /** @file */
100 +--
101 +2.11.0
102 +
103 diff --git a/sci-libs/libqalculate/libqalculate-0.9.10.ebuild
104 b/sci-libs/libqalculate/libqalculate-0.9.10.ebuild
105 new file mode 100644
106 index 0000000..d902451
107 --- /dev/null
108 +++ b/sci-libs/libqalculate/libqalculate-0.9.10.ebuild
109 @@ -0,0 +1,67 @@
110 +# Copyright 1999-2017 Gentoo Foundation
111 +# Distributed under the terms of the GNU General Public License v2
112 +# $Id$
113 +
114 +EAPI=6
115 +
116 +DESCRIPTION="A modern multi-purpose calculator library"
117 +HOMEPAGE="https://qalculate.github.io/"
118 +SRC_URI="https://github.com/Qalculate/${PN}/releases/download/v${PV}/${P}.tar.gz"
119 +
120 +LICENSE="GPL-2"
121 +SLOT="0/6"
122 +KEYWORDS="alpha amd64 ~arm ~hppa ia64 ppc ppc64 sparc x86 ~amd64-linux
123 ~x86-linux"
124 +IUSE="gnuplot readline static-libs"
125 +
126 +COMMON_DEPEND="
127 + dev-libs/glib:2
128 + dev-libs/libxml2:2
129 + >=sci-libs/cln-1.2
130 + sys-libs/zlib
131 + readline? ( sys-libs/readline:0= )"
132 +DEPEND="${COMMON_DEPEND}
133 + dev-util/intltool
134 + sys-devel/gettext
135 + virtual/pkgconfig"
136 +RDEPEND="${COMMON_DEPEND}
137 + net-misc/wget
138 + gnuplot? ( >=sci-visualization/gnuplot-3.7 )"
139 +
140 +PATCHES=(
141 + # https://github.com/Qalculate/libqalculate/pull/17
142 + "${FILESDIR}"/${P}-timeh.patch
143 +)
144 +
145 +src_prepare() {
146 + default
147 +
148 + cat >po/POTFILES.skip <<-EOF
149 + # Required by make check
150 + data/currencies.xml.in
151 + data/datasets.xml.in
152 + data/elements.xml.in
153 + data/functions.xml.in
154 + data/planets.xml.in
155 + data/units.xml.in
156 + data/variables.xml.in
157 + src/defs2doc.cc
158 + EOF
159 +}
160 +
161 +src_configure() {
162 + econf \
163 + $(use_enable static-libs static) \
164 + $(use_with readline)
165 +}
166 +
167 +src_install() {
168 + # docs/reference/Makefile.am -> referencedir=
169 + emake \
170 + DESTDIR="${D}" \
171 + referencedir="${EPREFIX}/usr/share/doc/${PF}/html" \
172 + install
173 +
174 + dodoc AUTHORS ChangeLog NEWS README* TODO
175 +
176 + find "${ED}" -name '*.la' -delete || die
177 +}
178 diff --git a/sci-libs/libqalculate/metadata.xml
179 b/sci-libs/libqalculate/metadata.xml
180 new file mode 100644
181 index 0000000..8ba3fbc
182 --- /dev/null
183 +++ b/sci-libs/libqalculate/metadata.xml
184 @@ -0,0 +1,11 @@
185 +<?xml version="1.0" encoding="UTF-8"?>
186 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
187 +<pkgmetadata>
188 + <maintainer type="project">
189 + <email>sci@g.o</email>
190 + <name>Gentoo Science Project</name>
191 + </maintainer>
192 + <upstream>
193 + <remote-id type="sourceforge">.tar.gz</remote-id>
194 + </upstream>
195 +</pkgmetadata>
196 --
197 2.11.0