/[gentoo-x86]/sci-chemistry/arp-warp-bin/arp-warp-bin-7.1-r1.ebuild
Gentoo

Contents of /sci-chemistry/arp-warp-bin/arp-warp-bin-7.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Wed Feb 6 07:55:47 2013 UTC (20 months, 2 weeks ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +3 -3 lines
sci-chemistry/arp-warp-bin: Loosen awk dependency from gawk to virtual/awk, #455682

(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/arp-warp-bin/arp-warp-bin-7.1-r1.ebuild,v 1.5 2012/07/24 13:35:02 jlec Exp $
4
5 EAPI=3
6
7 PYTHON_DEPEND="2"
8
9 inherit eutils prefix python
10
11 MY_P="arp_warp_${PV}"
12
13 DESCRIPTION="Software for improvement and interpretation of crystallographic electron density maps"
14 SRC_URI="${MY_P}.tar.gz"
15 HOMEPAGE="http://www.embl-hamburg.de/ARP/"
16
17 LICENSE="ArpWarp"
18 SLOT="0"
19 KEYWORDS="-* amd64 x86 ~amd64-linux ~x86-linux"
20 IUSE=""
21
22 RDEPEND="
23 app-shells/tcsh
24 sci-chemistry/refmac
25 virtual/awk
26 virtual/jre
27 virtual/opengl
28 x11-libs/libX11"
29 DEPEND=""
30
31 RESTRICT="fetch"
32
33 S="${WORKDIR}/${MY_P}"
34
35 QA_PREBUILT="opt/arp-warp-bin/bin/*"
36
37 pkg_nofetch(){
38 elog "Fill out the form at http://www.embl-hamburg.de/ARP/"
39 elog "and place ${A} in ${DISTDIR}"
40 }
41
42 pkg_setup() {
43 python_set_active_version 2
44 }
45
46 src_prepare() {
47 epatch "${FILESDIR}"/${PV}-setup.patch
48 eprefixify "${S}"/share/arpwarp_setup_base.*
49 sed "s:PYVER:$(python_get_version):g" -i "${S}"/share/arpwarp_setup_base.*
50 python_convert_shebangs $(python_get_version) flex-wARP-src-354/*py
51 sed -e "s:/usr/:${EPREFIX}/usr/:g" -i flex-wARP-src-354/*py || die
52 sed -e '/exit/d' -i "${S}"/share/arpwarp_setup_base.* || die
53 }
54
55 src_install(){
56 PYVER=$(python_get_version)
57 m_type=$(uname -m)
58 os_type=$(uname)
59
60 insinto /opt/${PN}/byte-code/python-${PYVER}
61 doins "${S}"/flex-wARP-src-354/*py || die
62
63 exeinto /opt/${PN}/bin/bin-${m_type}-${os_type}
64 doexe "${S}"/bin/bin-${m_type}-${os_type}/* && \
65 doexe "${S}"/share/*sh || die
66
67 insinto /opt/${PN}/bin/bin-${m_type}-${os_type}
68 doins "${S}"/share/*{gif,bmp,XYZ,bash,csh,dat,lib,tbl,llh} || die
69
70 insinto /etc/profile.d/
71 newins "${S}"/share/arpwarp_setup_base.csh 90arpwarp_setup.csh && \
72 newins "${S}"/share/arpwarp_setup_base.bash 90arpwarp_setup.sh || die
73
74 dodoc "${S}"/README manual/UserGuide${PV}.pdf || die
75 dohtml -r "${S}"/manual/html/* || die
76 }
77
78 pkg_postinst(){
79 python_need_rebuild
80 python_mod_optimize /opt/${PN}/byte-code/python-${PYVER}
81
82 testcommand=$(echo 3 2 | awk '{printf"%3.1f",$1/$2}')
83 if [ $testcommand == "1,5" ];then
84 ewarn "*** ERROR ***"
85 ewarn " 3/2=" $testcommand
86 ewarn "Invalid decimal separator (must be ".")"
87 ewarn "You need to set this correctly!!!"
88 echo
89 ewarn "One way of setting the decimal separator is:"
90 ewarn "setenv LC_NUMERIC C' in your .cshrc file"
91 ewarn "\tor"
92 ewarn "export LC_NUMERIC=C' in your .bashrc file"
93 ewarn "Otherwise please consult your system manager"
94 fi
95
96 grep -q sse2 /proc/cpuinfo || einfo "The CPU is lacking SSE2! You should use the cluster at EMBL-Hamburg."
97 echo
98 }
99
100 pkg_postrm() {
101 python_mod_cleanup /opt/${PN}/byte-code/python-${PYVER}
102 }

  ViewVC Help
Powered by ViewVC 1.1.20