Add CREW_ARCHIVE_DEST constant for use during builds (#8446)

* Add CREW_ARCHIVE_DEST constant for use during builds

* make buildsystems _options messages more verbose

* add configure_options message

* lint buildsystems files and add filefix to autotools

* change crew_archive_dest to CREW_ARCHIVE_DEST

* Revert "change crew_archive_dest to CREW_ARCHIVE_DEST"

bin/crew:1620:19: F: Lint/Syntax: formal argument cannot be a constant
(Using Ruby 3.1 parser; configure using TargetRubyVersion parameter, under AllCops)
def build_package(CREW_ARCHIVE_DEST)

This reverts commit 1f7a128d32.

* expand autotools
This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2023-06-27 15:30:48 -04:00
committed by GitHub
parent aba531884b
commit 42c68b25a0
5 changed files with 21 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
require 'fileutils'
require 'package'
class Autotools < Package
def self.configure_options(options = '')
return (@configure_options = options if options)
end
@@ -11,6 +11,7 @@ class Autotools < Package
end
def self.build
puts "Additional configure_options being used: #{@configure_options.nil? || @configure_options.empty? ? '<no configure_options>' : @configure_options}".orange
# Run autoreconf if necessary
unless File.executable? './configure'
if File.executable? './autogen.sh'
@@ -21,6 +22,12 @@ class Autotools < Package
system 'autoreconf -fiv'
end
end
abort "configure script not found!".lightred if File.file?('configure')
FileUtils.chmod('+x', 'configure')
if `grep -q /usr/bin/file configure`
puts 'Using filefix.'.orange
system 'filefix'
end
system "./configure #{CREW_OPTIONS} #{@configure_options}"
system 'make'
end

View File

@@ -1,7 +1,6 @@
require 'package'
class CMake < Package
def self.cmake_options(options = '')
return (@cmake_options = options if options)
end
@@ -11,7 +10,7 @@ class CMake < Package
end
def self.build
puts "Additional cmake_options being used: #{@cmake_options}".orange
puts "Additional cmake_options being used: #{@cmake_options.nil? || @cmake_options.empty? ? '<no cmake_options>' : @cmake_options}".orange
@crew_cmake_options = no_lto ? CREW_CMAKE_FNO_LTO_OPTIONS : CREW_CMAKE_OPTIONS
system "cmake -B builddir -G Ninja #{@crew_cmake_options} #{@cmake_options}"
system "#{CREW_NINJA} -C builddir"

View File

@@ -1,7 +1,6 @@
require 'package'
class Meson < Package
def self.meson_options(options = '')
return (@meson_options = options if options)
end
@@ -11,7 +10,7 @@ class Meson < Package
end
def self.build
puts "Additional meson_options being used: #{@meson_options}".orange
puts "Additional meson_options being used: #{@meson_options.nil? || @meson_options.empty? ? '<no meson_options>' : @meson_options}".orange
@crew_meson_options = no_lto ? CREW_MESON_FNO_LTO_OPTIONS : CREW_MESON_OPTIONS
system "meson #{@crew_meson_options} #{@meson_options} builddir"
system 'meson configure builddir'