commit:     0084d4a6d2f84876087b7bc828b48f2d651e59a8
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 31 18:34:25 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Dec 31 18:34:42 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0084d4a6

app-misc/dvtm: Do not strip (bug #565322). Drop obsolete sed scripts. Fix 
building against sys-libs/ncurses[tinfo] (bug #457530). Drop obsolete 
USE=unicode.

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../dvtm/{dvtm-9999.ebuild => dvtm-0.15-r1.ebuild} | 32 ++++++++-----------
 app-misc/dvtm/dvtm-9999.ebuild                     | 32 ++++++++-----------
 app-misc/dvtm/files/dvtm-0.15-gentoo.patch         | 36 ++++++++++++++++++++++
 app-misc/dvtm/files/dvtm-9999-gentoo.patch         | 13 ++++++++
 4 files changed, 73 insertions(+), 40 deletions(-)

diff --git a/app-misc/dvtm/dvtm-9999.ebuild b/app-misc/dvtm/dvtm-0.15-r1.ebuild
similarity index 65%
copy from app-misc/dvtm/dvtm-9999.ebuild
copy to app-misc/dvtm/dvtm-0.15-r1.ebuild
index a579a42918d..5d19ed9aab6 100644
--- a/app-misc/dvtm/dvtm-9999.ebuild
+++ b/app-misc/dvtm/dvtm-0.15-r1.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 
 inherit savedconfig toolchain-funcs
 
@@ -18,39 +18,31 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE="unicode"
 
-DEPEND="sys-libs/ncurses:0=[unicode?]"
-RDEPEND=${DEPEND}
+RDEPEND="sys-libs/ncurses:0=[unicode]"
+DEPEND="
+       ${RDEPEND}
+       virtual/pkgconfig
+"
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.15-gentoo.patch
+)
 
 src_prepare() {
-       sed -i \
-               -e 's|FLAGS =|FLAGS +=|' \
-               -e 's|-I/usr/local/include||' \
-               -e 's|-L/usr/local/lib||' \
-               -e 's|-Os||' \
-               config.mk || die "sed config.mk failed"
-       use unicode || {
-               sed -i \
-                       -e 's|-lncursesw|-lncurses|' \
-                       config.mk || die "sed config.mk failed"
-       }
-       sed -i \
-               -e '/strip/d' \
-               -e 's:@tic :@tic -o ${DESTDIR}${PREFIX}/share/terminfo :g' \
-               Makefile || die "sed Makefile failed"
+       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="/usr" install
+       emake DESTDIR="${D}" PREFIX="/usr" STRIP=true install
 
        insinto /usr/share/${PN}
        newins config.h ${PF}.config.h

diff --git a/app-misc/dvtm/dvtm-9999.ebuild b/app-misc/dvtm/dvtm-9999.ebuild
index a579a42918d..e80675e8d2f 100644
--- a/app-misc/dvtm/dvtm-9999.ebuild
+++ b/app-misc/dvtm/dvtm-9999.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 
 inherit savedconfig toolchain-funcs
 
@@ -18,39 +18,31 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE="unicode"
 
-DEPEND="sys-libs/ncurses:0=[unicode?]"
-RDEPEND=${DEPEND}
+RDEPEND="sys-libs/ncurses:0=[unicode]"
+DEPEND="
+       ${RDEPEND}
+       virtual/pkgconfig
+"
+PATCHES=(
+       "${FILESDIR}"/${PN}-9999-gentoo.patch
+)
 
 src_prepare() {
-       sed -i \
-               -e 's|FLAGS =|FLAGS +=|' \
-               -e 's|-I/usr/local/include||' \
-               -e 's|-L/usr/local/lib||' \
-               -e 's|-Os||' \
-               config.mk || die "sed config.mk failed"
-       use unicode || {
-               sed -i \
-                       -e 's|-lncursesw|-lncurses|' \
-                       config.mk || die "sed config.mk failed"
-       }
-       sed -i \
-               -e '/strip/d' \
-               -e 's:@tic :@tic -o ${DESTDIR}${PREFIX}/share/terminfo :g' \
-               Makefile || die "sed Makefile failed"
+       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="/usr" install
+       emake DESTDIR="${D}" PREFIX="/usr" STRIP=true install
 
        insinto /usr/share/${PN}
        newins config.h ${PF}.config.h

diff --git a/app-misc/dvtm/files/dvtm-0.15-gentoo.patch 
b/app-misc/dvtm/files/dvtm-0.15-gentoo.patch
new file mode 100644
index 00000000000..3bb7dec3721
--- /dev/null
+++ b/app-misc/dvtm/files/dvtm-0.15-gentoo.patch
@@ -0,0 +1,36 @@
+--- a/config.mk
++++ b/config.mk
+@@ -10,12 +10,12 @@
+ TERMINFO := ${DESTDIR}${PREFIX}/share/terminfo
+ 
+ INCS = -I.
+-LIBS = -lc -lutil -lncursesw
+-CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 
-D_XOPEN_SOURCE_EXTENDED
++LIBS = -lc -lutil $(shell $(PKG_CONFIG) --libs ncursesw)
++CPPFLAGS += -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 
-D_XOPEN_SOURCE_EXTENDED
+ CFLAGS += -std=c99 ${INCS} -DVERSION=\"${VERSION}\" -DNDEBUG ${CPPFLAGS}
+ LDFLAGS += ${LIBS}
+ 
+-DEBUG_CFLAGS = ${CFLAGS} -UNDEBUG -O0 -g -ggdb -Wall -Wextra 
-Wno-unused-parameter
++DEBUG_CFLAGS += ${CFLAGS} -UNDEBUG -O0 -g -ggdb -Wall -Wextra 
-Wno-unused-parameter
+ 
+ CC ?= cc
+ STRIP ?= strip
+--- a/Makefile
++++ b/Makefile
+@@ -16,13 +16,13 @@
+ 
+ .c.o:
+       @echo CC $<
+-      @${CC} -c ${CFLAGS} $<
++      ${CC} -c ${CFLAGS} $<
+ 
+ ${OBJ}: config.h config.mk
+ 
+ dvtm: ${OBJ}
+       @echo CC -o $@
+-      @${CC} -o $@ ${OBJ} ${LDFLAGS}
++      ${CC} -o $@ ${OBJ} ${LDFLAGS}
+ 
+ debug: clean
+       @make CFLAGS='${DEBUG_CFLAGS}'

diff --git a/app-misc/dvtm/files/dvtm-9999-gentoo.patch 
b/app-misc/dvtm/files/dvtm-9999-gentoo.patch
new file mode 100644
index 00000000000..f29e316c3e5
--- /dev/null
+++ b/app-misc/dvtm/files/dvtm-9999-gentoo.patch
@@ -0,0 +1,13 @@
+--- a/config.mk
++++ b/config.mk
+@@ -7,8 +7,8 @@
+ TERMINFO := ${DESTDIR}${PREFIX}/share/terminfo
+ 
+ INCS = -I.
+-LIBS = -lc -lutil -lncursesw
+-CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 
-D_XOPEN_SOURCE_EXTENDED
++LIBS = -lc -lutil $(shell $(PKG_CONFIG) --libs ncursesw)
++CPPFLAGS += -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 
-D_XOPEN_SOURCE_EXTENDED
+ CFLAGS += -std=c99 ${INCS} -DNDEBUG ${CPPFLAGS}
+ 
+ CC ?= cc

Reply via email to