| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-cdr/dvdisaster/dvdisaster-0.72.2.ebuild,v 1.6 2011/10/15 11:55:26 xarthisius Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
inherit eutils gnome2-utils versionator
|
| 7 |
|
| 8 |
MY_P=${PN}-$(replace_version_separator 2 '.')
|
| 9 |
|
| 10 |
DESCRIPTION="Data-protection and recovery tool for DVDs"
|
| 11 |
HOMEPAGE="http://dvdisaster.sourceforge.net/"
|
| 12 |
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
|
| 13 |
|
| 14 |
LICENSE="GPL-2"
|
| 15 |
KEYWORDS="amd64 ppc x86"
|
| 16 |
SLOT="0"
|
| 17 |
IUSE="debug linguas_cs linguas_de linguas_it linguas_ru sse2"
|
| 18 |
|
| 19 |
RDEPEND=">=x11-libs/gtk+-2.6:2
|
| 20 |
media-libs/libpng
|
| 21 |
sys-libs/zlib"
|
| 22 |
DEPEND="${RDEPEND}
|
| 23 |
virtual/pkgconfig"
|
| 24 |
|
| 25 |
S=${WORKDIR}/${MY_P}
|
| 26 |
|
| 27 |
src_prepare() {
|
| 28 |
epatch "${FILESDIR}"/${PN}-0.72.1-libpng15.patch
|
| 29 |
}
|
| 30 |
|
| 31 |
# - There is no autotools, use_ functions won't work
|
| 32 |
# - NLS disabled because sys-devel/gettext fails, if you enable it
|
| 33 |
# you need also virtual/libintl because it links to it for FreeBSD
|
| 34 |
src_configure() {
|
| 35 |
local myconf
|
| 36 |
|
| 37 |
if use sse2; then
|
| 38 |
myconf+=" --with-sse2=yes"
|
| 39 |
else
|
| 40 |
myconf+=" --with-sse2=no"
|
| 41 |
fi
|
| 42 |
|
| 43 |
use debug && myconf+=" --with-memdebug=yes"
|
| 44 |
|
| 45 |
./configure \
|
| 46 |
--prefix=/usr \
|
| 47 |
--bindir=/usr/bin \
|
| 48 |
--mandir=/usr/share/man \
|
| 49 |
--docdir=/usr/share/doc \
|
| 50 |
--docsubdir=${PF} \
|
| 51 |
--localedir=/usr/share/locale \
|
| 52 |
--buildroot="${D}" \
|
| 53 |
--with-nls=no \
|
| 54 |
${myconf} || die
|
| 55 |
}
|
| 56 |
|
| 57 |
src_install() {
|
| 58 |
emake install
|
| 59 |
|
| 60 |
newicon contrib/${PN}48.png ${PN}.png
|
| 61 |
make_desktop_entry ${PN} ${PN} ${PN} "System;Utility"
|
| 62 |
|
| 63 |
for res in 16 32 48 64; do
|
| 64 |
insinto /usr/share/icons/hicolor/${res}x${res}/apps
|
| 65 |
newins contrib/${PN}${res}.png ${PN}.png
|
| 66 |
done
|
| 67 |
|
| 68 |
local dest="${D}/usr/share"
|
| 69 |
|
| 70 |
for lang in cs de it ru; do
|
| 71 |
use linguas_${lang} || rm -rf ${dest}/doc/${PF}/${lang} \
|
| 72 |
${dest}/doc/${PF}/CREDITS.${lang} ${dest}/man/${lang}
|
| 73 |
done
|
| 74 |
|
| 75 |
rm -f "${D}"/usr/bin/*.sh
|
| 76 |
}
|
| 77 |
|
| 78 |
pkg_preinst() {
|
| 79 |
gnome2_icon_savelist
|
| 80 |
}
|
| 81 |
|
| 82 |
pkg_postinst() {
|
| 83 |
gnome2_icon_cache_update
|
| 84 |
}
|
| 85 |
|
| 86 |
pkg_postrm() {
|
| 87 |
gnome2_icon_cache_update
|
| 88 |
}
|