blob: 9440dce9820c62983518f799d843840b8146fd48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils toolchain-funcs
DESCRIPTION="Display molecular 3D structures, such as proteins, in both schematic and detailed representations"
HOMEPAGE="http://www.avatar.se/molscript/"
SRC_URI="${P}.tar.gz"
LICENSE="glut molscript"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
IUSE=""
DEPEND="
media-libs/freeglut
media-libs/gd:2=
media-libs/libpng:0=
virtual/jpeg:0=
|| (
x11-libs/libXmu
x11-libs/libXext
x11-libs/libX11
)"
RDEPEND="${DEPEND}"
RESTRICT="fetch"
pkg_nofetch() {
elog "Please visit ${HOMEPAGE}"
elog "and get ${A}."
elog "Place it in ${DISTDIR}"
}
src_prepare() {
epatch \
"${FILESDIR}"/fix-makefile-shared.patch \
"${FILESDIR}"/${PV}-ldflags.patch \
"${FILESDIR}"/${PV}-prll.patch \
"${FILESDIR}"/${PV}-libpng15.patch
# Provide glutbitmap.h, because freeglut doesn't have it
cp "${FILESDIR}"/glutbitmap.h "${S}"/clib/ || die
# Stop an incredibly hacky include
sed \
-e 's:<../lib/glut/glutbitmap.h>:"glutbitmap.h":g' \
-i "${S}"/clib/ogl_bitmap_character.c || die
}
src_compile() {
# Prefix of programs it links with
export FREEWAREDIR="${EPREFIX}/usr"
ln -s Makefile.complete Makefile || die
emake \
CC="$(tc-getCC)" \
COPT="${CFLAGS}"
}
src_install() {
dobin molscript molauto
dohtml "${S}"/doc/*.html
}
|