# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/www-client/links/Attic/links-2.1_pre18.ebuild,v 1.18 2006/04/21 17:04:40 vanquirius Exp $ EAPI=4 inherit autotools eutils DESCRIPTION="links is a fast lightweight text and graphic web-browser" HOMEPAGE="http://links.twibright.com/" # To handle pre-version ... MY_P="${P/_/}" S="${WORKDIR}/${MY_P}" SRC_URI="ftp://obelix.tul.cz/pub/unix/slackware/slackware-current/source/n/links/links-2.1pre18.tar.bz2" # MD5 4e2a5b23325db1be44250ae5644d4a8c, correct according to # http://dev.gentoo.org/~steev/files/overlays/mod-x-deps/www-client/links/files/digest-links-2.1_pre18 # and # http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/links/files/digest-links-2.1_pre18?hideattic=0&r1=1.3&r2=1.1.1.1 # WARNING: http://links.twibright.com/download/links-2.1pre18.tar.bz2 is corrupted # -r19 created from http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/links/links-2.1_pre18.ebuild?revision=1.18&pathrev=MAIN and =www-client/links/links-2.4-r2.ebuild LICENSE="GPL-2" SLOT="2" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86" IUSE="directfb ssl javascript png X gpm tiff fbcon svga jpeg unicode livecd" # Note: if X or fbcon usegflag are enabled, links will be built in graphic # mode. libpng is required to compile links in graphic mode # (not required in text mode), so let's add libpng for X? and fbcon? # We've also made USE=livecd compile in graphics mode. This closes bug #75685. RDEPEND="ssl? ( dev-libs/openssl:0 ) gpm? ( sys-libs/gpm ) png? ( >=media-libs/libpng-1.2.1 ) jpeg? ( virtual/jpeg ) tiff? ( media-libs/tiff:0 ) svga? ( >=media-libs/svgalib-1.4.3 >=media-libs/libpng-1.2.1 ) X? ( x11-libs/libXext >=media-libs/libpng-1.2.1 ) directfb? ( dev-libs/DirectFB ) fbcon? ( media-libs/libpng:0 virtual/jpeg sys-libs/gpm ) sys-libs/zlib sys-libs/ncurses javascript? ( >=sys-devel/flex-2.5.4a ) livecd? ( media-libs/libpng:0 virtual/jpeg sys-libs/gpm )" DEPEND="${RDEPEND} sys-devel/automake sys-devel/autoconf sys-devel/gcc dev-util/pkgconfig" pkg_setup (){ if ! use gpm && use fbcon ; then einfo einfo "gpm has been installed since you have included fbcon in your USE flags." einfo "The links framebuffer driver requires gpm in order to compile." einfo fi } src_prepare (){ if use unicode ; then epatch "${FILESDIR}/${MY_P}-utf8.diff.bz2" export LANG=C cd "${S}/intl" && ./gen-intl && cd .. || die "gen-intl filed" fi # naively backporting [ GLSA 200612-16 ] Links: Arbitrary Samba command execution # EPATCH_OPTS="-p1" epatch "${FILESDIR}/links-2.1pre18.GLSA.200612-16.patch" epatch "${FILESDIR}/links-2.1pre18-no-javascript-fix.patch" # from 'http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/links/files/links-2.1pre18-no-javascript-fix.patch?revision=1.1&pathrev=HEAD' } src_configure (){ local myconf if use X || use fbcon || use directfb || use svga || use livecd; then myconf="${myconf} --enable-graphics" fi # Note: --enable-static breaks. # Note: ./configure only support 'gpm' features auto-detection, so # we use the autoconf trick ( use gpm || use fbcon || use livecd ) || export ac_cv_lib_gpm_Gpm_Open="no" export LANG=C if use fbcon || use livecd; then myconf="${myconf} --with-fb" else myconf="${myconf} --without-fb" fi # force --with-libjpeg if livecd flag is set if use livecd; then myconf="${myconf} --with-libjpeg" fi # hack to allow cross-compilation export CC="$(tc-getCC)" econf \ $(use_with X x) \ $(use_with png libpng) \ $(use_with jpeg libjpeg) \ $(use_with tiff libtiff) \ $(use_with svga svgalib) \ $(use_with directfb) \ $(use_with ssl) \ $(use_enable javascript) \ ${myconf} } src_install (){ einstall # Only install links icon if X driver was compiled in ... use X && doicon graphics/links.xpm dodoc AUTHORS BUGS ChangeLog NEWS README SITES TODO dohtml doc/links_cal/* # Install a compatibility symlink links-javascript: dosym links /usr/bin/links-javascript use suid && fperms 4755 /usr/bin/links }