Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/ncbi-tools++/
Date: Tue, 29 Jan 2013 21:24:04
Message-Id: 1359494615.22fd8327e252d7cf356f2337cafed02bef31a42d.jlec@gentoo
1 commit: 22fd8327e252d7cf356f2337cafed02bef31a42d
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 29 21:23:35 2013 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 29 21:23:35 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=22fd8327
7
8 my version
9
10 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
11
12 ---
13 .../ncbi-tools++/ncbi-tools++-9.0.0-r1.ebuild | 345 ++++++++++++++++++++
14 1 files changed, 345 insertions(+), 0 deletions(-)
15
16 diff --git a/sci-biology/ncbi-tools++/ncbi-tools++-9.0.0-r1.ebuild b/sci-biology/ncbi-tools++/ncbi-tools++-9.0.0-r1.ebuild
17 new file mode 100644
18 index 0000000..9806b41
19 --- /dev/null
20 +++ b/sci-biology/ncbi-tools++/ncbi-tools++-9.0.0-r1.ebuild
21 @@ -0,0 +1,345 @@
22 +# Copyright 1999-2012 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +# $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 $
25 +
26 +EAPI=5
27 +
28 +inherit eutils flag-o-matic multilib toolchain-funcs
29 +
30 +MY_TAG="Jun_15_2010"
31 +MY_Y="${MY_TAG/*_/}"
32 +MY_PV="9_0_0"
33 +MY_P="ncbi_cxx--${MY_PV}"
34 +#ftp://ftp.ncbi.nlm.nih.gov/toolbox/ncbi_tools++/ARCHIVE/9_0_0/ncbi_cxx--9_0_0.tar.gz
35 +
36 +
37 +DESCRIPTION="NCBI C++ Toolkit, including NCBI BLAST+"
38 +HOMEPAGE="http://www.ncbi.nlm.nih.gov/books/bv.fcgi?rid=toolkit"
39 +SRC_URI="
40 + ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/ARCHIVE/${MY_PV}/ncbi_cxx--${MY_PV}.tar.gz"
41 +# http://dev.gentoo.org/~jlec/distfiles/${PN}-${PV#0.}-asneeded.patch.xz"
42 +
43 +LICENSE="public-domain"
44 +SLOT="0"
45 +IUSE="
46 + debug static-libs static threads pch
47 + test wxwidgets odbc
48 + berkdb boost bzip2 cppunit curl expat fastcgi fltk freetype ftds gif
49 + glut gnutls hdf5 icu jpeg lzo mesa mysql muparser opengl pcre png python
50 + sablotron sqlite sqlite3 ssl tiff xerces xalan xml xpm xslt X"
51 +#KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
52 +KEYWORDS=""
53 +
54 +# sys-libs/db should be compiled with USE=cxx
55 +DEPEND="
56 + berkdb? ( sys-libs/db:4.3[cxx] )
57 + ftds? ( dev-db/freetds )
58 + boost? ( dev-libs/boost )
59 + curl? ( net-misc/curl )
60 + sqlite? ( dev-db/sqlite )
61 + sqlite3? ( dev-db/sqlite:3 )
62 + mysql? ( virtual/mysql )
63 + gnutls? ( net-libs/gnutls )
64 + ssl? ( dev-libs/openssl )
65 + fltk? ( x11-libs/fltk )
66 + opengl? ( virtual/opengl )
67 + mesa? ( media-libs/mesa )
68 + glut? ( media-libs/freeglut )
69 + freetype? ( media-libs/freetype )
70 + fastcgi? ( www-apache/mod_fastcgi )
71 + python? ( dev-lang/python )
72 + cppunit? ( dev-util/cppunit )
73 + icu? ( dev-libs/icu )
74 + expat? ( dev-libs/expat )
75 + sablotron? ( app-text/sablotron )
76 + xml? ( dev-libs/libxml2 )
77 + xslt? ( dev-libs/libxslt )
78 + xerces? ( dev-libs/xerces-c )
79 + xalan? ( dev-libs/xalan-c )
80 + muparser? ( dev-cpp/muParser )
81 + hdf5? ( sci-libs/hdf5 )
82 + gif? ( media-libs/giflib )
83 + jpeg? ( virtual/jpeg )
84 + png? ( media-libs/libpng )
85 + tiff? ( media-libs/tiff )
86 + xpm? ( x11-libs/libXpm )
87 + dev-libs/lzo
88 + app-arch/bzip2
89 + dev-libs/libpcre"
90 +# USE flags which should be added somehow: wxWindows wxWidgets SP ORBacus ODBC OEChem sge
91 +
92 +# configure options, may want to expose some
93 +# --without-debug build non-debug versions of libs and apps
94 +# --without-optimization turn off optimization flags in non-debug mode
95 +# --with-profiling build profiled versions of libs and apps
96 +# --with-tcheck(=DIR) build for Intel Thread Checker (in DIR)
97 +# --with-dll build all libraries as DLLs
98 +# --with-static build all libraries statically even if --with-dll
99 +# --with-static-exe build all executables as statically as possible
100 +# --with-plugin-auto-load always enable the plugin manager by default
101 +# --with-bin-release build executables suitable for public release
102 +# --with-mt compile in a MultiThread-safe manner
103 +# --with-64 compile to 64-bit code
104 +# --with-universal build universal binaries on Mac OS X
105 +# --with-universal=CPUs build universal binaries targeting the given CPUs
106 +# --without-exe do not build executables
107 +# --with-runpath= hard-code the runtime path to DLLs
108 +# --with-lfs enable large file support to the extent possible
109 +# --with-extra-action= script to call after the configuration is complete
110 +# --with-autodep automatic generation of dependencies (GNU make)
111 +# --with-build-root=DIR specify a non-default build directory name
112 +# --with-fake-root=DIR appear to have been built under DIR
113 +# --without-suffix no Release/Debug, MT or DLL sfx in the build dir name
114 +# --with-hostspec add full host specs to the build dir name
115 +# --without-version don't always include the cplr ver in the bd name
116 +# --with-build-root-sfx=X add a user-specified suffix to the build dir name
117 +# --without-execopy do not copy built executables to the BIN area
118 +# --with-bincopy populate lib and bin with copies, not hard links
119 +# --with-lib-rebuilds ensure that apps use up-to-date libraries
120 +# --with-lib-rebuilds=ask ask whether to update each app's libraries
121 +# --without-deactivation keep old copies of libraries that no longer build
122 +# --without-makefile-auto-update do not auto-update generated makefiles
123 +# --with-projects=FILE build projects listed in FILE by default
124 +# --without-flat-makefile do not generate an all-encompassing flat makefile
125 +# --with-configure-dialog allow interactive flat makefile project selection
126 +# --with-saved-settings=F load configuration settings from the file F
127 +# --with-check run test suite after the build
128 +# --with-check-tools=... use the specified tools for testing
129 +# --with-ncbi-public ensure compatibility for all in-house platforms
130 +# --with-strip strip binaries at build time
131 +# --with-pch use precompiled headers if possible
132 +# --with-caution cancel configuration unconditionally when in doubt
133 +# --without-caution proceed without asking when in doubt
134 +# --without-ccache do not automatically use ccache if available
135 +# --without-distcc do not automatically use distcc if available
136 +# --without-ncbi-c do not use NCBI C Toolkit
137 +# --without-sss do not use NCBI SSS libraries
138 +# --without-utils do not use NCBI SSS UTIL library
139 +# --without-sssdb do not use NCBI SSS DB library
140 +# --with-included-sss use the in-tree copy of SSS
141 +
142 +# --without-local-lbsm turn off support for IPC with locally running LBSMD
143 +# --without-ncbi-crypt use a dummy stubbed-out version of ncbi_crypt
144 +# --without-connext do not build non-public CONNECT library extensions
145 +# --without-serial do not build the serialization library and tools
146 +# --without-objects do not generate/build serializeable objects from ASNs
147 +# --without-dbapi do not build database connectivity libraries
148 +# --without-app do not build standalone applications like ID1_FETCH
149 +# --without-ctools do not build NCBI C Toolkit based projects
150 +# --without-gui do not build most graphical projects
151 +# --without-algo do not build CPU-intensive algorithms
152 +# --without-internal do not build internal projects
153 +# --with-gbench ensure that Genome Workbench can be built
154 +# --without-gbench do not build Genome Workbench
155 +
156 +RDEPEND="${DEPEND}"
157 +
158 +S="${WORKDIR}/${MY_P}"
159 +
160 +src_prepare() {
161 +# filter-ldflags -Wl,--as-needed
162 +# append-ldflags -Wl,--no-undefined
163 +# sed -i -e 's/-print-file-name=libstdc++.a//' \
164 +# -e '/sed/ s/\([gO]\[0-9\]\)\*/\1\\+/' \
165 +# src/build-system/configure || die
166 +# epatch \
167 +# "${FILESDIR}"/${PN}-${PV#0.}-fix-order-of-libs.patch \
168 +# "${FILESDIR}"/curl-types.patch \
169 +# "${FILESDIR}"/malloc_initialize_upstream_fix.patch \
170 +# "${FILESDIR}"/respect_CXXFLAGS_configure.ac.patch \
171 +# "${FILESDIR}"/respect_CXXFLAGS_configure.patch \
172 +# "${FILESDIR}"/report_project_settings_configure.ac.patch \
173 +# "${FILESDIR}"/report_project_settings_configure.patch \
174 +# "${FILESDIR}"/make_install.patch
175 +
176 +# "${FILESDIR}"/${PN}-${PV#0.}-disable_test_compress.patch
177 +
178 +
179 +# "${FILESDIR}"/${PN}-${PV#0.}-gcc46.patch \
180 +# "${FILESDIR}"/${PN}-${PV#0.}-gcc47.patch \
181 +# "${WORKDIR}"/${PN}-${PV#0.}-asneeded.patch \
182 +# "${FILESDIR}"/${PN}-${PV#0.}-libpng15.patch \
183 +# "${FILESDIR}"/${PN}-${PV#0.}-glibc-214.patch
184 +
185 +# use prefix && append-ldflags -Wl,-rpath,"${EPREFIX}/usr/$(get_libdir)/${PN}"
186 + tc-export CXX CC
187 +}
188 +
189 +src_configure() {
190 + local myconf=()
191 + #--without-optimization turn off optimization flags in non-debug mode
192 + #--with-profiling build profiled versions of libs and apps
193 + #--with-tcheck(=DIR) build for Intel Thread Checker (in DIR)
194 + #--with-plugin-auto-load always enable the plugin manager by default
195 + #--with-bundles build bundles in addition to dylibs on Mac OS X
196 + #--with-bin-release build executables suitable for public release
197 + # no dll and such
198 + #--with-64 compile to 64-bit code
199 + # --with-universal build universal binaries on Mac OS X
200 + # --with-universal=CPUs build universal binaries targeting the given CPUs
201 + # --without-exe do not build executables
202 + #--with-relative-runpath=P specify an executable-relative DLL search path
203 + # --with-hard-runpath hard-code runtime path, ignoring LD_LIBRARY_PATH
204 + # --with-limited-linker don't attempt to build especially large projects
205 + #--with-extra-action= script to call after the configuration is complete
206 + #--with-autodep automatic generation of dependencies (GNU make)
207 + # --with-fake-root=DIR appear to have been built under DIR
208 + #--with-build-root-sfx=X add a user-specified suffix to the build dir name
209 + # --without-execopy do not copy built executables to the BIN area
210 + #--with-lib-rebuilds ensure that apps use up-to-date libraries
211 + # --with-lib-rebuilds=ask ask whether to update each app's libraries
212 + # --without-deactivation keep old copies of libraries that no longer build
213 + # --without-makefile-auto-update do not auto-update generated makefiles
214 + # --with-projects=FILE build projects listed in FILE by default
215 + # --without-flat-makefile do not generate an all-encompassing flat makefile
216 + # --with-configure-dialog allow interactive flat makefile project selection
217 + # --with-saved-settings=F load configuration settings from the file F
218 + #-with-check-tools=... use the specified tools for testing
219 + # --with-ncbi-public ensure compatibility for all in-house platforms
220 + #--with-sybase-local=DIR use local SYBASE install (DIR is optional)
221 + # --with-sybase-new use newer SYBASE install (12.5 rather than 12.0)
222 + #--without-ftds-renamed do not rename Sybase DBLIB symbols in built-in FTDS
223 + #--without-sp do not use SP libraries
224 + #--without-orbacus do not use ORBacus CORBA libraries
225 + # --with-orbacus=DIR use ORBacus installation in DIR
226 + #--with-jni(=JDK-DIR) build Java bindings (against the JDK in JDK-DIR)
227 + #--with-sablot=DIR use Sablotron installation in DIR
228 + # --without-sablot, do not use Sablotron
229 + #--with-oechem=DIR use OpenEye OEChem installation in DIR
230 + # --without-oechem do not use OEChem
231 + # --with-sge=DIR use Sun Grid Engine installation in DIR
232 + # --without-sge do not use Sun Grid Engine
233 + #--with-magic=DIR use libmagic installation in DIR
234 + # --without-magic do not use libmagic
235 + #--without-local-lbsm turn off support for IPC with locally running LBSMD
236 + # --without-ncbi-crypt use a dummy stubbed-out version of ncbi_crypt
237 + # --without-connext do not build non-public CONNECT library extensions
238 + # --without-serial do not build the serialization library and tools
239 + # --without-objects do not generate/build serializeable objects from ASNs
240 + # --without-dbapi do not build database connectivity libraries
241 + # --without-app do not build standalone applications like ID1_FETCH
242 + # --without-gui do not build most graphical projects
243 + # --without-algo do not build CPU-intensive algorithms
244 + #--without-internal do not build internal projects
245 + # --with-gbench ensure that Genome Workbench can be built
246 + # --without-gbench do not build Genome Workbench
247 + myconf+=(
248 + --with-dll
249 + --with-lfs
250 + --with-build-root="${S}"_build
251 + --without-suffix
252 + --without-hostspec
253 + --without-version
254 + --with-bincopy
255 + --without-strip
256 + --without-ccache
257 + --without-distcc
258 + --with-ncbi-c
259 + --without-ctools
260 + --with-sss
261 + --with-utils
262 + --with-sssdb
263 + --with-included-sss
264 + --with-z="${EPREFIX}"/usr
265 + --with-bz2="${EPREFIX}"/usr
266 + --with-muparser="${EPREFIX}"/usr
267 + --without-sybase
268 +# --with-3psw=std:netopt
269 + $(use_with debug)
270 + $(use_with debug max-debug)
271 + $(use_with debug symbols)
272 + $(use_with static-libs static)
273 + $(use_with static static-exe)
274 + $(use_with threads mt)
275 + $(use_with prefix runpath "${EPREFIX}/usr/$(get_libdir)/ncbi_cxx")
276 + $(use_with test check)
277 + $(use_with pch)
278 + $(use_with lzo lzo "${EPREFIX}"/usr)
279 + $(use_with pcre pcre "${EPREFIX}"/usr)
280 + $(use_with gnutls gnutls "${EPREFIX}"/usr)
281 + $(use_with ssl openssl "${EPREFIX}"/usr)
282 + $(use_with ftds ftds "${EPREFIX}"/usr)
283 + $(use_with mysql mysql "${EPREFIX}"/usr)
284 + $(use_with fltk fltk "${EPREFIX}"/usr)
285 + $(use_with opengl opengl "${EPREFIX}"/usr)
286 + $(use_with mesa mesa "${EPREFIX}"/usr)
287 + $(use_with opengl glut "${EPREFIX}"/usr)
288 + $(use_with opengl glew "${EPREFIX}"/usr)
289 + $(use_with opengl glew-m)
290 + $(use_with wxwidgets wxwidgets "${EPREFIX}"/usr)
291 + $(use_with wxwidgets wxwidgets-ucs)
292 + $(use_with freetype freetype "${EPREFIX}"/usr)
293 + $(use_with fastcgi fastcgi "${EPREFIX}"/usr)
294 + $(use_with berkdb bdb "${EPREFIX}"/usr)
295 + $(use_with odbc odbc "${EPREFIX}"/usr)
296 + $(use_with python python "${EPREFIX}"/usr)
297 + $(use_with boost boost "${EPREFIX}"/usr)
298 + $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
299 + $(use_with icu icu "${EPREFIX}"/usr)
300 + $(use_with expat expat "${EPREFIX}"/usr)
301 + $(use_with xml libxml2 "${EPREFIX}"/usr)
302 + $(use_with xml libxslt "${EPREFIX}"/usr)
303 + $(use_with xerces xerces "${EPREFIX}"/usr)
304 + $(use_with hdf5 hdf5 "${EPREFIX}"/usr)
305 + $(use_with xalan xalan "${EPREFIX}"/usr)
306 + $(use_with gif gif "${EPREFIX}"/usr)
307 + $(use_with jpeg jpeg "${EPREFIX}"/usr)
308 + $(use_with tiff tiff "${EPREFIX}"/usr)
309 + $(use_with png png "${EPREFIX}"/usr)
310 + $(use_with xpm xpm "${EPREFIX}"/usr)
311 + $(use_with curl curl "${EPREFIX}"/usr)
312 + $(use_with X x "${EPREFIX}"/usr)
313 + )
314 +
315 + # http://www.ncbi.nlm.nih.gov/books/NBK7167/
316 + use test || myconf+=( --with-projects="${FILESDIR}"/disable-testsuite-compilation.txt )
317 +
318 + # TODO
319 + # copy optimization -O options from CXXFLAGS to DEF_FAST_FLAGS and pass that also to configure
320 + # otherwise your -O2 will be dropped in some subdirectories and repalced by e.g. -O9
321 +
322 + "${S}"/configure \
323 + --prefix="${EPREFIX}"/usr \
324 + --build=x86_64-pc-linux-gnu \
325 + --host=x86_64-pc-linux-gnu \
326 + --infodir=/usr/share/info \
327 + --datadir=/usr/share \
328 + --sysconfdir=/etc \
329 + --localstatedir=/var/lib \
330 + --libdir=/usr/lib64 \
331 + ${myconf[@]} || die
332 +#--without-debug \
333 +# --with-bin-release \
334 +# --with-bincopy \
335 +# --without-static \
336 +# --with-dll \
337 +# --with-mt \
338 +# --with-lfs \
339 +# --prefix="${ED}"/usr \
340 +# --libdir="${ED}"/usr/$(get_libdir)/"${PN}" \
341 +# ${myconf} LDFLAGS="-Wl,--no-as-needed" \
342 +# || die
343 +# econf ${myconf[@]}
344 +}
345 +
346 +src_compile() {
347 + # all_r would ignore the --with-projects contents and build more
348 + # emake all_r -C GCC*-Release*/build || die
349 + # all_p with compile only selected/required components
350 + 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?"
351 +}
352 +
353 +src_install() {
354 + emake install || die
355 + # File collisions with sci-biology/ncbi-tools
356 + rm -f "${ED}"/usr/bin/{asn2asn,rpsblast,test_regexp}
357 + mv "${ED}"/usr/bin/seedtop "${ED}"/usr/bin/seedtop2
358 +
359 + echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${PN}" > ${S}/99${PN}
360 + doenvd "${S}/99${PN}"
361 +}
362 +
363 +pkg_postinst() {
364 + einfo 'Please run "source /etc/profile" before using this package in the current shell.'
365 + einfo 'Documentation is at http://www.ncbi.nlm.nih.gov/books/NBK7167/'
366 +}