blob: 5141ef938efad848d541d070478d30fc86ac22af (
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils
DESCRIPTION="Crossplatform & Opensource C++ Vector Graphic Framework"
HOMEPAGE="http://www.amanith.org/blog/index.php"
SRC_URI="http://www.amanith.org/download/files/${PN}_${PV/./}.tar.gz"
LICENSE="QPL"
SLOT="0"
KEYWORDS="~x86"
IUSE="examples qt4"
DEPEND=">=media-libs/freetype-2.1.10
>=media-libs/jpeg-6b
>=media-libs/libpng-1.2.10
>=sys-libs/zlib-1.2.3
qt4? ( >=x11-libs/qt-4.1.0 )
!qt4? ( =x11-libs/qt-3* )"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}"
src_unpack() {
unpack ${A}
epatch "${FILESDIR}/${PV}-plugins_dep.patch"
epatch "${FILESDIR}/${PV}-examples_gcc4.patch"
# We don't have to build the 3rd-party libs, they're provided by the deps
rm -rf "${S}/3rdpart"
sed -i -e 's/3rdpart//' "${S}/amanith.pro"
if use qt4; then
sed -i -e 's/# DEFINES += USE_QT4/DEFINES += USE_QT4/' "${S}/config/settings.conf"
fi
if ! use examples; then
sed -i -e 's/examples//' "${S}/amanith.pro"
fi
}
src_compile() {
cd "${S}"
export AMANITHDIR="${S}"
if ! use qt4; then
export QTDIR="/usr/qt/3"
PATH="${QTDIR}/bin:${PATH}"
fi
qmake || die "qmake failed"
emake || die "emake failed"
}
src_install() {
dolib.so lib/*.so*
dolib.so plugins/*.so*
insinto /usr/include
doins -r include/amanith
dodoc CHANGELOG FAQ README
insinto "/usr/share/doc/${PF}"
doins "doc/amanith.chm"
if use examples; then
insinto "/usr/share/${PN}"
# remove the object files
find ./examples -iname "*.o" -delete
doins -r examples
# and set the executable bit for the demos (removed by doins),
# note: do not use 'cp -r' since every file has executable bit set
for file in $(find "${D}/usr/share/${PN}/examples" -print); do
if [[ -n $(readelf -s "${file}" 2>/dev/null) ]]; then
chmod a+x ${file};
fi
done
doins -r data
doins -r config
fi
}
|