summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-02-12 10:56:29 +0100
committerDavid Seifert <soap@gentoo.org>2017-02-12 10:57:20 +0100
commitdda894edbd7a7d611fbec0c3c18bce3c5f66ca5d (patch)
tree43537af80c39cb329f11233bac46a85b6301de13 /net-libs/osptoolkit
parentgames-action/openlierox: restrict mirroring (diff)
downloadgentoo-dda894edbd7a7d611fbec0c3c18bce3c5f66ca5d.tar.gz
gentoo-dda894edbd7a7d611fbec0c3c18bce3c5f66ca5d.tar.bz2
gentoo-dda894edbd7a7d611fbec0c3c18bce3c5f66ca5d.zip
net-libs/osptoolkit: Version bump to 4.13.0
* Also fix GCC 5 bug Bug: https://bugs.gentoo.org/show_bug.cgi?id=581058 Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'net-libs/osptoolkit')
-rw-r--r--net-libs/osptoolkit/Manifest1
-rw-r--r--net-libs/osptoolkit/files/osptoolkit-4.13.0-gcc5.patch17
-rw-r--r--net-libs/osptoolkit/osptoolkit-4.13.0.ebuild98
3 files changed, 116 insertions, 0 deletions
diff --git a/net-libs/osptoolkit/Manifest b/net-libs/osptoolkit/Manifest
index 6769370559a3..0a5720a2d876 100644
--- a/net-libs/osptoolkit/Manifest
+++ b/net-libs/osptoolkit/Manifest
@@ -1,2 +1,3 @@
DIST OSPToolkit-3.5.0.tar.gz 393788 SHA256 b15e2b8deec032c1e12dcbf28e2fe2b3f964ebab647e0705ec051bf17932d7b1 SHA512 2687bed2a8d67c7571c1b5a854b8204120e19b0105af16cbdfed58ac2462cf6d5805760dc23a4565d696fef5b9b5207ae9ae3489797f5cf2cfdf0a46af9fa82e WHIRLPOOL 34c303097d70d91e23a4e0ac4d1a8638915d42db9999de2367543934571675e0546ca81940b9a597e482d4da5cccea3f314ecb9329d6ce97a7422c8ad62dbf16
DIST OSPToolkit-4.1.5.tar.gz 408481 SHA256 a0bf3247494375e63a75b4520c5c9aaaa0ed1423df54a013598c83a95846fccf SHA512 cc6244c0a62167ce90c85e646b13c991cac6d3663888ca4738666675f3c6c4904463e8502de376eab40cfd89e1d5c3d208d4ccaa58a95ed7a5895d74ea31aecc WHIRLPOOL 86111ab57301cf056a0ae9da56ce6a3bf2bbfcdd3c590f2447985420f204321a7e92ae747d2abae8e27d80e500f364f4982395311547c903de00eeaf1eef1d91
+DIST OSPToolkit-4.13.0.tar.gz 422064 SHA256 e12771340b5c33f22d006a7cc03c952be8a11e9af1d531136ecadcfa2a8d2483 SHA512 35e54350cdecf0367af47986a7c3eddfcdf924b0d6e7c52ccccdecd96d3d64ba7f8d8d266cc4d26708f0741e40eeff80db4690272702c35d4e5bafba745776bf WHIRLPOOL ab918e6f054038802dbf1220c5e698a3b64815b6326a23fa6a9114ffe5376b19ac2779acfcda0c44967374e08355d20f7d75e0794b123ad1aa7e4fd55595ba25
diff --git a/net-libs/osptoolkit/files/osptoolkit-4.13.0-gcc5.patch b/net-libs/osptoolkit/files/osptoolkit-4.13.0-gcc5.patch
new file mode 100644
index 000000000000..a06ffeecc91a
--- /dev/null
+++ b/net-libs/osptoolkit/files/osptoolkit-4.13.0-gcc5.patch
@@ -0,0 +1,17 @@
+Starting with GCC 5, the __builtin_isnan() fucntion requires proper overloaded types, even in C:
+* osptransapi.c:1040:13: error: non-floating-point argument in call to function ‘__builtin_isnan’
+* OSPM_ISNAN(metrics.mean, tnisnan);
+See also:
+https://bugs.gentoo.org/show_bug.cgi?id=581058
+
+--- a/src/osptransapi.c
++++ b/src/osptransapi.c
+@@ -983,7 +983,7 @@
+ /* sample mean - have to cast Samples to a float to get some precision on the mean */
+ mean = ((metrics.mean * currnumber) + (ospvMean * ospvSamples)) / (float)metrics.samples;
+
+- OSPM_ISNAN(metrics.mean, tnisnan);
++ OSPM_ISNAN((double)metrics.mean, tnisnan);
+
+ if (tnisnan) {
+ errcode = OSPC_ERR_TRAN_INVALID_CALC;
diff --git a/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild b/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild
new file mode 100644
index 000000000000..a9afec67b4dd
--- /dev/null
+++ b/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs
+
+S_DATE="20161107"
+
+DESCRIPTION="Open Settlement Protocol development kit"
+HOMEPAGE="http://www.transnexus.com/OSP%20Toolkit/OSP%20Toolkit%20Documents/OSP%20Toolkit%20Documents.htm"
+SRC_URI="mirror://sourceforge/osp-toolkit/OSPToolkit-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl:0="
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/TK-${PV//./_}-${S_DATE}
+
+# TODO:
+# generate a shared lib
+
+# NOTES:
+# osptest isn't a test that can be used for src_test, it's part of the toolkit
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.13.0-gcc5.patch
+)
+
+src_prepare() {
+ default
+
+ # remove -O and use users CFLAGS, see bug 241034
+ sed -i -e "s/ -O//" -e "s/^CFLAGS =/CFLAGS +=/" src/Makefile test/Makefile \
+ enroll/Makefile || die "patching Makefiles failed"
+
+ # use users LDFLAGS
+ sed -i -e "s:LFLAGS:LDFLAGS:" test/Makefile \
+ || die "patching test/Makefile failed"
+ sed -i -e "s:\(\$(LIBS\):\$(LDFLAGS) \1:" enroll/Makefile \
+ || die "patching enroll/Makefile failed"
+
+ # change lib dir to $(get_libdir)
+ sed -i -e "s:\$(INSTALL_PATH)/lib:\$(INSTALL_PATH)/$(get_libdir):" \
+ src/Makefile || die "patching src/Makefile failed"
+
+ # test.cfg is located in /etc/${PN}/test.cfg
+ sed -i -e \
+ "s:\(^#define CONFIG_FILENAME.*\"\).*\(test.cfg\"\):\1/etc/${PN}/\2:" \
+ test/test_app.c || die "patching test/test_app.c failed"
+
+ # configure enroll.sh
+ sed -i -e "s:^\(OPENSSL_CONF\).*:\1=/etc/${PN}/openssl.cnf:" \
+ -e "s:^\(RANDFILE\).*:\1=\/etc/${PN}/.rnd:" \
+ bin/enroll.sh || die "patching bin/enroll.sh failed"
+
+ # change enroll path
+ sed -i -e "s:^\(enroll\):/usr/lib/${PN}/\1:" \
+ bin/enroll.sh || die "patching bin/enroll.sh failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" AR="$(tc-getAR)" -C src build
+ emake CC="$(tc-getCC)" AR="$(tc-getAR)" -C enroll linux
+ emake CC="$(tc-getCC)" AR="$(tc-getAR)" -C test linux
+}
+
+src_install() {
+ emake -C src INSTALL_PATH="${ED%/}"/usr install
+
+ local DOCS=( README.txt RELNOTES.txt )
+ einstalldocs
+
+ insinto /etc/${PN}
+ doins bin/test.cfg bin/.rnd bin/openssl.cnf
+
+ # install enroll and enroll.sh in lib dir to prevent executing them
+ local ospdir=/usr/$(get_libdir)/${PN}
+ dodir ${ospdir}
+ exeinto ${ospdir}
+ doexe bin/enroll bin/enroll.sh
+
+ # use the symlink to execute enroll.sh
+ dosym ${ospdir}/enroll.sh /usr/bin/ospenroll
+
+ newbin bin/test_app osptest
+}
+
+pkg_postinst() {
+ elog "OSP test application is now available with 'osptest' command"
+ elog "OSP enroll application is now available with 'ospenroll' command"
+ elog "ospenroll is using /etc/${PN}/openssl.cnf as an openssl configuration"
+}