diff --git a/kdesvn-build b/kdesvn-build index cb11e4f..6e18ad3 100755 --- a/kdesvn-build +++ b/kdesvn-build @@ -641,6 +641,14 @@ sub handle_branch_tag_option # Remove trailing slashes. $svn_server =~ s/\/*$//; + # Special-case this for ease of user configuration. + if ($module eq 'kdelibs' and $branch = 'kde4-snapshot') + { + $branch = 'branches'; + $branchname = 'work'; + $module = 'kdelibs4_snapshot'; + } + return "$svn_server/$branch/$branchname/$module"; } @@ -1155,6 +1163,12 @@ sub tarball_snapshot_revision whisper "Checking if snapshot available for g[$module]"; + if (get_option($module, 'override-url')) + { + whisper "\tb[override-url] in effect for g[$module], snapshot not available."; + return 0; + } + $branch = 'trunk' if not $branch; # Use default value. debug "Looking up revision number for g[$module-$branch] from g[$tarballHost$revisionScript]"; @@ -1870,7 +1884,7 @@ sub setenv return unless $val; - pretend "\tWould have set g[$var]=y[$val]."; + whisper "\tWould have set g[$var]=y[$val]." if pretending; $ENV{$var} = $val; } @@ -1915,6 +1929,14 @@ sub setup_default_modules() { $package_opts{$i} = { }; # Set up defaults $package_opts{$i}{'set-env'} = { }; + + # Setup kdelibs to default to downloading and building the snapshot + # since that is what the rest of KDE trunk is being ported against + # right now. + if ($i eq 'kdelibs') + { + $package_opts{$i}{'branch'} = 'kde4-snapshot'; + } } } @@ -4622,7 +4644,7 @@ sub finish close_lock() unless pretending; - note "Your logs are saved in y[$logdir]"; + note "Your logs are saved in y[$logdir]" unless pretending; exit $exitcode; } diff --git a/kdesvn-buildrc-sample b/kdesvn-buildrc-sample index 9eb58da..65d55e4 100644 --- a/kdesvn-buildrc-sample +++ b/kdesvn-buildrc-sample @@ -16,7 +16,9 @@ global # override-url option yourself. # # If you set this option to false, or leave it unset, kdesvn-build will build -# /trunk, which corresponds right now with KDE 4.0. +# /trunk, which corresponds right now with KDE 4.0. If you set this option to +# true, you should also comment out or remove the branch option which is set +# in the "module kdelibs" section below. # # use-stable-kde false @@ -159,11 +161,10 @@ end module module kdelibs configure-flags --enable-sendfile --enable-mitshm - # kdelibs compiled from a snapshot for now, remove this after kdelibs - # trunk works again, and then remove the ${source-dir}/kdelibs and - # ${build-dir}/kdelibs directories, and then you'll have to rebuild - # kdelibs. Also remove this if you're building KDE 3. - override-url ${svn-server}/branches/work/kdelibs4_snapshot + # kdelibs compiles from a snapshot for now so that other modules can have something + # stable to port against. Use the kde4-snapshot branch in order to use this + # snapshot. If you'd rather use /trunk, just comment this out. + branch kde4-snapshot # KDE 4 uses CMake, if you need to pass options to the cmake command, use this # option: