[97028] trunk/dports/devel/subversion

dluke at macports.org dluke at macports.org
Fri Aug 24 12:48:23 PDT 2012


Revision: 97028
          https://trac.macports.org/changeset/97028
Author:   dluke at macports.org
Date:     2012-08-24 12:48:22 -0700 (Fri, 24 Aug 2012)
Log Message:
-----------
subversion: improved patch for unicode_path [from chris0 (at) lavabit.com]

Modified Paths:
--------------
    trunk/dports/devel/subversion/Portfile

Added Paths:
-----------
    trunk/dports/devel/subversion/files/patch-osx_unicode_precomp.diff

Removed Paths:
-------------
    trunk/dports/devel/subversion/files/patch-path.c.diff

Modified: trunk/dports/devel/subversion/Portfile
===================================================================
--- trunk/dports/devel/subversion/Portfile	2012-08-24 19:32:47 UTC (rev 97027)
+++ trunk/dports/devel/subversion/Portfile	2012-08-24 19:48:22 UTC (rev 97028)
@@ -4,7 +4,7 @@
 
 name			subversion
 version			1.7.6
-revision		1
+revision		2
 categories		devel
 platforms		darwin
 maintainers		geeklair.net:dluke blair
@@ -131,7 +131,7 @@
 
 # see http://subversion.tigris.org/issues/show_bug.cgi?id=2464
 variant unicode_path	description {Installs a hack to workaround Mac OS X unicode path issues} {
-			patchfiles-append patch-path.c.diff
+			patchfiles-append patch-osx_unicode_precomp.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."
 				}

Added: trunk/dports/devel/subversion/files/patch-osx_unicode_precomp.diff
===================================================================
--- trunk/dports/devel/subversion/files/patch-osx_unicode_precomp.diff	                        (rev 0)
+++ trunk/dports/devel/subversion/files/patch-osx_unicode_precomp.diff	2012-08-24 19:48:22 UTC (rev 97028)
@@ -0,0 +1,89 @@
+Index: subversion/libsvn_subr/path.c
+===================================================================
+--- subversion/libsvn_subr/path.orig.c	2011-01-17 21:45:39.000000000 +0000
++++ subversion/libsvn_subr/path.c	2012-01-07 19:06:36.000000000 +0000
+@@ -40,6 +40,9 @@
+ 
+ #include "dirent_uri.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
+@@ -1119,6 +1122,26 @@
+                          const char *path_apr,
+                          apr_pool_t *pool)
+ {
++#if defined(DARWIN)
++  /*
++    Convert any decomposed unicode characters into precomposed ones.
++    This will solve the problem that the 'svn status' command sometimes
++    cannot recognize as same file when files suppose to contain
++    composed 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);
++  path_apr = apr_palloc(pool, path_buff_size);
++  CFStringGetCString(cfmsr, path_apr, path_buff_size, kCFStringEncodingUTF8);
++  CFRelease(cfmsr);
++  *path_utf8 = path_apr;
++  return SVN_NO_ERROR;
++#else
+   svn_boolean_t path_is_utf8;
+   SVN_ERR(get_path_encoding(&path_is_utf8, pool));
+   if (path_is_utf8)
+@@ -1128,6 +1151,7 @@
+     }
+   else
+     return svn_utf_cstring_to_utf8(path_utf8, path_apr, pool);
++#endif
+ }
+ 
+ 
+Index: subversion/svn/proplist-cmd.c
+===================================================================
+--- subversion/svn/proplist-cmd.orig.c	2011-10-20 15:01:47.000000000 +0100
++++ subversion/svn/proplist-cmd.c	2012-01-07 18:04:32.000000000 +0000
+@@ -65,6 +65,10 @@
+     name_local = svn_dirent_local_style(path, pool);
+   else
+     name_local = path;
++#if defined(DARWIN)
++  if (! is_url)
++    SVN_ERR(svn_path_cstring_to_utf8(&name_local, name_local, pool));
++#endif
+ 
+   /* "<target ...>" */
+   svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "target",
+@@ -95,6 +99,10 @@
+     name_local = svn_dirent_local_style(path, pool);
+   else
+     name_local = path;
++#if defined(DARWIN)
++  if (! is_url)
++    SVN_ERR(svn_path_cstring_to_utf8(&name_local, name_local, pool));
++#endif
+ 
+   if (!opt_state->quiet)
+     SVN_ERR(svn_cmdline_printf(pool, _("Properties on '%s':\n"), name_local));
+Index: subversion/svn/status-cmd.c
+===================================================================
+--- subversion/svn/status-cmd.orig.c	2011-06-24 16:48:11.000000000 +0100
++++ subversion/svn/status-cmd.c	2012-01-07 17:46:45.000000000 +0000
+@@ -107,6 +107,9 @@
+ print_start_target_xml(const char *target, apr_pool_t *pool)
+ {
+   svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
++#if defined(DARWIN)
++  SVN_ERR(svn_path_cstring_to_utf8(&target, target, pool));
++#endif
+ 
+   svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "target",
+                         "path", target, NULL);

Deleted: trunk/dports/devel/subversion/files/patch-path.c.diff
===================================================================
--- trunk/dports/devel/subversion/files/patch-path.c.diff	2012-08-24 19:32:47 UTC (rev 97027)
+++ trunk/dports/devel/subversion/files/patch-path.c.diff	2012-08-24 19:48:22 UTC (rev 97028)
@@ -1,57 +0,0 @@
---- 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/20120824/f37d48b4/attachment.html>


More information about the macports-changes mailing list