$OpenBSD: patch-src_ruby_supportlib_phusion_passenger_config_nginx_engine_compiler_rb,v 1.2 2017/11/04 15:56:29 jeremy Exp $

Remove hiding of build steps.

Index: src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb
--- src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb.orig
+++ src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb
@@ -286,37 +286,17 @@ module PhusionPassenger
 
       def compile_support_libraries
         puts "Compiling support libraries (step 1 of 2)..."
-        progress_bar = ProgressBar.new
         e_working_dir = Shellwords.escape(@working_dir)
         args = "#{@support_libs_string} CACHING=false OUTPUT_DIR=#{e_working_dir}"
-        begin
-          progress_bar.set(0.05)
           Dir.chdir(PhusionPassenger.build_system_dir) do
-            run_rake_task!(args) do |progress, total|
-              progress_bar.set(0.05 + (progress / total.to_f) * 0.95)
-            end
+            run_rake_task!(args)
           end
-          progress_bar.set(1)
-        ensure
-          progress_bar.finish
-        end
       end
 
       def configure_and_compile_nginx
         puts "Compiling Nginx engine (step 2 of 2)..."
-        progress_bar = ProgressBar.new
-        progress_bar.set(0)
-        begin
-          configure_nginx do
-            progress_bar.set(0.25)
-          end
-          compile_nginx do |progress|
-            progress_bar.set(0.25 + progress * 0.75)
-          end
-          progress_bar.set(1)
-        ensure
-          progress_bar.finish
-        end
+        configure_nginx
+        compile_nginx
 
         FileUtils.cp("#{@working_dir}/nginx-#{@nginx_version}/objs/nginx",
           "#{@destdir}/nginx-#{@nginx_version}")
@@ -341,60 +321,12 @@ module PhusionPassenger
         command << "#{shell} ./configure --prefix=/tmp " +
           "#{self.class.configure_script_options} " +
           "--add-module=#{Shellwords.escape PhusionPassenger.nginx_module_source_dir}"
-        run_command_yield_activity(command) do
-          yield
-        end
+        system(command)
       end
 
       def compile_nginx
-        backlog = ""
         e_nginx_source_dir = Shellwords.escape("#{@working_dir}/nginx-#{@nginx_version}")
-
-        # Capture and index the `make --dry-run` output for
-        # progress determination.
-        total_lines = 0
-        dry_run_output = {}
-        `cd #{e_nginx_source_dir} && #{PlatformInfo.gnu_make} --dry-run`.split("\n").each do |line|
-          total_lines += 1
-          dry_run_output[line] = true
-        end
-
-        IO.popen("cd #{e_nginx_source_dir} && #{PlatformInfo.gnu_make} 2>&1", "r") do |io|
-          progress = 1
-          while !io.eof?
-            line = io.readline
-            backlog << line
-            # If the output is part of what we saw when dry-running,
-            # then increase progress bar. Otherwise it could be compiler
-            # warnings or something, so ignore those.
-            if dry_run_output[line.chomp]
-              yield(progress / total_lines.to_f)
-              progress += 1
-            end
-          end
-        end
-        if $?.exitstatus != 0
-          @stderr.puts
-          @stderr.puts "*** ERROR: unable to compile web helper."
-          @stderr.puts backlog
-          exit 1
-        end
-      end
-
-      def run_command_yield_activity(command)
-        backlog = ""
-        IO.popen("#{command} 2>&1", "rb") do |io|
-          while !io.eof?
-            backlog << io.readline
-            yield
-          end
-        end
-        if $?.exitstatus != 0
-          @stderr.puts
-          @stderr.puts backlog
-          @stderr.puts "*** ERROR: command failed: #{command}"
-          exit 1
-        end
+        system "cd #{e_nginx_source_dir} && #{PlatformInfo.gnu_make}"
       end
     end
 
