From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-libs/spr/Manifest | 8 ++ sci-libs/spr/files/spr-3.3.2-autotools.patch | 169 +++++++++++++++++++++++++++ sci-libs/spr/files/spr-3.3.2-fix-c++14.patch | 68 +++++++++++ sci-libs/spr/files/spr-3.3.2-gcc46.patch | 33 ++++++ sci-libs/spr/metadata.xml | 21 ++++ sci-libs/spr/spr-3.3.2.ebuild | 39 +++++++ 6 files changed, 338 insertions(+) create mode 100644 sci-libs/spr/Manifest create mode 100644 sci-libs/spr/files/spr-3.3.2-autotools.patch create mode 100644 sci-libs/spr/files/spr-3.3.2-fix-c++14.patch create mode 100644 sci-libs/spr/files/spr-3.3.2-gcc46.patch create mode 100644 sci-libs/spr/metadata.xml create mode 100644 sci-libs/spr/spr-3.3.2.ebuild (limited to 'sci-libs/spr') diff --git a/sci-libs/spr/Manifest b/sci-libs/spr/Manifest new file mode 100644 index 000000000000..98bba3da39e4 --- /dev/null +++ b/sci-libs/spr/Manifest @@ -0,0 +1,8 @@ +AUX spr-3.3.2-autotools.patch 6970 SHA256 e7232e62fd8bf50556267a2035ff279ed90e32bcb4c25fd06171e31a1142ade1 SHA512 f3dcd15c9e6cb5638e80a6eaa89b014618be2a78b6fca5ab34092adff73c4262cac17866f7fd0ed3dc5146f2d2d361bca83afdea66ba5936ebe2bbda99f1e64b WHIRLPOOL 63c028d33ea576e76880ec25b28c7344828be982c114ed513102018fc041c8809fd6d9ca64d8f46ad9fa36c691239cb62f9f9532dc09667363f8f5b961733f44 +AUX spr-3.3.2-fix-c++14.patch 2348 SHA256 6475aa679e4d92a8dd611b1215ce12bde9c583ab0c678d3215cae375720ad0bb SHA512 201548823f74904c46e065246762e8bccf29830ec7f83542b567f27b328047faff59d5737b287d40b771afa8989a61a9f5b8f671f1e05f35fa336fa7fda5e25e WHIRLPOOL 0b609f58f7611c1744223069a944dbc919bb183e09af1aa721c11cbb40dde44321258acad41026dde3fac3f44f5ef945aac58fad5239454401316a4f0277e303 +AUX spr-3.3.2-gcc46.patch 1391 SHA256 0f8fad5319dac57680b4f3575f7008161860c37f16ea9180ec4247ba1196d9b8 SHA512 b4a6d8026ee1ac0a3c6dd90f28c82fd044fe52fb896ca0f1ff967d04d71f913bacc30bc3b641ffafbea53994d764d6b38db0a5957f34dd61aedf8da23868b3c7 WHIRLPOOL fb20a457c6af8d55b424694d35dfa15489afa77fcf66d767efcfa868ab8a0f709ecc3f9e540c7e2bb46883a4b9ab240b275c00d5c16ab21794e1503856383e15 +DIST SPR-3.3.2.tar.gz 2512059 SHA256 e0ab1d690c11556f5c67a991398bf04c58d456febfcc98402fc58ae3dbd9a1ff SHA512 5fc5cd90de87385ac2bc6c4b7f54be2fe5e1548c2c5b9fbd4fd9958f443bd25233b59b773186dc3c38efdfb90b622420f1a0ab585937df75e7ed049500a59a9d WHIRLPOOL b938140ea12777435ae10417d1b7f8718aa4b5d6db97f0be5b3ff478a452d770e337a0610353705a359c376b5bee1cf89d975daa0dc42e60fd2a0cc38a051323 +EBUILD spr-3.3.2.ebuild 770 SHA256 69eba581de0fc7ecd586c582d580b43006ebc2c1461a9247bf1be9756d93245e SHA512 0c2bc7a025af487a5ad43cf312ae203ac140d66ab7a500ed20f405ac090fb5d3261cac4121cedeb47efdaf860e89ec9baa77fe0eff5cc233c697f5edcbab538a WHIRLPOOL 6d45c4c4eefc141beeb00507c3accc5e8b6254c0e3165e73ad709f3de7ed184561d9923fdac9ca1dfd3d17af1e0622c088fd999362a639772fe1497869e4826a +MISC ChangeLog 2683 SHA256 ed165589476758bdfb1cca73d3a4633cd58e40d5e7d8ca8536a5f2989e941c8c SHA512 1dae784f5072f73ce2edfd63745eb15952fd4d7a12008af3cf67d12f545be341de6065ecfab079544195e1331f0c6e03ffb715db0df5c8991871fc3ea4b846fa WHIRLPOOL 0f7d753d424d9e2fe3b90de6d7e98be3e2d516fa7bf967f4bbb5a5ee39f27789dd4c8168b902bd3966d6057458dd3cd83a20dc70c64e8c6984918d30a29b4407 +MISC ChangeLog-2015 674 SHA256 7c8b1409a713889c68ad489bba1822ad8857b7833b4d62ae0be284c3474e3550 SHA512 c825e4f100886e944fe9824f74d0f30d263654d2115d9768c282bcfc52a90de2435bfbcb58e47e81ba17cf6b506e4ca5f205bd2151ab2bcaa1e97d9dc89c5d8a WHIRLPOOL 50f2eee3266eddc7f23fccaac2a8a3659d4682de5b7f81cc587cbb25c2c66bbc55792f5bbece5ff76bba1bbc134d2481e6cd619e36613ad3df715072d428b276 +MISC metadata.xml 756 SHA256 a06cac870a8fe6221e0d6cf43088097316ed9d961d11085deb0e18476ac0733f SHA512 3ff7493b80e3ac11f697c677a05617e85d1966630f208ecc2f7814293d3b0d02964e26cdbfea908e5d18de66e2cb03555bb9c5bb3a20aef6f15afc41cc8befce WHIRLPOOL 4baed189b169eb564f115b5e4195f8289cda05f219f7357e2359b9d0352dff47085457cec86257d084db69a797d8168cb141eb1c763a22126e525ff75701687a diff --git a/sci-libs/spr/files/spr-3.3.2-autotools.patch b/sci-libs/spr/files/spr-3.3.2-autotools.patch new file mode 100644 index 000000000000..d04d1806dda8 --- /dev/null +++ b/sci-libs/spr/files/spr-3.3.2-autotools.patch @@ -0,0 +1,169 @@ +diff -Nur SPR-3.3.2.orig/configure.ac SPR-3.3.2/configure.ac +--- SPR-3.3.2.orig/configure.ac 2011-03-29 05:52:30.000000000 +0100 ++++ SPR-3.3.2/configure.ac 2011-05-04 00:48:43.000000000 +0100 +@@ -35,9 +35,6 @@ + AC_FUNC_STAT + AC_CHECK_FUNCS([gettimeofday pow sqrt]) + +-## Default compiler flags +-DEFAULTCXXFLAGS="-O4" +- + ## ROOT installation + AC_ARG_VAR([ROOTPATH], [path to ROOT installation]) + AC_ARG_WITH([root], AC_HELP_STRING([--with-root], [path to ROOT installation]), +@@ -97,7 +94,6 @@ + ## Test ROOT libs + AC_MSG_CHECKING([ROOT libraries]) + if test -f ${ROOTLIBPATH}/libCore.so; then +- DEFAULTCXXFLAGS="-O2" + AC_MSG_RESULT([using ROOT libraries in $ROOTLIBPATH]) + else + AC_MSG_WARN([ROOT libraries not found under $ROOTLIBPATH... disabling ROOT]) +@@ -117,16 +113,6 @@ + ################################ + + +-## Set default compiler flags if CXXFLAGS not defined +-if test -z "$CXXFLAGS"; then +- CXXFLAGS=$DEFAULTCXXFLAGS +-fi +- +- +-AM_CXXFLAGS="-ansi -pedantic" +-AC_SUBST(AM_CPPFLAGS) +-AC_SUBST(AM_CXXFLAGS) +-AC_SUBST(CXXFLAGS) + + AC_CONFIG_FILES(Makefile) + AC_CONFIG_FILES(math/Makefile) +diff -Nur SPR-3.3.2.orig/data/Makefile.am SPR-3.3.2/data/Makefile.am +--- SPR-3.3.2.orig/data/Makefile.am 2011-03-29 05:52:30.000000000 +0100 ++++ SPR-3.3.2/data/Makefile.am 2011-03-29 05:54:19.000000000 +0100 +@@ -1,4 +1,5 @@ +-dist_data_DATA = \ ++ ++pkgdata_DATA = \ + discrete_square.pat gausscorr_uniform_2d_train.pat \ + gauss2_uniform_2d_train.pat trainRoot.pat \ + gauss2_uniform_2d_valid.pat triangle_square_00_train.pat \ +@@ -9,4 +10,4 @@ + lambda-test.pat cmc.data \ + gauss2_uniform_2d_train_root.pat mlp_root.pat \ + tmva_root.pat cleveland.data \ +-samplematrixindicator.cfg +\ No newline at end of file ++samplematrixindicator.cfg +diff -Nur SPR-3.3.2.orig/src/Makefile.am SPR-3.3.2/src/Makefile.am +--- SPR-3.3.2.orig/src/Makefile.am 2011-03-29 05:52:30.000000000 +0100 ++++ SPR-3.3.2/src/Makefile.am 2011-05-04 00:45:22.000000000 +0100 +@@ -1,20 +1,14 @@ + lib_LTLIBRARIES = libSPR.la + + AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) +-AM_LDFLAGS = -L/usr/lib -L$(top_srcdir)/src +-AM_LIBS = -lSPR +-APPLDADD = -lSPR ++ + if WITH_ROOT +- AM_CXXFLAGS += $(ROOTCXXFLAGS) -O2 ++ AM_CXXFLAGS = $(ROOTCXXFLAGS) + AM_CPPFLAGS += $(ROOTCPPFLAGS) -DSPRROOTTUPLE +- AM_LDFLAGS += $(ROOTLDFLAGS) +- AM_LIBS += $(ROOTLIBS) +- APPLDADD += $(ROOTLIBS) +-else +- AM_CXXFLAGS += -O4 ++ AM_LDFLAGS = $(ROOTLDFLAGS) + endif + +-libSPR_la_LIBADD = $(top_srcdir)/math/libSPRmath.la ++libSPR_la_LIBADD = $(top_srcdir)/math/libSPRmath.la $(ROOTLIBS) + libSPR_la_SOURCES = \ + SprDataMoments.cc SprDecisionTree.cc \ + SprFisher.cc SprFomCalculator.cc \ +@@ -60,81 +54,52 @@ + ##################################################################### + + ++LDADD = libSPR.la + +-noinst_PROGRAMS = exampleBootstrapVarianceEst exampleCorrTest \ ++check_PROGRAMS = exampleBootstrapVarianceEst exampleCorrTest \ + exampleUserCuts exampleMatrixTest + + exampleBootstrapVarianceEst_SOURCES = exampleBootstrapVarianceEst.cc +-exampleBootstrapVarianceEst_LDADD = $(APPLDADD) + exampleCorrTest_SOURCES = exampleCorrTest.cc +-exampleCorrTest_LDADD = $(APPLDADD) + exampleMatrixTest_SOURCES = exampleMatrixTest.cc +-exampleMatrixTest_LDADD = $(APPLDADD) + + bin_PROGRAMS = SprFisherLogitApp SprDecisionTreeApp SprExploratoryAnalysisApp \ + SprMultiClassApp SprGoFDecisionTreeApp SprAdaBoostBinarySplitApp \ + SprRBFNetApp SprAdaBoostDecisionTreeApp SprStdBackpropApp \ + SprCombinerApp SprBaggerDecisionTreeApp SprBumpHunterApp \ + SprInteractiveAnalysisApp SprOutputAnalyzerApp SprOutputWriterApp \ +- SprBoosterApp SprBaggerApp exampleUserCuts \ ++ SprBoosterApp SprBaggerApp \ + SprVariableImportanceApp SprIOTestApp SprAddBaggersApp \ + SprTransformationApp SprSplitterApp SprAddNRemoveRApp \ + SprGEPApp SprCrossValidatorApp SprAddColumnsForMCLApp \ + SprIndicatorMatrixApp + + SprFisherLogitApp_SOURCES = SprFisherLogitApp.cc +-SprFisherLogitApp_LDADD = $(APPLDADD) + SprDecisionTreeApp_SOURCES = SprDecisionTreeApp.cc +-SprDecisionTreeApp_LDADD = $(APPLDADD) + SprExploratoryAnalysisApp_SOURCES = SprExploratoryAnalysisApp.cc +-SprExploratoryAnalysisApp_LDADD = $(APPLDADD) + SprMultiClassApp_SOURCES = SprMultiClassApp.cc +-SprMultiClassApp_LDADD = $(APPLDADD) + SprGoFDecisionTreeApp_SOURCES = SprGoFDecisionTreeApp.cc +-SprGoFDecisionTreeApp_LDADD = $(APPLDADD) + SprAdaBoostBinarySplitApp_SOURCES = SprAdaBoostBinarySplitApp.cc +-SprAdaBoostBinarySplitApp_LDADD = $(APPLDADD) + SprRBFNetApp_SOURCES = SprRBFNetApp.cc +-SprRBFNetApp_LDADD = $(APPLDADD) + SprAdaBoostDecisionTreeApp_SOURCES = SprAdaBoostDecisionTreeApp.cc +-SprAdaBoostDecisionTreeApp_LDADD = $(APPLDADD) + SprStdBackpropApp_SOURCES = SprStdBackpropApp.cc +-SprStdBackpropApp_LDADD = $(APPLDADD) + SprCombinerApp_SOURCES = SprCombinerApp.cc +-SprCombinerApp_LDADD = $(APPLDADD) + SprBaggerDecisionTreeApp_SOURCES = SprBaggerDecisionTreeApp.cc +-SprBaggerDecisionTreeApp_LDADD = $(APPLDADD) + SprBumpHunterApp_SOURCES = SprBumpHunterApp.cc +-SprBumpHunterApp_LDADD = $(APPLDADD) + SprInteractiveAnalysisApp_SOURCES = SprInteractiveAnalysisApp.cc +-SprInteractiveAnalysisApp_LDADD = $(APPLDADD) + SprOutputAnalyzerApp_SOURCES = SprOutputAnalyzerApp.cc +-SprOutputAnalyzerApp_LDADD = $(APPLDADD) + SprOutputWriterApp_SOURCES = SprOutputWriterApp.cc +-SprOutputWriterApp_LDADD = $(APPLDADD) + SprBoosterApp_SOURCES = SprBoosterApp.cc +-SprBoosterApp_LDADD = $(APPLDADD) + SprBaggerApp_SOURCES = SprBaggerApp.cc +-SprBaggerApp_LDADD = $(APPLDADD) + exampleUserCuts_SOURCES = exampleUserCuts.cc +-exampleUserCuts_LDADD = $(APPLDADD) + SprVariableImportanceApp_SOURCES = SprVariableImportanceApp.cc +-SprVariableImportanceApp_LDADD = $(APPLDADD) + SprIOTestApp_SOURCES = SprIOTestApp.cc +-SprIOTestApp_LDADD = $(APPLDADD) + SprAddBaggersApp_SOURCES = SprAddBaggersApp.cc +-SprAddBaggersApp_LDADD = $(APPLDADD) + SprTransformationApp_SOURCES = SprTransformationApp.cc +-SprTransformationApp_LDADD = $(APPLDADD) + SprSplitterApp_SOURCES = SprSplitterApp.cc +-SprSplitterApp_LDADD = $(APPLDADD) + SprAddNRemoveRApp_SOURCES = SprAddNRemoveRApp.cc +-SprAddNRemoveRApp_LDADD = $(APPLDADD) + SprGEPApp_SOURCES = SprGEPApp.cc +-SprGEPApp_LDADD = $(APPLDADD) + SprCrossValidatorApp_SOURCES = SprCrossValidatorApp.cc +-SprCrossValidatorApp_LDADD = $(APPLDADD) + SprAddColumnsForMCLApp_SOURCES = SprAddColumnsForMCLApp.cc +-SprAddColumnsForMCLApp_LDADD = $(APPLDADD) + SprIndicatorMatrixApp_SOURCES = SprIndicatorMatrixApp.cc +-SprIndicatorMatrixApp_LDADD = $(APPLDADD) ++ diff --git a/sci-libs/spr/files/spr-3.3.2-fix-c++14.patch b/sci-libs/spr/files/spr-3.3.2-fix-c++14.patch new file mode 100644 index 000000000000..fc2939281b3f --- /dev/null +++ b/sci-libs/spr/files/spr-3.3.2-fix-c++14.patch @@ -0,0 +1,68 @@ +Fix building with C++14, which errors out due to bool -> T* conversions +See also: https://bugs.gentoo.org/show_bug.cgi?id=594376 + +--- a/src/SprBinaryEncoder.cc ++++ b/src/SprBinaryEncoder.cc +@@ -165,7 +165,7 @@ + if( found != vars.end() ) { + cerr << "Variable " << sclass.c_str() << " is already included " + << "in the input list for SprBinaryEncoder." << endl; +- return false; ++ return NULL; + } + vars.push_back(sclass); + +--- a/src/SprDecisionTree.cc ++++ b/src/SprDecisionTree.cc +@@ -362,7 +362,7 @@ + { + // header + char s [200]; +- sprintf(s,"Trained DecisionTree %-6i signal nodes. Overall FOM=%-10g W0=%-10g W1=%-10g N0=%-10i N1=%-10i Version=%s",nodes1_.size(),fom_,w0_,w1_,n0_,n1_,SprVersion.c_str()); ++ sprintf(s,"Trained DecisionTree %-6lu signal nodes. Overall FOM=%-10g W0=%-10g W1=%-10g N0=%-10i N1=%-10i Version=%s",nodes1_.size(),fom_,w0_,w1_,n0_,n1_,SprVersion.c_str()); + os << s << endl; + os << "-------------------------------------------------------" << endl; + +--- a/src/SprVarTransformerReader.cc ++++ b/src/SprVarTransformerReader.cc +@@ -50,7 +50,7 @@ + nLine++; + if( !getline(is,line) ) { + cerr << "Unable to read VarTransformer from line " << nLine << endl; +- return 0; ++ return NULL; + } + istringstream ist(line); + string dummy, transformerName, version; +@@ -59,9 +59,9 @@ + // decode name + if( transformerName.empty() ) { + cerr << "Unable to read VarTransformer name on line " << nLine << endl; +- return false; ++ return NULL; + } +- SprAbsVarTransformer* t = 0; ++ SprAbsVarTransformer* t = NULL; + if( transformerName == "PCA" ) + t = SprVarTransformerReader::readPCATransformer(is,nLine); + else if( transformerName == "InputNormalizer" ) +@@ -72,16 +72,16 @@ + t = SprVarTransformerReader::readTransformerSequence(is,nLine); + else { + cerr << "Unknown VarTransformer name specified on line " << nLine << endl; +- return 0; ++ return NULL; + } +- if( t == 0 ) return 0; ++ if( t == NULL ) return NULL; + + // read vars + vector oldVars, newVars; + if( !SprVarTransformerReader::readVars(is,nLine,oldVars,newVars) || + oldVars.empty() || newVars.empty() ) { + cerr << "Unable to read VarTransformer variables." << endl; +- return 0; ++ return NULL; + } + t->setOldVars(oldVars); + t->setNewVars(newVars); diff --git a/sci-libs/spr/files/spr-3.3.2-gcc46.patch b/sci-libs/spr/files/spr-3.3.2-gcc46.patch new file mode 100644 index 000000000000..715d2ab21ede --- /dev/null +++ b/sci-libs/spr/files/spr-3.3.2-gcc46.patch @@ -0,0 +1,33 @@ +diff -Nur SPR-3.3.2.orig/src/SprAddBaggersApp.cc SPR-3.3.2/src/SprAddBaggersApp.cc +--- SPR-3.3.2.orig/src/SprAddBaggersApp.cc 2011-03-29 05:52:30.000000000 +0100 ++++ SPR-3.3.2/src/SprAddBaggersApp.cc 2011-05-04 00:58:45.000000000 +0100 +@@ -6,6 +6,7 @@ + #include "StatPatternRecognition/SprClassifierReader.hh" + #include "StatPatternRecognition/SprStringParser.hh" + ++#include + #include + #include + #include +diff -Nur SPR-3.3.2.orig/src/SprAddColumnsForMCLApp.cc SPR-3.3.2/src/SprAddColumnsForMCLApp.cc +--- SPR-3.3.2.orig/src/SprAddColumnsForMCLApp.cc 2011-03-29 05:52:30.000000000 +0100 ++++ SPR-3.3.2/src/SprAddColumnsForMCLApp.cc 2011-05-04 00:59:02.000000000 +0100 +@@ -4,6 +4,7 @@ + #include "StatPatternRecognition/SprMultiClassReader.hh" + #include "StatPatternRecognition/SprTrainedMultiClassLearner.hh" + ++#include + #include + #include + #include +diff -Nur SPR-3.3.2.orig/src/SprIndicatorMatrixApp.cc SPR-3.3.2/src/SprIndicatorMatrixApp.cc +--- SPR-3.3.2.orig/src/SprIndicatorMatrixApp.cc 2011-03-29 05:52:30.000000000 +0100 ++++ SPR-3.3.2/src/SprIndicatorMatrixApp.cc 2011-05-04 00:59:31.000000000 +0100 +@@ -4,6 +4,7 @@ + #include "StatPatternRecognition/SprIndicatorMatrix.hh" + #include "StatPatternRecognition/SprConfig.hh" + ++#include + #include + #include + #include diff --git a/sci-libs/spr/metadata.xml b/sci-libs/spr/metadata.xml new file mode 100644 index 000000000000..47921e2be92e --- /dev/null +++ b/sci-libs/spr/metadata.xml @@ -0,0 +1,21 @@ + + + + + sci-physics@gentoo.org + Gentoo Physics Project + + + The package implements a variety of tools for categorization of + multivariate data such as boosted decision trees, bagging and + random forest, bump hunting, a multi-class learner and others. + It is used mostly in High Energy Physics. + + + Add sci-physics/root graphics and i/o + support + + + statpatrec + + diff --git a/sci-libs/spr/spr-3.3.2.ebuild b/sci-libs/spr/spr-3.3.2.ebuild new file mode 100644 index 000000000000..5c35b6b55302 --- /dev/null +++ b/sci-libs/spr/spr-3.3.2.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools + +DESCRIPTION="Statistical analysis and machine learning library" +HOMEPAGE="http://statpatrec.sourceforge.net/" +SRC_URI="mirror://sourceforge/statpatrec/${P^^}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +IUSE="root static-libs" + +DEPEND="root? ( sci-physics/root )" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${P^^} +PATCHES=( + "${FILESDIR}"/${P}-autotools.patch + "${FILESDIR}"/${P}-gcc46.patch + "${FILESDIR}"/${P}-fix-c++14.patch +) + +src_prepare() { + default + rm aclocal.m4 || die + eautoreconf + cp data/gauss* src/ || die +} + +src_configure() { + econf \ + $(use_enable static-libs static) \ + $(use_with root) +} -- cgit v1.2.3