Skip to content
This repository
Browse code

git: fix some things and add sha1 implementation choice

  • Loading branch information...
commit cebdd0a8f4637fa06e9d9a0fb31c68b44b2579f0 1 parent 7fbb7b6
meh. authored March 12, 2012

Showing 1 changed file with 46 additions and 36 deletions. Show diff stats Hide diff stats

  1. 82  application/vcs/git/git.rbuild
82  application/vcs/git/git.rbuild
@@ -7,21 +7,31 @@ description 'The stupid content tracker, the revision control system heavily use
7 7
 homepage    'http://www.git-scm.com/'
8 8
 license     'GPL-2'
9 9
 
10  
-source 'http://www.kernel.org/pub/software/scm/git/git-#{package.version}.tar.bz2'
  10
+source 'https://git-core.googlecode.com/files/git-#{package.version}.tar.gz'
11 11
 
12 12
 features {
13  
-	http { enabled!
14  
-		description 'Enable git push/pull for HTTP and HTTPS'
  13
+	threads { enabled!
  14
+		before :configure do |conf|
  15
+			package.arguments[:THREADED_DELTA_SEARCH] = 'YesPlease' if enabled?
  16
+		end
  17
+	}
15 18
 
  19
+	sha1 { enabled!; default_value 'blk'
16 20
 		before :configure do |conf|
17  
-			package.arguments[:NO_CURL]  = 'YesPlease' if disabled?
18  
-			package.arguments[:NO_EXPAT] = 'YesPlease' if disabled?
  21
+			if value == 'blk'
  22
+				package.arguments[:BLK_SHA1] = 'YesPlease'
  23
+			elsif value == 'ppc'
  24
+				package.arguments[:PPC_SHA1] = 'YesPlease'
  25
+			end
19 26
 		end
20 27
 	}
21 28
 
22  
-	threads { enabled!
  29
+	http { enabled!
  30
+		description 'Enable git push/pull for HTTP and HTTPS'
  31
+
23 32
 		before :configure do |conf|
24  
-			package.arguments[:THREADED_DELTA_SEARCH] = 'YesPlease' if enabled?
  33
+			package.arguments[:NO_CURL]  = 'YesPlease' if disabled?
  34
+			package.arguments[:NO_EXPAT] = 'YesPlease' if disabled?
25 35
 		end
26 36
 	}
27 37
 
@@ -43,17 +53,18 @@ features {
43 53
 		end
44 54
 	}
45 55
 
46  
-	perl {
  56
+	perl { enabled!
47 57
 		before :configure do |conf|
48 58
 			if enabled?
49 59
 				package.arguments[:INSTALLDIRS] = 'vendor'
  60
+				package.arguments[:USE_LIBPCRE] = 'YesPlease'
50 61
 			else
51 62
 				package.arguments[:NO_PERL] = 'YesPlease'
52 63
 			end
53 64
 		end
54 65
 	}
55 66
 
56  
-	python {
  67
+	python { enabled!
57 68
 		before :configure do |conf|
58 69
 			package.arguments[:NO_PYTHON] = 'YesPlease' if disabled?
59 70
 		end
@@ -68,48 +79,47 @@ features {
68 79
 
69 80
 before :build do
70 81
 	package.arguments = {
71  
-		:INSTALL    => 'install',
72  
-		:TAR        => 'tar',
73  
-		:SHELL_PATH => '/bin/sh',
  82
+		INSTALL:    'install',
  83
+		TAR:        'tar',
  84
+		SHELL_PATH: '/bin/sh',
74 85
 
75 86
 		# Mac stuff
76  
-		:NO_FINK         => 'YesPlease',
77  
-		:NO_DARWIN_PORTS => 'YesPlease',
  87
+		NO_FINK:         'YesPlease',
  88
+		NO_DARWIN_PORTS: 'YesPlease',
78 89
 
79 90
 		# Misc stuff
80  
-		:SANE_TOOL_PATH               => '',
81  
-		:OLD_ICONV                    => '',
82  
-		:GIT_TEST_OPTS                => '--no-color',
83  
-		:NO_EXTERNAL_GREP             => '',
84  
-		:NO_CROSS_DIRECTORY_HARDLINKS => 'YesPlease',
85  
-		:DEFAULT_PAGER                => env[:PAGER],
86  
-		:DEFAULT_EDITOR               => env[:EDITOR],
  91
+		SANE_TOOL_PATH:               '',
  92
+		OLD_ICONV:                    '',
  93
+		GIT_TEST_OPTS:                '--no-color',
  94
+		NO_EXTERNAL_GREP:             '',
  95
+		NO_CROSS_DIRECTORY_HARDLINKS: 'YesPlease',
87 96
 
88 97
 		# Installation stuff
89  
-		:DESTDIR    => distdir,
90  
-		:prefix     => (env[:INSTALL_PATH] + 'usr').cleanpath,
91  
-		:htmldir    => (env[:INSTALL_PATH] + "usr/share/doc/git-#{package.version}").cleanpath,
92  
-		:sysconfdir => (env[:INSTALL_PATH] + 'etc').cleanpath,
  98
+		DESTDIR:    distdir,
  99
+		prefix:     Path.clean(env[:INSTALL_PATH] + '/usr'),
  100
+		htmldir:    Path.clean(env[:INSTALL_PATH] + "/usr/share/doc/git-#{package.version}"),
  101
+		sysconfdir: Path.clean(env[:INSTALL_PATH] + '/etc'),
  102
+		gitexecdir: Path.clean(env[:INSTALL_PATH] + '/usr/lib/git-core'),
93 103
 
94 104
 		# Compilation stuff
95  
-		:OPTCFLAGS  => env[:CFLAGS],
96  
-		:OPTLDFLAGS => env[:LDFLAGS],
97  
-		:OPTCC      => env[:CC],
98  
-		:OPTAR      => env[:AR],
  105
+		OPTCFLAGS:  env[:CFLAGS],
  106
+		OPTLDFLAGS: env[:LDFLAGS],
  107
+		OPTCC:      env[:CC],
  108
+		OPTAR:      env[:AR],
99 109
 
100 110
 		# Language binding stuff
101  
-		:PYTHON_PATH => "#{(env[:INSTALL_PATH] + 'usr/bin/env').cleanpath} python",
102  
-		:PERL_PATH   => "#{(env[:INSTALL_PATH] + 'usr/bin/env').cleanpath} perl",
103  
-		:PERL_MM_OPT => ''
  111
+		PYTHON_PATH: "#{Path.clean(env[:INSTALL_PATH] + '/usr/bin/env')} python",
  112
+		PERL_PATH:   "#{Path.clean(env[:INSTALL_PATH] + '/usr/bin/env')} perl",
  113
+		PERL_MM_OPT: ''
104 114
 	}
105 115
 end
106 116
 
107  
-before :configure do
108  
-	skip
  117
+def make (*args)
  118
+	autotools.make *package.arguments.map { |k, v| "#{k}=#{v}" }, *args, "-j#{env[:MAKE_JOBS]}"
109 119
 end
110 120
 
111  
-def make (*args)
112  
-	autotools.make *package.arguments.map {|(name, value)| "#{name}=#{value}"}, *args
  121
+before :configure do
  122
+	skip
113 123
 end
114 124
 
115 125
 before :compile do

0 notes on commit cebdd0a

Please sign in to comment.
Something went wrong with that request. Please try again.