summaryrefslogtreecommitdiff
blob: 5a70a6ce84aa410a7844f38cbb6b7cb67c4253fa (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-tv/tvbrowser/tvbrowser-2.6.2.ebuild,v 1.2 2008/01/13 19:48:07 hd_brummy Exp $

JAVA_PKG_IUSE="doc source"

inherit eutils java-pkg-2 java-ant-2 autotools flag-o-matic

DESCRIPTION="Themeable and easy to use TV Guide - written in Java"
HOMEPAGE="http://www.tvbrowser.org/"
SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip
themes? (
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/midnightthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/roueBrownthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/roueBluethemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/roueGreenthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/blueTurquesathemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/gorillathemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/BeOSthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/crystal2themepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/opusOSDeepthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/chaNinja-Bluethemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/amarachthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/quickSilverRthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/gfxOasisthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/underlingthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/coronaHthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/cougarthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/royalInspiratthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/tigerthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/mmMagra-Xthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/iBarthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/solunaRthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/fatalEthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/blueMetalthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/b0sumithemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/b0sumiErgothempack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/oliveGreenLunaXPthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/silverLunaXPthemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/architectBluethemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/architectOlivethemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/hmmXPBluethemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/hmmXPMonoBluethemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/tigerGraphitethemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/opusOSBluethemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/opusOSOlivethemepack.zip
http://javootoo.l2fprod.com/plaf/skinlf/t-packs/themepacks/opusLunaSilverthemepack.zip
http://www.tvbrowser.org/downloads/CrystalClear.zip
http://www.tvbrowser.org/downloads/noia.zip
http://www.tvbrowser.org/downloads/nuvola.zip
http://www.tvbrowser.org/downloads/tulliana.zip
)"

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

# missing dependencies commons-compress, TVAnytimeAPI, jRegistryKey , gdata-calendar, gdata-client and jcom
# use local jar files

RDEPEND=">=virtual/jre-1.5
	x11-libs/libXt
	x11-libs/libSM
	x11-libs/libICE
	x11-libs/libXext
	x11-libs/libXtst
	x11-libs/libX11
	x11-libs/libXau
	x11-libs/libXdmcp
	dev-java/junit
	dev-java/commons-net
	>=dev-java/jgoodies-forms-1.1.0
	>=dev-java/jgoodies-looks-2.0
	dev-java/bsh
	dev-java/l2fprod-common
	>=dev-java/jakarta-oro-2.0
	>=dev-java/poi-2.5.1
	>=dev-java/xerces-2.8"

DEPEND=">=virtual/jdk-1.5
	${RDEPEND}
	app-arch/unzip
	source? ( app-arch/zip )"

LICENSE="GPL-2"

IUSE="doc themes source"

src_unpack() {
	unpack ${P}-src.zip

	cd "${S}"
	epatch "${FILESDIR}"/tvbrowser-2.5-makefiles.patch

	# fix bug #170363
	epatch "${FILESDIR}/tvbrowser-2.6._Localizer.patch"

	local J_ARCH
	case "${ARCH}" in
		x86)	J_ARCH=i386 ;;
		amd64)	J_ARCH=amd64 ;;
		*) die "not supported arch for this ebuild" ;;
	esac

	sed -i "${S}"/deployment/x11/src/Makefile.am \
		-e "s:/lib/i386/:/lib/${J_ARCH}/:"

	cd "${S}/tvdatakit/workspace/lib"
	rm -v *.jar || die

	java-pkg_jar-from poi
	java-pkg_jar-from xerces-2

	cd "${S}"/lib
	rm -v junit.jar commons-net-1.4.1.jar forms-1.1.0.jar looks-2.1.4.jar \
		bsh-2.0b4.jar l2fprod-common-tasks.jar jakarta-oro-2.0.8.jar

	java-pkg_jar-from junit
	java-pkg_jar-from commons-net commons-net.jar commons-net-1.4.1.jar
	java-pkg_jar-from jgoodies-forms forms.jar forms-1.1.0.jar
	java-pkg_jar-from jgoodies-looks-2.0 looks.jar looks-2.1.4.jar
	java-pkg_jar-from bsh bsh.jar bsh-2.0b4.jar
	java-pkg_jar-from l2fprod-common l2fprod-common-tasks.jar
	java-pkg_jar-from jakarta-oro-2.0 jakarta-oro.jar jakarta-oro-2.0.8.jar

	# themepacks don't work with system skinlf
	#java-pkg_jarfrom skinlf

	# Fails to create javadocs without this
	mkdir "${S}/public"

	# fix bug #170364
	cd "${S}/deployment/x11"
	chmod u+x configure
	rm src/libDesktopIndicator.so

	# converting to unix line-endings
	edos2unix missing depcomp

	eautoreconf
}

src_compile() {
	eant runtime-linux $(use_doc public-doc)

	# second part: DesktopIndicator
	cd "${S}/deployment/x11"

	append-flags -fPIC	
	econf || die "econf failed"	
	emake || die "emake failed"
}

src_install() {
	use source && java-pkg_dosrc src/*
	use doc && java-pkg_dojavadoc doc
	cd runtime/${PN}_linux || die

	java-pkg_dojar ${PN}.jar

	local todir="${JAVA_PKG_SHAREPATH}"

	cp -a imgs "${D}/${todir}" || die
	cp -a icons "${D}/${todir}" || die
	cp -a plugins "${D}/${todir}" || die
	cp linux.properties "${D}/${todir}" || die

	insinto "${todir}/themepacks"
	doins themepacks/themepack.zip || die

	if use themes; then
		cd "${DISTDIR}"
		doins midnightthemepack.zip \
			roueBrownthemepack.zip \
			roueBluethemepack.zip \
			roueGreenthemepack.zip \
			blueTurquesathemepack.zip \
			gorillathemepack.zip \
			BeOSthemepack.zip \
			crystal2themepack.zip \
			opusOSDeepthemepack.zip \
			chaNinja-Bluethemepack.zip \
			amarachthemepack.zip \
			quickSilverRthemepack.zip \
			gfxOasisthemepack.zip \
			underlingthemepack.zip \
			coronaHthemepack.zip \
			cougarthemepack.zip \
			royalInspiratthemepack.zip \
			tigerthemepack.zip \
			mmMagra-Xthemepack.zip \
			iBarthemepack.zip \
			solunaRthemepack.zip \
			fatalEthemepack.zip \
			blueMetalthemepack.zip \
			b0sumithemepack.zip \
			b0sumiErgothempack.zip \
			oliveGreenLunaXPthemepack.zip \
			silverLunaXPthemepack.zip \
			architectBluethemepack.zip \
			architectOlivethemepack.zip \
			hmmXPBluethemepack.zip \
			hmmXPMonoBluethemepack.zip \
			tigerGraphitethemepack.zip \
			opusOSBluethemepack.zip \
			opusOSOlivethemepack.zip \
			opusLunaSilverthemepack.zip || die
		insinto "${todir}/icons"
		doins CrystalClear.zip noia.zip nuvola.zip tulliana.zip || die
	fi

	java-pkg_doso "${S}/deployment/x11/src/libDesktopIndicator.so"

	java-pkg_dolauncher "tvbrowser" \
		--jar ${todir}/lib/tvbrowser.jar \
		--pwd ${todir} \
		--java_args " -Dpropertiesfile=${todir}/linux.properties"

	make_desktop_entry ${PN} "TV Browser" /usr/share/tvbrowser/imgs/tvbrowser128.png
}