Commit 12cc96a2775f4435fb2567ce4251ff464c7d6140

Authored by Jacob Vosmaer
1 parent 205cd8fe

Add environment flags for native extensions

Showing 1 changed file with 7 additions and 1 deletions   Show diff stats
config/software/gitlab-rails.rb
... ... @@ -30,6 +30,12 @@ dependency "postgresql"
30 30  
31 31 source :git => "https://gitlab.com/gitlab-org/gitlab-ce.git"
32 32  
  33 +env = {
  34 + "LDFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include",
  35 + "CFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include",
  36 + "LD_RUN_PATH" => "#{install_dir}/embedded/lib",
  37 +}
  38 +
33 39 build do
34 40 # GitLab assumes it can extract the Git revision of the currently version
35 41 # from the Git repo the code lives in at boot. Because of our rsync later on,
... ... @@ -38,7 +44,7 @@ build do
38 44 # build.
39 45 command "sed -i \"s/.*REVISION.*/REVISION = '$(git log --pretty=format:'%h' -n 1)'/\" config/initializers/2_app.rb"
40 46  
41   - bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem"
  47 + bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem", :env => env
42 48  
43 49 # In order to precompile the assets, we need to get to a state where rake can
44 50 # load the Rails environment.
... ...