# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 inherit eutils tag="f31a83492b6c" S="${WORKDIR}/${PN}-${tag}" SRC_URI="\ http://foicica.com/hg/${PN}/archive/${tag}.zip -> ${PN}-${PV}.zip \ http://foicica.com/scintillua/download/scintillua_3.6.2-1.zip \ http://foicica.com/hg/bombay/archive/d704272c3629.zip -> bombay.zip \ http://foicica.com/gtdialog/download/gtdialog_1.2.zip \ http://foicica.com/lspawn/download/lspawn_1.3.zip \ http://foicica.com/scinterm/download/scinterm_1.6.zip \ http://prdownloads.sourceforge.net/scintilla/scintilla362.tgz \ http://github.com/keplerproject/luafilesystem/archive/v_1_6_3.zip \ http://luajit.org/download/LuaJIT-2.0.3.tar.gz \ http://invisible-island.net/datafiles/release/cdk.tar.gz \ http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.17.tar.gz \ http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.0.tar.gz \ http://www.lua.org/ftp/lua-5.3.1.tar.gz \ http://prdownloads.sourceforge.net/scintilla/scintilla362.tgz" KEYWORDS="~amd64 ~x86" DESCRIPTION="A fast, minimalist, and remarkably extensible cross-platform text editor" HOMEPAGE="http://foicica.com/${PN}/" IUSE="gtk luajit ncurses" REQUIRED_USE="|| ( ncurses gtk )" LICENSE="MIT" RDEPEND="gtk? ( x11-libs/gtk+:2 ) ncurses? ( sys-libs/ncurses )" DEPEND="${RDEPEND}" SLOT="0" src_unpack() { unpack "${PN}-${PV}.zip" for distfile in ${A}; do if [ "$distfile" != "${PN}-${PV}.zip" ]; then cp "${DISTDIR}/${distfile}" "${S}/src/" fi done } src_prepare() { cd ${S}/src/ sed -i -e '1iunexport LDFLAGS\' Makefile sed -i \ -e 's/CFLAGS = -Os/CFLAGS += -Os/g' \ -e 's/CXXFLAGS = -Os /CXXFLAGS += -Os /g' \ -e 's/LDFLAGS = /LDFLAGS += /g' \ Makefile emake deps cd - epatch_user } src_compile() { cd ${S}/src/ use luajit && luajit_suffix="jit" use gtk && emake ${PN}${luajit_suffix} use ncurses && emake ${PN}${luajit_suffix}-curses } src_install() { dodoc LICENSE home=/usr/share/${PN} insinto ${home} exeinto ${home} doexe ${PN}* doins -r core lexers modules themes init.lua properties.lua for binfile in ${home}/${PN}*; do dosym ${binfile} /usr/bin/$(basename ${binfile}) done }