You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
2.3 KiB
97 lines
2.3 KiB
7 years ago
|
# Copyright 1999-2018 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
12 years ago
|
EAPI=5
|
||
|
inherit eutils versionator toolchain-funcs
|
||
13 years ago
|
|
||
|
MY_PV=$(replace_version_separator 2 '_')
|
||
|
|
||
|
DESCRIPTION="A vi/ex clone"
|
||
|
HOMEPAGE="ftp://ftp.cs.pdx.edu/pub/elvis/"
|
||
|
SRC_URI="ftp://ftp.cs.pdx.edu/pub/elvis/${PN}-${MY_PV}.tar.gz"
|
||
|
|
||
|
LICENSE="Artistic"
|
||
|
SLOT="0"
|
||
8 years ago
|
KEYWORDS="amd64 ppc ppc64 x86 ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris"
|
||
13 years ago
|
IUSE="X"
|
||
|
|
||
7 years ago
|
RDEPEND=">=sys-libs/ncurses-5.7-r7:0=
|
||
7 years ago
|
X? (
|
||
13 years ago
|
>=x11-libs/libX11-1.0.0
|
||
|
>=x11-libs/libXt-1.0.0
|
||
|
>=x11-libs/libXpm-3.5.4.2
|
||
|
>=x11-libs/libXft-2.1.8.2 )
|
||
10 years ago
|
app-eselect/eselect-vi"
|
||
12 years ago
|
DEPEND="${RDEPEND}
|
||
7 years ago
|
X? ( x11-base/xorg-proto )
|
||
12 years ago
|
virtual/pkgconfig"
|
||
13 years ago
|
|
||
|
S=${WORKDIR}/${PN}-${MY_PV}
|
||
|
|
||
|
src_prepare() {
|
||
12 years ago
|
epatch \
|
||
|
"${FILESDIR}"/ft2.3-symbol-collision-fix.patch \
|
||
|
"${FILESDIR}"/${P}-glibc-2.10.patch \
|
||
|
"${FILESDIR}"/${P}-interix.patch
|
||
13 years ago
|
}
|
||
|
|
||
12 years ago
|
src_configure() {
|
||
13 years ago
|
./configure \
|
||
12 years ago
|
--libs="$($(tc-getPKG_CONFIG) --libs ncurses)" \
|
||
13 years ago
|
--prefix="${EPREFIX}"/usr \
|
||
|
--bindir="${EPREFIX}"/usr/bin \
|
||
|
--datadir="${EPREFIX}"/usr/share/elvis \
|
||
12 years ago
|
--docdir="${EPREFIX}"/usr/share/doc/${PF} \
|
||
13 years ago
|
$(use_with X x) \
|
||
12 years ago
|
|| die
|
||
13 years ago
|
|
||
|
# Some Makefile fixups (must happen after configure)
|
||
|
# Use our CFLAGS
|
||
|
sed -i -e "s:gcc -O2:$(tc-getCC) ${CFLAGS}:" Makefile || die "sed 1 failed"
|
||
|
|
||
|
# We'll install the man-pages ourselves
|
||
|
sed -i -e '/^ sh instman.sh/d' Makefile || die "sed 2 failed"
|
||
|
|
||
|
# Don't try to write to /etc
|
||
|
sed -i -e 's,/etc/elvis,${ED}/etc/elvis,g' Makefile || die "sed 3 failed"
|
||
|
|
||
|
# Use LDFLAGS
|
||
|
sed -i -e "s#\$(CC) \$(CFLAGS)#\$(CC) \$(CFLAGS) ${LDFLAGS}#" Makefile || \
|
||
|
die "sed 4 failed"
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
dodir /usr/bin
|
||
|
dodir /usr/share/man/man1
|
||
|
dodir /usr/share/elvis
|
||
12 years ago
|
dodir /usr/share/doc/${PF}
|
||
13 years ago
|
dodir /etc
|
||
12 years ago
|
emake install \
|
||
13 years ago
|
PREFIX="${ED}"/usr \
|
||
|
BINDIR="${ED}"/usr/bin \
|
||
|
DATADIR="${ED}"/usr/share/elvis \
|
||
12 years ago
|
DOCDIR="${ED}"/usr/share/doc/${PF}
|
||
13 years ago
|
|
||
|
# Install the man-pages
|
||
|
mv doc/elvis.man doc/elvis.1
|
||
|
mv doc/elvtags.man doc/elvtags.1
|
||
|
mv doc/ref.man doc/ref.1
|
||
12 years ago
|
doman doc/*.1
|
||
13 years ago
|
|
||
|
# Fixup some READMEs
|
||
|
sed -i -e "s,${ED},,g" "${ED}"/etc/elvis/README \
|
||
|
|| die 'sed /etc/elvis/README failed'
|
||
|
sed -i -e "s,${ED},,g" "${ED}"/usr/share/elvis/README \
|
||
|
|| die 'sed /usr/share/elvis/README failed'
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
einfo "Setting /usr/bin/vi symlink"
|
||
|
eselect vi set "${PN}"
|
||
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
einfo "Updating /usr/bin/vi symlink"
|
||
|
eselect vi update
|
||
|
}
|