[44499] trunk/dports/devel/subversion
dluke at macports.org
dluke at macports.org
Mon Dec 29 08:25:09 PST 2008
Revision: 44499
http://trac.macports.org/changeset/44499
Author: dluke at macports.org
Date: 2008-12-29 08:25:07 -0800 (Mon, 29 Dec 2008)
Log Message:
-----------
Add +unicode_path variant, fixes #17813 (see also http://subversion.tigris.org/issues/show_bug.cgi?id=2464)
Modified Paths:
--------------
trunk/dports/devel/subversion/Portfile
Added Paths:
-----------
trunk/dports/devel/subversion/files/patch-path.c.diff
Modified: trunk/dports/devel/subversion/Portfile
===================================================================
--- trunk/dports/devel/subversion/Portfile 2008-12-29 12:51:34 UTC (rev 44498)
+++ trunk/dports/devel/subversion/Portfile 2008-12-29 16:25:07 UTC (rev 44499)
@@ -108,6 +108,14 @@
}
}
+# see http://subversion.tigris.org/issues/show_bug.cgi?id=2464
+variant unicode_path description {Installs a hack to workaround MacOSX unicode path issues} {
+ patchfiles-append patch-path.c.diff
+ post-install {
+ ui_warn "This variant (+unicode_path) implements a hack to deal with composed/decomposed unicode handling on Mac OS X which is different from linux and windows. It is an implementation of solution 1 from http://svn.collab.net/repos/svn/trunk/notes/unicode-composition-for-filenames which _WILL_ break some setups. Please be sure you understand what you are asking for when you install this variant."
+ }
+ }
+
variant bash_completion {
depends_run-append port:bash-completion
post-destroot {
Added: trunk/dports/devel/subversion/files/patch-path.c.diff
===================================================================
--- trunk/dports/devel/subversion/files/patch-path.c.diff (rev 0)
+++ trunk/dports/devel/subversion/files/patch-path.c.diff 2008-12-29 16:25:07 UTC (rev 44499)
@@ -0,0 +1,57 @@
+--- subversion/libsvn_subr/path.c 2007-05-01 07:21:03.000000000 +0900
++++ subversion/libsvn_subr/path.c 2007-11-04 23:18:05.000000000 +0900
+@@ -31,6 +31,9 @@
+ #include "svn_io.h" /* for svn_io_stat() */
+ #include "svn_ctype.h"
+
++#if defined(DARWIN)
++#include <CoreFoundation/CoreFoundation.h>
++#endif /* DARWIN */
+
+ /* The canonical empty path. Can this be changed? Well, change the empty
+ test below and the path library will work, not so sure about the fs/wc
+@@ -1231,6 +1234,36 @@
+ apr_pool_t *pool)
+ {
+ svn_boolean_t path_is_utf8;
++#if defined(DARWIN)
++ svn_error_t *err;
++ /*
++ Compose any decomposed unicode characters precomposed one.
++ This will solve the problem that the 'svn status' command sometime
++ cannot recognize as same file when files suppose to be comtain
++ comopsed characters, like umlaut in some European language or
++ 'Daku-ten' in Japanese, and the files are added on windows machines
++ then you use svn on Mac OS X checking out the files.
++ */
++ CFMutableStringRef cfmsr = CFStringCreateMutable(NULL, 0);
++ CFStringAppendCString(cfmsr, path_apr, kCFStringEncodingUTF8);
++ CFStringNormalize(cfmsr, kCFStringNormalizationFormC);
++ CFIndex path_buff_size = 1 + CFStringGetMaximumSizeForEncoding(
++ CFStringGetLength(cfmsr), kCFStringEncodingUTF8);
++ char *path = apr_palloc(pool, path_buff_size);
++ CFStringGetCString(cfmsr, path, path_buff_size, kCFStringEncodingUTF8);
++
++ SVN_ERR(get_path_encoding(&path_is_utf8, pool));
++
++ if (path_is_utf8)
++ {
++ *path_utf8 = apr_pstrdup(pool, path);
++ err = SVN_NO_ERROR;
++ }
++ else
++ err = svn_utf_cstring_to_utf8(path_utf8, path, pool);
++ CFRelease(cfmsr);
++ return err;
++#else
+ SVN_ERR(get_path_encoding(&path_is_utf8, pool));
+ if (path_is_utf8)
+ {
+@@ -1239,6 +1272,7 @@
+ }
+ else
+ return svn_utf_cstring_to_utf8(path_utf8, path_apr, pool);
++#endif
+ }
+
+ svn_error_t *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081229/bded64b7/attachment.html>
More information about the macports-changes
mailing list