aboutsummaryrefslogtreecommitdiffstats
path: root/devel/kdesvn-kde4
diff options
context:
space:
mode:
Diffstat (limited to 'devel/kdesvn-kde4')
-rw-r--r--devel/kdesvn-kde4/files/patch-CMakeLists.txt11
-rw-r--r--devel/kdesvn-kde4/files/patch-src-svnqt-path.cpp108
2 files changed, 119 insertions, 0 deletions
diff --git a/devel/kdesvn-kde4/files/patch-CMakeLists.txt b/devel/kdesvn-kde4/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..2471e06f7cd8
--- /dev/null
+++ b/devel/kdesvn-kde4/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig Sat Sep 30 05:45:15 2006
++++ CMakeLists.txt Sun Oct 8 23:18:36 2006
+@@ -30,7 +30,7 @@
+ ${CMAKE_BINARY_DIR}/src/svnfrontend
+ ${CMAKE_BINARY_DIR})
+
+-ADD_DEFINITIONS(${KDE3_DEFINITIONS} ${APR_CPP_FLAGS} ${QT_DEFINITIONS})
++ADD_DEFINITIONS(${KDE3_DEFINITIONS} ${QT_DEFINITIONS} ${APR_CPP_FLAGS})
+ SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+ SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/kde3)
+
diff --git a/devel/kdesvn-kde4/files/patch-src-svnqt-path.cpp b/devel/kdesvn-kde4/files/patch-src-svnqt-path.cpp
new file mode 100644
index 000000000000..680c6829458c
--- /dev/null
+++ b/devel/kdesvn-kde4/files/patch-src-svnqt-path.cpp
@@ -0,0 +1,108 @@
+--- src/svnqt/path.cpp.orig Tue Sep 26 05:32:24 2006
++++ src/svnqt/path.cpp Mon Oct 9 00:05:26 2006
+@@ -186,105 +186,6 @@
+ }
+ }
+
+- /* ===================================================================
+- * The next two Fixed_* functions are copies of the APR
+- * apr_temp_dir_get functionality with a fix applied.
+- * This should turn up in APR release 0.9.5 or 1.0, but
+- * for now is reproduced here.
+- *
+- * TODO: Remove this section!
+- */
+-#include "apr_env.h"
+-
+-#define test_tempdir Fixed_test_tempdir
+-#define apr_temp_dir_get Fixed_apr_temp_dir_get
+-
+- static char global_temp_dir[APR_PATH_MAX+1] = { 0 };
+-
+- /* Try to open a temporary file in the temporary dir, write to it,
+- and then close it. */
+- static int Fixed_test_tempdir(const char *temp_dir, apr_pool_t *p)
+- {
+- apr_file_t *dummy_file;
+- // This is the only actual fix - adding the ".XXXXXX"!
+- const char *path = apr_pstrcat(p, temp_dir, "/apr-tmp.XXXXXX", NULL);
+-
+- if (apr_file_mktemp(&dummy_file, (char *)path, 0, p) == APR_SUCCESS) {
+- if (apr_file_putc('!', dummy_file) == APR_SUCCESS) {
+- if (apr_file_close(dummy_file) == APR_SUCCESS) {
+- apr_file_remove(path, p);
+- return 1;
+- }
+- }
+- }
+- return 0;
+- }
+-
+- static apr_status_t Fixed_apr_temp_dir_get(const char **temp_dir, apr_pool_t *p)
+- {
+- apr_status_t apr_err;
+- const char *try_dirs[] = { "/tmp", "/usr/tmp", "/var/tmp" };
+- const char *try_envs[] = { "TMP", "TEMP", "TMPDIR" };
+- char *cwd;
+- size_t i;
+-
+- /* Our goal is to find a temporary directory suitable for writing
+- into. We'll only pay the price once if we're successful -- we
+- cache our successful find. Here's the order in which we'll try
+- various paths:
+-
+- $TMP
+- $TEMP
+- $TMPDIR
+- "/tmp"
+- "/var/tmp"
+- "/usr/tmp"
+- `pwd`
+-
+- NOTE: This algorithm is basically the same one used by Python
+- 2.2's tempfile.py module. */
+-
+- /* Try the environment first. */
+- for (i = 0; i < (sizeof(try_envs) / sizeof(const char *)); i++) {
+- char *value;
+- apr_err = apr_env_get(&value, try_envs[i], p);
+- if ((apr_err == APR_SUCCESS) && value) {
+- apr_size_t len = strlen(value);
+- if (len && (len < APR_PATH_MAX) && test_tempdir(value, p)) {
+- memcpy(global_temp_dir, value, len + 1);
+- goto end;
+- }
+- }
+- }
+-
+- /* Next, try a set of hard-coded paths. */
+- for (i = 0; i < (sizeof(try_dirs) / sizeof(const char *)); i++) {
+- if (test_tempdir(try_dirs[i], p)) {
+- memcpy(global_temp_dir, try_dirs[i], strlen(try_dirs[i]) + 1);
+- goto end;
+- }
+- }
+-
+- /* Finally, try the current working directory. */
+- if (APR_SUCCESS == apr_filepath_get(&cwd, APR_FILEPATH_NATIVE, p)) {
+- if (test_tempdir(cwd, p)) {
+- memcpy(global_temp_dir, cwd, strlen(cwd) + 1);
+- goto end;
+- }
+- }
+-
+-end:
+- if (global_temp_dir[0]) {
+- *temp_dir = apr_pstrdup(p, global_temp_dir);
+- return APR_SUCCESS;
+- }
+- return APR_EGENERAL;
+- }
+-
+- /* ===================================================================
+- * End of inserted fixed APR code
+- */
+-
+ Path
+ Path::getTempDir ()
+ {