Ticket #12712: macports-git-instaweb.patch

File macports-git-instaweb.patch, 2.5 KB (added by bryan@…, 17 years ago)
  • git-core/Portfile

    diff --git a/git-core/Portfile b/git-core/Portfile
    index 86df730..e98e738 100644
    a b  
    1 # $Id: Portfile 28705 2007-09-07 20:08:19Z mgrimes@macports.org $
     1#$Id: Portfile 28705 2007-09-07 20:08:19Z mgrimes@macports.org $
    22
    33PortSystem        1.0
    44name              git-core
    55version           1.5.3.1
     6revision          2
    67description       The stupid content tracker.
    78long_description  A stupid (but extremely fast) directory content manager. \
    89                  It doesn't do a whole lot, but what it _does_ do is track \
    checksums git-${version}${extract.suffix} sha1 011008a66928f115a7604f4a3066c0 
    2324depends_run  port:curl port:openssh port:rsync port:perl port:p5-error
    2425depends_lib  port:curl port:zlib port:openssl port:expat port:libiconv
    2526
    26 patchfiles   patch-Makefile patch-http.h
     27patchfiles   patch-Makefile patch-http.h patch-git-instaweb.sh
    2728
    2829extract.only   git-${version}${extract.suffix} \
    2930               git-manpages-${version}${extract.suffix}
  • new file git-core/files/patch-git-instaweb.sh

    diff --git a/git-core/files/patch-git-instaweb.sh b/git-core/files/patch-git-instaweb.sh
    new file mode 100644
    index 0000000..aabff59
    - +  
     1diff --git git-instaweb.sh.orig git-instaweb.sh
     2index b79c6b6..9e9253a 100755
     3--- git-instaweb.sh.orig
     4+++ git-instaweb.sh
     5@@ -30,8 +30,7 @@ test -z "$port" && port=1234
     6 
     7 start_httpd () {
     8        httpd_only="`echo $httpd | cut -f1 -d' '`"
     9-       if test "`expr index $httpd_only /`" -eq '1' || \
     10-                               which $httpd_only >/dev/null
     11+       if test echo $http_only | grep ^/ || which $httpd_only >/dev/null
     12        then
     13                $httpd $fqgitdir/gitweb/httpd.conf
     14        else
     15@@ -207,10 +206,14 @@ EOF
     16 }
     17 
     18 script='
     19-s#^\(my\|our\) $projectroot =.*#\1 $projectroot = "'`dirname $fqgitdir`'";#
     20-s#\(my\|our\) $gitbin =.*#\1 $gitbin = "'$GIT_EXEC_PATH'";#
     21-s#\(my\|our\) $projects_list =.*#\1 $projects_list = $projectroot;#
     22-s#\(my\|our\) $git_temp =.*#\1 $git_temp = "'$fqgitdir/gitweb/tmp'";#'
     23+s#^my $projectroot =.*#my $projectroot = "'`dirname $fqgitdir`'";#
     24+s#^our $projectroot =.*#our $projectroot = "'`dirname $fqgitdir`'";#
     25+s#my $gitbin =.*#my $gitbin = "'$GIT_EXEC_PATH'";#
     26+s#our $gitbin =.*#our $gitbin = "'$GIT_EXEC_PATH'";#
     27+s#my $projects_list =.*#my $projects_list = $projectroot;#
     28+s#our $projects_list =.*#our $projects_list = $projectroot;#
     29+s#my $git_temp =.*#my $git_temp = "'$fqgitdir/gitweb/tmp'";#
     30+s#our $git_temp =.*#our $git_temp = "'$fqgitdir/gitweb/tmp'";#'
     31 
     32 gitweb_cgi () {
     33        cat > "$1.tmp" <<\EOFGITWEB