summaryrefslogtreecommitdiff
path: root/app-benchmarks/i7z
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-benchmarks/i7z
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-benchmarks/i7z')
-rw-r--r--app-benchmarks/i7z/Manifest13
-rw-r--r--app-benchmarks/i7z/files/fix-insecure-tempfile.patch76
-rw-r--r--app-benchmarks/i7z/files/fix_cpuid_asm.patch21
-rw-r--r--app-benchmarks/i7z/files/gcc5.patch40
-rw-r--r--app-benchmarks/i7z/files/hyphen-used-as-minus-sign.patch26
-rw-r--r--app-benchmarks/i7z/files/i7z-0.27.2-ncurses.patch22
-rw-r--r--app-benchmarks/i7z/files/install-i7z_rw_registers.patch26
-rw-r--r--app-benchmarks/i7z/files/nehalem.patch15
-rw-r--r--app-benchmarks/i7z/files/qt5.patch13
-rw-r--r--app-benchmarks/i7z/files/use_stdbool.patch40
-rw-r--r--app-benchmarks/i7z/i7z-93_p20131012-r1.ebuild69
-rw-r--r--app-benchmarks/i7z/i7z-93_p20131012-r2.ebuild63
-rw-r--r--app-benchmarks/i7z/metadata.xml10
13 files changed, 434 insertions, 0 deletions
diff --git a/app-benchmarks/i7z/Manifest b/app-benchmarks/i7z/Manifest
new file mode 100644
index 000000000000..536ad3d3a2bc
--- /dev/null
+++ b/app-benchmarks/i7z/Manifest
@@ -0,0 +1,13 @@
+AUX fix-insecure-tempfile.patch 3615 BLAKE2B a25ae5d15a1757d45901fd8d783bb5fa2c80f8c2e54b46906b55679f1c45b5268f853ce373ccf9e85c60cff8daefd43120627a8e08b2b944363b58f30e68d207 SHA512 ec07232656ea18602f062562af9182be5cc6b5e4a073b15f7d5308bf9632e2abf546de2006f4e4bd4cf4bd8314d9df521235e2b3c4720d0dee88e4430705978c
+AUX fix_cpuid_asm.patch 924 BLAKE2B 8c73d3034a70ec5a4b0b9b704ee10f6db99c5d592f68bc26f058c6ec99f681e1f0d04ae417d498a31bdfea4a52676cfb3a71d967bff9a79bbeee46b28837c546 SHA512 ad0ea8751e753340b541fc13849c2cb5b2be1c3c297a7b40e508d2ac9abdd1b153918ef507d89db1d4b15ec1e1eedfe7cb3619376649a10abfb1f5880f6d187c
+AUX gcc5.patch 1866 BLAKE2B 7792ec7852839317c9838617cb9fd85be0949afbe8cc456bf7f5587b0a934fb217a021c4d0a711d438553e15478e03e670f104bca122beaed4f68255c71139e8 SHA512 ad9a752bf3604136f2f3110c6053274581f6e5f6db56cede31fee2091d9b989b93f43d4658ca12f77bdf7c6ed78a0a06d8368ebea3ef20239fe707ae8e1a707a
+AUX hyphen-used-as-minus-sign.patch 2470 BLAKE2B e2c04874bae901475f1fadd1baf14d380182f25dd0ff41ab8879b1c2adf904475d6d5c64d0590abe638122653e7c0e3d8c44d713513b258b390df40f9f939fbb SHA512 05544e9f682bb6ccc1166182985ff4a4d19481ba555f63a0f030487ccc231cea9b2d1dfff83a95e9a2bcbf9d7dcc31cd331397cf84ef2ed253dac23fe9ecaa99
+AUX i7z-0.27.2-ncurses.patch 825 BLAKE2B 2538bcfcdb3f8597f33901c060974b3aa0e251f8c17b985452208e6e66940cedab29e21cdc3817070a91ec566b492c31bfcf3e3b727845bc9119a70b63f62e8a SHA512 6bf1773ccdf8b310be575eccdbbe351db5661bb4fef2621d2cf46dac073c627f27441e3a879b558c607305a5d73d53ef3687c98d49a2f0db7a1048019bd41a1a
+AUX install-i7z_rw_registers.patch 802 BLAKE2B 186862e797e903766767b035565a0a20814a8197051519a308a2774ad1d9556f17a91eb299ea050c83f9b91850fd47e77cbb7b4a41a73a5356f11267eb3f3624 SHA512 677df9ea9884d138f1eecb88b49ab96ac16f49cb63caf11fa63892940815e3c31e2170afadd0c73a2a571ff62b824be6109c0cda72779d76e03907da546f48d9
+AUX nehalem.patch 477 BLAKE2B e0f30d54f1da1cac0aafaea91641d5e626bbbdea6bc2abc6e1f6acf3c5e3d613cb1f0da5ff337fd8a44bc4288b981d83eaa63541291c0c397619f859b34b1da0 SHA512 5a647455d4fc4ff24689c9d4d6e936c346065ff2219de0bc61613a1044236df40fb815df0a136510ba2645bd01f172ba67486cbb9dc072dddf4308fab1824d7e
+AUX qt5.patch 365 BLAKE2B 4aa56d2b643ecc119122f549678d4cd1525bdba923067366c92fa0ef3a3b183b17668ad593d825223cb69bba883ede461439b05ecda1da29d27e6b3085a54f52 SHA512 fc38423e82f774aff588023b45154ea3bf3fd553ee6bc4261dcd0e7911d1d589754461a1734e0da969d03d6d94e2b844da6f09a388ce4508090d4ba5c75c7df0
+AUX use_stdbool.patch 885 BLAKE2B 10365e67f43418213e8f38ab74d3588aab2783329d447834ad795f8973cdd53fdc40862d8f9abc723acaddfe03f49f3c471046ae865ed72f041db23ee1337c37 SHA512 5df3d042a580268971e6da0878bd070d2054e9a9732b518a88a489d6b3d62acae58f697fe44634ee6c847b108cae25df6592ed9e1f20ea4d7c6b36adb516830d
+DIST i7z-93_p20131012.tar.gz 879969 BLAKE2B 73b1f2e777cef9799fc9e11d366c989c37f4bad03676409855fdd8229a66d1075805068ad424ab0b46bb9bb4fe62431fb6c79b414fde0c1b1d29935ca4566839 SHA512 ef2dfc36407b18a2081413d423cc3d38c38121e386d9068eee9a794b810232727b3abbd22d3b36bc32206f4dc89dd881a4550df19108c439a91f01369bf74d5a
+EBUILD i7z-93_p20131012-r1.ebuild 1480 BLAKE2B d5fbec4df1b016bdcd875976eccb3f2a2627cfaa15a38c0ffb623089587980acc9a69309c695acc26b72500cf3a3b90fa5c78b49146578754250471088217b3d SHA512 866ba126d0743b1ec3c5fb57cad73729d43be1b9a61417208bca19a6ef50df092bad82c772ed86234b6eb46d538e3729fa298ca02986999795ce34874c80a91e
+EBUILD i7z-93_p20131012-r2.ebuild 1298 BLAKE2B f86d42dd03f42c5c94444be65e7b4f639ec7e103f1545d7fe94ff3c5e35cb6e380de539fe2623bfde38637b0f5c017e626de1a8ee6491aff37658ce1f66911a4 SHA512 5e67a7aae98ebb9e44041ab1df5cafd980c43d66b58714dc183c15281998b955aeb6e62b20736e9ca156cb26acd0e56db274022499f5945eb8f00a7416b4fb7c
+MISC metadata.xml 296 BLAKE2B c58dcfad78dd439c5fb57ba43d2c7694eee04f21dd6feef0af39c06d4980c37a02da0a1cea423d41cc2d32265be75b731a1a3866cda1e855af8efd71917900fb SHA512 a73fd853e9d6da0d414da279e6fea520e9f1f1ff76c73295640be542ed81391871a83f30f5739271c7044692398182217e42b59d75fe65ad4c5d949015009668
diff --git a/app-benchmarks/i7z/files/fix-insecure-tempfile.patch b/app-benchmarks/i7z/files/fix-insecure-tempfile.patch
new file mode 100644
index 000000000000..fb027158434b
--- /dev/null
+++ b/app-benchmarks/i7z/files/fix-insecure-tempfile.patch
@@ -0,0 +1,76 @@
+Author: Andreas Beckmann <anbe@debian.org>
+Description: fix insecure temfile usage: /tmp/cpufreq.txt
+ switch from system() + fopen() to popen()
+ disable other insecure tempfiles that may be generated but not used
+Bug-Debian: http://bugs.debian.org/718418
+
+diff --git a/GUI/i7z_GUI.cpp b/GUI/i7z_GUI.cpp
+index 2705e84..60eaeb2 100644
+--- a/GUI/i7z_GUI.cpp
++++ b/GUI/i7z_GUI.cpp
+@@ -171,18 +171,17 @@ MyThread::run ()
+ //CPUINFO is wrong for i7 but correct for the number of physical and logical cores present
+ //If Hyperthreading is enabled then, multiple logical processors will share a common CORE ID
+ //http://www.redhat.com/magazine/022aug06/departments/tips_tricks/
+- system ("cat /proc/cpuinfo |grep MHz|sed 's/cpu\\sMHz\\s*:\\s//'|tail -n 1 > /tmp/cpufreq.txt");
+- system ("grep \"core id\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numPhysical.txt");
+- system ("grep \"processor\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numLogical.txt");
++ //system ("grep \"core id\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numPhysical.txt");
++ //system ("grep \"processor\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numLogical.txt");
+
+
+- //Open the parsed cpufreq file and obtain the cpufreq from /proc/cpuinfo
++ // obtain the cpufreq from /proc/cpuinfo
+ FILE *tmp_file;
+- tmp_file = fopen ("/tmp/cpufreq.txt", "r");
++ tmp_file = popen ("sed -n '/MHz/ { s/cpu\\sMHz\\s*:\\s//p; q }' /proc/cpuinfo", "r");
+ char tmp_str[30];
+ fgets (tmp_str, 30, tmp_file);
++ pclose (tmp_file);
+ double cpu_freq_cpuinfo = atof (tmp_str);
+- fclose (tmp_file);
+
+ unsigned int numPhysicalCores, numLogicalCores;
+ numPhysicalCores = socket_0.num_physical_cores + socket_1.num_physical_cores;
+diff --git a/helper_functions.c b/helper_functions.c
+index 2f8da87..906c298 100644
+--- a/helper_functions.c
++++ b/helper_functions.c
+@@ -531,16 +531,13 @@ double cpufreq_info()
+ //CPUINFO is wrong for i7 but correct for the number of physical and logical cores present
+ //If Hyperthreading is enabled then, multiple logical processors will share a common CORE ID
+ //http://www.redhat.com/magazine/022aug06/departments/tips_tricks/
+- system
+- ("cat /proc/cpuinfo |grep MHz|sed 's/cpu\\sMHz\\s*:\\s//'|tail -n 1 > /tmp/cpufreq.txt");
+
+-
+- //Open the parsed cpufreq file and obtain the cpufreq from /proc/cpuinfo
++ // obtain the cpufreq from /proc/cpuinfo
+ FILE *tmp_file;
+- tmp_file = fopen ("/tmp/cpufreq.txt", "r");
++ tmp_file = popen ("sed -n '/MHz/ { s/cpu\\sMHz\\s*:\\s//p; q }' /proc/cpuinfo", "r");
+ char tmp_str[30];
+ fgets (tmp_str, 30, tmp_file);
+- fclose (tmp_file);
++ pclose (tmp_file);
+ return atof(tmp_str);
+ }
+
+diff --git a/i7z_Single_Socket.c b/i7z_Single_Socket.c
+index 015f154..d0afee0 100644
+--- a/i7z_Single_Socket.c
++++ b/i7z_Single_Socket.c
+@@ -823,10 +823,13 @@ void print_i7z_single ()
+ //CPUINFO is wrong for i7 but correct for the number of physical and logical cores present
+ //If Hyperthreading is enabled then, multiple logical processors will share a common CORE ID
+ //http://www.redhat.com/magazine/022aug06/departments/tips_tricks/
++ERROR INSECURE TMPFILE
+ system
+ ("cat /proc/cpuinfo |grep MHz|sed 's/cpu\\sMHz\\s*:\\s//'|tail -n 1 > /tmp/cpufreq.txt");
++ERROR INSECURE TMPFILE
+ system
+ ("grep \"core id\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numPhysical.txt");
++ERROR INSECURE TMPFILE
+ system
+ ("grep \"processor\" /proc/cpuinfo |sort -|uniq -|wc -l > /tmp/numLogical.txt");
+ //At this step, /tmp/numPhysical contains number of physical cores in machine and
diff --git a/app-benchmarks/i7z/files/fix_cpuid_asm.patch b/app-benchmarks/i7z/files/fix_cpuid_asm.patch
new file mode 100644
index 000000000000..27739a64523e
--- /dev/null
+++ b/app-benchmarks/i7z/files/fix_cpuid_asm.patch
@@ -0,0 +1,21 @@
+Author: Andreas Beckmann <anbe@debian.org>
+Description: fix cpuid inline assembly
+ the old code zeroed the upper half of %rbx
+
+--- a/helper_functions.c
++++ b/helper_functions.c
+@@ -101,13 +101,7 @@ static inline void cpuid (unsigned int i
+ unsigned int *ecx, unsigned int *edx)
+ {
+ unsigned int _eax = info, _ebx, _ecx, _edx;
+- asm volatile ("mov %%ebx, %%edi;" // save ebx (for PIC)
+- "cpuid;"
+- "mov %%ebx, %%esi;" // pass to caller
+- "mov %%edi, %%ebx;" // restore ebx
+- :"+a" (_eax), "=S" (_ebx), "=c" (_ecx), "=d" (_edx)
+- : /* inputs: eax is handled above */
+- :"edi" /* clobbers: we hit edi directly */);
++ asm volatile ("cpuid\n\t" : "+a" (_eax), "=b" (_ebx), "=c" (_ecx), "=d" (_edx) : : );
+ if (eax) *eax = _eax;
+ if (ebx) *ebx = _ebx;
+ if (ecx) *ecx = _ecx;
diff --git a/app-benchmarks/i7z/files/gcc5.patch b/app-benchmarks/i7z/files/gcc5.patch
new file mode 100644
index 000000000000..dd3ed99a1c7b
--- /dev/null
+++ b/app-benchmarks/i7z/files/gcc5.patch
@@ -0,0 +1,40 @@
+diff -Nuar i7z-5023138d7c35c4667c938b853e5ea89737334e92/GUI/i7z_GUI.cpp
+i7z-5023138d7c35c4667c938b853e5ea89737334e92-fixed/GUI/i7z_GUI.cpp
+--- i7z-5023138d7c35c4667c938b853e5ea89737334e92/GUI/i7z_GUI.cpp 2013-10-12 20:59:19.000000000 +0000
++++ i7z-5023138d7c35c4667c938b853e5ea89737334e92-fixed/GUI/i7z_GUI.cpp 2017-03-06 18:27:54.825756111 +0000
+@@ -16,7 +16,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <time.h>
+-#include <math.h>
++#include <cmath>
+
+ #include <QApplication>
+ #include <QPushButton>
+@@ -382,7 +382,7 @@
+
+ //C1_time[i] -= C3_time[i] + C6_time[i];
+ C1_time[i] = c1_time - (C3_time[i] + C6_time[i]) ;
+- if (!isnan(c1_time) && !isinf(c1_time)) {
++ if (!std::isnan(c1_time) && !std::isinf(c1_time)) {
+ if (C1_time[i] <= 0) {
+ C1_time[i]=0;
+ }
+@@ -642,13 +642,13 @@
+
+ for (i = 0; i < (int)numCPUs; i++)
+ {
+- if ( (mythread->FREQ[i] > Max_Freq_socket0) && (!isnan(mythread->FREQ[i])) &&
+- (!isinf(mythread->FREQ[i])) && (socket_list[i] == socket_0.socket_num) ) {
++ if ( (mythread->FREQ[i] > Max_Freq_socket0) && (!std::isnan(mythread->FREQ[i])) &&
++ (!std::isinf(mythread->FREQ[i])) && (socket_list[i] == socket_0.socket_num) ) {
+ Max_Freq_socket0 = mythread->FREQ[i];
+ num_socket0_cpus++;
+ }
+- if ( (mythread->FREQ[i] > Max_Freq_socket1) && (!isnan(mythread->FREQ[i])) &&
+- (!isinf(mythread->FREQ[i])) && (socket_list[i] == socket_1.socket_num) ) {
++ if ( (mythread->FREQ[i] > Max_Freq_socket1) && (!std::isnan(mythread->FREQ[i])) &&
++ (!std::isinf(mythread->FREQ[i])) && (socket_list[i] == socket_1.socket_num) ) {
+ Max_Freq_socket1 = mythread->FREQ[i];
+ num_socket1_cpus++;
+ }
diff --git a/app-benchmarks/i7z/files/hyphen-used-as-minus-sign.patch b/app-benchmarks/i7z/files/hyphen-used-as-minus-sign.patch
new file mode 100644
index 000000000000..f908b934621e
--- /dev/null
+++ b/app-benchmarks/i7z/files/hyphen-used-as-minus-sign.patch
@@ -0,0 +1,26 @@
+Author: Andreas Beckmann <anbe@debian.org>
+Description: fix hyphen abuse
+
+--- a/doc/i7z.man
++++ b/doc/i7z.man
+@@ -7,15 +7,15 @@
+ i7z runs the i7z, ncurses based, program without any options. i7z will print out the C-states and temperature for i3, i5 and i7 based Core processors from Intel (including Nehalems, Sandy Bridge and Ivy Bridge).
+ .SH OPTIONS
+ .TP
+-\fB-h, --help \fPshow the list of options available with the i7z tool.
++\fB\-h, \-\-help \fPshow the list of options available with the i7z tool.
+ .TP
+-\fB-w [a|l], --write [a,l] \fPLogging of the frequencies can be turned on with this options. Option "-w a" or "--write a" will append to the log file. Option "-w l" or "--write l" will replace the log file.
++\fB\-w [a|l], \-\-write [a,l] \fPLogging of the frequencies can be turned on with this options. Option "\-w a" or "\-\-write a" will append to the log file. Option "\-w l" or "\-\-write l" will replace the log file.
+ .TP
+-\fB-l, --logfile [FILENAME] \fPChange the log file name to the specified FILENAME. Default logging file is cpu_freq_log.txt (single socket) or cpu_freq_log_dual%d.txt (dual socket, %d is either 0, 1).
++\fB\-l, \-\-logfile [FILENAME] \fPChange the log file name to the specified FILENAME. Default logging file is cpu_freq_log.txt (single socket) or cpu_freq_log_dual%d.txt (dual socket, %d is either 0, 1).
+ .TP
+-\fB--socket0 [SOCKETNUM], --socket1 [SOCKETNUM] \fPThe tool can print information for about 2 sockets at once at the most. The top view will be, by default, of the first socket (controlled by --socket0) and the bottom view will be of the second socket (controlled by --socket1). Supply the appropriate value of 0 or 1 or more for SOCKETNUM (if there are more sockets on the machine) to show in the top and bottom view.
++\fB\-\-socket0 [SOCKETNUM], \-\-socket1 [SOCKETNUM] \fPThe tool can print information for about 2 sockets at once at the most. The top view will be, by default, of the first socket (controlled by \-\-socket0) and the bottom view will be of the second socket (controlled by \-\-socket1). Supply the appropriate value of 0 or 1 or more for SOCKETNUM (if there are more sockets on the machine) to show in the top and bottom view.
+ .TP
+-\fB--nogui \fPDisable the GUI. Useful when the only need is logging.
++\fB\-\-nogui \fPDisable the GUI. Useful when the only need is logging.
+ .SH Example
+ To print for two sockets and also change the log file (log to /tmp/logfilei7z)
+
diff --git a/app-benchmarks/i7z/files/i7z-0.27.2-ncurses.patch b/app-benchmarks/i7z/files/i7z-0.27.2-ncurses.patch
new file mode 100644
index 000000000000..72695a951f7e
--- /dev/null
+++ b/app-benchmarks/i7z/files/i7z-0.27.2-ncurses.patch
@@ -0,0 +1,22 @@
+Index: Makefile
+===================================================================
+--- a/Makefile (revision 109)
++++ b/Makefile (working copy)
+@@ -19,7 +19,7 @@
+
+ CC ?= gcc
+
+-LIBS += -lncurses -lpthread -lrt -lm
++LIBS += `pkg-config --libs ncurses` -lpthread -lrt -lm
+ INCLUDEFLAGS =
+
+ BIN = i7z
+@@ -42,7 +42,7 @@
+
+ #http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644728 for -ltinfo on debian
+ static-bin: message $(OBJ)
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(OBJ) -static-libgcc -DNCURSES_STATIC -static -lpthread -lncurses -lrt -lm -ltinfo
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(OBJ) -static-libgcc -DNCURSES_STATIC -static -lpthread `pkg-config --static --libs ncurses` -lrt -lm
+
+ # perfmon-bin: message $(OBJ)
+ # $(CC) $(CFLAGS) $(LDFLAGS) -o $(PERFMON-BIN) perfmon-i7z.c helper_functions.c $(LIBS)
diff --git a/app-benchmarks/i7z/files/install-i7z_rw_registers.patch b/app-benchmarks/i7z/files/install-i7z_rw_registers.patch
new file mode 100644
index 000000000000..65c36e9a26f6
--- /dev/null
+++ b/app-benchmarks/i7z/files/install-i7z_rw_registers.patch
@@ -0,0 +1,26 @@
+Author: Andreas Beckmann <anbe@debian.org>
+Description: install the i7z_rw_registers script and fix the hashbang
+
+--- a/i7z_rw_registers.rb
++++ b/i7z_rw_registers.rb
+@@ -1,3 +1,5 @@
++#!/usr/bin/ruby
++
+ #* ----------------------------------------------------------------------- *
+ # *
+ # * Under GPL v3
+@@ -7,7 +9,6 @@
+ # *
+ # * ----------------------------------------------------------------------- */
+
+-#!/usr/bin/ruby
+
+ def print_command_list()
+ print "Do you need help? \n"
+--- a/Makefile
++++ b/Makefile
+@@ -61,3 +61,4 @@
+ install -D -m 755 $(BIN) $(DESTDIR)$(sbindir)$(BIN)
+ install -d $(DESTDIR)$(docdir)
+ install -m 0644 README.txt put_cores_offline.sh put_cores_online.sh MAKEDEV-cpuid-msr $(DESTDIR)$(docdir)
++ install -m 0755 i7z_rw_registers.rb $(DESTDIR)$(sbindir)/i7z_rw_registers
diff --git a/app-benchmarks/i7z/files/nehalem.patch b/app-benchmarks/i7z/files/nehalem.patch
new file mode 100644
index 000000000000..c1b5639779a9
--- /dev/null
+++ b/app-benchmarks/i7z/files/nehalem.patch
@@ -0,0 +1,15 @@
+Author: Andreas Beckmann <anbe@debian.org>
+Description: fix some nehalem detected as haswell, too
+Bug-Debian: https://bugs.debian.org/856806
+
+--- a/helper_functions.c
++++ b/helper_functions.c
+@@ -420,7 +420,7 @@ void Print_Information_Processor(bool* n
+ *nehalem = true;
+ *sandy_bridge = false;
+ *ivy_bridge = false;
+- *haswell = true;
++ *haswell = false;
+
+ } else if (proc_info.extended_model == 0x2) {
+ switch (proc_info.model)
diff --git a/app-benchmarks/i7z/files/qt5.patch b/app-benchmarks/i7z/files/qt5.patch
new file mode 100644
index 000000000000..9e9b162d9e85
--- /dev/null
+++ b/app-benchmarks/i7z/files/qt5.patch
@@ -0,0 +1,13 @@
+diff -Naur a/GUI/i7z_GUI.pro b/GUI/i7z_GUI.pro
+--- a/GUI/i7z_GUI.pro 2013-10-12 21:59:19.000000000 +0100
++++ b/GUI/i7z_GUI.pro 2016-11-05 13:54:30.118655672 +0000
+@@ -3,7 +3,8 @@
+ ######################################################################
+
+ TEMPLATE = app
+-TARGET =
++TARGET = i7z_GUI
++QT += widgets
+ DEPENDPATH += .
+ INCLUDEPATH += .
+ CONFIG += debug
diff --git a/app-benchmarks/i7z/files/use_stdbool.patch b/app-benchmarks/i7z/files/use_stdbool.patch
new file mode 100644
index 000000000000..4aa84ac091c9
--- /dev/null
+++ b/app-benchmarks/i7z/files/use_stdbool.patch
@@ -0,0 +1,40 @@
+Author: Andreas Beckmann <anbe@debian.org>
+Description: use a consistent bool type
+Bug-Debian: #749724
+
+--- a/i7z.h
++++ b/i7z.h
+@@ -11,18 +11,13 @@
+ * ----------------------------------------------------------------------- */
+
+ #include <sys/time.h>
++#include <stdbool.h>
+
+ #define i7z_VERSION_INFO "svn-r93-(27-MAY-2013)"
+
+ //structure to store the information about the processor
+ #define proccpuinfo "/proc/cpuinfo"
+
+-#ifndef bool
+-#define bool int
+-#endif
+-#define false 0
+-#define true 1
+-
+ #define MAX_PROCESSORS 128
+ #define MAX_HI_PROCESSORS MAX_PROCESSORS
+ #define MAX_SK_PROCESSORS (MAX_PROCESSORS/4)
+--- a/cpuinfo.c
++++ b/cpuinfo.c
+@@ -2,10 +2,8 @@
+ #include "string.h"
+ #include "stdlib.h"
+ #include "assert.h"
++#include <stdbool.h>
+ #define MAX_PROCESSORS 32
+-#define bool int
+-#define false 0
+-#define true 1
+
+ #define MAX_HI_PROCESSORS MAX_PROCESSORS
+
diff --git a/app-benchmarks/i7z/i7z-93_p20131012-r1.ebuild b/app-benchmarks/i7z/i7z-93_p20131012-r1.ebuild
new file mode 100644
index 000000000000..d555d4c41fa5
--- /dev/null
+++ b/app-benchmarks/i7z/i7z-93_p20131012-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic qmake-utils toolchain-funcs
+
+COMMIT="5023138d7c35c4667c938b853e5ea89737334e92"
+DESCRIPTION="A better i7 (and now i3, i5) reporting tool for Linux"
+HOMEPAGE="https://github.com/ajaiantilal/i7z"
+SRC_URI="https://github.com/ajaiantilal/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="qt5"
+
+RDEPEND="
+ sys-libs/ncurses:0=
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/i7z-0.27.2-ncurses.patch
+ "${FILESDIR}"/qt5.patch
+ "${FILESDIR}"/gcc5.patch
+
+ # From Debian
+ "${FILESDIR}"/fix-insecure-tempfile.patch
+ "${FILESDIR}"/fix_cpuid_asm.patch
+ "${FILESDIR}"/hyphen-used-as-minus-sign.patch
+ "${FILESDIR}"/install-i7z_rw_registers.patch
+ "${FILESDIR}"/use_stdbool.patch
+)
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+src_configure() {
+ # The GUI segfaults with -O1. None of the documented flags make a
+ # difference. There may not be a specific flag for the culprit.
+ # Looks to work fine for me with -O2 (pacho - 20170530)
+# filter-flags "-O*"
+
+ tc-export CC
+ cd GUI || die
+
+ use qt5 && eqmake5 ${PN}_GUI.pro
+}
+
+src_compile() {
+ default
+
+ if use qt5; then
+ emake -C GUI clean
+ emake -C GUI
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${ED}" docdir=/usr/share/doc/${PF} install
+
+ if use qt5; then
+ dosbin GUI/i7z_GUI
+ fi
+}
diff --git a/app-benchmarks/i7z/i7z-93_p20131012-r2.ebuild b/app-benchmarks/i7z/i7z-93_p20131012-r2.ebuild
new file mode 100644
index 000000000000..992080972ba0
--- /dev/null
+++ b/app-benchmarks/i7z/i7z-93_p20131012-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic qmake-utils toolchain-funcs
+
+COMMIT="5023138d7c35c4667c938b853e5ea89737334e92"
+DESCRIPTION="A better i7 (and now i3, i5) reporting tool for Linux"
+HOMEPAGE="https://github.com/ajaiantilal/i7z"
+SRC_URI="https://github.com/ajaiantilal/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="qt5"
+
+RDEPEND="
+ sys-libs/ncurses:0=
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/i7z-0.27.2-ncurses.patch
+ "${FILESDIR}"/qt5.patch
+ "${FILESDIR}"/gcc5.patch
+
+ # From Debian
+ "${FILESDIR}"/fix-insecure-tempfile.patch
+ "${FILESDIR}"/fix_cpuid_asm.patch
+ "${FILESDIR}"/hyphen-used-as-minus-sign.patch
+ "${FILESDIR}"/install-i7z_rw_registers.patch
+ "${FILESDIR}"/use_stdbool.patch
+ "${FILESDIR}"/nehalem.patch
+)
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+src_configure() {
+ tc-export CC
+ cd GUI || die
+ use qt5 && eqmake5 ${PN}_GUI.pro
+}
+
+src_compile() {
+ default
+
+ if use qt5; then
+ emake -C GUI clean
+ emake -C GUI
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${ED}" docdir=/usr/share/doc/${PF} install
+
+ if use qt5; then
+ dosbin GUI/i7z_GUI
+ fi
+}
diff --git a/app-benchmarks/i7z/metadata.xml b/app-benchmarks/i7z/metadata.xml
new file mode 100644
index 000000000000..78dfd9b514c5
--- /dev/null
+++ b/app-benchmarks/i7z/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pacho@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ajaiantilal/i7z</remote-id>
+ </upstream>
+</pkgmetadata>