Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/phaser: phaser-2.1.4.ebuild metadata.xml ChangeLog
Date: Sat, 03 Jul 2010 13:32:50
Message-Id: 20100703133241.4CCAC2CE15@corvid.gentoo.org
1 jlec 10/07/03 13:32:41
2
3 Added: phaser-2.1.4.ebuild metadata.xml ChangeLog
4 Log:
5 Initial addition
6 (Portage version: 2.2_rc67/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sci-chemistry/phaser/phaser-2.1.4.ebuild
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/phaser/phaser-2.1.4.ebuild?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/phaser/phaser-2.1.4.ebuild?rev=1.1&content-type=text/plain
13
14 Index: phaser-2.1.4.ebuild
15 ===================================================================
16 # Copyright 1999-2010 Gentoo Foundation
17 # Distributed under the terms of the GNU General Public License v2
18 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/phaser/phaser-2.1.4.ebuild,v 1.1 2010/07/03 13:32:41 jlec Exp $
19
20 EAPI="3"
21
22 PYTHON_DEPEND="2"
23
24 inherit base flag-o-matic python
25
26 CCP4VER="6.1.13"
27
28 DESCRIPTION="A program for phasing macromolecular crystal structures"
29 HOMEPAGE="http://www-structmed.cimr.cam.ac.uk/phaser"
30 SRC_URI="ftp://ftp.ccp4.ac.uk/ccp4/${CCP4VER}/ccp4-${CCP4VER}-${PN}-cctbx-src.tar.gz"
31
32 LICENSE="|| ( phaser phaser-com ccp4 )"
33 SLOT="0"
34 KEYWORDS="~amd64 ~x86"
35 IUSE="openmp"
36
37 RDEPEND=""
38 DEPEND="${RDEPEND}
39 app-shells/tcsh"
40
41 S="${WORKDIR}"/ccp4-${CCP4VER}
42
43 PATCHES=(
44 "${FILESDIR}"/phaser-2.1.4-chmod.patch
45 "${FILESDIR}"/phaser-2.1.4-ldflags.patch
46 )
47
48 pkg_setup() {
49 python_set_active_version 2
50 }
51
52 src_prepare() {
53 base_src_prepare
54
55 use openmp && append-flags -fopenmp
56
57 for i in ${CXXFLAGS}; do
58 OPTS="${OPTS} \"${i}\","
59 done
60
61 OPTS=${OPTS%,}
62
63 sed -i \
64 -e "s:opts = \[.*\]$:opts = \[${OPTS}\]:g" \
65 "${S}"/lib/cctbx/cctbx_sources/libtbx/SConscript || die
66
67 for i in ${LDFLAGS}; do
68 OPTSLD="${OPTSLD} \"${i}\","
69 done
70
71 sed -i \
72 -e "s:env_etc.shlinkflags .* \"-shared\":env_etc.shlinkflags = \[ ${OPTSLD} \"-shared\"\]:g" \
73 -e "s:\[\"-static:\[${OPTSLD} \"-static:g" \
74 "${S}"/lib/cctbx/cctbx_sources/libtbx/SConscript || die
75
76 }
77
78 src_configure() {
79 local compiler
80 local mtype
81 local mversion
82 local nproc
83
84 # Valid compilers are win32_cl, sunos_CC, unix_gcc, unix_ecc,
85 # unix_icc, unix_icpc, tru64_cxx, hp_ux11_aCC, irix_CC,
86 # darwin_c++, darwin_gcc. The build systems seems to prepend
87 # unix_ all by itself. Can this be derived from $(tc-getCC)?
88 compiler=$(expr match "$(tc-getCC)" '.*\([a-z]cc\)')
89
90 # Breaks cross compilation.
91 mtype=$(src/${PN}/bin/machine_type)
92 mversion=$(src/${PN}/bin/machine_version)
93
94 einfo "Creating build directory"
95 mkdir build
96 cd build
97 ln -sf "${S}/lib/cctbx/cctbx_sources/scons" scons
98 ln -sf "${S}/lib/cctbx/cctbx_sources/libtbx" libtbx
99
100 einfo "Configuring phaser components"
101 $(PYTHON) "libtbx/configure.py" \
102 --build=release \
103 --compiler=${compiler} \
104 --repository="${S}"/src/${PN}/source \
105 --repository="${S}"/lib/cctbx/cctbx_sources \
106 --static_libraries \
107 ccp4io="${S}" \
108 mmtbx \
109 phaser || die "configure.py failed"
110 }
111
112 src_compile() {
113 nproc=`echo "-j1 ${MAKEOPTS}" \
114 | sed -e "s/.*\(-j\s*\|--jobs=\)\([0-9]\+\).*/\2/"`
115
116 cd build
117 einfo "Setting up build environment"
118 source setpaths.sh
119
120 einfo "Compiling phaser components"
121 libtbx.scons -j ${nproc} || die "libtbx.scons failed"
122 }
123
124 src_install() {
125 dobin build/exe/phaser || die
126
127 cat >> "${T}"/53${PN} <<- EOF
128 PHASER="${EPREFIX}/usr/bin"
129 PHASER_ENVIRONMENT="1"
130 PHASER_MTYPE="${mtype}"
131 PHASER_MVERSION="${mversion}"
132 PHASER_VERSION="${PV}"
133 EOF
134
135 doenvd "${T}"/53${PN} || die
136 }
137
138
139
140 1.1 sci-chemistry/phaser/metadata.xml
141
142 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/phaser/metadata.xml?rev=1.1&view=markup
143 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/phaser/metadata.xml?rev=1.1&content-type=text/plain
144
145 Index: metadata.xml
146 ===================================================================
147 <?xml version="1.0" encoding="UTF-8"?>
148 <pkgmetadata>
149 <herd>sci-chemistry</herd>
150 <maintainer>
151 <email>jlec@g.o</email>
152 <description>ccp4 maintainer</description>
153 </maintainer>
154 </pkgmetadata>
155
156
157
158 1.1 sci-chemistry/phaser/ChangeLog
159
160 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/phaser/ChangeLog?rev=1.1&view=markup
161 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/phaser/ChangeLog?rev=1.1&content-type=text/plain
162
163 Index: ChangeLog
164 ===================================================================
165 # ChangeLog for sci-chemistry/phaser
166 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
167 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/phaser/ChangeLog,v 1.1 2010/07/03 13:32:41 jlec Exp $
168
169 *phaser-2.1.4 (03 Jul 2010)
170
171 03 Jul 2010; Justin Lecher <jlec@g.o> +phaser-2.1.4.ebuild,
172 +files/phaser-2.1.4-chmod.patch, +metadata.xml:
173 Initial addition