app-misc/dvtm: add patch to avoid file collisions with sys-libs/ncurses
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Thu, 29 Mar 2018 09:53:11 +0000 (11:53 +0200)
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Thu, 29 Mar 2018 09:53:11 +0000 (11:53 +0200)
Bug: https://bugs.gentoo.org/show_bug.cgi?id=648472
Package-Manager: Portage-2.3.24, Repoman-2.3.6

app-misc/dvtm/dvtm-0.15-r3.ebuild [new file with mode: 0644]
app-misc/dvtm/dvtm-9999.ebuild
app-misc/dvtm/files/dvtm-0.15-stop-installing-terminfo.patch [new file with mode: 0644]

diff --git a/app-misc/dvtm/dvtm-0.15-r3.ebuild b/app-misc/dvtm/dvtm-0.15-r3.ebuild
new file mode 100644 (file)
index 0000000..1de9eac
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit savedconfig toolchain-funcs
+
+DESCRIPTION="Dynamic virtual terminal manager"
+HOMEPAGE="http://www.brain-dump.org/projects/dvtm/"
+
+if [[ ${PV} == *9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="git://repo.or.cz/dvtm.git"
+else
+       SRC_URI="http://www.brain-dump.org/projects/${PN}/${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND=">=sys-libs/ncurses-6.1:0=[unicode]"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.15-gentoo.patch
+       "${FILESDIR}"/${PN}-0.15-stop-installing-terminfo.patch
+)
+
+src_prepare() {
+       default
+
+       restore_config config.h
+}
+
+src_compile() {
+       tc-export PKG_CONFIG
+       local msg=""
+       use savedconfig && msg=", please check the configfile"
+       emake CC=$(tc-getCC) ${PN} || die "emake failed${msg}"
+}
+
+src_install() {
+       emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" STRIP=true install
+
+       insinto /usr/share/${PN}
+       newins config.h ${PF}.config.h
+
+       dodoc README.md
+
+       save_config config.h
+}
+
+pkg_postinst() {
+       elog "This ebuild has support for user defined configs"
+       elog "Please read this ebuild for more details and re-emerge as needed"
+       elog "if you want to add or remove functionality for ${PN}"
+}
index 557a8538c0a9bd8c04efbc7141d43a9ac428e6ba..64b9d7335b2be0309e8907530a08ab0767845843 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -19,13 +19,14 @@ fi
 LICENSE="MIT"
 SLOT="0"
 
-RDEPEND="sys-libs/ncurses:0=[unicode]"
+RDEPEND=">=sys-libs/ncurses-6.1:0=[unicode]"
 DEPEND="
        ${RDEPEND}
        virtual/pkgconfig
 "
 PATCHES=(
        "${FILESDIR}"/${PN}-9999-gentoo.patch
+       "${FILESDIR}"/${PN}-0.15-stop-installing-terminfo.patch
 )
 
 src_prepare() {
diff --git a/app-misc/dvtm/files/dvtm-0.15-stop-installing-terminfo.patch b/app-misc/dvtm/files/dvtm-0.15-stop-installing-terminfo.patch
new file mode 100644 (file)
index 0000000..fbf2598
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ur a/Makefile b/Makefile
+--- a/Makefile 2016-01-09 12:40:56.000000000 +0100
++++ b/Makefile 2018-02-23 00:45:06.436287174 +0100
+@@ -55,8 +55,6 @@
+       @mkdir -p ${DESTDIR}${MANPREFIX}/man1
+       @sed "s/VERSION/${VERSION}/g" < dvtm.1 > ${DESTDIR}${MANPREFIX}/man1/dvtm.1
+       @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dvtm.1
+-      @echo installing terminfo description
+-      @TERMINFO=${TERMINFO} tic -s dvtm.info
+ 
+ uninstall:
+       @echo removing executable file from ${DESTDIR}${PREFIX}/bin