summaryrefslogtreecommitdiff
blob: 6682213c57bff73f6d17af28322006112984e889 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/bibletime/bibletime-1.6_beta2.ebuild,v 1.2 2006/06/15 04:52:30 squinky86 Exp $

inherit kde eutils versionator

MY_P="${PN}-$(replace_version_separator 2 '')"
S=${WORKDIR}/${MY_P}

DESCRIPTION="KDE Bible study application using the SWORD library."
HOMEPAGE="http://www.bibletime.info/"
SRC_URI="mirror://sourceforge/bibletime/${MY_P}.tar.bz2"
LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=">=app-text/sword-1.5.8
	dev-cpp/clucene"

LANGS_PKG=${PN}-i18n-1.5.3
LANGS="af bg cs da de en_GB es fi fr hu it ko nl nn_NO no pl pt_BR ro ru sk ua"
LANGS_DOC="bg cs de fi fr it ko nl pt_BR ru"

for X in ${LANGS}; do
	SRC_URI="${SRC_URI} linguas_${X}? ( mirror://sourceforge/bibletime/${LANGS_PKG}.tar.bz2 )"
done

need-kde 3.4

pkg_setup() {
	if ! built_with_use app-text/sword curl; then
		echo
		ewarn "The SWORD library may not have been compiled with curl support."
		ewarn "If you wish to use BibleTime's ability to download modules"
		ewarn "straight from the SWORD website, please make sure app-text/sword"
		ewarn "was compiled with USE=\"curl\"."
		ewarn "Press ctrl+c to abort the merge of BibleTime if you want to"
		ewarn "recompile SWORD with curl support."
		echo
		ebeep 5
	fi
}

src_unpack() {
	kde_src_unpack
	epatch ${FILESDIR}/${P}-gcc4.patch

	local MAKE_LANGS MAKE_LANGS_DOC
	for X in ${LANGS}; do
		use linguas_${X} && MAKE_LANGS="${MAKE_LANGS} ${X/pt_BR/pt_br}.po"
	done
	for X in ${LANGS_DOC}; do
		use linguas_${X} && MAKE_LANGS_DOC="${MAKE_LANGS_DOC} ${X/pt_BR/pt-br}"
	done

	if [ -d "${WORKDIR}/${LANGS_PKG}" ]; then
		cd "${WORKDIR}/${LANGS_PKG}"
		sed -i -e "s,^POFILES.*,POFILES = ${MAKE_LANGS}," po/Makefile.am
		sed -i -e "s,^SUBDIRS.*,SUBDIRS = ${MAKE_LANGS_DOC}," docs/Makefile.am
		make -f admin/Makefile.common || die
	fi
}

src_compile() {
	kde_src_compile

	local _S="${S}"
	if [ -d "${WORKDIR}/${LANGS_PKG}" ]; then
		S="${WORKDIR}/${LANGS_PKG}"
		cd "${S}"
		kde_src_compile
	fi
	S="${_S}"
}

src_install() {
	kde_src_install

	local _S="${S}"
	if [ -d "${WORKDIR}/${LANGS_PKG}" ]; then
		S="${WORKDIR}/${LANGS_PKG}"
		cd "${S}"
		kde_src_install
	fi
	S="${_S}"
}