1 |
commit: dda894edbd7a7d611fbec0c3c18bce3c5f66ca5d |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 12 09:56:29 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 12 09:57:20 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dda894ed |
7 |
|
8 |
net-libs/osptoolkit: Version bump to 4.13.0 |
9 |
|
10 |
* Also fix GCC 5 bug |
11 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=581058 |
12 |
|
13 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
14 |
|
15 |
net-libs/osptoolkit/Manifest | 1 + |
16 |
.../osptoolkit/files/osptoolkit-4.13.0-gcc5.patch | 17 ++++ |
17 |
net-libs/osptoolkit/osptoolkit-4.13.0.ebuild | 98 ++++++++++++++++++++++ |
18 |
3 files changed, 116 insertions(+) |
19 |
|
20 |
diff --git a/net-libs/osptoolkit/Manifest b/net-libs/osptoolkit/Manifest |
21 |
index 6769370559..0a5720a2d8 100644 |
22 |
--- a/net-libs/osptoolkit/Manifest |
23 |
+++ b/net-libs/osptoolkit/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST OSPToolkit-3.5.0.tar.gz 393788 SHA256 b15e2b8deec032c1e12dcbf28e2fe2b3f964ebab647e0705ec051bf17932d7b1 SHA512 2687bed2a8d67c7571c1b5a854b8204120e19b0105af16cbdfed58ac2462cf6d5805760dc23a4565d696fef5b9b5207ae9ae3489797f5cf2cfdf0a46af9fa82e WHIRLPOOL 34c303097d70d91e23a4e0ac4d1a8638915d42db9999de2367543934571675e0546ca81940b9a597e482d4da5cccea3f314ecb9329d6ce97a7422c8ad62dbf16 |
26 |
DIST OSPToolkit-4.1.5.tar.gz 408481 SHA256 a0bf3247494375e63a75b4520c5c9aaaa0ed1423df54a013598c83a95846fccf SHA512 cc6244c0a62167ce90c85e646b13c991cac6d3663888ca4738666675f3c6c4904463e8502de376eab40cfd89e1d5c3d208d4ccaa58a95ed7a5895d74ea31aecc WHIRLPOOL 86111ab57301cf056a0ae9da56ce6a3bf2bbfcdd3c590f2447985420f204321a7e92ae747d2abae8e27d80e500f364f4982395311547c903de00eeaf1eef1d91 |
27 |
+DIST OSPToolkit-4.13.0.tar.gz 422064 SHA256 e12771340b5c33f22d006a7cc03c952be8a11e9af1d531136ecadcfa2a8d2483 SHA512 35e54350cdecf0367af47986a7c3eddfcdf924b0d6e7c52ccccdecd96d3d64ba7f8d8d266cc4d26708f0741e40eeff80db4690272702c35d4e5bafba745776bf WHIRLPOOL ab918e6f054038802dbf1220c5e698a3b64815b6326a23fa6a9114ffe5376b19ac2779acfcda0c44967374e08355d20f7d75e0794b123ad1aa7e4fd55595ba25 |
28 |
|
29 |
diff --git a/net-libs/osptoolkit/files/osptoolkit-4.13.0-gcc5.patch b/net-libs/osptoolkit/files/osptoolkit-4.13.0-gcc5.patch |
30 |
new file mode 100644 |
31 |
index 0000000000..a06ffeecc9 |
32 |
--- /dev/null |
33 |
+++ b/net-libs/osptoolkit/files/osptoolkit-4.13.0-gcc5.patch |
34 |
@@ -0,0 +1,17 @@ |
35 |
+Starting with GCC 5, the __builtin_isnan() fucntion requires proper overloaded types, even in C: |
36 |
+* osptransapi.c:1040:13: error: non-floating-point argument in call to function ‘__builtin_isnan’ |
37 |
+* OSPM_ISNAN(metrics.mean, tnisnan); |
38 |
+See also: |
39 |
+https://bugs.gentoo.org/show_bug.cgi?id=581058 |
40 |
+ |
41 |
+--- a/src/osptransapi.c |
42 |
++++ b/src/osptransapi.c |
43 |
+@@ -983,7 +983,7 @@ |
44 |
+ /* sample mean - have to cast Samples to a float to get some precision on the mean */ |
45 |
+ mean = ((metrics.mean * currnumber) + (ospvMean * ospvSamples)) / (float)metrics.samples; |
46 |
+ |
47 |
+- OSPM_ISNAN(metrics.mean, tnisnan); |
48 |
++ OSPM_ISNAN((double)metrics.mean, tnisnan); |
49 |
+ |
50 |
+ if (tnisnan) { |
51 |
+ errcode = OSPC_ERR_TRAN_INVALID_CALC; |
52 |
|
53 |
diff --git a/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild b/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild |
54 |
new file mode 100644 |
55 |
index 0000000000..a9afec67b4 |
56 |
--- /dev/null |
57 |
+++ b/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild |
58 |
@@ -0,0 +1,98 @@ |
59 |
+# Copyright 1999-2017 Gentoo Foundation |
60 |
+# Distributed under the terms of the GNU General Public License v2 |
61 |
+# $Id$ |
62 |
+ |
63 |
+EAPI=6 |
64 |
+ |
65 |
+inherit toolchain-funcs |
66 |
+ |
67 |
+S_DATE="20161107" |
68 |
+ |
69 |
+DESCRIPTION="Open Settlement Protocol development kit" |
70 |
+HOMEPAGE="http://www.transnexus.com/OSP%20Toolkit/OSP%20Toolkit%20Documents/OSP%20Toolkit%20Documents.htm" |
71 |
+SRC_URI="mirror://sourceforge/osp-toolkit/OSPToolkit-${PV}.tar.gz" |
72 |
+ |
73 |
+LICENSE="BSD" |
74 |
+SLOT="0" |
75 |
+KEYWORDS="~amd64 ~x86" |
76 |
+IUSE="" |
77 |
+ |
78 |
+RDEPEND="dev-libs/openssl:0=" |
79 |
+DEPEND="${RDEPEND}" |
80 |
+ |
81 |
+S=${WORKDIR}/TK-${PV//./_}-${S_DATE} |
82 |
+ |
83 |
+# TODO: |
84 |
+# generate a shared lib |
85 |
+ |
86 |
+# NOTES: |
87 |
+# osptest isn't a test that can be used for src_test, it's part of the toolkit |
88 |
+ |
89 |
+PATCHES=( |
90 |
+ "${FILESDIR}"/${PN}-4.13.0-gcc5.patch |
91 |
+) |
92 |
+ |
93 |
+src_prepare() { |
94 |
+ default |
95 |
+ |
96 |
+ # remove -O and use users CFLAGS, see bug 241034 |
97 |
+ sed -i -e "s/ -O//" -e "s/^CFLAGS =/CFLAGS +=/" src/Makefile test/Makefile \ |
98 |
+ enroll/Makefile || die "patching Makefiles failed" |
99 |
+ |
100 |
+ # use users LDFLAGS |
101 |
+ sed -i -e "s:LFLAGS:LDFLAGS:" test/Makefile \ |
102 |
+ || die "patching test/Makefile failed" |
103 |
+ sed -i -e "s:\(\$(LIBS\):\$(LDFLAGS) \1:" enroll/Makefile \ |
104 |
+ || die "patching enroll/Makefile failed" |
105 |
+ |
106 |
+ # change lib dir to $(get_libdir) |
107 |
+ sed -i -e "s:\$(INSTALL_PATH)/lib:\$(INSTALL_PATH)/$(get_libdir):" \ |
108 |
+ src/Makefile || die "patching src/Makefile failed" |
109 |
+ |
110 |
+ # test.cfg is located in /etc/${PN}/test.cfg |
111 |
+ sed -i -e \ |
112 |
+ "s:\(^#define CONFIG_FILENAME.*\"\).*\(test.cfg\"\):\1/etc/${PN}/\2:" \ |
113 |
+ test/test_app.c || die "patching test/test_app.c failed" |
114 |
+ |
115 |
+ # configure enroll.sh |
116 |
+ sed -i -e "s:^\(OPENSSL_CONF\).*:\1=/etc/${PN}/openssl.cnf:" \ |
117 |
+ -e "s:^\(RANDFILE\).*:\1=\/etc/${PN}/.rnd:" \ |
118 |
+ bin/enroll.sh || die "patching bin/enroll.sh failed" |
119 |
+ |
120 |
+ # change enroll path |
121 |
+ sed -i -e "s:^\(enroll\):/usr/lib/${PN}/\1:" \ |
122 |
+ bin/enroll.sh || die "patching bin/enroll.sh failed" |
123 |
+} |
124 |
+ |
125 |
+src_compile() { |
126 |
+ emake CC="$(tc-getCC)" AR="$(tc-getAR)" -C src build |
127 |
+ emake CC="$(tc-getCC)" AR="$(tc-getAR)" -C enroll linux |
128 |
+ emake CC="$(tc-getCC)" AR="$(tc-getAR)" -C test linux |
129 |
+} |
130 |
+ |
131 |
+src_install() { |
132 |
+ emake -C src INSTALL_PATH="${ED%/}"/usr install |
133 |
+ |
134 |
+ local DOCS=( README.txt RELNOTES.txt ) |
135 |
+ einstalldocs |
136 |
+ |
137 |
+ insinto /etc/${PN} |
138 |
+ doins bin/test.cfg bin/.rnd bin/openssl.cnf |
139 |
+ |
140 |
+ # install enroll and enroll.sh in lib dir to prevent executing them |
141 |
+ local ospdir=/usr/$(get_libdir)/${PN} |
142 |
+ dodir ${ospdir} |
143 |
+ exeinto ${ospdir} |
144 |
+ doexe bin/enroll bin/enroll.sh |
145 |
+ |
146 |
+ # use the symlink to execute enroll.sh |
147 |
+ dosym ${ospdir}/enroll.sh /usr/bin/ospenroll |
148 |
+ |
149 |
+ newbin bin/test_app osptest |
150 |
+} |
151 |
+ |
152 |
+pkg_postinst() { |
153 |
+ elog "OSP test application is now available with 'osptest' command" |
154 |
+ elog "OSP enroll application is now available with 'ospenroll' command" |
155 |
+ elog "ospenroll is using /etc/${PN}/openssl.cnf as an openssl configuration" |
156 |
+} |