summaryrefslogtreecommitdiff
blob: 24cba832c83ae13888fc55f871ae7a25dd1c61d0 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-games/physfs/physfs-1.1.1.ebuild,v 1.1 2007/08/27 00:54:43 mr_bones_ Exp $

DESCRIPTION="abstraction layer for filesystems, useful for games"
HOMEPAGE="http://icculus.org/physfs/"
SRC_URI="http://icculus.org/physfs/downloads/${P}.tar.gz"

LICENSE="ZLIB"
SLOT="0"
KEYWORDS="-* ~x86-fbsd"
IUSE="doc"

RDEPEND="sys-libs/zlib"
DEPEND="${RDEPEND}
	>=dev-util/cmake-2.4
	doc? ( app-doc/doxygen )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	sed -i \
		-e '/test_physfs/d' \
		CMakeLists.txt \
		|| die "sed failed"
}

src_compile() {
	cmake -DCMAKE_INSTALL_PREFIX=/usr .
	emake || die
	if use doc ; then
		doxygen
	fi
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	if use doc ; then
		dohtml -r docs/html
	fi
	dodoc CHANGELOG.txt CREDITS.txt TODO.txt
}