```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
--- a/libproxy/url.cpp 2012-02-28 21:05:15.572948027 +0000
|
|
+++ b/libproxy/url.cpp 2012-02-28 21:05:45.635937474 +0000
|
|
@@ -27,6 +27,7 @@
|
|
#define close _close
|
|
#endif
|
|
#include <fcntl.h> // For ::open()
|
|
+#include <unistd.h> // For ::read() and ::close()
|
|
#include <cstring> // For memcpy()
|
|
#include <sstream> // For int/string conversion (using stringstream)
|
|
#include <cstdio> // For sscanf()
|
|
--- a/libproxy/modules/config_sysconfig.cpp 2012-02-28 21:06:01.552943358 +0000
|
|
+++ b/libproxy/modules/config_sysconfig.cpp 2012-02-28 21:11:21.429953982 +0000
|
|
@@ -18,6 +18,7 @@
|
|
******************************************************************************/
|
|
|
|
#include <sys/stat.h>
|
|
+#include <unistd.h>
|
|
#include <cstdlib>
|
|
#include <map>
|
|
#include <fstream>
|
|
--- a/libproxy/modules/pacrunner_mozjs.cpp 2012-02-28 21:06:11.637943033 +0000
|
|
+++ b/libproxy/modules/pacrunner_mozjs.cpp 2012-02-28 21:11:46.560961409 +0000
|
|
@@ -17,6 +17,7 @@
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
******************************************************************************/
|
|
|
|
+#include <unistd.h> // for ::gethostname()
|
|
#include <cstring> // ?
|
|
|
|
#include "../extension_pacrunner.hpp"
|
|
--- a/libproxy/modules/pacrunner_webkit.cpp 2012-02-28 21:06:29.615943614 +0000
|
|
+++ b/libproxy/modules/pacrunner_webkit.cpp 2012-02-28 21:12:35.530965553 +0000
|
|
@@ -17,6 +17,7 @@
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
******************************************************************************/
|
|
|
|
+#include <unistd.h> // for ::gethostname()
|
|
#include "../extension_pacrunner.hpp"
|
|
using namespace libproxy;
|
|
|