1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools eutils fdo-mime
10 DESCRIPTION="A fast and lightweight web browser running in both graphics and text mode"
11 HOMEPAGE="http://links.twibright.com/"
12 SRC_URI="http://${PN}.twibright.com/download/${P}.tar.bz2
13 mirror://debian/pool/main/${PN:0:1}/${PN}2/${PN}2_${DEBIAN_REVISION}.debian.tar.xz"
17 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
18 IUSE="bzip2 directfb fbcon gpm ipv6 jpeg livecd lzma ssl suid svga tiff unicode X zlib"
20 GRAPHICS_DEPEND="media-libs/libpng:0="
22 RDEPEND=">=sys-libs/ncurses-5.7-r7
23 bzip2? ( app-arch/bzip2 )
28 fbcon? ( ${GRAPHICS_DEPEND} )
30 jpeg? ( virtual/jpeg:0 )
36 lzma? ( app-arch/xz-utils )
37 ssl? ( dev-libs/openssl:0 )
42 tiff? ( media-libs/tiff:0 )
47 zlib? ( sys-libs/zlib )"
51 fbcon? ( virtual/os-headers )
52 livecd? ( virtual/os-headers )"
54 REQUIRED_USE="!livecd? ( fbcon? ( gpm ) )
57 DOCS=( AUTHORS BRAILLE_HOWTO ChangeLog KEYS NEWS README SITES )
60 epatch "${WORKDIR}"/debian/patches/verify-ssl-certs-510417.diff
69 # error: conditional "am__fastdepCXX" was never defined (for eautoreconf)
71 -e '/AC_PROG_CXX/s:dnl ::' \
72 -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
73 configure.in || die #467020
75 # Upstream configure produced by broken autoconf-2.13. This also fixes
76 # toolchain detection.
77 eautoreconf #131440 and #103483#c23
84 export ac_cv_lib_gpm_Gpm_Open=yes
85 myconf+=' --with-fb --with-libjpeg'
87 export ac_cv_lib_gpm_Gpm_Open=$(usex gpm)
90 if use X || use fbcon || use directfb || use svga || use livecd; then
91 myconf+=' --enable-graphics'
100 $(use_with svga svgalib) \
102 $(use_with fbcon fb) \
103 $(use_with directfb) \
104 $(use_with jpeg libjpeg) \
105 $(use_with tiff libtiff) \
113 newicon Links_logo.png links.png
114 make_desktop_entry 'links -g %u' Links links 'Network;WebBrowser'
115 local d="${ED}"/usr/share/applications
116 echo 'MimeType=x-scheme-handler/http;' >> "${d}"/*.desktop
117 use ssl && sed -i -e 's:x-scheme-handler/http;:&x-scheme-handler/https;:' \
121 dohtml doc/links_cal/*
122 use suid && fperms 4755 /usr/bin/links
126 use X && fdo-mime_desktop_database_update
130 use X && fdo-mime_desktop_database_update