1 |
commit: b1b6e4a46931c0998199aae07b6b3cc73db730b2 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 8 12:37:21 2020 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 8 12:37:21 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1b6e4a4 |
7 |
|
8 |
app-admin/procinfo-ng: Port to EAPI 7 |
9 |
|
10 |
* Use CXXFLAGS instead of CFLAGS for .cpp files |
11 |
* Use proper Autoconf macros for ncurses |
12 |
* Unify patches |
13 |
|
14 |
Closes: https://bugs.gentoo.org/668660 |
15 |
Closes: https://github.com/gentoo/gentoo/pull/14635 |
16 |
Package-Manager: Portage-2.3.93, Repoman-2.3.20 |
17 |
Suggested-by: Denis Pronin <dannftk <AT> yandex.ru> |
18 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
19 |
|
20 |
.../files/procinfo-ng-2.0.304-as-needed.patch | 11 ---- |
21 |
.../files/procinfo-ng-2.0.304-autotools.patch | 69 ++++++++++++++++++++++ |
22 |
.../files/procinfo-ng-2.0.304-man.patch | 4 +- |
23 |
.../procinfo-ng/procinfo-ng-2.0.304-r1.ebuild | 25 +++----- |
24 |
4 files changed, 79 insertions(+), 30 deletions(-) |
25 |
|
26 |
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 |
27 |
deleted file mode 100644 |
28 |
index a489f533787..00000000000 |
29 |
--- a/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-as-needed.patch |
30 |
+++ /dev/null |
31 |
@@ -1,11 +0,0 @@ |
32 |
---- Makefile.in 2009-04-27 05:33:50.000000000 +0200 |
33 |
-+++ Makefile.in.new 2009-10-11 15:22:23.458985416 +0200 |
34 |
-@@ -44,7 +44,7 @@ |
35 |
- cygwin_procstat.cpp cygwin_rendercpupagestat.cpp \ |
36 |
- lib/routines.cpp lib/timeRoutines.cpp lib/prettyPrint.cpp \ |
37 |
- Makefile |
38 |
-- $(CXX) $(CFLAGS) $(LDFLAGS) procinfo.cpp -o $@ |
39 |
-+ $(CXX) $(CFLAGS) $(LDFLAGS) procinfo.cpp -o $@ $(LIBS) |
40 |
- |
41 |
- #procinfo.o: procinfo.cpp procinfo.h |
42 |
- # $(XX) $(CFLAGS) procinfo.cpp -o procinfo.o |
43 |
|
44 |
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 |
45 |
new file mode 100644 |
46 |
index 00000000000..9035a5987c3 |
47 |
--- /dev/null |
48 |
+++ b/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-autotools.patch |
49 |
@@ -0,0 +1,69 @@ |
50 |
+--- a/configure.in |
51 |
++++ b/configure.in |
52 |
+@@ -37,13 +37,9 @@ |
53 |
+ AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode Enables debug symbols and disables optimizations [default=no]], |
54 |
+ [ enable_maintainer_mode=yes ]) |
55 |
+ |
56 |
+-if test "$enable_maintainer_mode" = "yes"; then |
57 |
+- CFLAGS="-O0 -g3 --pipe -Wall" |
58 |
+- LDFLAGS="-lncurses" |
59 |
+-else |
60 |
+- CFLAGS="$CFLAGS -pipe -Wall" |
61 |
+- LDFLAGS="-s -lncurses" |
62 |
+-fi |
63 |
++CXXFLAGS+=" -Wall" |
64 |
++ |
65 |
++PKG_CHECK_MODULES([NCURSES], [ncurses]) |
66 |
+ |
67 |
+ AC_OUTPUT(Makefile) |
68 |
+ #AC_CONFIG_FILES([Makefile]) |
69 |
+--- a/Makefile.in |
70 |
++++ b/Makefile.in |
71 |
+@@ -6,24 +6,30 @@ |
72 |
+ |
73 |
+ mandir= @mandir@ |
74 |
+ |
75 |
++CC = @CC@ |
76 |
+ CXX = @CXX@ |
77 |
+ |
78 |
+ CFLAGS = @CFLAGS@ |
79 |
++CXXFLAGS = @CXXFLAGS@ |
80 |
++ |
81 |
+ LDFLAGS = @LDFLAGS@ |
82 |
+ |
83 |
++CPPFLAGS += @NCURSES_CFLAGS@ |
84 |
++LIBS = @NCURSES_LIBS@ |
85 |
++ |
86 |
+ #LDLIBS = -levent |
87 |
+ |
88 |
+ ### Add to taste: |
89 |
+ |
90 |
+-# CFLAGS = -g |
91 |
++# CXXFLAGS = -g |
92 |
+ # LDFLAGS = -g |
93 |
+ |
94 |
+-# CFLAGS += -DPROC_DIR=\"extra2/\" |
95 |
++# CXXFLAGS += -DPROC_DIR=\"extra2/\" |
96 |
+ |
97 |
+-# CFLAGS += -DDEBUG |
98 |
++# CXXFLAGS += -DDEBUG |
99 |
+ # LDLIBS += -ldmalloc |
100 |
+ |
101 |
+-# CFLAGS += -pg |
102 |
++# CXXFLAGS += -pg |
103 |
+ # LDFLAGS = -pg |
104 |
+ |
105 |
+ ### End of configurable options. |
106 |
+@@ -44,10 +50,10 @@ |
107 |
+ cygwin_procstat.cpp cygwin_rendercpupagestat.cpp \ |
108 |
+ lib/routines.cpp lib/timeRoutines.cpp lib/prettyPrint.cpp \ |
109 |
+ Makefile |
110 |
+- $(CXX) $(CFLAGS) $(LDFLAGS) procinfo.cpp -o $@ |
111 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) procinfo.cpp -o $@ $(LIBS) |
112 |
+ |
113 |
+ #procinfo.o: procinfo.cpp procinfo.h |
114 |
+-# $(XX) $(CFLAGS) procinfo.cpp -o procinfo.o |
115 |
++# $(CXX) $(CXXFLAGS) procinfo.cpp -o procinfo.o |
116 |
+ |
117 |
+ install: procinfo procinfo.8 |
118 |
+ -mkdir -p $(DESTDIR)/$(prefix)/bin |
119 |
|
120 |
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 |
121 |
index ce818fcd3e7..954281258a2 100644 |
122 |
--- a/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-man.patch |
123 |
+++ b/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-man.patch |
124 |
@@ -1,5 +1,5 @@ |
125 |
---- procinfo-ng-2.0.217/procinfo.8.orig 2009-01-11 11:21:23.000000000 +0100 |
126 |
-+++ procinfo-ng-2.0.217/procinfo.8 2009-01-11 11:21:48.000000000 +0100 |
127 |
+--- a/procinfo.8 |
128 |
++++ b/procinfo.8 |
129 |
@@ -6,7 +6,7 @@ |
130 |
.SH SYNOPSIS |
131 |
.B procinfo |
132 |
|
133 |
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 |
134 |
index 791cfbd4c7f..49ce7d2cac5 100644 |
135 |
--- a/app-admin/procinfo-ng/procinfo-ng-2.0.304-r1.ebuild |
136 |
+++ b/app-admin/procinfo-ng/procinfo-ng-2.0.304-r1.ebuild |
137 |
@@ -1,9 +1,9 @@ |
138 |
-# Copyright 1999-2017 Gentoo Foundation |
139 |
+# Copyright 1999-2020 Gentoo Authors |
140 |
# Distributed under the terms of the GNU General Public License v2 |
141 |
|
142 |
-EAPI=5 |
143 |
+EAPI=7 |
144 |
|
145 |
-inherit autotools eutils toolchain-funcs |
146 |
+inherit autotools |
147 |
|
148 |
DESCRIPTION="Completely rewrite of the old system monitoring app procinfo" |
149 |
HOMEPAGE="https://sourceforge.net/projects/procinfo-ng/" |
150 |
@@ -12,29 +12,20 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" |
151 |
LICENSE="|| ( GPL-2 LGPL-2.1 )" |
152 |
SLOT="0" |
153 |
KEYWORDS="amd64 hppa x86" |
154 |
-IUSE="" |
155 |
|
156 |
RDEPEND=" |
157 |
sys-libs/ncurses:0= |
158 |
!app-admin/procinfo" |
159 |
-DEPEND="${RDEPEND} |
160 |
- virtual/pkgconfig" |
161 |
+DEPEND="${RDEPEND}" |
162 |
+BDEPEND="virtual/pkgconfig" |
163 |
|
164 |
PATCHES=( |
165 |
- "${FILESDIR}"/${P}-as-needed.patch |
166 |
+ "${FILESDIR}"/${P}-autotools.patch |
167 |
"${FILESDIR}"/${P}-man.patch |
168 |
) |
169 |
|
170 |
src_prepare() { |
171 |
- epatch "${PATCHES[@]}" |
172 |
- # removing -s flag as portage does the stripping part and add support |
173 |
- # for custom LDFLAGS. Plus correct for --as-needed |
174 |
- sed \ |
175 |
- -e 's:-s -lncurses:${LDFLAGS}:' \ |
176 |
- -i configure.in || die "sed configure.in failed" |
177 |
+ default |
178 |
+ mv configure.{in,ac} || die |
179 |
eautoreconf |
180 |
} |
181 |
- |
182 |
-src_compile() { |
183 |
- emake LIBS="$($(tc-getPKG_CONFIG) --libs ncurses)" |
184 |
-} |