aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2012-12-28 20:18:59 +0100
committerMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2012-12-28 20:18:59 +0100
commit5a943c6e03b67dc35df1700cb8354ec20630bf25 (patch)
treeb8b6ee466cc0d721257e36a040b2c0791fd75b4e /sci-biology
parentsci-biology/sra_sdk-2.2.2a: a version bump, still requires MAKEOPTS=-j1 and c... (diff)
downloadsci-5a943c6e03b67dc35df1700cb8354ec20630bf25.tar.gz
sci-5a943c6e03b67dc35df1700cb8354ec20630bf25.tar.bz2
sci-5a943c6e03b67dc35df1700cb8354ec20630bf25.zip
sci-biology/ncbi-tools++-9.0.0: a sketch of an updated ebuild, bug #279606, does not pass repoman checks due to IUSE items
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/ncbi-tools++/files/curl-types.patch24
-rw-r--r--sci-biology/ncbi-tools++/files/disable-testsuite-compilation.txt3
-rw-r--r--sci-biology/ncbi-tools++/files/malloc_initialize_upstream_fix.patch100
-rw-r--r--sci-biology/ncbi-tools++/files/ncbi-tools++-9.0.0-disable_test_compress.patch15
-rw-r--r--sci-biology/ncbi-tools++/files/ncbi-tools++-9.0.0-fix-order-of-libs.patch24
-rw-r--r--sci-biology/ncbi-tools++/ncbi-tools++-9.0.0.ebuild304
6 files changed, 470 insertions, 0 deletions
diff --git a/sci-biology/ncbi-tools++/files/curl-types.patch b/sci-biology/ncbi-tools++/files/curl-types.patch
new file mode 100644
index 000000000..3e6079057
--- /dev/null
+++ b/sci-biology/ncbi-tools++/files/curl-types.patch
@@ -0,0 +1,24 @@
+Index: libs/kns/url-fetcher-curl.c
+===================================================================
+--- src/sra/sdk/libs/kns/url-fetcher-curl.c (revision 11878)
++++ src/sra/sdk/libs/kns/url-fetcher-curl.c (revision 11880)
+@@ -38,7 +38,6 @@
+ #include <string.h>
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ /*--------------------------------------------------------------------------
+Index: tools/refseq-load/refseq-load.c
+===================================================================
+--- src/sra/sdk/tools/refseq-load/refseq-load.c (revision 11878)
++++ src/sra/sdk/tools/refseq-load/refseq-load.c (revision 11880)
+@@ -41,7 +41,6 @@
+ #include <sysalloc.h>
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ #include <stdlib.h>
diff --git a/sci-biology/ncbi-tools++/files/disable-testsuite-compilation.txt b/sci-biology/ncbi-tools++/files/disable-testsuite-compilation.txt
new file mode 100644
index 000000000..aeaf75e45
--- /dev/null
+++ b/sci-biology/ncbi-tools++/files/disable-testsuite-compilation.txt
@@ -0,0 +1,3 @@
+.*
+-.*/test
+-.*/unit_test
diff --git a/sci-biology/ncbi-tools++/files/malloc_initialize_upstream_fix.patch b/sci-biology/ncbi-tools++/files/malloc_initialize_upstream_fix.patch
new file mode 100644
index 000000000..4900e529a
--- /dev/null
+++ b/sci-biology/ncbi-tools++/files/malloc_initialize_upstream_fix.patch
@@ -0,0 +1,100 @@
+--- trunk/c++/src/app/netcache/nc_memory.cpp 2011/12/16 17:42:54 52330
++++ trunk/c++/src/app/netcache/nc_memory.cpp 2012/02/27 14:38:30 53136
+@@ -360,7 +360,7 @@
+ m_ObjLock.Lock();
+ ++m_SysFrees;
+ m_SystemMem -= alloced_size;
+- m_LostMem -= alloced_size -= asked_size;
++ m_LostMem -= alloced_size - asked_size;
+ m_ObjLock.Unlock();
+ }
+
+@@ -2539,7 +2539,7 @@
+ bool
+ CNCMemManager::InitializeApp(void)
+ {
+- try {
++ /*try {
+ CSQLITE_Global::SetCustomMallocFuncs(&s_NCMallocMethods);
+ }
+ catch (CSQLITE_Exception& ex) {
+@@ -2547,13 +2547,15 @@
+ return false;
+ }
+
+- return CNCMMCentral::RunLateInit();
++ return CNCMMCentral::RunLateInit();*/
++ g_InitNCThreadIndexes();
++ return true;
+ }
+
+ void
+ CNCMemManager::FinalizeApp(void)
+ {
+- CNCMMCentral::PrepareToStop();
++ //CNCMMCentral::PrepareToStop();
+ }
+
+ void
+@@ -2571,28 +2573,29 @@
+ void
+ CNCMemManager::PrintStats(CPrintTextProxy& proxy)
+ {
+- CNCMMStats stats_sum;
++ /*CNCMMStats stats_sum;
+ CNCMMStats::CollectAllStats(&stats_sum);
+- stats_sum.Print(proxy);
++ stats_sum.Print(proxy);*/
+ }
+
+ size_t
+ CNCMemManager::GetMemoryLimit(void)
+ {
+- return CNCMMCentral::GetMemLimit();
++ return 0;//CNCMMCentral::GetMemLimit();
+ }
+
+ size_t
+ CNCMemManager::GetMemoryUsed(void)
+ {
+- CNCMMStats stat;
++ /*CNCMMStats stat;
+ CNCMMStats::CollectAllStats(&stat);
+- return stat.GetSystemMem();
++ return stat.GetSystemMem();*/
++ return 0;
+ }
+
+ END_NCBI_SCOPE
+
+-
++/*
+ void*
+ operator new (size_t size)
+ #ifndef NCBI_COMPILER_MSVC
+@@ -2626,13 +2629,13 @@
+ {
+ NCBI_NS_NCBI::CNCMMCentral::DeallocMemory(ptr);
+ }
+-
++*/
+ #ifdef __GLIBC__
+ // glibc has special method of overriding C library allocation functions.
+
+ #include <malloc.h>
+
+-
++/*
+ void* s_NCMallocHook(size_t size, const void* caller)
+ {
+ return NCBI_NS_NCBI::CNCMMCentral::AllocMemory(size);
+@@ -2656,7 +2659,7 @@
+ }
+
+ void (*__malloc_initialize_hook) (void) = s_NCInitMallocHook;
+-
++*/
+ #elif !defined(NCBI_OS_MSWIN)
+ // Changing of C library allocation functions on Windows is very tricky (if
+ // possible at all) and NetCache will never run in production on Windows. So
+
diff --git a/sci-biology/ncbi-tools++/files/ncbi-tools++-9.0.0-disable_test_compress.patch b/sci-biology/ncbi-tools++/files/ncbi-tools++-9.0.0-disable_test_compress.patch
new file mode 100644
index 000000000..d37980653
--- /dev/null
+++ b/sci-biology/ncbi-tools++/files/ncbi-tools++-9.0.0-disable_test_compress.patch
@@ -0,0 +1,15 @@
+--- src/util/test/Makefile.in.ori 2012-12-21 14:26:16.000000000 +0100
++++ src/util/test/Makefile.in 2012-12-21 14:26:26.000000000 +0100
+@@ -4,10 +4,10 @@
+ #################################
+
+ APP_PROJ = test_utf8 test_rangemap test_resize_iter \
+- test_logrotate test_regexp test_compress test_checksum \
++ test_logrotate test_regexp test_checksum \
+ test_staticmap test_strsearch test_table test_tar \
+ test_transmissionrw test_align \
+- test_cache_mt test_id_mux test_compress_mt test_thread_pool \
++ test_cache_mt test_id_mux test_thread_pool \
+ test_uttp test_line_reader test_queue_mt test_thread_pool_old \
+ test_scheduler test_value_convert example_value_convert \
+ formatguess_unit_test test_floating_point_comparison \
diff --git a/sci-biology/ncbi-tools++/files/ncbi-tools++-9.0.0-fix-order-of-libs.patch b/sci-biology/ncbi-tools++/files/ncbi-tools++-9.0.0-fix-order-of-libs.patch
new file mode 100644
index 000000000..84a544ebe
--- /dev/null
+++ b/sci-biology/ncbi-tools++/files/ncbi-tools++-9.0.0-fix-order-of-libs.patch
@@ -0,0 +1,24 @@
+Index: Makefile.test_compress.app
+===================================================================
+--- src/util/test/Makefile.test_compress.app (revision 356584)
++++ src/util/test/Makefile.test_compress.app (working copy)
+@@ -3,7 +3,7 @@
+
+ APP = test_compress
+ SRC = test_compress
+-LIB = xutil xcompress $(CMPRS_LIB) xncbi
++LIB = xcompress xutil $(CMPRS_LIB) xncbi
+ LIBS = $(CMPRS_LIBS) $(ORIG_LIBS)
+ CPPFLAGS = $(ORIG_CPPFLAGS) $(CMPRS_INCLUDE)
+
+--- src/util/test/Makefile.test_compress_mt.app.ori 2012-12-21 16:12:11.000000000 +0100
++++ src/util/test/Makefile.test_compress_mt.app 2012-12-21 16:12:41.000000000 +0100
+@@ -3,7 +3,7 @@
+
+ APP = test_compress_mt
+ SRC = test_compress_mt
+-LIB = xutil xcompress $(CMPRS_LIB) test_mt xncbi
++LIB = xcompress xutil $(CMPRS_LIB) test_mt xncbi
+ LIBS = $(CMPRS_LIBS) $(ORIG_LIBS)
+ CPPFLAGS = $(ORIG_CPPFLAGS) $(CMPRS_INCLUDE)
+
diff --git a/sci-biology/ncbi-tools++/ncbi-tools++-9.0.0.ebuild b/sci-biology/ncbi-tools++/ncbi-tools++-9.0.0.ebuild
new file mode 100644
index 000000000..e2950beef
--- /dev/null
+++ b/sci-biology/ncbi-tools++/ncbi-tools++-9.0.0.ebuild
@@ -0,0 +1,304 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/ncbi-tools++/ncbi-tools++-0.2010.06.15-r1.ebuild,v 1.3 2012/11/05 11:22:49 jlec Exp $
+
+EAPI="3"
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_TAG="Jun_15_2010"
+MY_Y="${MY_TAG/*_/}"
+MY_PV="9_0_0"
+MY_P="ncbi_cxx--${MY_PV}"
+#ftp://ftp.ncbi.nlm.nih.gov/toolbox/ncbi_tools++/ARCHIVE/9_0_0/ncbi_cxx--9_0_0.tar.gz
+
+
+DESCRIPTION="NCBI C++ Toolkit, including NCBI BLAST+"
+HOMEPAGE="http://www.ncbi.nlm.nih.gov/books/bv.fcgi?rid=toolkit"
+SRC_URI="
+ ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/ARCHIVE/${MY_PV}/ncbi_cxx--${MY_PV}.tar.gz"
+# http://dev.gentoo.org/~jlec/distfiles/${PN}-${PV#0.}-asneeded.patch.xz"
+
+LICENSE="public-domain"
+SLOT="0"
+IUSE="berkdb boost bzip2 cppunit curl expat fastcgi fltk freetype ftds gif glut gnutls hdf5 icu jpeg lzo mesa mysql muparser opengl pcre png python sablotron sqlite sqlite3 ssl tiff xerces xalan xml xpm xslt X"
+#KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS=""
+
+# sys-libs/db should be compiled with USE=cxx
+DEPEND="berkdb? ( sys-libs/db:4.3 )
+ ftds? ( dev-db/freetds )
+ boost? ( dev-libs/boost )
+ curl? ( net-misc/curl )
+ sqlite? ( dev-db/sqlite:2 )
+ sqlite3? ( dev-db/sqlite:3 )
+ mysql? ( virtual/mysql )
+ gnutls? ( net-libs/gnutls )
+ ssl? ( dev-libs/openssl )
+ fltk? ( x11-libs/fltk )
+ opengl? ( virtual/opengl )
+ mesa? ( media-libs/mesa )
+ glut? ( media-libs/freeglut )
+ freetype? ( media-libs/freetype )
+ fastcgi? ( www-apache/mod_fastcgi )
+ python? ( dev-lang/python )
+ cppunit? ( dev-util/cppunit )
+ icu? ( dev-libs/icu )
+ expat? ( dev-libs/expat )
+ sablotron? ( app-text/sablotron )
+ xml? ( dev-libs/libxml2 )
+ xslt? ( dev-libs/libxslt )
+ xerces? ( dev-libs/xerces-c )
+ xalan? ( dev-libs/xalan-c )
+ muparser? ( dev-cpp/muParser )
+ hdf5? ( sci-libs/hdf5 )
+ gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ png? ( media-libs/libpng )
+ tiff? ( media-libs/tiff )
+ xpm? ( x11-libs/libXpm )
+ dev-libs/lzo
+ app-arch/bzip2
+ dev-libs/libpcre"
+# USE flags which should be added somehow: wxWindows wxWidgets SP ORBacus ODBC OEChem sge
+
+# configure options, may want to expose some
+# --without-debug build non-debug versions of libs and apps
+# --without-optimization turn off optimization flags in non-debug mode
+# --with-profiling build profiled versions of libs and apps
+# --with-tcheck(=DIR) build for Intel Thread Checker (in DIR)
+# --with-dll build all libraries as DLLs
+# --with-static build all libraries statically even if --with-dll
+# --with-static-exe build all executables as statically as possible
+# --with-plugin-auto-load always enable the plugin manager by default
+# --with-bin-release build executables suitable for public release
+# --with-mt compile in a MultiThread-safe manner
+# --with-64 compile to 64-bit code
+# --with-universal build universal binaries on Mac OS X
+# --with-universal=CPUs build universal binaries targeting the given CPUs
+# --without-exe do not build executables
+# --with-runpath= hard-code the runtime path to DLLs
+# --with-lfs enable large file support to the extent possible
+# --with-extra-action= script to call after the configuration is complete
+# --with-autodep automatic generation of dependencies (GNU make)
+# --with-build-root=DIR specify a non-default build directory name
+# --with-fake-root=DIR appear to have been built under DIR
+# --without-suffix no Release/Debug, MT or DLL sfx in the build dir name
+# --with-hostspec add full host specs to the build dir name
+# --without-version don't always include the cplr ver in the bd name
+# --with-build-root-sfx=X add a user-specified suffix to the build dir name
+# --without-execopy do not copy built executables to the BIN area
+# --with-bincopy populate lib and bin with copies, not hard links
+# --with-lib-rebuilds ensure that apps use up-to-date libraries
+# --with-lib-rebuilds=ask ask whether to update each app's libraries
+# --without-deactivation keep old copies of libraries that no longer build
+# --without-makefile-auto-update do not auto-update generated makefiles
+# --with-projects=FILE build projects listed in FILE by default
+# --without-flat-makefile do not generate an all-encompassing flat makefile
+# --with-configure-dialog allow interactive flat makefile project selection
+# --with-saved-settings=F load configuration settings from the file F
+# --with-check run test suite after the build
+# --with-check-tools=... use the specified tools for testing
+# --with-ncbi-public ensure compatibility for all in-house platforms
+# --with-strip strip binaries at build time
+# --with-pch use precompiled headers if possible
+# --with-caution cancel configuration unconditionally when in doubt
+# --without-caution proceed without asking when in doubt
+# --without-ccache do not automatically use ccache if available
+# --without-distcc do not automatically use distcc if available
+# --without-ncbi-c do not use NCBI C Toolkit
+# --without-sss do not use NCBI SSS libraries
+# --without-utils do not use NCBI SSS UTIL library
+# --without-sssdb do not use NCBI SSS DB library
+# --with-included-sss use the in-tree copy of SSS
+
+# --without-local-lbsm turn off support for IPC with locally running LBSMD
+# --without-ncbi-crypt use a dummy stubbed-out version of ncbi_crypt
+# --without-connext do not build non-public CONNECT library extensions
+# --without-serial do not build the serialization library and tools
+# --without-objects do not generate/build serializeable objects from ASNs
+# --without-dbapi do not build database connectivity libraries
+# --without-app do not build standalone applications like ID1_FETCH
+# --without-ctools do not build NCBI C Toolkit based projects
+# --without-gui do not build most graphical projects
+# --without-algo do not build CPU-intensive algorithms
+# --without-internal do not build internal projects
+# --with-gbench ensure that Genome Workbench can be built
+# --without-gbench do not build Genome Workbench
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+# filter-ldflags -Wl,--as-needed
+# append-ldflags -Wl,--no-undefined
+ sed -i -e 's/-print-file-name=libstdc++.a//' \
+ -e '/sed/ s/\([gO]\[0-9\]\)\*/\1\\+/' \
+ src/build-system/configure || die
+ epatch \
+ "${FILESDIR}"/${PN}-${PV#0.}-fix-order-of-libs.patch \
+ "${FILESDIR}"/curl-types.patch \
+ "${FILESDIR}"/malloc_initialize_upstream_fix.patch
+
+# "${FILESDIR}"/${PN}-${PV#0.}-disable_test_compress.patch
+
+
+# "${FILESDIR}"/${PN}-${PV#0.}-gcc46.patch \
+# "${FILESDIR}"/${PN}-${PV#0.}-gcc47.patch \
+# "${WORKDIR}"/${PN}-${PV#0.}-asneeded.patch \
+# "${FILESDIR}"/${PN}-${PV#0.}-libpng15.patch \
+# "${FILESDIR}"/${PN}-${PV#0.}-glibc-214.patch
+
+ use prefix && append-ldflags -Wl,-rpath,"${EPREFIX}/usr/$(get_libdir)/${PN}"
+}
+
+src_configure() {
+ tc-export CXX CC
+ # the use flag test below are for those which allow to enable or disable the package usage (unlike those cases which either allow or not use of internal, built-in copy of some mostly library, e.g. zlib, boost)
+# conf check for sqlite and mysql
+ local myconf=""
+ if use berkdb; then
+ myconf="--with-bdb"
+ else
+ myconf="--without-bdb"
+ fi
+ if ! use curl; then
+ myconf="--without-curl"
+ fi
+ if use ftds; then
+ myconf="--with-ftds"
+ else
+ myconf="--without-ftds"
+ fi
+ if use gnutls; then
+ myconf="--with-gnutls"
+ else
+ myconf="--without-gnutls"
+ fi
+ if use ssl; then
+ myconf="--with-openssl"
+ else
+ myconf="--without-openssl"
+ fi
+ if ! use sqlite; then
+ myconf="--without-sqlite"
+ fi
+ if ! use sqlite3; then
+ myconf="--without-sqlite3"
+ fi
+ if ! use mysql; then
+ myconf="--without-mysql"
+ fi
+ if ! use fltk; then
+ myconf="--without-fltk"
+ fi
+ if ! use opengl; then
+ myconf="--without-opengl"
+ fi
+ if ! use mesa; then
+ myconf="--without-mesa"
+ fi
+ if ! use glut; then
+ myconf="--without-glut"
+ fi
+ if ! use freetype; then
+ myconf="--without-freetype"
+ fi
+ if ! use fastcgi; then
+ myconf="--without-fastcgi"
+ fi
+ if ! use python; then
+ myconf="--without-python"
+ fi
+ if ! use cppunit; then
+ myconf="--without-cppunit"
+ fi
+ if ! use icu; then
+ myconf="--without-icu"
+ fi
+ if ! use expat; then
+ myconf="--without-expat"
+ fi
+ if ! use sablotron; then
+ myconf="--without-sablotron"
+ fi
+ if ! use xml; then
+ myconf="--without-xml"
+ fi
+ if ! use xslt; then
+ myconf="--without-xslt"
+ fi
+ if ! use xerces; then
+ myconf="--without-xerces"
+ fi
+ if ! use xalan; then
+ myconf="--without-xalan"
+ fi
+ if ! use muparser; then
+ myconf="--without-muparser"
+ fi
+ if ! use hdf5; then
+ myconf="--without-hdf5"
+ fi
+ if ! use gif; then
+ myconf="--without-gif"
+ fi
+ if ! use jpeg; then
+ myconf="--without-jpeg"
+ fi
+ if ! use png; then
+ myconf="--without-png"
+ fi
+ if ! use tiff; then
+ myconf="--without-tiff"
+ fi
+ if ! use xpm; then
+ myconf="--without-xpm"
+ fi
+ if ! use X; then
+ myconf="--without-gui --without-x"
+ fi
+
+ # http://www.ncbi.nlm.nih.gov/books/NBK7167/
+ if ! use test; then
+ myconf="--with-projects="${FILESDIR}"/disable-testsuite-compilation.txt"
+ fi
+
+ # TODO
+ # copy optimization -O options from CXXFLAGS to DEF_FAST_FLAGS and pass that also to configure
+ # otherwise your -O2 will be dropped in some subdirectories and repalced by e.g. -O9
+
+ "${S}"/configure --without-debug \
+ --with-bin-release \
+ --with-bincopy \
+ --without-static \
+ --with-dll \
+ --with-mt \
+ --with-lfs \
+ --prefix="${ED}"/usr \
+ --libdir="${ED}"/usr/$(get_libdir)/"${PN}" \
+ ${myconf} LDFLAGS="-Wl,--no-as-needed" \
+ || die
+}
+
+src_compile() {
+ # all_r would ignore the --with-projects contents and build more
+ # emake all_r -C GCC*-Release*/build || die
+ # all_p with compile only selected/required components
+ emake all_p -C GCC*-Release*/build || die "gcc-4.5.3 crashes at src/objects/valerr/ValidError.cpp:226:1: internal compiler error: Segmentation fault, right?"
+}
+
+src_install() {
+ emake install || die
+ # File collisions with sci-biology/ncbi-tools
+ rm -f "${ED}"/usr/bin/{asn2asn,rpsblast,test_regexp}
+
+ echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${PN}" > ${S}/99${PN}
+ doenvd "${S}/99${PN}"
+}
+
+pkg_postinst() {
+ einfo 'Please run "source /etc/profile" before using this package in the current shell.'
+ einfo 'Documentation is at http://www.ncbi.nlm.nih.gov/books/NBK7167/'
+}