Commit f3b4db06c69ae661da0e1da59d84446177ca81e7

Thomas de Grivel 2023-03-06T18:17:46

libffi

diff --git a/lib/rbpkg/repo.rb b/lib/rbpkg/repo.rb
index 1831b37..085e9df 100644
--- a/lib/rbpkg/repo.rb
+++ b/lib/rbpkg/repo.rb
@@ -5,15 +5,19 @@ class Rbpkg::Repo
   @@remote_default = "origin"
   @@branch_default = "master"
 
-  def autogen()
+  def autogen
     verbose 3, "repo(#{name.inspect}).autogen"
     if File.executable?("#{src_dir}/autogen")
-      cmd! "cd #{sh_quote(src_dir)} && ./autogen"
+      cmd! "cd #{sh_quote(src_dir)} && #{autogen_env} ./autogen"
     elsif File.exists?("#{src_dir}/autogen.sh")
-      cmd! "cd #{sh_quote(src_dir)} && sh autogen.sh"
+      cmd! "cd #{sh_quote(src_dir)} && #{autogen_env} sh autogen.sh"
     end
   end
 
+  def autogen_env
+    ""
+  end
+
   def branch
     @@branch_default
   end
diff --git a/lib/rbpkg/repos/libffi.rb b/lib/rbpkg/repos/libffi.rb
index 69fd7e4..6c11f3e 100644
--- a/lib/rbpkg/repos/libffi.rb
+++ b/lib/rbpkg/repos/libffi.rb
@@ -8,6 +8,10 @@ class Rbpkg::Repos::Libffi < Rbpkg::Repo
     []
   end
 
+  def autogen_env
+    "AUTOCONF_VERSION=2.71"
+  end
+
   def configure_env
     if system("which gmake >/dev/null 2>&1")
       "MAKE=gmake"