diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-libs/osptoolkit |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-libs/osptoolkit')
-rw-r--r-- | net-libs/osptoolkit/Manifest | 6 | ||||
-rw-r--r-- | net-libs/osptoolkit/files/osptoolkit-4.13.0-gcc5.patch | 17 | ||||
-rw-r--r-- | net-libs/osptoolkit/metadata.xml | 11 | ||||
-rw-r--r-- | net-libs/osptoolkit/osptoolkit-4.13.0.ebuild | 97 |
4 files changed, 131 insertions, 0 deletions
diff --git a/net-libs/osptoolkit/Manifest b/net-libs/osptoolkit/Manifest new file mode 100644 index 000000000000..fc371501c872 --- /dev/null +++ b/net-libs/osptoolkit/Manifest @@ -0,0 +1,6 @@ +AUX osptoolkit-4.13.0-gcc5.patch 768 SHA256 710770a97f710a97e00cdec714c204a0ea6b7dd093cc902fd4a49c0cf756a200 SHA512 4f2d11e32b958ca5621321ed0258d3b8544528c16bb9418eb5ddd7c1929b24d42ec0ec6d714c658905df249a8356efb4cc13309a0ccc70521425faad306136fd WHIRLPOOL 1fea3dfcbc67ad2b9b7f557ed33bbdc91e09de764cae1667dfe1134787c857229c3e85f777843ebbb5ae1ad44bd2d2c91fad7f8ed36bde62dd8e0b20a078aa26 +DIST OSPToolkit-4.13.0.tar.gz 422064 SHA256 e12771340b5c33f22d006a7cc03c952be8a11e9af1d531136ecadcfa2a8d2483 SHA512 35e54350cdecf0367af47986a7c3eddfcdf924b0d6e7c52ccccdecd96d3d64ba7f8d8d266cc4d26708f0741e40eeff80db4690272702c35d4e5bafba745776bf WHIRLPOOL ab918e6f054038802dbf1220c5e698a3b64815b6326a23fa6a9114ffe5376b19ac2779acfcda0c44967374e08355d20f7d75e0794b123ad1aa7e4fd55595ba25 +EBUILD osptoolkit-4.13.0.ebuild 2720 SHA256 84c8b32e40ccf0d45c3a9ae5ef26588e5c4b43d7f64e725d33681ff742744a2d SHA512 bdee9975b225101cd0712cbbadac13d43ded13d99c319e3592b81637156d644c7cae31cee6bdd29e8d8244eba95275073dcc42762ad627dbe7d851c3d6ccaa7c WHIRLPOOL 3c469d0e692204b2ff6a0f52ffbc2a923ee51e304e528bac951340e1ac8023b87cc9906d5687429e0fab5873522ce7c4af09f7c78c2b82588772c428dc95a1ab +MISC ChangeLog 2243 SHA256 22859923a4fb41ca213742a277868e21b6994a91acc1ca5b0e8f68c85a646c0d SHA512 6dd6b935cdcabb643c2e2ab716aa513c27607d7de641fc063eddf47e1a638a45c7188de29b5da6c8757956c0e9ca6b330d50d4aa67c847eda2d138aa251fcdcc WHIRLPOOL 5d6d5133660e30e0113a280dd077272d68c5dfd2b2ecb3b1dea02bc05d8005bcb49f095174910afcfe0465857ce18dd318eaaba33380a6ac6ec795743ea68880 +MISC ChangeLog-2015 3099 SHA256 f7c6a7092220d8e857027348fa936cb6efb502f9ab395e9c354b7affd46d7d3e SHA512 9bb43bc2f856e09c14830452ce1f1d0a31040b03caa56eeba205d9fe006c4d67c99381d7f42562a9eaa0bb7fceb9eb8f96e1cc6d2b4b5ae504bc73305e47ef04 WHIRLPOOL 3b12862152b18a242f3211f96cf96b3a381fc84905b557aafc141f586109bc3bcd18aaf340bde6c33420e0ee89923557ca64208f6b81ada3afed84f567fea020 +MISC metadata.xml 336 SHA256 392f19e42fd62454d1953aae26ae76f4d37cd3f7feb8a53e21ee3dc91f396d59 SHA512 09152b4aecb17930c71dfe645780e61205a9f13c6ade1fd8f16298a7f982e36d802f2b8744a9de95c48b41a28ebafbc8e76a7f0262721c5fa41a61bffef5a5dc WHIRLPOOL e93143ea60c6fcd18a285ddfeb7c502fd7e82774aff7ecf1f7c9848a6efccbc09f2fe0d277025635ae906bbba04145e8169bdecd1112dbcbc06005ebcd19bb90 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/metadata.xml b/net-libs/osptoolkit/metadata.xml new file mode 100644 index 000000000000..8e8837dfca6a --- /dev/null +++ b/net-libs/osptoolkit/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>chainsaw@gentoo.org</email> + <name>Tony Vroon</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">osp-toolkit</remote-id> + </upstream> +</pkgmetadata> 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..2c1dd1459dbf --- /dev/null +++ b/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 ~ppc ~ppc64 ~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" +} |