diff options
author | David Seifert <soap@gentoo.org> | 2020-03-08 13:37:21 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-03-08 13:37:21 +0100 |
commit | b1b6e4a46931c0998199aae07b6b3cc73db730b2 (patch) | |
tree | 2a05abf709ee09d4809a29b2431ff5833a5798d4 /app-admin/procinfo-ng | |
parent | sys-devel/bison: Removed old (diff) | |
download | gentoo-b1b6e4a46931c0998199aae07b6b3cc73db730b2.tar.gz gentoo-b1b6e4a46931c0998199aae07b6b3cc73db730b2.tar.bz2 gentoo-b1b6e4a46931c0998199aae07b6b3cc73db730b2.zip |
app-admin/procinfo-ng: Port to EAPI 7
* Use CXXFLAGS instead of CFLAGS for .cpp files
* Use proper Autoconf macros for ncurses
* Unify patches
Closes: https://bugs.gentoo.org/668660
Closes: https://github.com/gentoo/gentoo/pull/14635
Package-Manager: Portage-2.3.93, Repoman-2.3.20
Suggested-by: Denis Pronin <dannftk@yandex.ru>
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'app-admin/procinfo-ng')
4 files changed, 79 insertions, 30 deletions
diff --git a/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-as-needed.patch b/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-as-needed.patch deleted file mode 100644 index a489f5337879..000000000000 --- a/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-as-needed.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in 2009-04-27 05:33:50.000000000 +0200 -+++ Makefile.in.new 2009-10-11 15:22:23.458985416 +0200 -@@ -44,7 +44,7 @@ - cygwin_procstat.cpp cygwin_rendercpupagestat.cpp \ - lib/routines.cpp lib/timeRoutines.cpp lib/prettyPrint.cpp \ - Makefile -- $(CXX) $(CFLAGS) $(LDFLAGS) procinfo.cpp -o $@ -+ $(CXX) $(CFLAGS) $(LDFLAGS) procinfo.cpp -o $@ $(LIBS) - - #procinfo.o: procinfo.cpp procinfo.h - # $(XX) $(CFLAGS) procinfo.cpp -o procinfo.o diff --git a/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-autotools.patch b/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-autotools.patch new file mode 100644 index 000000000000..9035a5987c37 --- /dev/null +++ b/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-autotools.patch @@ -0,0 +1,69 @@ +--- a/configure.in ++++ b/configure.in +@@ -37,13 +37,9 @@ + AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode Enables debug symbols and disables optimizations [default=no]], + [ enable_maintainer_mode=yes ]) + +-if test "$enable_maintainer_mode" = "yes"; then +- CFLAGS="-O0 -g3 --pipe -Wall" +- LDFLAGS="-lncurses" +-else +- CFLAGS="$CFLAGS -pipe -Wall" +- LDFLAGS="-s -lncurses" +-fi ++CXXFLAGS+=" -Wall" ++ ++PKG_CHECK_MODULES([NCURSES], [ncurses]) + + AC_OUTPUT(Makefile) + #AC_CONFIG_FILES([Makefile]) +--- a/Makefile.in ++++ b/Makefile.in +@@ -6,24 +6,30 @@ + + mandir= @mandir@ + ++CC = @CC@ + CXX = @CXX@ + + CFLAGS = @CFLAGS@ ++CXXFLAGS = @CXXFLAGS@ ++ + LDFLAGS = @LDFLAGS@ + ++CPPFLAGS += @NCURSES_CFLAGS@ ++LIBS = @NCURSES_LIBS@ ++ + #LDLIBS = -levent + + ### Add to taste: + +-# CFLAGS = -g ++# CXXFLAGS = -g + # LDFLAGS = -g + +-# CFLAGS += -DPROC_DIR=\"extra2/\" ++# CXXFLAGS += -DPROC_DIR=\"extra2/\" + +-# CFLAGS += -DDEBUG ++# CXXFLAGS += -DDEBUG + # LDLIBS += -ldmalloc + +-# CFLAGS += -pg ++# CXXFLAGS += -pg + # LDFLAGS = -pg + + ### End of configurable options. +@@ -44,10 +50,10 @@ + cygwin_procstat.cpp cygwin_rendercpupagestat.cpp \ + lib/routines.cpp lib/timeRoutines.cpp lib/prettyPrint.cpp \ + Makefile +- $(CXX) $(CFLAGS) $(LDFLAGS) procinfo.cpp -o $@ ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) procinfo.cpp -o $@ $(LIBS) + + #procinfo.o: procinfo.cpp procinfo.h +-# $(XX) $(CFLAGS) procinfo.cpp -o procinfo.o ++# $(CXX) $(CXXFLAGS) procinfo.cpp -o procinfo.o + + install: procinfo procinfo.8 + -mkdir -p $(DESTDIR)/$(prefix)/bin diff --git a/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-man.patch b/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-man.patch index ce818fcd3e77..954281258a24 100644 --- a/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-man.patch +++ b/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-man.patch @@ -1,5 +1,5 @@ ---- procinfo-ng-2.0.217/procinfo.8.orig 2009-01-11 11:21:23.000000000 +0100 -+++ procinfo-ng-2.0.217/procinfo.8 2009-01-11 11:21:48.000000000 +0100 +--- a/procinfo.8 ++++ b/procinfo.8 @@ -6,7 +6,7 @@ .SH SYNOPSIS .B procinfo diff --git a/app-admin/procinfo-ng/procinfo-ng-2.0.304-r1.ebuild b/app-admin/procinfo-ng/procinfo-ng-2.0.304-r1.ebuild index 791cfbd4c7fb..49ce7d2cac57 100644 --- a/app-admin/procinfo-ng/procinfo-ng-2.0.304-r1.ebuild +++ b/app-admin/procinfo-ng/procinfo-ng-2.0.304-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -inherit autotools eutils toolchain-funcs +inherit autotools DESCRIPTION="Completely rewrite of the old system monitoring app procinfo" HOMEPAGE="https://sourceforge.net/projects/procinfo-ng/" @@ -12,29 +12,20 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="|| ( GPL-2 LGPL-2.1 )" SLOT="0" KEYWORDS="amd64 hppa x86" -IUSE="" RDEPEND=" sys-libs/ncurses:0= !app-admin/procinfo" -DEPEND="${RDEPEND} - virtual/pkgconfig" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" PATCHES=( - "${FILESDIR}"/${P}-as-needed.patch + "${FILESDIR}"/${P}-autotools.patch "${FILESDIR}"/${P}-man.patch ) src_prepare() { - epatch "${PATCHES[@]}" - # removing -s flag as portage does the stripping part and add support - # for custom LDFLAGS. Plus correct for --as-needed - sed \ - -e 's:-s -lncurses:${LDFLAGS}:' \ - -i configure.in || die "sed configure.in failed" + default + mv configure.{in,ac} || die eautoreconf } - -src_compile() { - emake LIBS="$($(tc-getPKG_CONFIG) --libs ncurses)" -} |