summaryrefslogtreecommitdiff
blob: 80fcc44f6ffa4583d82384a2d7bf2c43213d7820 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-games/physfs/physfs-2.0.0.ebuild,v 1.2 2009/05/26 14:59:05 tupone Exp $

EAPI=2
inherit eutils cmake-utils

DESCRIPTION="Abstraction layer for filesystem and archive access"
HOMEPAGE="http://icculus.org/physfs/"
SRC_URI="http://icculus.org/physfs/downloads/${P}.tar.gz"

LICENSE="ZLIB"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE="doc grp hog mvl wad qpak +zip"

RDEPEND=""
DEPEND="doc? ( app-doc/doxygen )"

src_prepare() {
	epatch "${FILESDIR}"/${P}-gcc44.patch
	# make sure these libs aren't used
	rm -rf lzma zlib*
}

src_configure() {
	local mycmakeargs="
		-DPHYSFS_ARCHIVE_7Z=OFF
		-DPHYSFS_BUILD_SHARED=ON
		-DPHYSFS_BUILD_STATIC=ON
		-DPHYSFS_BUILD_TEST=OFF
		-DPHYSFS_BUILD_WX_TEST=OFF
		-DPHYSFS_INTERNAL_ZLIB=OFF
		$(cmake-utils_use grp PHYSFS_ARCHIVE_GRP)
		$(cmake-utils_use hog PHYSFS_ARCHIVE_HOG)
		$(cmake-utils_use mvl PHYSFS_ARCHIVE_MVL)
		$(cmake-utils_use wad PHYSFS_ARCHIVE_WAD)
		$(cmake-utils_use qpak PHYSFS_ARCHIVE_QPAK)
		$(cmake-utils_use zip PHYSFS_ARCHIVE_ZIP)"

	cmake-utils_src_configure
}

src_compile() {
	cmake-utils_src_compile

	if use doc ; then
		doxygen || die "doxygen failed"
	fi
}

src_install() {
	local DOCS="CHANGELOG.txt CREDITS.txt TODO.txt"
	local HTML_DOCS=$(use doc && echo docs/html/*)

	cmake-utils_src_install
}