app-editors/kakoune: new ebuild
authorMykyta Holubakha <hilobakho@gmail.com>
Thu, 5 May 2016 18:14:19 +0000 (21:14 +0300)
committerIan Delaney <idella4@gentoo.org>
Fri, 6 May 2016 10:54:38 +0000 (18:54 +0800)
initial vns.; a snapshot 2016.05.05ebuild, and a live ebuild

Closes: https://github.com/gentoo/gentoo/pull/1414

Signed-off-by: Ian Delaney <idella4@gentoo.org>
app-editors/kakoune/Manifest [new file with mode: 0644]
app-editors/kakoune/files/kakoune-makefile.patch [new file with mode: 0644]
app-editors/kakoune/kakoune-2016.05.05.ebuild [new file with mode: 0644]
app-editors/kakoune/kakoune-9999.ebuild [new file with mode: 0644]
app-editors/kakoune/metadata.xml [new file with mode: 0644]

diff --git a/app-editors/kakoune/Manifest b/app-editors/kakoune/Manifest
new file mode 100644 (file)
index 0000000..f74622d
--- /dev/null
@@ -0,0 +1 @@
+DIST kakoune-2016.05.05.tar.gz 367575 SHA256 e79655b89d6138547d7158e715b520c98316b0358ced6c356496b361c9ea0049 SHA512 9b6cc2c9c6c356a27f5a42a226ba2fb2ce32e21e795423a6354127f9dce7edd423e61a9356a0582d609efc4c28dd012788556cc32ba3f8f791a901f07a36bbc8 WHIRLPOOL e71748f69bca77dd9cd6c02c92f032123d322861bf86ab63bd5561b1f7957ec68c6b7ce0e1f8dd493166cf22aceae7cd49e6ffd42816c7c265712e554b224fe0
diff --git a/app-editors/kakoune/files/kakoune-makefile.patch b/app-editors/kakoune/files/kakoune-makefile.patch
new file mode 100644 (file)
index 0000000..076c42f
--- /dev/null
@@ -0,0 +1,38 @@
+diff --git a/src/Makefile b/src/Makefile
+index c79c270..9409a8c 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -3,10 +3,10 @@ pedantic ?= yes
+ ifeq ($(debug),yes)
+     CPPFLAGS += -DKAK_DEBUG
++    CXXFLAGS += -g
+     suffix := .debug
+ else
+     ifeq ($(debug),no)
+-        CXXFLAGS += -O3
+         suffix := .opt
+     else
+         $(error debug should be either yes or no)
+@@ -26,8 +26,6 @@ mandocs := $(docs:.asciidoc=.gz)
+ PREFIX ?= /usr/local
+ DESTDIR ?= # root dir
+-NCURSESW_INCLUDE ?= /usr/include/ncursesw
+-
+ bindir := $(DESTDIR)$(PREFIX)/bin
+ sharedir := $(DESTDIR)$(PREFIX)/share/kak
+ docdir := $(DESTDIR)$(PREFIX)/share/doc/kak
+@@ -53,11 +51,10 @@ else ifneq (,$(findstring CYGWIN,$(os)))
+     LIBS += -lncursesw -lboost_regex -ldbghelp
+ else
+     LIBS += -lncursesw -lboost_regex
+-    CPPFLAGS += -I$(NCURSESW_INCLUDE)
+     LDFLAGS += -rdynamic
+ endif
+-CXXFLAGS += -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address
++CXXFLAGS += -std=gnu++11 -Wall -Wno-reorder -Wno-sign-compare -Wno-address
+ kak : $(objects)
+       $(CXX) $(LDFLAGS) $(CXXFLAGS) $(objects) $(LIBS) -o $@
diff --git a/app-editors/kakoune/kakoune-2016.05.05.ebuild b/app-editors/kakoune/kakoune-2016.05.05.ebuild
new file mode 100644 (file)
index 0000000..da48501
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs vcs-snapshot
+
+REF="9298efd19bd024f96df3eab0cef92d03581969ba"
+
+DESCRIPTION="Selection-oriented code editor inspired by vim"
+HOMEPAGE="https://github.com/mawww/kakoune"
+SRC_URI="https://github.com/mawww/${PN}/tarball/${REF} -> ${P}.tar.gz"
+
+LICENSE="Unlicense"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+       sys-libs/ncurses:*[unicode]
+       dev-libs/boost
+"
+DEPEND="
+       app-text/asciidoc
+       virtual/pkgconfig
+       ${RDEPEND}
+"
+
+PATCHES=( "${FILESDIR}/${PN}-makefile.patch" )
+
+src_configure() {
+       append-cppflags $(pkg-config --cflags ncursesw)
+       export CXX=$(tc-getCXX)
+       export debug=$(usex debug)
+}
+
+src_compile() {
+       emake -C src
+}
+
+src_test() {
+       emake -C src test
+}
+
+src_install() {
+       emake -C src DESTDIR="${D}" PREFIX="/usr" install
+}
diff --git a/app-editors/kakoune/kakoune-9999.ebuild b/app-editors/kakoune/kakoune-9999.ebuild
new file mode 100644 (file)
index 0000000..f448c1b
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs git-r3
+
+DESCRIPTION="Selection-oriented code editor inspired by vim"
+HOMEPAGE="https://github.com/mawww/kakoune"
+EGIT_REPO_URI="https://github.com/mawww/kakoune.git"
+
+LICENSE="Unlicense"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug"
+
+RDEPEND="
+       sys-libs/ncurses:*[unicode]
+       dev-libs/boost
+"
+DEPEND="
+       app-text/asciidoc
+       virtual/pkgconfig
+       ${RDEPEND}
+"
+
+PATCHES=( "${FILESDIR}/${PN}-makefile.patch" )
+
+src_configure() {
+       append-cppflags $(pkg-config --cflags ncursesw)
+       export CXX=$(tc-getCXX)
+       export debug=$(usex debug)
+}
+
+src_compile() {
+       emake -C src
+}
+
+src_test() {
+       emake -C src test
+}
+
+src_install() {
+       emake -C src DESTDIR="${D}" PREFIX="/usr" install
+}
diff --git a/app-editors/kakoune/metadata.xml b/app-editors/kakoune/metadata.xml
new file mode 100644 (file)
index 0000000..753a398
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>hilobakho@gmail.com</email>
+               <name>Mykyta Holubakha</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>proxy-maint@gentoo.org</email>
+               <name>Gentoo Proxy Maintainers Project</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">mawww/kakoune</remote-id>
+       </upstream>
+</pkgmetadata>