diff options
author | Jeroen Roovers <jer@gentoo.org> | 2010-12-30 17:42:19 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2010-12-30 17:42:19 +0000 |
commit | c311e92c4f9ec3055f85b97f91ed3150e07c8fc8 (patch) | |
tree | 8359a2b1c42302523c9158780feabcc32137a763 /app-editors/fte | |
parent | added patch for poppler-0.16, bug #349941 (diff) | |
download | gentoo-2-c311e92c4f9ec3055f85b97f91ed3150e07c8fc8.tar.gz gentoo-2-c311e92c4f9ec3055f85b97f91ed3150e07c8fc8.tar.bz2 gentoo-2-c311e92c4f9ec3055f85b97f91ed3150e07c8fc8.zip |
Respect LDFLAGS (bug #337413), CFLAGS (bug #239928), CXX. Add x11-libs/libXpm dependency (bug #216444 by Evil Compile Person). Split off configure and prepare from unpack. Replace cat | grep with sed. Die on sed/dobin.
(Portage version: 2.2.0_alpha10/cvs/Linux i686)
Diffstat (limited to 'app-editors/fte')
-rw-r--r-- | app-editors/fte/ChangeLog | 11 | ||||
-rw-r--r-- | app-editors/fte/fte-20051115-r2.ebuild | 114 |
2 files changed, 123 insertions, 2 deletions
diff --git a/app-editors/fte/ChangeLog b/app-editors/fte/ChangeLog index 61bcd53391e9..aea4565c3a62 100644 --- a/app-editors/fte/ChangeLog +++ b/app-editors/fte/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-editors/fte -# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/fte/ChangeLog,v 1.48 2008/11/17 19:56:48 flameeyes Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-editors/fte/ChangeLog,v 1.49 2010/12/30 17:42:19 jer Exp $ + +*fte-20051115-r2 (30 Dec 2010) + + 30 Dec 2010; Jeroen Roovers <jer@gentoo.org> +fte-20051115-r2.ebuild: + Respect LDFLAGS (bug #337413), CFLAGS (bug #239928), CXX. Add x11-libs/libXpm + dependency (bug #216444 by Evil Compile Person). Split off configure and + prepare from unpack. Replace cat | grep with sed. Die on sed/dobin. 17 Nov 2008; Diego E. Pettenò <flameeyes@gentoo.org> files/fte-slang.patch: diff --git a/app-editors/fte/fte-20051115-r2.ebuild b/app-editors/fte/fte-20051115-r2.ebuild new file mode 100644 index 000000000000..6979c6981c1f --- /dev/null +++ b/app-editors/fte/fte-20051115-r2.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-editors/fte/fte-20051115-r2.ebuild,v 1.1 2010/12/30 17:42:18 jer Exp $ + +EAPI="2" + +inherit eutils toolchain-funcs + +DESCRIPTION="Lightweight text-mode editor" +HOMEPAGE="http://fte.sourceforge.net" +SRC_URI="mirror://sourceforge/fte/${P}-src.zip + mirror://sourceforge/fte/${P}-common.zip" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc -sparc ~x86" +IUSE="gpm slang X" + +S="${WORKDIR}/${PN}" + +RDEPEND=">=sys-libs/ncurses-5.2 + X? ( + x11-libs/libXdmcp + x11-libs/libXau + x11-libs/libX11 + x11-libs/libXpm + ) + gpm? ( >=sys-libs/gpm-1.20 )" +DEPEND="${RDEPEND} + slang? ( >=sys-libs/slang-2.1.3 ) + app-arch/unzip" + +set_targets() { + export TARGETS="" + use slang && TARGETS="${TARGETS} sfte" + use X && TARGETS="${TARGETS} xfte" + + TARGETS="{$TARGETS} vfte" +} + +src_prepare() { + epatch "${FILESDIR}"/fte-gcc34 + epatch "${FILESDIR}"/${PN}-new_keyword.patch + epatch "${FILESDIR}"/${PN}-slang.patch + + sed /usr/include/linux/keyboard.h -e '/wait.h/d' > src/hacked_keyboard.h + + sed \ + -e "s:<linux/keyboard.h>:\"hacked_keyboard.h\":" \ + -i src/con_linux.cpp || die "sed keyboard" + sed \ + -e 's:^OPTIMIZE:#&:g' \ + -e '/^LDFLAGS/s:=:+=:g' \ + -e 's:= g++:= $(CXX):g' \ + -i src/fte-unix.mak || die "sed CFLAGS, LDFLAGS, CC" +} + +src_configure() { + set_targets + sed \ + -e "s:@targets@:${TARGETS}:" \ + -i src/fte-unix.mak || die "sed targets" + + if ! use gpm; then + sed \ + -e "s:#define USE_GPM://#define USE_GPM:" \ + -i src/con_linux.cpp || die "sed USE_GPM" + sed \ + -e "s:-lgpm::" \ + -i src/fte-unix.mak || die "sed -lgpm" + fi +} + +src_compile() { + DEFFLAGS="PREFIX=/usr CONFIGDIR=/usr/share/fte \ + DEFAULT_FTE_CONFIG=../config/main.fte" + + set_targets + emake CXX=$(tc-getCXX) OPTIMIZE="${CXXFLAGS}" ${DEFFLAGS} TARGETS="${TARGETS}" \ + all || die "emake failed" +} + +src_install() { + local files + + keepdir /etc/fte + + into /usr + + set_targets + files="${TARGETS} cfte" + + for i in ${files}; do + dobin src/$i || die "dobin ${i}" + done + + dobin "${FILESDIR}"/fte || die "dobin fte" + + dodoc Artistic CHANGES BUGS HISTORY README TODO + dohtml doc/* + + dodir usr/share/fte + insinto /usr/share/fte + doins -r config/* + + rm -rf "${D}"/usr/share/fte/CVS +} + +pkg_postinst() { + ebegin "Compiling configuration" + cd /usr/share/fte || die "missing configuration dir" + /usr/bin/cfte main.fte /etc/fte/system.fterc + eend $? +} |