|
Lines 1-95
Link Here
|
| 1 |
# Copyright 1999-2017 Gentoo Foundation |
|
|
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
|
| 4 |
EAPI=6 |
| 5 |
|
| 6 |
inherit eutils multilib flag-o-matic |
| 7 |
|
| 8 |
DESCRIPTION="E-Book Reader. Supports many e-book formats" |
| 9 |
HOMEPAGE="http://www.fbreader.org/" |
| 10 |
SRC_URI="http://www.fbreader.org/files/desktop/${PN}-sources-${PV}.tgz" |
| 11 |
|
| 12 |
LICENSE="GPL-2" |
| 13 |
SLOT="0" |
| 14 |
KEYWORDS="~amd64 ~arm ~ppc ~x86" # do not stablize as upstream is dead |
| 15 |
IUSE="debug" |
| 16 |
|
| 17 |
RDEPEND=" |
| 18 |
app-arch/bzip2 |
| 19 |
dev-libs/expat |
| 20 |
dev-libs/liblinebreak |
| 21 |
dev-libs/fribidi |
| 22 |
dev-db/sqlite |
| 23 |
net-misc/curl |
| 24 |
sys-libs/zlib |
| 25 |
dev-qt/qtcore:5 |
| 26 |
dev-qt/qtgui:5 |
| 27 |
dev-qt/qtwidgets:5 |
| 28 |
dev-qt/qtnetwork:5[ssl] |
| 29 |
" |
| 30 |
DEPEND="${RDEPEND} |
| 31 |
virtual/pkgconfig |
| 32 |
" |
| 33 |
|
| 34 |
src_prepare() { |
| 35 |
# Still use linebreak instead of new unibreak |
| 36 |
sed -e "s:-lunibreak:-llinebreak:" \ |
| 37 |
-i makefiles/config.mk zlibrary/text/Makefile || die "fixing libunibreak failed" |
| 38 |
|
| 39 |
# Let portage decide about the compiler |
| 40 |
sed -e "/^CC = /d" \ |
| 41 |
-i makefiles/arch/desktop.mk || die "removing CC line failed" |
| 42 |
|
| 43 |
# let portage strip the binary |
| 44 |
sed -e '/@strip/d' \ |
| 45 |
-i fbreader/desktop/Makefile || die |
| 46 |
|
| 47 |
# Respect *FLAGS |
| 48 |
sed -e "s/^CFLAGS = -pipe/CFLAGS +=/" \ |
| 49 |
-i makefiles/arch/desktop.mk || die "CFLAGS sed failed" |
| 50 |
sed -e "/^ CFLAGS +=/ d" \ |
| 51 |
-i makefiles/config.mk || die "CFLAGS sed failed" |
| 52 |
sed -e "/^ LDFLAGS += -s$/ d" \ |
| 53 |
-i makefiles/config.mk || die "sed failed" |
| 54 |
sed -e "/^LDFLAGS =$/ d" \ |
| 55 |
-i makefiles/arch/desktop.mk || die "sed failed" |
| 56 |
|
| 57 |
echo "TARGET_ARCH = desktop" > makefiles/target.mk |
| 58 |
echo "LIBDIR = /usr/$(get_libdir)" >> makefiles/target.mk |
| 59 |
|
| 60 |
echo "UI_TYPE = qt4" >> makefiles/target.mk |
| 61 |
sed -e 's:MOC = moc-qt4:MOC = /usr/bin/moc:' \ |
| 62 |
-i makefiles/arch/desktop.mk || die "updating desktop.mk failed" |
| 63 |
|
| 64 |
if use debug; then |
| 65 |
echo "TARGET_STATUS = debug" >> makefiles/target.mk |
| 66 |
else |
| 67 |
echo "TARGET_STATUS = release" >> makefiles/target.mk |
| 68 |
fi |
| 69 |
|
| 70 |
# bug #452636 |
| 71 |
eapply "${FILESDIR}"/${P}.patch |
| 72 |
# bug #515698 |
| 73 |
eapply "${FILESDIR}"/${P}-qreal-cast.patch |
| 74 |
# bug #516794 |
| 75 |
eapply "${FILESDIR}"/${P}-mimetypes.patch |
| 76 |
# bug #437262 |
| 77 |
eapply "${FILESDIR}"/${P}-ld-bfd.patch |
| 78 |
# bug #592588 |
| 79 |
eapply -p0 "${FILESDIR}"/${P}-gcc6.patch |
| 80 |
|
| 81 |
eapply "${FILESDIR}"/${P}-qt5.patch |
| 82 |
append-cflags -std=c++11 |
| 83 |
|
| 84 |
eapply_user |
| 85 |
} |
| 86 |
|
| 87 |
src_compile() { |
| 88 |
# bug #484516 |
| 89 |
emake -j1 |
| 90 |
} |
| 91 |
|
| 92 |
src_install() { |
| 93 |
default |
| 94 |
dosym FBReader /usr/bin/fbreader |
| 95 |
} |