summaryrefslogtreecommitdiff
path: root/app-benchmarks/i7z
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-benchmarks/i7z
reinit the tree, so we can have metadata
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/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/metadata.xml10
11 files changed, 356 insertions, 0 deletions
diff --git a/app-benchmarks/i7z/Manifest b/app-benchmarks/i7z/Manifest
new file mode 100644
index 000000000000..9d4b6cca0f57
--- /dev/null
+++ b/app-benchmarks/i7z/Manifest
@@ -0,0 +1,13 @@
+AUX fix-insecure-tempfile.patch 3615 SHA256 0ca3a67b5793b0be84c26993bea2a5d300e14ddbe685c67b42fba1f6d57f0a07 SHA512 ec07232656ea18602f062562af9182be5cc6b5e4a073b15f7d5308bf9632e2abf546de2006f4e4bd4cf4bd8314d9df521235e2b3c4720d0dee88e4430705978c WHIRLPOOL 37d0bd9a0060a55513bde0b28d51a94222c33ced302cf49803a03a3a09c20d49d9fe3bfb242e1e0ab2e6efb21e973c3d8b882c56febff56f8df648b00ef2f879
+AUX fix_cpuid_asm.patch 924 SHA256 78d6b44d5f5a93fea6ebf10f704925b21bf51d92c090dc5cad9ff836cda0b254 SHA512 ad0ea8751e753340b541fc13849c2cb5b2be1c3c297a7b40e508d2ac9abdd1b153918ef507d89db1d4b15ec1e1eedfe7cb3619376649a10abfb1f5880f6d187c WHIRLPOOL f2a40ca53fb96cfb2447e6403c0fce1cb7a76b986fd86bf5f3544430df3a52ef4af5e5acd8629d11d7f6a8bec0be7a130b88263e7b5099da6ac2ba53cdfa9365
+AUX gcc5.patch 1866 SHA256 dec3a0a3e7b3584003c71e3607b06c24b697926228c797f0345b12b07337fc88 SHA512 ad9a752bf3604136f2f3110c6053274581f6e5f6db56cede31fee2091d9b989b93f43d4658ca12f77bdf7c6ed78a0a06d8368ebea3ef20239fe707ae8e1a707a WHIRLPOOL 17c21c1c6876cba8a87806e4360589993a83c3582ba4f69b8b06b324356fcba79ab17d1314fa0f91e4d40abbe960b62e7e57d752e2a0664d2121b2b741b1884e
+AUX hyphen-used-as-minus-sign.patch 2470 SHA256 6bb8466ac41d9de4cae0ea84508e0919cb99da24098c12c1517d23322c0a3f5f SHA512 05544e9f682bb6ccc1166182985ff4a4d19481ba555f63a0f030487ccc231cea9b2d1dfff83a95e9a2bcbf9d7dcc31cd331397cf84ef2ed253dac23fe9ecaa99 WHIRLPOOL f24fc7c8608ad9ab45cc0680923f90ebf0df5859f3b0a83e66cb2ed5f8ce7d390d9519a4ff559ef897abeac6aabb7cab895b8e4698957876b2b01c294704d70d
+AUX i7z-0.27.2-ncurses.patch 825 SHA256 0286dbda73a37b6c3300c98150eafdc23276c1dbebe17ee85659ee00a1457f57 SHA512 6bf1773ccdf8b310be575eccdbbe351db5661bb4fef2621d2cf46dac073c627f27441e3a879b558c607305a5d73d53ef3687c98d49a2f0db7a1048019bd41a1a WHIRLPOOL e96caaddf76932bc97f26c31de3d3352ba81df66c2a21e2a78bbe7d08c45a323db90bf68890977920cfdbbd5cfdbc415ca19953826efbeca6a5b4dddd2ece6dd
+AUX install-i7z_rw_registers.patch 802 SHA256 469b26bd44cd8d87c9aa11b3abf7884857447f66b5689e6228a77ae62ae392d1 SHA512 677df9ea9884d138f1eecb88b49ab96ac16f49cb63caf11fa63892940815e3c31e2170afadd0c73a2a571ff62b824be6109c0cda72779d76e03907da546f48d9 WHIRLPOOL 679cb65021c797c01b77472fb84a60fb93e5ee46dfcf7d08ef8033527444269919a0bacf7271f5abcb9f525dc4a36b0161c0f41eedc8c8d23d7070aff0c9c182
+AUX qt5.patch 365 SHA256 e52f2c47cdd071ffefab9550ba816100f1d1ea367654bd5752655aef9680bcd6 SHA512 fc38423e82f774aff588023b45154ea3bf3fd553ee6bc4261dcd0e7911d1d589754461a1734e0da969d03d6d94e2b844da6f09a388ce4508090d4ba5c75c7df0 WHIRLPOOL a7d82af960b539aacd6ce59e44ae4c1fd755141a4a7ce64d06ca3df9087ef6168a02675ee822971294729719e2fa16020324d4982bce9268499569f189648e8d
+AUX use_stdbool.patch 885 SHA256 8eb552d74fd4fda6cecbcf390843174d9c879f5c6b1459a9f7d3d1780cd9c351 SHA512 5df3d042a580268971e6da0878bd070d2054e9a9732b518a88a489d6b3d62acae58f697fe44634ee6c847b108cae25df6592ed9e1f20ea4d7c6b36adb516830d WHIRLPOOL 8132f9de4ca0ea788615267402072674b6af35798d706a0475ecc14f30952e90a9ca1b0c283dccb903072595c46b4ffdea8cb0b40d679dd66b08fe558631efa5
+DIST i7z-93_p20131012.tar.gz 879969 SHA256 e127bddf850e7febd39cef2d2b13dca5fe19cc2a1bb1099d72b683be5d8bd1c0 SHA512 ef2dfc36407b18a2081413d423cc3d38c38121e386d9068eee9a794b810232727b3abbd22d3b36bc32206f4dc89dd881a4550df19108c439a91f01369bf74d5a WHIRLPOOL f46d7c3ae19920315e68d6c3264d14613f457201e1107c07b6c74632fff13c1cdb75747add8f1618937c5b4430a476dfc5f5d30fc01df16579fd843e4516faab
+EBUILD i7z-93_p20131012-r1.ebuild 1480 SHA256 4fbeac2e00751f6ad017d6d143d943c2b5f79d86f8eb17f5e00b4933f441c749 SHA512 866ba126d0743b1ec3c5fb57cad73729d43be1b9a61417208bca19a6ef50df092bad82c772ed86234b6eb46d538e3729fa298ca02986999795ce34874c80a91e WHIRLPOOL 62a00f3197980bff8879ebbe0e69ca03481a94b38e8d1dcbb2f34c6b65f87befaed80757ac18e9a5d121eeed7a33d406fd8a644ea46989984b5ca92f0952f356
+MISC ChangeLog 4014 SHA256 64a3b023679bf9ea00d64abc77b8623e6a46f359ec67afa88a609a61812a4b62 SHA512 3da78548747d451e1d10377aebd303e07b794e4008bed35d4bc3e965b078b86da4fad9648a31eefb69285b0efac1079dba52c6664b95b2d5795f897eaec213d4 WHIRLPOOL e56ba8cd76c70f272e0fdddb23b7daff7c0fc865f0098f24f1492ee3fb0b996a6d280138e219833daa96287eb5d9131cfa51e730055242f59c2fd062644c7d8f
+MISC ChangeLog-2015 2822 SHA256 ec9e1b30916c1f1ab8b6f25768c798a8dcfd20d06303dea39afa55ad592da678 SHA512 5bac6a648afb861d3f15515a2fc00ef3749c6b8fcbe6c4cc173456d32c72403a2623cac16d27586d993317fed341e8231ffa66353f72e3c93b8bf2e701645762 WHIRLPOOL b28dc3a83e1f22ff810b77559ab25106c803047f11f69c61996b91b32c34cc26c22668905849289f8ff50c5ae98ed4ffecb316a2e1c063db54ef149f015d3ad9
+MISC metadata.xml 296 SHA256 72bf9740931ce4ae544571807aa69b16e4a502b3697156ada6510dc20c108493 SHA512 a73fd853e9d6da0d414da279e6fea520e9f1f1ff76c73295640be542ed81391871a83f30f5739271c7044692398182217e42b59d75fe65ad4c5d949015009668 WHIRLPOOL 72b17f382c9b6f33673c3d465920da662d41cb1183e148a47188d0c34f11f11ed5fa7f5a429728ff664f01be2cab3a437a893b1dfcb539b0e04e53ef5d298abf
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/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/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>