www-client/netsurf: get back building
[netsurf-overlay.git] / www-client / netsurf / netsurf-9999.ebuild
blob39d1bbb9dbd729fd99ba39777cb567f284aebbc6
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=5
5 NETSURF_COMPONENT_TYPE=binary
6 NETSURF_BUILDSYSTEM="buildsystem-9999"
8 inherit netsurf git-r3
10 DESCRIPTION="a free, open source web browser"
11 HOMEPAGE="http://www.netsurf-browser.org/"
12 SRC_URI="http://xmw.de/mirror/netsurf-fb.modes-example.gz"
13 EGIT_REPO_URI="http://git.netsurf-browser.org/netsurf.git"
15 LICENSE="GPL-2 MIT"
16 SLOT="0"
17 KEYWORDS=""
18 IUSE="+bmp fbcon truetype +gif gstreamer gtk2 gtk3 javascript +jpeg +mng +png
19 +rosprite +svg +svgtiny fbcon_frontend_able fbcon_frontend_linux
20 fbcon_frontend_sdl fbcon_frontend_vnc fbcon_frontend_x"
22 REQUIRED_USE="
23 amd64? ( abi_x86_32? (
24 !gstreamer !javascript svg? ( svgtiny ) !truetype ) )
25 fbcon? ( ^^ ( fbcon_frontend_able fbcon_frontend_linux fbcon_frontend_sdl
26 fbcon_frontend_vnc fbcon_frontend_x ) )"
28 RDEPEND="dev-libs/libxml2
29 net-misc/curl
30 >=dev-libs/libcss-9999[${MULTILIB_USEDEP}]
31 >=net-libs/libhubbub-9999[${MULTILIB_USEDEP}]
32 >=net-libs/libdom-9999[xml,${MULTILIB_USEDEP}]
33 >=dev-libs/libutf8proc-9999
34 >=dev-libs/libnsutils-9999
35 bmp? ( >=media-libs/libnsbmp-9999[${MULTILIB_USEDEP}] )
36 fbcon? ( >=dev-libs/libnsfb-9999[${MULTILIB_USEDEP}]
37 truetype? ( media-fonts/dejavu
38 >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
40 gif? ( >=media-libs/libnsgif-9999[${MULTILIB_USEDEP}] )
41 gtk2? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
42 gnome-base/libglade:2.0
43 >=x11-libs/gtk+-2.24.23:2[${MULTILIB_USEDEP}] )
44 gtk3? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
45 gnome-base/libglade:2.0
46 >=x11-libs/gtk+-3.00.00:3[${MULTILIB_USEDEP}] )
47 gstreamer? ( media-libs/gstreamer:0.10 )
48 javascript? ( >=dev-libs/nsgenbind-9999 )
49 jpeg? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
50 mng? ( >=media-libs/libmng-1.0.10-r2[${MULTILIB_USEDEP}] )
51 png? ( >=media-libs/libpng-1.2.51[${MULTILIB_USEDEP}] )
52 svg? ( svgtiny? ( >=media-libs/libsvgtiny-9999[${MULTILIB_USEDEP}] )
53 !svgtiny? ( gnome-base/librsvg:2 ) )
54 ( || ( app-editors/vim-core app-editors/xxd ) )"
55 DEPEND="${RDEPEND}
56 javascript? ( >=dev-libs/nsgenbind-0.1.1 )
57 rosprite? ( >=media-libs/librosprite-0.1.1[${MULTILIB_USEDEP}] )
58 >=dev-util/netsurf-buildsystem-9999"
60 PATCHES=(
61 "${FILESDIR}"/${P}-reenable-glib-deprecated.patch
63 DOCS=( fb.modes README.md docs/using-framebuffer.md
64 docs/ideas/{cache,css-engine,render-library}.txt )
66 src_unpack() {
67 git-r3_src_unpack
68 unpack "netsurf-fb.modes-example.gz"
69 cp -r /usr/share/netsurf-buildsystem "${WORKDIR}/${NETSURF_BUILDSYSTEM}"
72 src_prepare() {
73 rm -rf amiga atari beos cocoa monkey riscos windows || die
75 mv "${WORKDIR}"/netsurf-fb.modes-example fb.modes
77 netsurf_src_prepare
80 src_configure() {
81 netsurf_src_configure
83 netsurf_makeconf+=(
84 NETSURF_USE_BMP=$(usex bmp YES NO)
85 NETSURF_USE_GIF=$(usex gif YES NO)
86 NETSURF_USE_JPEG=$(usex jpeg YES NO)
87 NETSURF_USE_PNG=$(usex png YES NO)
88 NETSURF_USE_PNG=$(usex png YES NO)
89 NETSURF_USE_MNG=$(usex mng YES NO)
90 NETSURF_USE_VIDEO=$(usex gstreamer YES NO)
91 NETSURF_USE_JS=NO
92 NETSURF_USE_MOZJS=NO
93 NETSURF_USE_DUKTAPE=$(usex javascript YES NO)
94 NETSURF_USE_HARU_PDF=NO
95 NETSURF_USE_NSSVG=$(usex svg $(usex svgtiny YES NO) NO)
96 NETSURF_USE_RSVG=$(usex svg $(usex svgtiny NO YES) NO)
97 NETSURF_USE_ROSPRITE=$(usex rosprite YES NO)
98 PKG_CONFIG=$(tc-getPKG_CONFIG)
99 $(usex fbcon_frontend_able NETSURF_FB_FRONTEND=able "")
100 $(usex fbcon_frontend_linux NETSURF_FB_FRONTEND=linux "")
101 $(usex fbcon_frontend_sdl NETSURF_FB_FRONTEND=sdl "")
102 $(usex fbcon_frontend_vnc NETSURF_FB_FRONTEND=vnc "")
103 $(usex fbcon_frontend_x NETSURF_FB_FRONTEND=x "")
104 NETSURF_FB_FONTLIB=$(usex truetype freetype internal)
105 NETSURF_FB_FONTPATH=${EROOT}usr/share/fonts/dejavu
106 TARGET=dummy
110 src_compile() {
111 if use fbcon ; then
112 netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=framebuffer}" )
113 netsurf_src_compile
115 if use gtk2 ; then
116 netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk2}" )
117 netsurf_src_compile
119 if use gtk3 ; then
120 netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk3}" )
121 netsurf_src_compile
125 src_install() {
126 sed -e '1iexit;' \
127 -i "${WORKDIR}"/*/utils/git-testament.pl || die
129 if use fbcon ; then
130 netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=framebuffer}" )
131 netsurf_src_install
132 elog "framebuffer binary has been installed as netsurf-fb"
133 make_desktop_entry "${EROOT}"usr/bin/netsurf-fb NetSurf-framebuffer netsurf "Network;WebBrowser"
135 elog "In order to setup the framebuffer console, netsurf needs an /etc/fb.modes"
136 elog "You can use an example from /usr/share/doc/${PF}/fb.modes.* (bug 427092)."
137 elog "Please make /etc/input/mice readable to the account using netsurf-fb."
138 elog "Either use chmod a+r /etc/input/mice (security!!!) or use an group."
140 if use gtk2 ; then
141 netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk2}" )
142 netsurf_src_install
144 if use gtk3 ; then
145 netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk3}" )
146 netsurf_src_install
149 insinto /usr/share/pixmaps
150 doins frontends/gtk/res/netsurf.xpm