1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils toolchain-funcs
8 DESCRIPTION="Multi-purpose text editor for the X Window System"
9 HOMEPAGE="https://sourceforge.net/projects/nedit"
11 https://downloads.sourceforge.net/project/${PN}/${PN}-source/${P}a-src.tar.gz
12 https://dev.gentoo.org/~jlec/distfiles/${PN}.png.xz"
16 KEYWORDS="alpha amd64 ~mips ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
18 RDEPEND=">=x11-libs/motif-2.3:0
22 || ( dev-util/yacc sys-devel/bison )
25 S="${WORKDIR}/${PN}-5.6"
28 #respecting LDFLAGS, bug #208189
30 "${FILESDIR}"/${P}-format.patch \
31 "${FILESDIR}"/${P}-ldflags.patch \
32 "${FILESDIR}"/${P}-40_Pointer_to_Integer.patch \
33 "${FILESDIR}"/${P}-security.patch
35 -e "s:bin/:${EPREFIX}/bin/:g" \
36 -i Makefile source/preferences.c source/help_data.h source/nedit.c Xlt/Makefile || die
38 -e "s:nc:neditc:g" -i doc/nc.pod || die
39 sed -i -e "s:CFLAGS=-O:CFLAGS=${CFLAGS}:" -e "s:check_tif_rule::" \
40 makefiles/Makefile.linux || die
41 sed -i -e "s:CFLAGS=-O:CFLAGS=${CFLAGS}:" \
42 -e "s:MOTIFDIR=/usr/local:MOTIFDIR=${EPREFIX}/usr:" \
43 -e "s:-lX11:-lX11 -lXmu -liconv:" \
44 -e "s:check_tif_rule::" \
45 makefiles/Makefile.macosx || die
53 emake CC="$(tc-getCC)" AR="$(tc-getAR)" macosx
56 emake CC="$(tc-getCC)" AR="$(tc-getAR)" linux
59 emake VERSION="NEdit ${PV}" -C doc all
64 newbin source/nc neditc
66 make_desktop_entry "${PN}"
67 doicon "${WORKDIR}/${PN}.png"
69 newman doc/nedit.man nedit.1
70 newman doc/nc.man neditc.1
72 dodoc README ReleaseNotes ChangeLog
73 dodoc doc/nedit.doc doc/NEdit.ad doc/faq.txt