aboutsummaryrefslogtreecommitdiffstats
path: root/main/zsnes/zsnes-1.51-depbuild.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-01-25 16:43:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-01-25 16:43:57 +0000
commit9526ee659401dee7160f35cb62ded2779bcbbc99 (patch)
tree812ad73bde9c84dcc02a3acbc5db576369ca314a /main/zsnes/zsnes-1.51-depbuild.patch
parent05e09c1126a898b6d0af491fef0401bf53e297f8 (diff)
downloadaports-9526ee659401dee7160f35cb62ded2779bcbbc99.tar.bz2
aports-9526ee659401dee7160f35cb62ded2779bcbbc99.tar.xz
merged x11 repository into main
ref #255
Diffstat (limited to 'main/zsnes/zsnes-1.51-depbuild.patch')
-rw-r--r--main/zsnes/zsnes-1.51-depbuild.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/main/zsnes/zsnes-1.51-depbuild.patch b/main/zsnes/zsnes-1.51-depbuild.patch
new file mode 100644
index 0000000000..e2cc0d86f6
--- /dev/null
+++ b/main/zsnes/zsnes-1.51-depbuild.patch
@@ -0,0 +1,34 @@
+--- a/src/tools/depbuild.cpp Fri Nov 13 18:41:24 2009
++++ b/src/tools/depbuild.cpp Fri Nov 13 19:04:09 2009
+@@ -24,6 +24,9 @@
+ #include <iostream>
+ #include <string>
+ #include <cstdio>
++#include <cstdlib>
++#include <unistd.h>
++
+ using namespace std;
+
+ #include "fileutil.h"
+@@ -130,7 +133,20 @@
+ void dependency_calculate_asm(const char *filename)
+ {
+ string command = nasm + " " + nflags + " -M " + filename;
+- system(command.c_str());
++ FILE *fp = popen(command.c_str(), "r");
++ if (fp)
++ {
++ char line[256];
++ while (fgets(line, sizeof(line), fp)) //Process all lines of output
++ {
++ cout << line;
++ }
++ pclose(fp);
++ }
++ else
++ {
++ cerr << "Failed on: " << filename << "\n";
++ }
+ }
+
+ void dependency_calculate_psr(const char *filename)