diff --git a/subversion/01-make-build-directories.patch b/subversion/01-make-build-directories.patch new file mode 100644 index 00000000..68c4ad61 --- /dev/null +++ b/subversion/01-make-build-directories.patch @@ -0,0 +1,25 @@ +Create directories in build tree. + +From: David Rothenberger + + +--- + configure.ac | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e3dd4ac..5f9f3fa 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1497,6 +1497,11 @@ AC_DEFINE_UNQUOTED([SVN_BUILD_TARGET], "${target}", + [Defined to the config.guess name of the build target]) + + AC_OUTPUT ++if test "$abs_srcdir" != "$abs_builddir" ++then ++ AC_MSG_NOTICE([Creating build directories]) ++ (cd "$abs_srcdir"; find subversion tools contrib -type d) | xargs $MKDIR ++fi + + # ==== Print final messages to user ========================================== + diff --git a/subversion/02-fix-linking.patch b/subversion/02-fix-linking.patch new file mode 100644 index 00000000..4f82a300 --- /dev/null +++ b/subversion/02-fix-linking.patch @@ -0,0 +1,83 @@ +Fix linking for Cygwin. + +From: David Rothenberger + + +--- + build.conf | 26 +++++++++++++++++++++----- + 1 files changed, 21 insertions(+), 5 deletions(-) + +diff --git a/build.conf b/build.conf +index 39630c2..5136b41 100644 +--- a/build.conf ++++ b/build.conf +@@ -360,7 +360,7 @@ type = apache-mod + path = subversion/mod_dav_svn + sources = *.c reports/*.c posts/*.c + libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr +-nonlibs = apr aprutil ++ mod_dav httpd aprutil apr + install = apache-mod + msvc-libs = mod_dav.lib libhttpd.lib + +@@ -369,8 +369,9 @@ description = Subversion path-based authorization module for Apache + when = INSTALL_APACHE_MODS + type = apache-mod + path = subversion/mod_authz_svn +-nonlibs = mod_dav_svn apr aprutil + libs = libsvn_repos libsvn_subr ++ mod_dav httpd aprutil apr ++ mod_dav_svn + install = apache-mod + msvc-libs = libhttpd.lib + +@@ -379,8 +380,9 @@ description = Apache Httpd module to block certain kinds of Apache Subversion re + when = INSTALL_APACHE_MODS + type = apache-mod + path = tools/server-side/mod_dontdothat +-nonlibs = mod_dav_svn apr aprutil + libs = libsvn_subr xml ++ mod_dav httpd aprutil apr ++ mod_dav_svn + install = tools + msvc-libs = libhttpd.lib + +@@ -501,7 +503,7 @@ type = swig_lib + lang = python + path = subversion/bindings/swig/python/libsvn_swig_py + libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr +-link-cmd = $(LINK) ++link-cmd = $(LINK) $(SWIG_PY_LIBS) + install = swig-py-lib + # need special build rule to include -DSWIGPYTHON + compile-cmd = $(COMPILE_SWIG_PY) +@@ -512,7 +514,7 @@ msvc-static = no + type = swig_lib + lang = perl + path = subversion/bindings/swig/perl/libsvn_swig_perl +-libs = libsvn_delta libsvn_subr apriconv apr ++libs = libsvn_delta libsvn_subr apriconv apr perl + install = swig-pl-lib + # need special build rule to include + compile-cmd = $(COMPILE_SWIG_PL) +@@ -1205,6 +1207,20 @@ type = lib + external-lib = $(SVN_FS_LIB_LINK) + libs = libsvn_fs_base libsvn_fs_fs + ++[perl] ++type = lib ++external-lib = -L/usr/lib/perl5/5.14/i686-cygwin-threads-64int/CORE -lperl ++ ++[mod_dav] ++type = lib ++external-lib = -Wl,`$(APXS) -q libexecdir`/mod_dav.so ++libs = httpd aprutil apr ++ ++[httpd] ++type = lib ++external-lib = -lhttpd2core ++libs = aprutil apr ++ + [__ALL__] + type = project + path = build/win32 diff --git a/subversion/03-fix-linking-perl.patch b/subversion/03-fix-linking-perl.patch new file mode 100644 index 00000000..9f9f35f7 --- /dev/null +++ b/subversion/03-fix-linking-perl.patch @@ -0,0 +1,72 @@ +Fix linking for perl. + +From: David Rothenberger + + +--- + Makefile.in | 1 + + build.conf | 7 ++----- + build/ac-macros/swig.m4 | 6 ++++++ + 3 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 5ad1ecb..127b825 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -137,6 +137,7 @@ SWIG_PY_COMPILE = @SWIG_PY_COMPILE@ + SWIG_PY_LINK = @SWIG_PY_LINK@ + SWIG_PY_LIBS = @SWIG_PY_LIBS@ + SWIG_PL_INCLUDES = @SWIG_PL_INCLUDES@ ++SWIG_PL_LIBS = @SWIG_PL_LIBS@ + SWIG_RB_INCLUDES = @SWIG_RB_INCLUDES@ -I$(SWIG_SRC_DIR)/ruby/libsvn_swig_ruby + SWIG_RB_COMPILE = @SWIG_RB_COMPILE@ + SWIG_RB_LINK = @SWIG_RB_LINK@ +diff --git a/build.conf b/build.conf +index 5136b41..73b925d 100644 +--- a/build.conf ++++ b/build.conf +@@ -514,7 +514,8 @@ msvc-static = no + type = swig_lib + lang = perl + path = subversion/bindings/swig/perl/libsvn_swig_perl +-libs = libsvn_delta libsvn_subr apriconv apr perl ++libs = libsvn_delta libsvn_subr apriconv apr ++link-cmd = $(LINK) $(SWIG_PL_LIBS) + install = swig-pl-lib + # need special build rule to include + compile-cmd = $(COMPILE_SWIG_PL) +@@ -1207,10 +1208,6 @@ type = lib + external-lib = $(SVN_FS_LIB_LINK) + libs = libsvn_fs_base libsvn_fs_fs + +-[perl] +-type = lib +-external-lib = -L/usr/lib/perl5/5.14/i686-cygwin-threads-64int/CORE -lperl +- + [mod_dav] + type = lib + external-lib = -Wl,`$(APXS) -q libexecdir`/mod_dav.so +diff --git a/build/ac-macros/swig.m4 b/build/ac-macros/swig.m4 +index 70b829d..b73a935 100644 +--- a/build/ac-macros/swig.m4 ++++ b/build/ac-macros/swig.m4 +@@ -174,6 +174,11 @@ AC_DEFUN(SVN_FIND_SWIG, + AC_MSG_RESULT([$PERL_VERSION]) + if test "$PERL_VERSION" -ge "5008000"; then + SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`" ++ ++ AC_CACHE_CHECK([how to link Perl libraries], [ac_cv_perl_libs], [ ++ ac_cv_perl_libs="`$PERL -MExtUtils::Embed -e ldopts`" ++ ]) ++ SWIG_PL_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_perl_libs)`" + else + AC_MSG_WARN([perl bindings require perl 5.8.0 or newer.]) + fi +@@ -294,6 +299,7 @@ int main() + AC_SUBST(SWIG_PY_LINK) + AC_SUBST(SWIG_PY_LIBS) + AC_SUBST(SWIG_PL_INCLUDES) ++ AC_SUBST(SWIG_PL_LIBS) + AC_SUBST(SWIG_RB_LINK) + AC_SUBST(SWIG_RB_LIBS) + AC_SUBST(SWIG_RB_INCLUDES) diff --git a/subversion/04-fix-switch-tests.patch b/subversion/04-fix-switch-tests.patch new file mode 100644 index 00000000..bfc20db1 --- /dev/null +++ b/subversion/04-fix-switch-tests.patch @@ -0,0 +1,27 @@ +Fix a switch test that expects to an error due to read-only, but + +From: David Rothenberger + +doesn't because the user has Administrator privileges. +--- + subversion/tests/cmdline/switch_tests.py | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/subversion/tests/cmdline/switch_tests.py b/subversion/tests/cmdline/switch_tests.py +index 3f1e7ab..1881d9e 100755 +--- a/subversion/tests/cmdline/switch_tests.py ++++ b/subversion/tests/cmdline/switch_tests.py +@@ -967,6 +967,13 @@ def refresh_read_only_attribute(sbox): + if os.geteuid() == 0: + raise svntest.Skip + ++ # Same test, but for Cygwin ++ if os.name == 'posix': ++ try: ++ os.getgroups.index(513) ++ except: ++ raise svntest.Skip ++ + sbox.build() + wc_dir = sbox.wc_dir + diff --git a/subversion/05-retry-loop.patch b/subversion/05-retry-loop.patch new file mode 100644 index 00000000..89628c84 --- /dev/null +++ b/subversion/05-retry-loop.patch @@ -0,0 +1,96 @@ +Use WIN32 retry loop on Cygwin, too. + +From: David Rothenberger + + +--- + subversion/libsvn_subr/io.c | 25 +++++++++++++++++++++---- + 1 files changed, 21 insertions(+), 4 deletions(-) + +diff --git a/subversion/libsvn_subr/io.c b/subversion/libsvn_subr/io.c +index 7c17169..1b62056 100644 +--- a/subversion/libsvn_subr/io.c ++++ b/subversion/libsvn_subr/io.c +@@ -29,6 +29,10 @@ + #include + #endif + ++#ifdef __CYGWIN__ ++#include ++#endif ++ + #ifndef APR_STATUS_IS_EPERM + #include + #ifdef EPERM +@@ -134,6 +138,12 @@ + || os_err == ERROR_SHARING_VIOLATION \ + || os_err == ERROR_DIR_NOT_EMPTY), \ + 1) ++#elif defined(__CYGWIN__) ++#define WIN32_RETRY_LOOP(err, expr) \ ++ RETRY_LOOP(err, expr, (os_err == EBUSY \ ++ || os_err == EACCES \ ++ || os_err == ENOTEMPTY), \ ++ 1) + #else + #define WIN32_RETRY_LOOP(err, expr) ((void)0) + #endif +@@ -2268,6 +2278,7 @@ svn_io_remove_file2(const char *path, + || SVN__APR_STATUS_IS_ENOTDIR(apr_err)))) + return SVN_NO_ERROR; + ++#if defined(WIN32) || defined(__CYGWIN__) + #ifdef WIN32 + /* If the target is read only NTFS reports EACCESS and FAT/FAT32 + reports EEXIST */ +@@ -2281,11 +2292,15 @@ svn_io_remove_file2(const char *path, + if (!apr_err) + return SVN_NO_ERROR; + } +- ++#endif + { + apr_status_t os_err = APR_TO_OS_ERROR(apr_err); + /* Check to make sure we aren't trying to delete a directory */ ++#ifdef WIN32 + if (os_err == ERROR_ACCESS_DENIED || os_err == ERROR_SHARING_VIOLATION) ++#else ++ if (os_err == EACCES) ++#endif + { + apr_finfo_t finfo; + +@@ -3618,20 +3633,22 @@ svn_io_file_rename(const char *from_path, const char *to_path, + + status = apr_file_rename(from_path_apr, to_path_apr, pool); + +-#if defined(WIN32) || defined(__OS2__) ++#if defined(WIN32) || defined(__OS2__) || defined(__CYGWIN__) + /* If the target file is read only NTFS reports EACCESS and + FAT/FAT32 reports EEXIST */ + if (APR_STATUS_IS_EACCES(status) || APR_STATUS_IS_EEXIST(status)) + { ++#ifndef __CYGWIN__ + /* Set the destination file writable because Windows will not + allow us to rename when to_path is read-only, but will + allow renaming when from_path is read only. */ + SVN_ERR(svn_io_set_file_read_write(to_path, TRUE, pool)); ++#endif + + status = apr_file_rename(from_path_apr, to_path_apr, pool); + } + WIN32_RETRY_LOOP(status, apr_file_rename(from_path_apr, to_path_apr, pool)); +-#endif /* WIN32 || __OS2__ */ ++#endif /* WIN32 || __OS2__ || __CYGWIN__ */ + + if (status) + return svn_error_wrap_apr(status, _("Can't move '%s' to '%s'"), +@@ -3746,7 +3763,7 @@ dir_make(const char *path, apr_fileperms_t perm, + /* Windows does not implement sgid. Skip here because retrieving + the file permissions via APR_FINFO_PROT | APR_FINFO_OWNER is documented + to be 'incredibly expensive'. */ +-#ifndef WIN32 ++#if !defined(WIN32) && !defined(__CYGWIN__) + if (sgid) + { + apr_finfo_t finfo; diff --git a/subversion/06-svnadmin-binary-mode.patch b/subversion/06-svnadmin-binary-mode.patch new file mode 100644 index 00000000..3ea900ad --- /dev/null +++ b/subversion/06-svnadmin-binary-mode.patch @@ -0,0 +1,40 @@ +Use binary mode for svnadmin dump/load. + +From: David Rothenberger + + +--- + subversion/svnadmin/svnadmin.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/subversion/svnadmin/svnadmin.c b/subversion/svnadmin/svnadmin.c +index 84da948..db6eaa1 100644 +--- a/subversion/svnadmin/svnadmin.c ++++ b/subversion/svnadmin/svnadmin.c +@@ -49,6 +49,10 @@ + + #include "svn_private_config.h" + ++#include ++#include ++#include ++ + + /*** Code. ***/ + +@@ -998,6 +1002,7 @@ subcommand_dump(apr_getopt_t *os, void *baton, apr_pool_t *pool) + return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("First revision cannot be higher than second")); + ++ setmode(STDOUT_FILENO, O_BINARY); + SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool)); + + /* Progress feedback goes to STDERR, unless they asked to suppress it. */ +@@ -1183,6 +1188,7 @@ subcommand_load(apr_getopt_t *os, void *baton, apr_pool_t *pool) + SVN_ERR(open_repos(&repos, opt_state->repository_path, pool)); + + /* Read the stream from STDIN. Users can redirect a file. */ ++ setmode(STDIN_FILENO, O_BINARY); + SVN_ERR(svn_stream_for_stdin(&stdin_stream, pool)); + + /* Progress feedback goes to STDOUT, unless they asked to suppress it. */ diff --git a/subversion/07-fix-path-tests.patch b/subversion/07-fix-path-tests.patch new file mode 100644 index 00000000..d7632165 --- /dev/null +++ b/subversion/07-fix-path-tests.patch @@ -0,0 +1,650 @@ +Don't support DOS paths for Cygwin. + +From: David Rothenberger + +* But do support a little UNC. +--- + subversion/libsvn_subr/dirent_uri.c | 55 +++++--- + subversion/tests/libsvn_subr/dirent_uri-test.c | 159 +++++++++++++++++++++--- + subversion/tests/libsvn_subr/path-test.c | 10 +- + 3 files changed, 181 insertions(+), 43 deletions(-) + +diff --git a/subversion/libsvn_subr/dirent_uri.c b/subversion/libsvn_subr/dirent_uri.c +index 2b51e7a..323f886 100644 +--- a/subversion/libsvn_subr/dirent_uri.c ++++ b/subversion/libsvn_subr/dirent_uri.c +@@ -54,7 +54,7 @@ + + /* This check must match the check on top of dirent_uri-tests.c and + path-tests.c */ +-#if defined(WIN32) || defined(__CYGWIN__) || defined(__OS2__) ++#if defined(WIN32) || defined(__OS2__) + #define SVN_USE_DOS_PATHS + #endif + +@@ -123,6 +123,7 @@ canonicalize_to_upper(char c) + static apr_size_t + dirent_root_length(const char *dirent, apr_size_t len) + { ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + #ifdef SVN_USE_DOS_PATHS + if (len >= 2 && dirent[1] == ':' && + ((dirent[0] >= 'A' && dirent[0] <= 'Z') || +@@ -130,6 +131,7 @@ dirent_root_length(const char *dirent, apr_size_t len) + { + return (len > 2 && dirent[2] == '/') ? 3 : 2; + } ++#endif + + if (len > 2 && dirent[0] == '/' && dirent[1] == '/') + { +@@ -139,7 +141,7 @@ dirent_root_length(const char *dirent, apr_size_t len) + i++; + + if (i == len) +- return len; /* Cygwin drive alias, invalid path on WIN32 */ ++ return 1; + + i++; /* Skip '/' */ + +@@ -437,7 +439,7 @@ canonicalize(path_type_t type, const char *path, apr_pool_t *pool) + { + *(dst++) = *(src++); + +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + /* On Windows permit two leading separator characters which means an + * UNC path. */ + if ((type == type_dirent) && *src == '/') +@@ -533,7 +535,7 @@ canonicalize(path_type_t type, const char *path, apr_pool_t *pool) + + *dst = '\0'; + +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + /* Skip leading double slashes when there are less than 2 + * canon segments. UNC paths *MUST* have two segments. */ + if ((type == type_dirent) && canon[0] == '/' && canon[1] == '/') +@@ -667,7 +669,7 @@ get_longest_ancestor_length(path_type_t types, + apr_size_t path1_len, path2_len; + apr_size_t i = 0; + apr_size_t last_dirsep = 0; +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + svn_boolean_t unc = FALSE; + #endif + +@@ -700,7 +702,7 @@ get_longest_ancestor_length(path_type_t types, + return 0; + + /* Handle some windows specific cases */ +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + if (types == type_dirent) + { + /* don't count the '//' from UNC paths */ +@@ -710,6 +712,7 @@ get_longest_ancestor_length(path_type_t types, + unc = TRUE; + } + ++#ifdef SVN_USE_DOS_PATHS + /* X:/ and X:/foo */ + if (i == 3 && path1[2] == '/' && path1[1] == ':') + return i; +@@ -727,8 +730,9 @@ get_longest_ancestor_length(path_type_t types, + /* X: and X:foo */ + if (path1[i - 1] == ':' || path2[i - 1] == ':') + return i; +- } + #endif /* SVN_USE_DOS_PATHS */ ++ } ++#endif /* defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) */ + + /* last_dirsep is now the offset of the last directory separator we + crossed before reaching a non-matching byte. i is the offset of +@@ -743,18 +747,20 @@ get_longest_ancestor_length(path_type_t types, + { + /* Nothing in common but the root folder '/' or 'X:/' for Windows + dirents. */ +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + if (! unc) + { ++#ifdef SVN_USE_DOS_PATHS + /* X:/foo and X:/bar returns X:/ */ + if ((types == type_dirent) && + last_dirsep == 2 && path1[1] == ':' && path1[2] == '/' + && path2[1] == ':' && path2[2] == '/') + return 3; + #endif /* SVN_USE_DOS_PATHS */ ++#endif /* defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) */ + if (last_dirsep == 0 && path1[0] == '/' && path2[0] == '/') + return 1; +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + } + #endif + } +@@ -912,7 +918,8 @@ svn_relpath__internal_style(const char *relpath, + svn_boolean_t + svn_dirent_is_root(const char *dirent, apr_size_t len) + { +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(__CYGWIN__) ++#ifndef __CYGWIN__ + /* On Windows and Cygwin, 'H:' or 'H:/' (where 'H' is any letter) + are also root directories */ + if ((len == 2 || ((len == 3) && (dirent[2] == '/'))) && +@@ -920,9 +927,9 @@ svn_dirent_is_root(const char *dirent, apr_size_t len) + ((dirent[0] >= 'A' && dirent[0] <= 'Z') || + (dirent[0] >= 'a' && dirent[0] <= 'z'))) + return TRUE; ++#endif + +- /* On Windows and Cygwin //server/share is a root directory, +- and on Cygwin //drive is a drive alias */ ++ /* On Windows and Cygwin //server/share is a root directory */ + if (len >= 2 && dirent[0] == '/' && dirent[1] == '/' + && dirent[len - 1] != '/') + { +@@ -937,11 +944,7 @@ svn_dirent_is_root(const char *dirent, apr_size_t len) + return FALSE; + } + } +-#ifdef __CYGWIN__ +- return (segments <= 1); +-#else + return (segments == 1); /* //drive is invalid on plain Windows */ +-#endif + } + #endif + +@@ -1655,7 +1658,7 @@ svn_dirent_is_canonical(const char *dirent, apr_pool_t *scratch_pool) + if (*ptr == '/') + { + ptr++; +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + /* Check for UNC paths */ + if (*ptr == '/') + { +@@ -2335,7 +2338,7 @@ svn_uri_get_dirent_from_file_url(const char **dirent, + + /* Duplicate the URL, starting at the top of the path. + At the same time, we URI-decode the path. */ +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + /* On Windows, we'll typically have to skip the leading / if the + path starts with a drive letter. Like most Web browsers, We + support two variants of this scheme: +@@ -2352,10 +2355,11 @@ svn_uri_get_dirent_from_file_url(const char **dirent, + even if the path looks like it starts with a drive letter. + */ + { +- static const char valid_drive_letters[] = +- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + /* Casting away const! */ + char *dup_path = (char *)svn_path_uri_decode(path, pool); ++#ifdef SVN_USE_DOS_PATHS ++ static const char valid_drive_letters[] = ++ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + + /* This check assumes ':' and '|' are already decoded! */ + if (!hostname && dup_path[1] && strchr(valid_drive_letters, dup_path[1]) +@@ -2383,6 +2387,7 @@ svn_uri_get_dirent_from_file_url(const char **dirent, + } + } + } ++#endif + if (hostname) + { + if (dup_path[0] == '/' && dup_path[1] == '\0') +@@ -2396,7 +2401,7 @@ svn_uri_get_dirent_from_file_url(const char **dirent, + else + *dirent = dup_path; + } +-#else /* !SVN_USE_DOS_PATHS */ ++#else /* !(defined(SVN_USE_DOS_PATHS) || defined(CYGWIN)) */ + /* Currently, the only hostnames we are allowing on non-Win32 platforms + are the empty string and 'localhost'. */ + if (hostname) +@@ -2424,7 +2429,15 @@ svn_uri_get_file_url_from_dirent(const char **url, + if (dirent[0] == '/' && dirent[1] == '\0') + dirent = NULL; /* "file://" is the canonical form of "file:///" */ + ++#ifdef CYGWIN ++ if (dirent != NULL && dirent[0] == '/' && dirent[1] == '/') ++ /* Handle UNC paths //server/share -> file://server/share */ ++ *url = apr_pstrcat(pool, "file:", dirent, NULL); ++ else ++ *url = apr_pstrcat(pool, "file://", dirent, (char *)NULL); ++#else + *url = apr_pstrcat(pool, "file://", dirent, (char *)NULL); ++#endif + #else + if (dirent[0] == '/') + { +diff --git a/subversion/tests/libsvn_subr/dirent_uri-test.c b/subversion/tests/libsvn_subr/dirent_uri-test.c +index 1ebf55c..d21d414 100644 +--- a/subversion/tests/libsvn_subr/dirent_uri-test.c ++++ b/subversion/tests/libsvn_subr/dirent_uri-test.c +@@ -43,7 +43,7 @@ + #define SVN_EMPTY_PATH "" + + /* This check must match the check on top of dirent_uri.c and path-tests.c */ +-#if defined(WIN32) || defined(__CYGWIN__) || defined(__OS2__) ++#if defined(WIN32) || defined(__OS2__) + #define SVN_USE_DOS_PATHS + #endif + +@@ -63,7 +63,7 @@ test_dirent_is_root(apr_pool_t *pool) + { "/foo/bar", FALSE }, + { "/foo", FALSE }, + { "", FALSE }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "X:/foo", FALSE }, + { "X:/", TRUE }, + { "X:foo", FALSE }, /* Based on non absolute root */ +@@ -72,6 +72,14 @@ test_dirent_is_root(apr_pool_t *pool) + { "//srv/shr/fld", FALSE }, + { "//srv/s r", TRUE }, + { "//srv/s r/fld", FALSE }, ++#elif defined(CYGWIN) ++ { "/", TRUE }, ++ { "/X:foo", FALSE }, ++ { "/X:", FALSE }, ++ { "//srv/shr", TRUE }, ++ { "//srv/shr/fld", FALSE }, ++ { "//srv/s r", TRUE }, ++ { "//srv/s r/fld", FALSE }, + #else /* !SVN_USE_DOS_PATHS */ + { "/", TRUE }, + { "/X:foo", FALSE }, +@@ -143,7 +151,7 @@ test_dirent_is_absolute(apr_pool_t *pool) + { "foo/bar", FALSE }, + { "foo", FALSE }, + { "", FALSE }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "/foo/bar", FALSE }, + { "/foo", FALSE }, + { "/", FALSE }, +@@ -155,6 +163,18 @@ test_dirent_is_absolute(apr_pool_t *pool) + { "//srv/shr/fld", TRUE }, + { "//srv/s r", TRUE }, + { "//srv/s r/fld", TRUE }, ++#elif defined(CYGWIN) ++ { "/foo/bar", TRUE }, ++ { "/foo", TRUE }, ++ { "/", TRUE }, ++ { "C:/foo", FALSE }, ++ { "C:/", FALSE }, ++ { "c:/", FALSE }, ++ { "c:/foo", FALSE }, ++ { "//srv/shr", TRUE }, ++ { "//srv/shr/fld", TRUE }, ++ { "//srv/s r", TRUE }, ++ { "//srv/s r/fld", TRUE }, + #else /* !SVN_USE_DOS_PATHS */ + { "/foo/bar", TRUE }, + { "/foo", TRUE }, +@@ -226,7 +246,7 @@ test_dirent_join(apr_pool_t *pool) + { SVN_EMPTY_PATH, "/abc", "/abc" }, + { SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_EMPTY_PATH }, + { "/", "/", "/" }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "X:/", SVN_EMPTY_PATH, "X:/" }, + { "X:/", "abc", "X:/abc" }, + { "X:/", "/def", "X:/def" }, +@@ -249,6 +269,14 @@ test_dirent_join(apr_pool_t *pool) + { "aa", "A:", "A:" }, + { "aa", "A:file", "A:file"}, + { "A:", "/", "A:/" }, ++#elif defined(CYGWIN) ++ { "X:abc", "X:/def", "X:abc/X:/def" }, ++ { "X:","abc", "X:/abc" }, ++ { "X:/abc", "X:/def", "X:/abc/X:/def" }, ++ { "//srv/shr", "fld", "//srv/shr/fld" }, ++ { "//srv/shr/fld", "subfld", "//srv/shr/fld/subfld" }, ++ { "//srv/shr/fld", "//srv/shr", "//srv/shr" }, ++ { "//srv/s r", "fld", "//srv/s r/fld" }, + #else /* !SVN_USE_DOS_PATHS */ + { "X:abc", "X:/def", "X:abc/X:/def" }, + { "X:","abc", "X:/abc" }, +@@ -317,7 +345,7 @@ test_dirent_join(apr_pool_t *pool) + TEST_MANY((pool, SVN_EMPTY_PATH, "/", SVN_EMPTY_PATH, NULL), "/"); + TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "/", NULL), "/"); + +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + TEST_MANY((pool, "X:/", "def", "ghi", NULL), "X:/def/ghi"); + TEST_MANY((pool, "abc", "X:/", "ghi", NULL), "X:/ghi"); + TEST_MANY((pool, "abc", "def", "X:/", NULL), "X:/"); +@@ -345,7 +373,17 @@ test_dirent_join(apr_pool_t *pool) + + TEST_MANY((pool, "abcd", "/dir", "A:", "file", NULL), "A:file"); + TEST_MANY((pool, "abcd", "A:", "/dir", "file", NULL), "A:/dir/file"); +- ++#elif defined(CYGWIN) ++ TEST_MANY((pool, "X:", "def", "ghi", NULL), "X:/def/ghi"); ++ TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", NULL), "X:/ghi"); ++ TEST_MANY((pool, "X:", "def", SVN_EMPTY_PATH, NULL), "X:/def"); ++ TEST_MANY((pool, SVN_EMPTY_PATH, "X:", "ghi", NULL), "X:/ghi"); ++ TEST_MANY((pool, "//srv/shr", "def", "ghi", NULL), "//srv/shr/def/ghi"); ++ TEST_MANY((pool, "//srv/shr/fld", "def", "ghi", NULL), "//srv/shr/fld/def/ghi"); ++ TEST_MANY((pool, "//srv/shr/fld", "def", "//srv/shr", NULL), "//srv/shr"); ++ TEST_MANY((pool, "//srv/s r/fld", "def", "//srv/s r", NULL), "//srv/s r"); ++ TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "ghi", NULL), "//srv/shr/fld/def/ghi"); ++ TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "//srv/shr", NULL), "//srv/shr"); + #else /* !SVN_USE_DOS_PATHS */ + TEST_MANY((pool, "X:", "def", "ghi", NULL), "X:/def/ghi"); + TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", NULL), "X:/ghi"); +@@ -421,7 +459,7 @@ test_dirent_basename(apr_pool_t *pool) + { "/", "" }, + { SVN_EMPTY_PATH, SVN_EMPTY_PATH }, + { "X:/abc", "abc" }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "X:", "" }, + { "X:/", "" }, + { "X:abc", "abc" }, +@@ -429,6 +467,13 @@ test_dirent_basename(apr_pool_t *pool) + { "//srv/shr/fld", "fld" }, + { "//srv/shr/fld/subfld", "subfld" }, + { "//srv/s r/fld", "fld" }, ++#elif defined(CYGWIN) ++ { "X:", "X:" }, ++ { "X:abc", "X:abc" }, ++ { "//srv/shr", "" }, ++ { "//srv/shr/fld", "fld" }, ++ { "//srv/shr/fld/subfld", "subfld" }, ++ { "//srv/s r/fld", "fld" }, + #else /* !SVN_USE_DOS_PATHS */ + { "X:", "X:" }, + { "X:abc", "X:abc" }, +@@ -538,7 +583,7 @@ test_dirent_dirname(apr_pool_t *pool) + { "/", "/" }, + { SVN_EMPTY_PATH, SVN_EMPTY_PATH }, + { "X:abc/def", "X:abc" }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "X:/", "X:/" }, + { "X:/abc", "X:/" }, + { "X:abc", "X:" }, +@@ -547,6 +592,14 @@ test_dirent_dirname(apr_pool_t *pool) + { "//srv/shr/fld", "//srv/shr" }, + { "//srv/shr/fld/subfld", "//srv/shr/fld" }, + { "//srv/s r/fld", "//srv/s r" }, ++#elif defined(CYGWIN) ++ /* on non-Windows platforms, ':' is allowed in pathnames */ ++ { "X:", "" }, ++ { "X:abc", "" }, ++ { "//srv/shr", "//srv/shr" }, ++ { "//srv/shr/fld", "//srv/shr" }, ++ { "//srv/shr/fld/subfld", "//srv/shr/fld" }, ++ { "//srv/s r/fld", "//srv/s r" }, + #else /* !SVN_USE_DOS_PATHS */ + /* on non-Windows platforms, ':' is allowed in pathnames */ + { "X:", "" }, +@@ -693,7 +746,9 @@ test_dirent_canonicalize(apr_pool_t *pool) + { "x:/", "X:/" }, + { "x:", "X:" }, + { "x:AAAAA", "X:AAAAA" }, +- /* We permit UNC dirents on Windows. By definition UNC ++#endif /* SVN_USE_DOS_PATHS */ ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) ++ /* We permit UNC dirents on Windows and Cygwin. By definition UNC + * dirents must have two components so we should remove the + * double slash if there is only one component. */ + { "//hst/foo", "//hst/foo" }, +@@ -704,7 +759,7 @@ test_dirent_canonicalize(apr_pool_t *pool) + { "//SERVER/SHare/", "//server/SHare" }, + { "//srv/s r", "//srv/s r" }, + { "//srv/s r/qq", "//srv/s r/qq" }, +-#endif /* SVN_USE_DOS_PATHS */ ++#endif /* defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) */ + }; + + for (t = tests; t < tests + COUNT_OF(tests); t++) +@@ -1042,7 +1097,7 @@ test_dirent_is_canonical(apr_pool_t *pool) + { "X:foo", TRUE }, + { "X:foo/", FALSE }, + { "file with spaces", TRUE }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "X:/", TRUE }, + { "X:/foo", TRUE }, + { "X:", TRUE }, +@@ -1061,6 +1116,22 @@ test_dirent_is_canonical(apr_pool_t *pool) + { "//server/SHare", TRUE }, + { "//SERVER/SHare", FALSE }, + { "//srv/SH RE", TRUE }, ++#elif defined(CYGWIN) ++ { "X:/", FALSE }, ++ /* Some people use colons in their filenames. */ ++ { ":", TRUE }, ++ { ".:", TRUE }, ++ { "foo/.:", TRUE }, ++ /* We permit UNC dirents on Cygwin. By definition UNC ++ * dirents must have two components so we should remove the ++ * double slash if there is only one component. */ ++ { "//hst", FALSE }, ++ { "//hst/./", FALSE }, ++ { "//server/share/", FALSE }, ++ { "//server/share", TRUE }, ++ { "//server/SHare", TRUE }, ++ { "//SERVER/SHare", FALSE }, ++ { "//srv/SH RE", TRUE }, + #else /* !SVN_USE_DOS_PATHS */ + { "X:/", FALSE }, + /* Some people use colons in their filenames. */ +@@ -1237,13 +1308,18 @@ test_dirent_split(apr_pool_t *pool) + { "/", "/", "" }, + { "X:/foo/bar", "X:/foo", "bar" }, + { "X:foo/bar", "X:foo", "bar" }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "X:/", "X:/", "" }, + { "X:/foo", "X:/", "foo" }, + { "X:foo", "X:", "foo" }, + { "//srv/shr", "//srv/shr", "" }, + { "//srv/shr/fld", "//srv/shr", "fld" }, + { "//srv/s r", "//srv/s r", "" }, ++#elif defined(CYGWIN) ++ { "X:foo", SVN_EMPTY_PATH, "X:foo" }, ++ { "//srv/shr", "//srv/shr", "" }, ++ { "//srv/shr/fld", "//srv/shr", "fld" }, ++ { "//srv/s r", "//srv/s r", "" }, + #else /* !SVN_USE_DOS_PATHS */ + { "X:foo", SVN_EMPTY_PATH, "X:foo" }, + #endif /* SVN_USE_DOS_PATHS */ +@@ -1383,7 +1459,7 @@ static const testcase_ancestor_t dirent_ancestor_tests[] = + { "/foo/bar/zig", "/foo", NULL }, + { "/foo/bar/zig", "/foo/ba", NULL }, + { "/foo/bar/zig", "/foo/bar/zi", NULL }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "", "C:", NULL }, + { "", "C:foo", NULL }, + { "", "C:/", NULL }, +@@ -1417,6 +1493,21 @@ static const testcase_ancestor_t dirent_ancestor_tests[] = + { "//srv/shr/fld", "//srv2/shr/fld", NULL }, + { "//srv/shr/fld", "//srv/shr/f", NULL }, + { "/", "//srv/share", NULL }, ++#elif defined(CYGWIN) ++ { "", "C:", "C:" }, ++ { "", "C:/foo", "C:/foo" }, ++ { "X:", "X:foo", NULL }, ++ { "//srv", "//srv/share", NULL }, ++ { "//srv", "//srv/shr/fld", NULL }, ++ { "//srv/shr", "//srv", NULL }, ++ { "//srv/share", "//vrs/share", NULL }, ++ { "//srv/share", "//srv/share/foo", "foo" }, ++ { "//srv/shr", "//srv/shr/fld", "fld" }, ++ { "//srv/s r", "//srv/s r/fld", "fld" }, ++ { "//srv/shr/fld", "//srv/shr", NULL }, ++ { "//srv/shr/fld", "//srv2/shr/fld", NULL }, ++ { "//srv/shr/fld", "//srv/shr/f", NULL }, ++ { "/", "//srv/share", NULL }, + #else /* !SVN_USE_DOS_PATHS */ + { "", "C:", "C:" }, + { "", "C:/foo", "C:/foo" }, +@@ -1604,7 +1695,7 @@ test_dirent_get_longest_ancestor(apr_pool_t *pool) + { "/", "/", "/"}, + { "X:foo", "Y:foo", SVN_EMPTY_PATH}, + { "X:/folder1", "Y:/folder2", SVN_EMPTY_PATH}, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "X:/", "X:/", "X:/"}, + { "X:/foo/bar/A/D/H/psi", "X:/foo/bar/A/B", "X:/foo/bar/A" }, + { "X:/foo/bar/boo", "X:/foo/bar/baz/boz", "X:/foo/bar"}, +@@ -1618,6 +1709,14 @@ test_dirent_get_longest_ancestor(apr_pool_t *pool) + { "X:", "X:foo", "X:"}, + { "X:", "X:/", SVN_EMPTY_PATH}, + { "X:foo", "X:bar", "X:"}, ++#elif defined(CYGWIN) ++ { "X:/foo", "X:", "X:"}, ++ { "X:/folder1", "X:/folder2", "X:"}, ++ { "X:", "X:foo", SVN_EMPTY_PATH}, ++ { "X:foo", "X:bar", SVN_EMPTY_PATH}, ++ { "//srv/shr", "//srv/shr/fld", "//srv/shr" }, ++ { "//srv/shr/fld", "//srv/shr", "//srv/shr" }, ++ { "//srv/shr/fld", "//srv2/shr/fld", SVN_EMPTY_PATH }, + #else /* !SVN_USE_DOS_PATHS */ + { "X:/foo", "X:", "X:"}, + { "X:/folder1", "X:/folder2", "X:"}, +@@ -1763,11 +1862,13 @@ test_dirent_is_child(apr_pool_t *pool) + ".foo", + "/", + "foo2", +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + "//srv", + "//srv2", + "//srv/shr", + "//srv/shr/fld", ++#endif ++#ifdef SVN_USE_DOS_PATHS + "H:/foo/bar", + "H:/foo/baz", + "H:/foo/bar/baz", +@@ -1809,7 +1910,7 @@ test_dirent_is_child(apr_pool_t *pool) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + /* //srv paths */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, "shr", "shr/fld", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, +@@ -1819,6 +1920,8 @@ test_dirent_is_child(apr_pool_t *pool) + 0, 0, 0, "fld", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, ++#endif ++#ifdef SVN_USE_DOS_PATHS + /* H:/ paths */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, "baz", 0, "baz/bing/boom", 0, 0, 0, 0, 0 }, +@@ -2187,13 +2290,19 @@ test_dirent_local_style(apr_pool_t *pool) + } tests[] = { + { "", "." }, + { ".", "." }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "A:/", "A:\\" }, + { "A:/file", "A:\\file" }, + { "dir/file", "dir\\file" }, + { "/", "\\" }, + { "//server/share/dir", "\\\\server\\share\\dir" }, + { "//server/sh re/dir", "\\\\server\\sh re\\dir" }, ++#elif defined(CYGWIN) ++ { "a:/file", "a:/file" }, ++ { "dir/file", "dir/file" }, ++ { "/", "/" }, ++ { "//server/share/dir", "//server/share/dir" }, ++ { "//server/sh re/dir", "//server/sh re/dir" }, + #else + { "a:/file", "a:/file" }, + { "dir/file", "dir/file" }, +@@ -2229,7 +2338,7 @@ test_dirent_internal_style(apr_pool_t *pool) + { "file", "file" }, + { "dir/file", "dir/file" }, + { "dir/file/./.", "dir/file" }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "A:\\", "A:/" }, + { "A:\\file", "A:/file" }, + { "A:file", "A:file" }, +@@ -2244,6 +2353,14 @@ test_dirent_internal_style(apr_pool_t *pool) + { "//srv/shr", "//srv/shr" }, + { "//srv/s r", "//srv/s r" }, + { "//srv/s r", "//srv/s r" }, ++#elif defined(CYGWIN) ++ { "a:/", "a:" }, /* Wrong but expected for svn_path_*() */ ++ { "a:/file", "a:/file" }, ++ { "dir/file", "dir/file" }, ++ { "/", "/" }, ++ { "//srv/shr", "//srv/shr" }, ++ { "//srv/s r", "//srv/s r" }, ++ { "//srv/s r", "//srv/s r" }, + #else + { "a:/", "a:" }, /* Wrong but expected for svn_path_*() */ + { "a:/file", "a:/file" }, +@@ -2315,9 +2432,11 @@ test_dirent_from_file_url(apr_pool_t *pool) + { "file://localhost", "/" }, + { "file://localhost/dir", "/dir" }, + { "file://localhost/dir/path", "/dir/path" }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) || defined(CYGWIN) + { "file://server/share", "//server/share" }, + { "file://server/share/dir", "//server/share/dir" }, ++#endif ++#ifdef SVN_USE_DOS_PATHS + { "file:///A:", "A:/" }, + { "file:///A:/dir", "A:/dir" }, + { "file:///A:dir", "A:dir" }, +@@ -2351,7 +2470,7 @@ test_dirent_from_file_url_errors(apr_pool_t *pool) + /* error if scheme is not "file" */ + "http://localhost/dir", + "file+ssh://localhost/dir", +-#ifndef SVN_USE_DOS_PATHS ++#if !(defined(SVN_USE_DOS_PATHS) || defined(CYGWIN)) + "file://localhostwrongname/dir", /* error if host name not "localhost" */ + #endif + }; +diff --git a/subversion/tests/libsvn_subr/path-test.c b/subversion/tests/libsvn_subr/path-test.c +index ec35176..6d1471b 100644 +--- a/subversion/tests/libsvn_subr/path-test.c ++++ b/subversion/tests/libsvn_subr/path-test.c +@@ -53,7 +53,7 @@ + + /* This check must match the check on top of dirent_uri.c and + dirent_uri-tests.c */ +-#if defined(WIN32) || defined(__CYGWIN__) || defined(__OS2__) ++#if defined(WIN32) || defined(__OS2__) + #define SVN_USE_DOS_PATHS + #endif + +@@ -1437,12 +1437,18 @@ test_path_internal_style(apr_pool_t *pool) + { ".", "" }, + { "http://host/dir", "http://host/dir" }, + { "/", "/" }, +-#ifdef SVN_USE_DOS_PATHS ++#if defined(SVN_USE_DOS_PATHS) + { "a:\\", "A:/" }, + { "a:\\file", "A:/file" }, + { "dir\\file", "dir/file" }, + { "\\", "/" }, + { "\\\\server/share/dir", "//server/share/dir" }, ++#elif defined(CYGWIN) ++ { "a:/", "a:" }, ++ { "a:/file", "a:/file" }, ++ { "dir/file", "dir/file" }, ++ { "/", "/" }, ++ { "//server/share/dir", "//server/share/dir" }, + #else + { "a:/", "a:" }, + { "a:/file", "a:/file" }, diff --git a/subversion/08-ruby-test-fix.patch b/subversion/08-ruby-test-fix.patch new file mode 100644 index 00000000..16316dc9 --- /dev/null +++ b/subversion/08-ruby-test-fix.patch @@ -0,0 +1,40 @@ +Fix ruby tests. + +From: David Rothenberger + + +--- + subversion/bindings/swig/ruby/svn/util.rb | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/subversion/bindings/swig/ruby/svn/util.rb b/subversion/bindings/swig/ruby/svn/util.rb +index 8e05367..7fdf9ec 100644 +--- a/subversion/bindings/swig/ruby/svn/util.rb ++++ b/subversion/bindings/swig/ruby/svn/util.rb +@@ -17,7 +17,7 @@ + # under the License. + # ==================================================================== + +-if /cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM) ++if /mingw|mswin32|bccwin32/.match(RUBY_PLATFORM) + $LOAD_PATH.each do |load_path| + svn_ext_path = File.join(load_path, "svn", "ext") + if File.exists?(svn_ext_path) +@@ -115,7 +115,7 @@ EOC + end + + def reset_message_directory +- if /cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM) ++ if /mingw|mswin32|bccwin32/.match(RUBY_PLATFORM) + top_directory = File.join(File.dirname(__FILE__), "..", "..") + top_directory = File.expand_path(top_directory) + locale_directory = File.join(top_directory, "share", "locale") +@@ -140,7 +140,7 @@ EOC + end + + def windows? +- /cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM) ++ /mingw|mswin32|bccwin32/.match(RUBY_PLATFORM) + end + end + end diff --git a/subversion/09-wincrypt.patch b/subversion/09-wincrypt.patch new file mode 100644 index 00000000..a06997df --- /dev/null +++ b/subversion/09-wincrypt.patch @@ -0,0 +1,138 @@ +Support wincrypt for password encryption on Cygwin. + +From: David Rothenberger + + +--- + build.conf | 6 +++++- + subversion/include/svn_auth.h | 2 +- + subversion/libsvn_subr/auth.c | 2 +- + subversion/libsvn_subr/config_file.c | 2 +- + subversion/libsvn_subr/win32_crypto.c | 5 ++++- + subversion/tests/libsvn_subr/auth-test.c | 6 ++++-- + 6 files changed, 16 insertions(+), 7 deletions(-) + +diff --git a/build.conf b/build.conf +index 73b925d..c66d3bd 100644 +--- a/build.conf ++++ b/build.conf +@@ -323,7 +323,7 @@ description = Subversion General Utility Library + type = lib + install = fsmod-lib + path = subversion/libsvn_subr +-libs = aprutil apriconv apr xml zlib apr_memcache sqlite magic ++libs = aprutil apriconv apr xml zlib apr_memcache sqlite magic wincrypt + msvc-libs = kernel32.lib advapi32.lib shfolder.lib ole32.lib + crypt32.lib version.lib psapi.lib + msvc-export = +@@ -1218,6 +1218,10 @@ type = lib + external-lib = -lhttpd2core + libs = aprutil apr + ++[wincrypt] ++type = lib ++external-lib = -lcrypt32 ++ + [__ALL__] + type = project + path = build/win32 +diff --git a/subversion/include/svn_auth.h b/subversion/include/svn_auth.h +index 5f59d6d..6ee4b50 100644 +--- a/subversion/include/svn_auth.h ++++ b/subversion/include/svn_auth.h +@@ -859,7 +859,7 @@ svn_auth_get_platform_specific_client_providers( + svn_config_t *config, + apr_pool_t *pool); + +-#if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) ++#if ((defined(WIN32) && !defined(__MINGW32__)) || defined(__CYGWIN__)) || defined(DOXYGEN) + /** + * Set @a *provider to an authentication provider of type @c + * svn_auth_cred_simple_t that gets/sets information from the user's +diff --git a/subversion/libsvn_subr/auth.c b/subversion/libsvn_subr/auth.c +index 5406358..b2b8a11 100644 +--- a/subversion/libsvn_subr/auth.c ++++ b/subversion/libsvn_subr/auth.c +@@ -522,7 +522,7 @@ svn_auth_get_platform_specific_provider(svn_auth_provider_object_t **provider, + } + #endif + +-#if defined(WIN32) && !defined(__MINGW32__) ++#if (defined(WIN32) && !defined(__MINGW32__)) || defined(__CYGWIN__) + if (strcmp(provider_name, "windows") == 0 && + strcmp(provider_type, "simple") == 0) + { +diff --git a/subversion/libsvn_subr/config_file.c b/subversion/libsvn_subr/config_file.c +index 9d15f6b..627b666 100644 +--- a/subversion/libsvn_subr/config_file.c ++++ b/subversion/libsvn_subr/config_file.c +@@ -1028,7 +1028,7 @@ svn_config_ensure(const char *config_dir, apr_pool_t *pool) + "### windows-cryptoapi (Windows)" NL + #ifdef SVN_HAVE_KEYCHAIN_SERVICES + "# password-stores = keychain" NL +-#elif defined(WIN32) && !defined(__MINGW32__) ++#elif (defined(WIN32) && !defined(__MINGW32__)) || defined(__CYGWIN__) + "# password-stores = windows-cryptoapi" NL + #else + "# password-stores = gpg-agent,gnome-keyring,kwallet" NL +diff --git a/subversion/libsvn_subr/win32_crypto.c b/subversion/libsvn_subr/win32_crypto.c +index a7e3828..f74c634 100644 +--- a/subversion/libsvn_subr/win32_crypto.c ++++ b/subversion/libsvn_subr/win32_crypto.c +@@ -26,7 +26,7 @@ typedef int win32_crypto__dummy; + + /* ==================================================================== */ + +-#if defined(WIN32) && !defined(__MINGW32__) ++#if (defined(WIN32) && !defined(__MINGW32__)) || defined(__CYGWIN__) + + /*** Includes. ***/ + +@@ -44,6 +44,9 @@ typedef int win32_crypto__dummy; + + #include "svn_private_config.h" + ++#ifdef __CYGWIN__ ++#include ++#endif + #include + + +diff --git a/subversion/tests/libsvn_subr/auth-test.c b/subversion/tests/libsvn_subr/auth-test.c +index 9d7d866..58ff760 100644 +--- a/subversion/tests/libsvn_subr/auth-test.c ++++ b/subversion/tests/libsvn_subr/auth-test.c +@@ -62,7 +62,7 @@ test_platform_specific_auth_providers(apr_pool_t *pool) + #ifdef SVN_HAVE_KEYCHAIN_SERVICES + number_of_providers += 2; + #endif +-#if defined(WIN32) && !defined(__MINGW32__) ++#if (defined(WIN32) && !defined(__MINGW32__)) || defined(__CYGWIN__) + number_of_providers += 2; + #endif + if (providers->nelts != number_of_providers) +@@ -103,7 +103,7 @@ test_platform_specific_auth_providers(apr_pool_t *pool) + #endif + + /* Test Windows auth providers */ +-#if defined(WIN32) && !defined(__MINGW32__) ++#if (defined(WIN32) && !defined(__MINGW32__)) || defined(__CYGWIN__) + svn_auth_get_platform_specific_provider(&provider, "windows", + "simple", pool); + +@@ -164,6 +164,7 @@ test_platform_specific_auth_providers(apr_pool_t *pool) + "'ssl_client_cert_pw') should not return NULL"); + + /* Make sure you do not get a Windows auth provider */ ++#ifndef __CYGWIN__ + SVN_ERR(svn_auth_get_platform_specific_provider(&provider, "windows", + "simple", pool)); + +@@ -173,6 +174,7 @@ test_platform_specific_auth_providers(apr_pool_t *pool) + "svn_auth_get_platform_specific_provider('windows', 'simple') should " \ + "return NULL"); + #endif ++#endif + + /* Test KWallet auth providers */ + #ifdef SVN_HAVE_KWALLET diff --git a/subversion/10-perl-vendors.patch b/subversion/10-perl-vendors.patch new file mode 100644 index 00000000..5a6c591e --- /dev/null +++ b/subversion/10-perl-vendors.patch @@ -0,0 +1,22 @@ +Install perl modules into vendors + +From: David Rothenberger + + +--- + Makefile.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 127b825..b23a284 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -761,7 +761,7 @@ $(SWIG_PL_DIR)/native/Makefile.PL: $(SWIG_SRC_DIR)/perl/native/Makefile.PL.in + ./config.status subversion/bindings/swig/perl/native/Makefile.PL + + $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL +- cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL ++ cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL INSTALLDIRS=vendor + + # There is a "readlink -f" command on some systems for the same purpose, + # but it's not as portable (e.g. Mac OS X doesn't have it). These should diff --git a/subversion/11-XFAIL-case-sensitive-move-tests.patch b/subversion/11-XFAIL-case-sensitive-move-tests.patch new file mode 100644 index 00000000..64035d2c --- /dev/null +++ b/subversion/11-XFAIL-case-sensitive-move-tests.patch @@ -0,0 +1,58 @@ +XFAIL some case-sensitive rename and move tests + +From: David Rothenberger + + +--- + subversion/tests/cmdline/copy_tests.py | 1 + + subversion/tests/cmdline/svntest/main.py | 5 ++++- + subversion/tests/libsvn_wc/op-depth-test.c | 4 ++-- + 3 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/subversion/tests/cmdline/copy_tests.py b/subversion/tests/cmdline/copy_tests.py +index a4284b8..6670715 100755 +--- a/subversion/tests/cmdline/copy_tests.py ++++ b/subversion/tests/cmdline/copy_tests.py +@@ -5199,6 +5199,7 @@ def copy_base_of_deleted(sbox): + @Issue(3702) + # APR's apr_filepath_merge() with APR_FILEPATH_TRUENAME is broken on OS X. + @XFail(svntest.main.is_os_darwin) ++@XFail(svntest.main.is_os_cygwin) + def case_only_rename(sbox): + """case-only rename""" + +diff --git a/subversion/tests/cmdline/svntest/main.py b/subversion/tests/cmdline/svntest/main.py +index f73b98e..6a9e863 100644 +--- a/subversion/tests/cmdline/svntest/main.py ++++ b/subversion/tests/cmdline/svntest/main.py +@@ -1326,8 +1326,11 @@ def is_posix_os(): + def is_os_darwin(): + return sys.platform == 'darwin' + ++def is_os_cygwin(): ++ return sys.platform == 'cygwin' ++ + def is_fs_case_insensitive(): +- return (is_os_darwin() or is_os_windows()) ++ return (is_os_darwin() or is_os_windows() or is_os_cygwin()) + + def is_threaded_python(): + return True +diff --git a/subversion/tests/libsvn_wc/op-depth-test.c b/subversion/tests/libsvn_wc/op-depth-test.c +index a191ac5..1470e87 100644 +--- a/subversion/tests/libsvn_wc/op-depth-test.c ++++ b/subversion/tests/libsvn_wc/op-depth-test.c +@@ -8198,11 +8198,11 @@ struct svn_test_descriptor_t test_funcs[] = + "test_shadowed_update"), + SVN_TEST_OPTS_PASS(test_copy_of_deleted, + "test_copy_of_deleted (issue #3873)"), +-#ifndef DARWIN ++#if !(defined(DARWIN) || defined(__CYGWIN__)) + SVN_TEST_OPTS_PASS(test_case_rename, + "test_case_rename on case (in)sensitive system"), + #else +- /* apr doesn't implement APR_FILEPATH_TRUENAME for MAC OS yet */ ++ /* apr doesn't implement APR_FILEPATH_TRUENAME for MAC OS or CYGWIN yet */ + SVN_TEST_OPTS_XFAIL(test_case_rename, + "test_case_rename on case (in)sensitive system"), + #endif diff --git a/subversion/12-fix-svnlook-test.patch b/subversion/12-fix-svnlook-test.patch new file mode 100644 index 00000000..dab262ef --- /dev/null +++ b/subversion/12-fix-svnlook-test.patch @@ -0,0 +1,22 @@ +Fix svnlook_tests.py, so it sets PATH in the python hook. + +From: David Rothenberger + + +--- + subversion/tests/cmdline/svnlook_tests.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/subversion/tests/cmdline/svnlook_tests.py b/subversion/tests/cmdline/svnlook_tests.py +index f7c620b..027251c 100755 +--- a/subversion/tests/cmdline/svnlook_tests.py ++++ b/subversion/tests/cmdline/svnlook_tests.py +@@ -649,7 +649,7 @@ svnlook_bin=%s + fp = open(os.path.join(sys.argv[1], 'hooks.log'), 'wb') + def output_command(fp, cmd, opt): + command = [svnlook_bin, cmd, '-t', sys.argv[2], sys.argv[1]] + opt +- process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False, bufsize=-1) ++ process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False, bufsize=-1, env={'PATH': '/usr/bin'}) + (output, errors) = process.communicate() + status = process.returncode + fp.write(output) diff --git a/subversion/14-dso_open.patch b/subversion/14-dso_open.patch new file mode 100644 index 00000000..bc238e35 --- /dev/null +++ b/subversion/14-dso_open.patch @@ -0,0 +1,65 @@ +Fix DSO open, specifically for auth modules like GNOME keyring + +From: David Rothenberger + +support. Thanks to Yaakov for the patch. + +http://cygwin.com/ml/cygwin/2012-03/msg00835.html +--- + subversion/libsvn_fs/fs-loader.c | 7 ++++++- + subversion/libsvn_ra/ra_loader.c | 7 ++++++- + subversion/libsvn_subr/auth.c | 4 ++++ + 3 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/subversion/libsvn_fs/fs-loader.c b/subversion/libsvn_fs/fs-loader.c +index 01d6ba1..984a22f 100644 +--- a/subversion/libsvn_fs/fs-loader.c ++++ b/subversion/libsvn_fs/fs-loader.c +@@ -120,7 +120,12 @@ load_module(fs_init_func_t *initfunc, const char *name, apr_pool_t *pool) + _("Invalid name for FS type '%s'"), + name); + +- libname = apr_psprintf(pool, "libsvn_fs_%s-%d.so.%d", ++ libname = apr_psprintf(pool, ++#ifdef __CYGWIN__ ++ "cygsvn_fs_%s-%d-%d.dll", ++#else ++ "libsvn_fs_%s-%d.so.%d", ++#endif + name, SVN_VER_MAJOR, SVN_SOVERSION); + funcname = apr_psprintf(pool, "svn_fs_%s__init", name); + +diff --git a/subversion/libsvn_ra/ra_loader.c b/subversion/libsvn_ra/ra_loader.c +index 4afcb59..16b38dc 100644 +--- a/subversion/libsvn_ra/ra_loader.c ++++ b/subversion/libsvn_ra/ra_loader.c +@@ -141,7 +141,12 @@ load_ra_module(svn_ra__init_func_t *func, + const char *compat_funcname; + apr_status_t status; + +- libname = apr_psprintf(pool, "libsvn_ra_%s-%d.so.%d", ++ libname = apr_psprintf(pool, ++#ifdef __CYGWIN__ ++ "cygsvn_ra_%s-%d-%d.dll", ++#else ++ "libsvn_ra_%s-%d.so.%d", ++#endif + ra_name, SVN_VER_MAJOR, SVN_SOVERSION); + funcname = apr_psprintf(pool, "svn_ra_%s__init", ra_name); + compat_funcname = apr_psprintf(pool, "svn_ra_%s_init", ra_name); +diff --git a/subversion/libsvn_subr/auth.c b/subversion/libsvn_subr/auth.c +index b2b8a11..6dc0f18 100644 +--- a/subversion/libsvn_subr/auth.c ++++ b/subversion/libsvn_subr/auth.c +@@ -453,7 +453,11 @@ svn_auth_get_platform_specific_provider(svn_auth_provider_object_t **provider, + const char *library_label, *library_name; + const char *provider_function_name, *version_function_name; + library_name = apr_psprintf(pool, ++#ifdef __CYGWIN__ ++ "cygsvn_auth_%s-%d-%d.dll", ++#else + "libsvn_auth_%s-%d.so.%d", ++#endif + provider_name, + SVN_VER_MAJOR, SVN_SOVERSION); + library_label = apr_psprintf(pool, "svn_%s", provider_name); diff --git a/subversion/14-fix_svnauthz_tests.patch b/subversion/14-fix_svnauthz_tests.patch new file mode 100644 index 00000000..7075a5cc --- /dev/null +++ b/subversion/14-fix_svnauthz_tests.patch @@ -0,0 +1,22 @@ +Fix svnauthz_tests.py by adding /usr/bin to PATH. + +From: David Rothenberger + + +--- + subversion/tests/cmdline/svnauthz_tests.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/subversion/tests/cmdline/svnauthz_tests.py b/subversion/tests/cmdline/svnauthz_tests.py +index fc93b23..68b79c0 100755 +--- a/subversion/tests/cmdline/svnauthz_tests.py ++++ b/subversion/tests/cmdline/svnauthz_tests.py +@@ -48,7 +48,7 @@ svnauthz_bin=%s + fp = open(os.path.join(sys.argv[1], 'hooks.log'), 'wb') + def output_command(fp, cmd, opt): + command = [svnauthz_bin, cmd, '-t', sys.argv[2], sys.argv[1]] + opt +- process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False, bufsize=-1) ++ process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False, bufsize=-1, env={'PATH': '/usr/bin'}) + (output, errors) = process.communicate() + status = process.returncode + fp.write(output) diff --git a/subversion/15-XFAIL_case_sensitive_tree_conflict.patch b/subversion/15-XFAIL_case_sensitive_tree_conflict.patch new file mode 100644 index 00000000..c15141e2 --- /dev/null +++ b/subversion/15-XFAIL_case_sensitive_tree_conflict.patch @@ -0,0 +1,22 @@ +Mark basic_test.py rm_missing_with_case_clashing_ondisk_item as XFAIL. + +From: David Rothenberger + +It depends on Windows code that can get the canonical case for an on +disk item, but that has not been implemented for Cygwin. +--- + subversion/tests/cmdline/basic_tests.py | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/subversion/tests/cmdline/basic_tests.py b/subversion/tests/cmdline/basic_tests.py +index c51d80a..b2209dd 100755 +--- a/subversion/tests/cmdline/basic_tests.py ++++ b/subversion/tests/cmdline/basic_tests.py +@@ -2958,6 +2958,7 @@ def quiet_commits(sbox): + # Regression test for issue #4023: on Windows, 'svn rm' incorrectly deletes + # on-disk file if it is case-clashing with intended (non-on-disk) target. + @Issue(4023) ++@XFail() + def rm_missing_with_case_clashing_ondisk_item(sbox): + """rm missing item with case-clashing ondisk item""" + diff --git a/subversion/16-XFAIL_sqlite3_temp_table_tests.patch b/subversion/16-XFAIL_sqlite3_temp_table_tests.patch new file mode 100644 index 00000000..f8bc8110 --- /dev/null +++ b/subversion/16-XFAIL_sqlite3_temp_table_tests.patch @@ -0,0 +1,28 @@ +XFAIL sqlite3 tests that use temp tables + +From: David Rothenberger + +The sqlite3 library (3.7.16.2-1) has a known problem with temporary +tables, and the wc-queries-test tests rely on this, so XFAIL them. +--- + subversion/tests/libsvn_wc/wc-queries-test.c | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/subversion/tests/libsvn_wc/wc-queries-test.c b/subversion/tests/libsvn_wc/wc-queries-test.c +index cd55a1c..c1f01f8 100644 +--- a/subversion/tests/libsvn_wc/wc-queries-test.c ++++ b/subversion/tests/libsvn_wc/wc-queries-test.c +@@ -712,9 +712,9 @@ struct svn_test_descriptor_t test_funcs[] = + SVN_TEST_NULL, + SVN_TEST_PASS2(test_sqlite_version, + "sqlite up-to-date"), +- SVN_TEST_PASS2(test_parsable, +- "queries are parsable"), +- SVN_TEST_PASS2(test_query_expectations, +- "test query expectations"), ++ SVN_TEST_XFAIL2(test_parsable, ++ "queries are parsable"), ++ SVN_TEST_XFAIL2(test_query_expectations, ++ "test query expectations"), + SVN_TEST_NULL + }; diff --git a/subversion/PKGBUILD b/subversion/PKGBUILD new file mode 100644 index 00000000..52ff4863 --- /dev/null +++ b/subversion/PKGBUILD @@ -0,0 +1,152 @@ +# Maintainer: Alexey Pavlov + +pkgname=subversion +pkgver=1.8.4 +pkgrel=1 +pkgdesc="A Modern Concurrent Version Control System" +arch=('i686' 'x86_64') +url="http://subversion.apache.org/" +license=('APACHE') +depends=('libsqlite' 'file' 'libserf') +makedepends=('python2' 'perl' 'swig' 'ruby') +optdepends=('bash-completion: for svn bash completion' + 'python2: for some hook scripts' + 'ruby: for some hook scripts') +provides=('svn') +options=('!makeflags' '!libtool' '!emptydirs') +noextract=("subversion-${pkgver}.tar.bz2") +source=(http://www.apache.org/dist/subversion/subversion-${pkgver}.tar.bz2{,.asc} + svnclean + 01-make-build-directories.patch + 02-fix-linking.patch + 03-fix-linking-perl.patch + 04-fix-switch-tests.patch + 05-retry-loop.patch + 06-svnadmin-binary-mode.patch + 07-fix-path-tests.patch + 08-ruby-test-fix.patch + 09-wincrypt.patch + 10-perl-vendors.patch + 11-XFAIL-case-sensitive-move-tests.patch + 12-fix-svnlook-test.patch + 14-dso_open.patch + 14-fix_svnauthz_tests.patch + 15-XFAIL_case_sensitive_tree_conflict.patch + 16-XFAIL_sqlite3_temp_table_tests.patch + subversion-1.8.0-msys2.patch) +md5sums=('a73a5caad3c442fe88e1f9c0e794d212' + 'SKIP' + '07ee0cb01bdf8468cb8d4c22c0d6bc04' + '42faeb019c65be928a90d0cf4203d65c' + '0a858a775000407676900d23d9e717ac' + 'ff627c4baa06c04fbccfd2e06189ab5f' + '2ba451721e676ea689d3538b9c436479' + '72a774fab01ea2f5c83f4d68b0dea0ab' + '3a45dc619d830e6efef90d8ef2782923' + 'f307b3c8d0ffe2967aa30cdbc6d22b0a' + '232c54625c9c4fd4f060d7b735da0315' + '66e52cdefc037c05163fc89a289b2578' + '2b54f0bc7ebb43d933d57ed565fd02cc' + '69ef6bf65f26916a29f80fcabe480491' + '8c73463534e1005cd0a8e562f7de69c9' + '8baab01eb6847d162abe3d43a9ed07e2' + 'ca7fb78bcd33a12845168e603128aa5d' + '19ebc3da4d7735c86195e5c0907ff3cf' + 'f4d1dd96a3dd9cb6e19b86cc0bfeb1f6' + '44d3666035747d6fdadb1dff120d56d7') + +PYTHON_SITELIB=/usr/lib/python2.7/site-packages + +prepare() { + cd $startdir/ + [ -d $srcdir/$pkgname-$pkgver ] || tar -xjvf ${pkgname}-${pkgver}.tar.bz2 -C $srcdir || true + + cd $srcdir/$pkgname-$pkgver + + sed -i 's|/usr/bin/env python|/usr/bin/env python2|' tools/hook-scripts/{,mailer/{,tests/}}*.py + + patch -p1 -i ${srcdir}/01-make-build-directories.patch + patch -p1 -i ${srcdir}/02-fix-linking.patch + patch -p1 -i ${srcdir}/03-fix-linking-perl.patch + patch -p1 -i ${srcdir}/04-fix-switch-tests.patch + patch -p1 -i ${srcdir}/05-retry-loop.patch + patch -p1 -i ${srcdir}/06-svnadmin-binary-mode.patch + patch -p1 -i ${srcdir}/07-fix-path-tests.patch + patch -p1 -i ${srcdir}/08-ruby-test-fix.patch + patch -p1 -i ${srcdir}/09-wincrypt.patch + patch -p1 -i ${srcdir}/10-perl-vendors.patch + patch -p1 -i ${srcdir}/11-XFAIL-case-sensitive-move-tests.patch + patch -p1 -i ${srcdir}/12-fix-svnlook-test.patch + patch -p1 -i ${srcdir}/14-dso_open.patch + patch -p1 -i ${srcdir}/14-fix_svnauthz_tests.patch + patch -p1 -i ${srcdir}/15-XFAIL_case_sensitive_tree_conflict.patch + patch -p1 -i ${srcdir}/16-XFAIL_sqlite3_temp_table_tests.patch + patch -p1 -i ${srcdir}/subversion-1.8.0-msys2.patch + + ./autogen.sh +} + +build() { + cd ${pkgname}-${pkgver} + export PYTHON=/usr/bin/python2 + ./configure --build=${CHOST} --prefix=/usr --with-apr=/usr --with-apr-util=/usr \ + --with-zlib=/usr --with-serf=/usr --without-apxs \ + --with-sqlite=/usr \ + --without-gnome-keyring \ + --enable-shared --disable-static \ + --with-ruby-sitedir=/usr/lib/ruby/vendor_ruby \ + --enable-disallowing-of-undefined-references \ + --enable-local-library-preloading \ + + #make LT_LDFLAGS="-L$Fdestdir/usr/lib" + # make swig_pydir=/usr/lib/python2.7/site-packages/libsvn \ + # swig_pydir_extra=/usr/lib/python2.7/site-packages/svn swig-py swig-pl swig-rb + + + make clean-swig + make autogen-swig + make all + + plain "Compiling swig bindings: ruby" + make swig-rb + + plain "Compiling swig bindings: perl" + make swig-pl + + plain "Compiling swig bindings: python" + make swig-py swig_pydir=${PYTHON_SITELIB}/libsvn swig_pydir_extra=${PYTHON_SITELIB}/svn +} + +#check() { +# cd ${pkgname}-${pkgver} +# export LANG=C LC_ALL=C +# make check check-swig-pl check-swig-py check-swig-rb CLEANUP=yes # check-javahl +#} + +package() { + cd ${pkgname}-${pkgver} + + make DESTDIR="${pkgdir}" INSTALLDIRS=vendor \ + swig_pydir=${PYTHON_SITELIB}/libsvn \ + swig_pydir_extra=${PYTHON_SITELIB}/svn \ + install install-tools install-swig-py install-swig-pl install-swig-rb + + install -dm755 "${pkgdir}"/usr/share/subversion + cp -a tools/hook-scripts "${pkgdir}"/usr/share/subversion/ + rm "${pkgdir}"/usr/share/subversion/hook-scripts/*.in + + ## svnclean + install -Dm 755 ${srcdir}/svnclean "${pkgdir}"/usr/bin/svnclean + + install -Dm 644 tools/client-side/bash_completion \ + "${pkgdir}"/usr/share/bash-completion/completions/subversion + for i in svn svnadmin svndumpfilter svnlook svnsync svnversion; do + ln -sf subversion "${pkgdir}"/usr/share/bash-completion/completions/${i} + done + + # Remove illegal files + find ${pkgdir}/usr -type f -name "*::*" | xargs rm -f + + # fix permissons + find ${pkgdir}/usr -type f \( -name *.dll -o -name *.exe \) | xargs chmod 0755 +} diff --git a/subversion/subversion-1.8.0-msys2.patch b/subversion/subversion-1.8.0-msys2.patch new file mode 100644 index 00000000..471fa0e2 --- /dev/null +++ b/subversion/subversion-1.8.0-msys2.patch @@ -0,0 +1,883 @@ +diff -Naur subversion-1.8.0-orig/build/ac-macros/apache.m4 subversion-1.8.0/build/ac-macros/apache.m4 +--- subversion-1.8.0-orig/build/ac-macros/apache.m4 2013-04-30 08:01:28.000000000 +0400 ++++ subversion-1.8.0/build/ac-macros/apache.m4 2013-06-24 09:18:54.663086000 +0400 +@@ -141,7 +141,7 @@ + INSTALL_APACHE_MODS=true + + case $host in +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + APACHE_LDFLAGS="-shrext .so" + ;; + esac +diff -Naur subversion-1.8.0-orig/build/ac-macros/sqlite.m4 subversion-1.8.0/build/ac-macros/sqlite.m4 +--- subversion-1.8.0-orig/build/ac-macros/sqlite.m4 2013-04-20 08:00:52.000000000 +0400 ++++ subversion-1.8.0/build/ac-macros/sqlite.m4 2013-06-24 10:09:37.107421900 +0400 +@@ -256,7 +256,7 @@ + AC_DEFUN(_SVN_SQLITE_DSO_LIBS, + [ + case $host_os in +- beos* | mingw* | pw32* | cegcc* | cygwin*) ++ beos* | mingw* | pw32* | cegcc* | cygwin* | msys*) + svn_sqlite_dso_ldflags= + ;; + +diff -Naur subversion-1.8.0-orig/build/config.guess subversion-1.8.0/build/config.guess +--- subversion-1.8.0-orig/build/config.guess 2013-06-13 13:07:11.000000000 +0400 ++++ subversion-1.8.0/build/config.guess 2013-06-24 09:18:54.678711000 +0400 +@@ -803,6 +803,9 @@ + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; ++ i*:MSYS*:*) ++ echo ${UNAME_MACHINE}-pc-msys ++ exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; +@@ -843,6 +846,9 @@ + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; ++ amd64:MSYS*:*:* | x86_64:MSYS*:*:*) ++ echo x86_64-unknown-msys ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; +diff -Naur subversion-1.8.0-orig/build/config.sub subversion-1.8.0/build/config.sub +--- subversion-1.8.0-orig/build/config.sub 2013-06-13 13:07:11.000000000 +0400 ++++ subversion-1.8.0/build/config.sub 2013-06-24 09:18:54.709961000 +0400 +@@ -1343,7 +1343,7 @@ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ +- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ++ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ +diff -Naur subversion-1.8.0-orig/build/get-py-info.py subversion-1.8.0/build/get-py-info.py +--- subversion-1.8.0-orig/build/get-py-info.py 2009-11-16 22:07:17.000000000 +0300 ++++ subversion-1.8.0/build/get-py-info.py 2013-06-24 09:18:54.709961000 +0400 +@@ -101,7 +101,7 @@ + sysconfig.get_config_var('PYTHON')) + add_option_if_missing(options, "-bundle_loader", python_exe) + +- elif sys.platform == 'cygwin' or sys.platform.startswith('openbsd'): ++ elif sys.platform == 'cygwin' or sys.platform == 'msys' or sys.platform.startswith('openbsd'): + + # Add flags to build against the Python library (also necessary + # for Darwin, but handled elsewhere). +diff -Naur subversion-1.8.0-orig/build/libtool.m4 subversion-1.8.0/build/libtool.m4 +--- subversion-1.8.0-orig/build/libtool.m4 2013-06-13 13:07:11.000000000 +0400 ++++ subversion-1.8.0/build/libtool.m4 2013-06-24 09:18:54.756836000 +0400 +@@ -1616,7 +1616,7 @@ + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -1863,7 +1863,7 @@ + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +@@ -2334,7 +2334,7 @@ + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no +@@ -2366,6 +2366,12 @@ + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; ++ msys*) ++ # NSYS DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ++m4_if([$1], [],[ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +@@ -2400,7 +2406,7 @@ + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; +- cygwin*) ++ cygwin* | msys*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... +@@ -3140,7 +3146,7 @@ + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi +@@ -3196,7 +3202,7 @@ + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -3506,7 +3512,7 @@ + [lt_cv_sharedlib_from_linklib_cmd='unknown' + + case $host_os in +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in +@@ -3561,7 +3567,7 @@ + [AC_REQUIRE([AC_CANONICAL_HOST])dnl + LIBM= + case $host in +-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; + *-ncr-sysv4.3*) +@@ -3636,7 +3642,7 @@ + aix*) + symcode='[[BCDT]]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; + hpux*) +@@ -3904,7 +3910,7 @@ + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; +- mingw* | cygwin* | os2* | pw32* | cegcc*) ++ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -3975,7 +3981,7 @@ + ;; + esac + ;; +- mingw* | cygwin* | os2* | pw32* | cegcc*) ++ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], +@@ -4222,7 +4228,7 @@ + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -4307,7 +4313,7 @@ + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], +@@ -4567,7 +4573,7 @@ + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' +@@ -4625,7 +4631,7 @@ + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -4740,7 +4746,7 @@ + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +@@ -5113,7 +5119,7 @@ + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -6114,7 +6120,7 @@ + esac + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC +@@ -7930,7 +7936,7 @@ + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; +- *-*-cygwin* ) ++ *-*-cygwin* | *-*-msys* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix +@@ -7938,12 +7944,12 @@ + ;; + esac + ;; +- *-*-cygwin* ) ++ *-*-cygwin* | *-*-msys* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; +- *-*-cygwin* ) ++ *-*-cygwin* | *-*-msys* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix +diff -Naur subversion-1.8.0-orig/build/ltmain.sh subversion-1.8.0/build/ltmain.sh +--- subversion-1.8.0-orig/build/ltmain.sh 2013-06-13 13:07:11.000000000 +0400 ++++ subversion-1.8.0/build/ltmain.sh 2013-06-24 09:18:54.834961000 +0400 +@@ -1180,7 +1180,7 @@ + test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in +- *cygwin* | *mingw* | *pw32* | *cegcc*) ++ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; +@@ -2123,7 +2123,7 @@ + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in +- cygwin* | mingw* | pw32* | os2* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac +@@ -2992,7 +2992,7 @@ + 'exit $?' + tstripme="$stripme" + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" +@@ -3098,7 +3098,7 @@ + + # Do a test to see if this is really a libtool program. + case $host in +- *cygwin* | *mingw*) ++ *cygwin* | *msys* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result +@@ -3173,7 +3173,7 @@ + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in +- */usr/bin/install*,*cygwin*) ++ */usr/bin/install*,*cygwin*|*/usr/bin/install*,*msys*) + case $file:$destfile in + *.exe:*.exe) + # this is ok +@@ -3323,7 +3323,7 @@ + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *msys* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; +@@ -3335,7 +3335,7 @@ + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *msys* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; +@@ -3349,7 +3349,7 @@ + func_basename "$dlprefile" + name="$func_basename_result" + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *msys* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" +@@ -3502,7 +3502,7 @@ + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *msys* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` +@@ -4375,7 +4375,7 @@ + { + EOF + case "$host" in +- *mingw* | *cygwin* ) ++ *mingw* | *cygwin* | *msys* ) + # make stdout use "unix" line endings + echo " setmode(1,_O_BINARY);" + ;; +@@ -5094,7 +5094,7 @@ + { + $opt_debug + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra +@@ -5581,7 +5581,7 @@ + ;; + esac + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; +@@ -5601,7 +5601,7 @@ + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; +@@ -5679,7 +5679,7 @@ + + -no-install) + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" +@@ -6545,7 +6545,7 @@ + fi + case "$host" in + # special handling for platforms with PE-DLLs. +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *msys* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present +@@ -6689,7 +6689,7 @@ + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in +- *cygwin* | *mingw* | *cegcc*) ++ *cygwin* | *msys* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no +@@ -6759,7 +6759,7 @@ + elif test -n "$soname_spec"; then + # bleh windows + case $host in +- *cygwin* | mingw* | *cegcc*) ++ *cygwin* | *msys* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" +@@ -7620,7 +7620,7 @@ + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) +@@ -8134,7 +8134,7 @@ + + orig_export_symbols= + case $host_os in +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then +@@ -8690,7 +8690,7 @@ + + prog) + case $host in +- *cygwin*) func_stripname '' '.exe' "$output" ++ *cygwin* | *msys*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ +@@ -8803,7 +8803,7 @@ + esac + fi + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; +@@ -8881,7 +8881,7 @@ + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; +- *cygwin* | *mingw* ) ++ *cygwin* | *msys* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi +@@ -9028,14 +9028,14 @@ + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in +- *cygwin*) ++ *cygwin* | *msys*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in +- *cygwin* | *mingw* ) ++ *cygwin* | *msys* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result +@@ -9365,7 +9365,7 @@ + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in +- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) ++ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then +diff -Naur subversion-1.8.0-orig/build/ltoptions.m4 subversion-1.8.0/build/ltoptions.m4 +--- subversion-1.8.0-orig/build/ltoptions.m4 2013-06-13 13:07:11.000000000 +0400 ++++ subversion-1.8.0/build/ltoptions.m4 2013-06-24 09:18:54.850586000 +0400 +@@ -126,7 +126,7 @@ + [enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) +diff -Naur subversion-1.8.0-orig/configure subversion-1.8.0/configure +--- subversion-1.8.0-orig/configure 2013-06-13 13:08:08.000000000 +0400 ++++ subversion-1.8.0/configure 2013-06-24 10:09:18.904296900 +0400 +@@ -5661,7 +5661,7 @@ + INSTALL_APACHE_MODS=true + + case $host in +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + APACHE_LDFLAGS="-shrext .so" + ;; + esac +@@ -5879,7 +5879,7 @@ + $as_echo "amalgamation found and is okay" >&6; } + + case $host_os in +- beos* | mingw* | pw32* | cegcc* | cygwin*) ++ beos* | mingw* | pw32* | cegcc* | cygwin* | msys*) + svn_sqlite_dso_ldflags= + ;; + +@@ -6194,7 +6194,7 @@ + $as_echo "amalgamation found and is okay" >&6; } + + case $host_os in +- beos* | mingw* | pw32* | cegcc* | cygwin*) ++ beos* | mingw* | pw32* | cegcc* | cygwin* | msys*) + svn_sqlite_dso_ldflags= + ;; + +@@ -7390,7 +7390,7 @@ + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -7579,7 +7579,7 @@ + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; +- *-*-cygwin* ) ++ *-*-cygwin* | *-*-msys* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix +@@ -7587,12 +7587,12 @@ + ;; + esac + ;; +- *-*-cygwin* ) ++ *-*-cygwin* | *-*-msys* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; +- *-*-cygwin* ) ++ *-*-cygwin* | *-*-msys* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix +@@ -7658,7 +7658,7 @@ + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi +@@ -7816,7 +7816,7 @@ + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -8137,7 +8137,7 @@ + lt_cv_sharedlib_from_linklib_cmd='unknown' + + case $host_os in +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in +@@ -8671,7 +8671,7 @@ + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -10504,7 +10504,7 @@ + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -10588,7 +10588,7 @@ + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -11079,7 +11079,7 @@ + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -11194,7 +11194,7 @@ + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -11651,7 +11651,7 @@ + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -12604,7 +12604,7 @@ + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no +@@ -12636,6 +12636,12 @@ + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # MSYS DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -12670,7 +12676,7 @@ + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; +- cygwin*) ++ cygwin* | msys*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... +@@ -13331,7 +13337,7 @@ + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +@@ -14580,7 +14586,7 @@ + esac + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC +@@ -15613,7 +15619,7 @@ + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; +- mingw* | cygwin* | os2* | pw32* | cegcc*) ++ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -15683,7 +15689,7 @@ + ;; + esac + ;; +- mingw* | cygwin* | os2* | pw32* | cegcc*) ++ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' +@@ -16168,7 +16174,7 @@ + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + case $cc_basename in + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' +@@ -16437,7 +16443,7 @@ + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no +@@ -16468,6 +16474,11 @@ + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + ;; ++ msys*) ++ # MSYS DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -16502,7 +16513,7 @@ + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; +- cygwin*) ++ cygwin* | msys*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... +@@ -17233,7 +17244,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool needs -no-undefined" >&5 + $as_echo_n "checking whether libtool needs -no-undefined... " >&6; } + case $host in +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + LT_NO_UNDEFINED="-no-undefined" +@@ -17249,7 +17260,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to avoid circular linkage at all costs" >&5 + $as_echo_n "checking whether to avoid circular linkage at all costs... " >&6; } + case $host in +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + +diff -Naur subversion-1.8.0-orig/configure.ac subversion-1.8.0/configure.ac +--- subversion-1.8.0-orig/configure.ac 2013-06-24 09:05:45.530273500 +0400 ++++ subversion-1.8.0/configure.ac 2013-06-24 09:18:54.928711000 +0400 +@@ -313,7 +313,7 @@ + dnl So we only turn it on for platforms where we know we really need it. + AC_MSG_CHECKING([whether libtool needs -no-undefined]) + case $host in +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + AC_MSG_RESULT([yes]) + LT_NO_UNDEFINED="-no-undefined" + ;; +@@ -326,7 +326,7 @@ + + AC_MSG_CHECKING([whether to avoid circular linkage at all costs]) + case $host in +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + AC_MSG_RESULT([yes]) + AC_DEFINE([SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK], 1, + [Define if circular linkage is not possible on this platform.]) +diff -Naur subversion-1.8.0-orig/subversion/bindings/ctypes-python/test/remoterepos.py subversion-1.8.0/subversion/bindings/ctypes-python/test/remoterepos.py +--- subversion-1.8.0-orig/subversion/bindings/ctypes-python/test/remoterepos.py 2011-08-12 00:56:26.000000000 +0400 ++++ subversion-1.8.0/subversion/bindings/ctypes-python/test/remoterepos.py 2013-06-24 09:18:54.928711000 +0400 +@@ -175,7 +175,7 @@ + f.close() + os.chmod(hook, S_IRWXU) + +- if sys.platform == "cygwin": ++ if sys.platform == "cygwin" or sys.platform == "msys": + ### FIXME: When you try to set revprops, cygwin crashes + ### with a fatal error, so we skip this test for now. + return +diff -Naur subversion-1.8.0-orig/subversion/bindings/swig/perl/native/Makefile.PL.in subversion-1.8.0/subversion/bindings/swig/perl/native/Makefile.PL.in +--- subversion-1.8.0-orig/subversion/bindings/swig/perl/native/Makefile.PL.in 2012-12-14 10:05:48.000000000 +0400 ++++ subversion-1.8.0/subversion/bindings/swig/perl/native/Makefile.PL.in 2013-06-24 09:18:54.944336000 +0400 +@@ -65,7 +65,7 @@ + # According to the log of r7937, the flags guarded by the conditional break + # the build on FreeBSD if not conditionalized. + my $apr_ldflags = '@SVN_APR_LIBS@' +- if $^O eq 'darwin' or $^O eq 'cygwin'; ++ if $^O eq 'darwin' or $^O eq 'cygwin' or $^O eq 'msys'; + + chomp $apr_shlib_path_var; + +diff -Naur subversion-1.8.0-orig/subversion/bindings/swig/python/tests/setup_path.py subversion-1.8.0/subversion/bindings/swig/python/tests/setup_path.py +--- subversion-1.8.0-orig/subversion/bindings/swig/python/tests/setup_path.py 2009-11-19 22:25:52.000000000 +0300 ++++ subversion-1.8.0/subversion/bindings/swig/python/tests/setup_path.py 2013-06-24 09:18:54.944336000 +0400 +@@ -39,7 +39,7 @@ + + # OSes without RPATH support are going to have to do things here to make + # the correct shared libraries be found. +-if sys.platform == 'cygwin': ++if sys.platform == 'cygwin' or sys.platform == 'msys': + import glob + svndir = os.path.normpath("../../../%s" % bld_swig_python_dir) + libpath = os.getenv("PATH").split(":") +diff -Naur subversion-1.8.0-orig/subversion/tests/cmdline/commit_tests.py subversion-1.8.0/subversion/tests/cmdline/commit_tests.py +--- subversion-1.8.0-orig/subversion/tests/cmdline/commit_tests.py 2013-04-12 11:44:37.000000000 +0400 ++++ subversion-1.8.0/subversion/tests/cmdline/commit_tests.py 2013-06-24 09:18:54.959961000 +0400 +@@ -51,7 +51,7 @@ + # + + def is_non_posix_os_or_cygwin_platform(): +- return (not svntest.main.is_posix_os()) or sys.platform == 'cygwin' ++ return (not svntest.main.is_posix_os()) or sys.platform == 'cygwin' or sys.platform == 'msys' + + def get_standard_state(wc_dir): + """Return a status list reflecting the local mods made by +@@ -1024,7 +1024,7 @@ + + # Note: on Windows, files can't have angle brackets in them, so we + # don't tests that case. +- if svntest.main.windows or sys.platform == 'cygwin': ++ if svntest.main.windows or sys.platform == 'cygwin' or sys.platform == 'msys': + angle_name = '_angle_' + nasty_name = '#![]{}()__%' + else: +diff -Naur subversion-1.8.0-orig/subversion/tests/cmdline/svntest/main.py subversion-1.8.0/subversion/tests/cmdline/svntest/main.py +--- subversion-1.8.0-orig/subversion/tests/cmdline/svntest/main.py 2013-06-24 09:10:09.858398500 +0400 ++++ subversion-1.8.0/subversion/tests/cmdline/svntest/main.py 2013-06-24 10:12:05.326171900 +0400 +@@ -278,7 +278,7 @@ + def get_admin_name(): + "Return name of SVN administrative subdirectory." + +- if (windows or sys.platform == 'cygwin') \ ++ if (windows or sys.platform == 'cygwin' or sys.platform == 'msys') \ + and 'SVN_ASP_DOT_NET_HACK' in os.environ: + return '_svn' + else: +@@ -1329,8 +1329,11 @@ + def is_os_cygwin(): + return sys.platform == 'cygwin' + ++def is_os_msys(): ++ return sys.platform == 'msys' ++ + def is_fs_case_insensitive(): +- return (is_os_darwin() or is_os_windows() or is_os_cygwin()) ++ return (is_os_darwin() or is_os_windows() or is_os_cygwin() or is_os_msys()) + + def is_threaded_python(): + return True diff --git a/subversion/svnclean b/subversion/svnclean new file mode 100644 index 00000000..07101818 --- /dev/null +++ b/subversion/svnclean @@ -0,0 +1,246 @@ +#!/usr/bin/perl + +# svn-clean - Wipes out unversioned files from SVN working copy. +# Copyright (C) 2004, 2005, 2006 Simon Perreault +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +use strict; +use Cwd; +use File::Path; +use Getopt::Long; +use Pod::Usage; + +# Try to use SVN module if available. +my $use_svn_module = eval { require SVN::Client }; + +my $CWD = getcwd; + +my @exclude = (); +my $force = 0; +my $quiet = 0; +my $print = 0; +my $help = 0; +my $man = 0; +my $nonrecursive = 0; +my @paths = ($CWD); +GetOptions( + "exclude=s" => \@exclude, + "force" => \$force, + "non-recursive|N" => \$nonrecursive, + "quiet" => \$quiet, + "print" => \$print, + "help|?" => \$help, + "man" => \$man +) or pod2usage(2); +pod2usage(1) if $help; +pod2usage( -exitstatus => 0, -verbose => 2 ) if $man; +@paths = map { Cwd::abs_path($_) } @ARGV if @ARGV; + +# Precompile regexes. +$_ = qr/$_/ foreach @exclude; + +if ($use_svn_module) { + + # Create SVN client object. No need for connection to remote server. + my $ctx = new SVN::Client; + + # Call handler function with status info for each file. + $ctx->status( $_, undef, \&clean, !$nonrecursive, 1, 0, 1 ) + for @paths; +} +else { + warn "Warning: Not using SVN Perl modules, this might be slow.\n" + unless $quiet; + + # Build svn client command + my @command = qw(svn status --no-ignore -v); + if ($nonrecursive) { + push @command, '-N'; + } + + # Main file-wiping loop. + if ( $^O eq 'MSWin32' ) { + + # Perl on Windows currently doesn't have list pipe opens. + open SVN, join( ' ', @command, @paths ) . '|' + or die "Can't call program \"svn\": $!\n"; + } + else { + open SVN, "-|", @command, @paths + or die "Can't call program \"svn\": $!\n"; + } + LINE: while () { + if (/^([\?ID])/) { + my $file = (split)[-1]; + foreach my $ex (@exclude) { + if ( $file =~ $ex ) { + print "excluded $file\n" unless $quiet or $print; + next LINE; + } + } + if ( $1 eq 'D' ) { + next unless -f $file; + } + else { + next unless -e $file; + } + if ($print) { + print "$file\n"; + } + else { + rmtree( $file, !$quiet, !$force ); + } + } + } +} + +# Main file-wiping function. +sub clean { + my ( $path, $status ) = @_; + + # Use relative path for pretty-printing. + if ( $path =~ s/^\Q$CWD\E\/?//o ) { + + # If the substitution succeeded, we should have a relative path. Make + # sure we don't delete critical stuff. + return if $path =~ /^\//; + } + + # Find files needing to be removed. + if ( $status->text_status == $SVN::Wc::Status::unversioned + or $status->text_status == $SVN::Wc::Status::ignored + or $status->text_status == $SVN::Wc::Status::deleted ) + { + foreach my $ex (@exclude) { + if ( $path =~ $ex ) { + print "excluded $path\n" unless $quiet or $print; + return; + } + } + + # Make sure the file exists before removing it. Do not remove deleted + # directories as they are needed to remove the files they contain when + # committing. + lstat $path or stat $path; + if ( + -e _ + and ( not -d _ + or $status->text_status != $SVN::Wc::Status::deleted ) + ) + { + if ($print) { + print "$path\n"; + } + else { + rmtree( $path, !$quiet, !$force ); + } + } + } +} + +__END__ + +=head1 NAME + +svn-clean - Wipes out unversioned files from Subversion working copy + +=head1 SYNOPSIS + +svn-clean [options] [directory or file ...] + +=head1 DESCRIPTION + +B will scan the given files and directories recursively and find +unversioned files and directories (files and directories that are not present in +the Subversion repository). After the scan is done, these files and directories +will be deleted. + +If no file or directory is given, B defaults to the current directory +("."). + +B uses the SVN Perl modules if they are available. This is much +faster than parsing the output of the B command-line client. + +=head1 OPTIONS + +=over 8 + +=item B<-e>, B<--exclude> + +A regular expression for filenames to be exluded. For example, the following +command will skip files ending in ".zip": + +=over 8 + +svn-clean --exclude '\.zip$' + +=back + +Multiple exclude patterns can be specified. If at least one matches, then the +file is skipped. For example, the following command will skip files ending in +".jpg" or ".png": + +=over 8 + +svn-clean --exclude '\.jpg$' --exclude '\.png$' + +=back + +The following command will skip the entire "build" subdirectory: + +=over 8 + +svn-clean --exclude '^build(/|$)' + +=back + +=item B<-f>, B<--force> + +Files to which you do not have delete access (if running under VMS) or write +access (if running under another OS) will not be deleted unless you use this +option. + +=item B<-N>, B<--non-recursive> + +Do not search recursively for unversioned files and directories. Unversioned +directories will still be deleted along with all their contents. + +=item B<-q>, B<--quiet> + +Do not print progress info. In particular, do not print a message each time a +file is examined, giving the name of the file, and indicating whether "rmdir" or +"unlink" is used to remove it, or that it's skipped. + +=item B<-p>, B<--print> + +Do not delete anything. Instead, print the name of every file and directory that +would have been deleted. + +=item B<-?>, B<-h>, B<--help> + +Prints a brief help message and exits. + +=item B<--man> + +Prints the manual page and exits. + +=back + +=head1 AUTHOR + +Simon Perreault + +=cut