/[gentoo-x86]/www-client/netsurf/netsurf-2.9.ebuild
Gentoo

Contents of /www-client/netsurf/netsurf-2.9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Aug 20 10:52:31 2012 UTC (23 months ago) by xmw
Branch: MAIN
Changes since 1.3: +2 -1 lines
Fix compilation w/o libnsbmp (bug 428660, thanks James Le Cuirot for the patch)

(Portage version: 2.1.11.10/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/netsurf/netsurf-2.9.ebuild,v 1.3 2012/07/18 17:05:36 mr_bones_ Exp $
4
5 EAPI=4
6
7 inherit eutils multilib toolchain-funcs
8
9 DESCRIPTION="a free, open source web browser"
10 HOMEPAGE="http://www.netsurf-browser.org/"
11 SRC_URI="http://download.netsurf-browser.org/${PN}/releases/source-full/${P}-full-src.tar.gz
12 http://xmw.de/mirror/netsurf-fb.modes-example.gz"
13
14 LICENSE="GPL-2 MIT"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm"
17 IUSE="bmp fbcon freetype gif gstreamer gtk javascript jpeg mng pdf-writer png rosprite svg svgtiny webp"
18
19 RDEPEND="dev-libs/libcss
20 net-libs/hubbub
21 net-misc/curl
22 bmp? ( media-libs/libnsbmp )
23 fbcon? ( dev-libs/libnsfb )
24 freetype? ( media-fonts/dejavu
25 media-libs/freetype )
26 gif? ( media-libs/libnsgif )
27 gtk? ( dev-libs/glib:2
28 gnome-base/libglade:2.0
29 media-libs/lcms:0
30 x11-libs/gtk+:2 )
31 jpeg? ( virtual/jpeg )
32 mng? ( media-libs/libmng )
33 pdf-writer? ( media-libs/libharu )
34 png? ( media-libs/libpng )
35 svg? ( svgtiny? ( media-libs/libsvgtiny )
36 !svgtiny? ( gnome-base/librsvg:2 ) )
37 webp? ( media-libs/libwebp )"
38 DEPEND="${RDEPEND}
39 virtual/pkgconfig
40 rosprite? ( media-libs/librosprite )"
41
42 REQUIRED_USE="|| ( fbcon gtk )"
43
44 src_unpack() {
45 default
46 einfo "remove bundled libs"
47 cd "${WORKDIR}" || die
48 mv ${P} ${P}_complete || die
49 mv ${P}_complete/${P} . || die
50 rm -r ${P}_complete || die
51 }
52
53 src_prepare() {
54 sed -e '/CFLAGS \(:\|+\)=/d' \
55 -i Makefile.defaults || die
56 sed -e '/^#define NSFB_TOOLBAR_DEFAULT_LAYOUT/s:blfsrut:blfsrutc:' \
57 -i framebuffer/gui.c || die
58
59 epatch "${FILESDIR}"/${P}-buildsystem.patch
60 epatch "${FILESDIR}"/${P}-includes.patch
61 epatch "${FILESDIR}"/${P}-conditionally-include-image-headers.patch
62 }
63
64 src_configure() {
65 netsurf_set() {
66 echo "override $1 := $2" >> Makefile.config || die
67 }
68 netsurf_use() {
69 local val=${4:-NO}
70 use $2 && val=${3:-YES}
71 echo "override $1 := $val" >> Makefile.config || die
72 }
73 #see Makefile.defaults
74 netsurf_use NETSURF_USE_BMP bmp
75 netsurf_use NETSURF_USE_GIF gif
76 netsurf_use NETSURF_USE_JPEG jpeg
77 netsurf_use NETSURF_USE_PNG png
78 netsurf_use NETSURF_USE_MNG mng
79 netsurf_use NETSURF_USE_WEBP webp
80 netsurf_use NETSURF_USE_VIDEO gstreamer
81 netsurf_use NETSURF_USE_JS javascript
82 netsurf_use NETSURF_USE_HARU_PDF pdf-writer
83 netsurf_set PREFIX /usr
84 netsurf_set Q
85 netsurf_set CC $(tc-getCC)
86 netsurf_set LD $(tc-getCC)
87
88 if use svg ; then
89 if use svgtiny ; then
90 netsurf_set NETSURF_USE_NSSVG YES
91 netsurf_set NETSURF_USE_RSVG NO
92 else
93 netsurf_set NETSURF_USE_NSSVG NO
94 netsurf_set NETSURF_USE_RSVG YES
95 fi
96 else
97 netsurf_set NETSURF_USE_NSSVG NO
98 netsurf_set NETSURF_USE_RSVG NO
99 fi
100 if use fbcon ; then
101 netsurf_set NETSURF_FB_FRONTEND linux
102 netsurf_use NETSURF_FB_FONTLIB freetype freetype internal
103 netsurf_set NETSURF_FB_FONTPATH /usr/share/fonts/dejavu
104 fi
105 netsurf_use NETSURF_USE_ROSPRITE rosprite
106 }
107
108 src_compile() {
109 use gtk && emake PREFIX="/usr" TARGET=gtk
110 use fbcon && emake PREFIX="/usr" TARGET=framebuffer
111 }
112
113 src_install() {
114 if use gtk ; then
115 emake DESTDIR="${D}" PREFIX="/usr" TARGET=gtk install
116 mv "${D}"/usr/bin/netsurf{,-gtk} || die
117 make_desktop_entry /usr/bin/netsurf-gtk NetSurf-gtk netsurf "Network;WebBrowser"
118 fi
119 if use fbcon ; then
120 emake DESTDIR="${D}" PREFIX="/usr" TARGET=framebuffer install
121 mv "${D}"/usr/bin/netsurf{,-fb} || die
122 make_desktop_entry /usr/bin/netsurf-fb NetSurf-framebuffer netsurf "Network;WebBrowser"
123
124 einfo
125 elog "In order to setup the framebuffer console, netsurf needs an /etc/fb.modes"
126 elog "You can use an example from /usr/share/doc/${PF}/fb.modes.* (bug 427092)."
127 einfo
128 elog "Please make /etc/input/mice readable to the account using netsurf-fb."
129 elog "Either use chmod a+r /etc/input/mice (security!!!) or use an group."
130 einfo
131 fi
132 insinto /usr/share/pixmaps
133 doins gtk/res/netsurf.xpm
134
135 dodoc -r Docs/{USING-*,ideas}
136 newdoc "${WORKDIR}"/netsurf-fb.modes-example fb.modes
137 }

  ViewVC Help
Powered by ViewVC 1.1.20