Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add iasl formula #18027

Closed
wants to merge 1 commit into from

2 participants

@qwerty12

Homepage: https://www.acpica.org

iasl - ACPI Source Language compiler/decompiler

@adamv

How much "stuff" does this formula install? Are these patches just for make install? Can Homebrew's install functions be used instead of patching?

@qwerty12

Hi,

I followed Debian's example in only having iasl built and installed to $HOMEBREW_PREFIX/bin, nothing else.

The second patch could be removed by using MacOS.prefer_64_bit (I think) to see if the compiled binary was placed in the bin32 or bin64 folders that are used by iasl's build system to store the binary before it is installed by make install, but the first patch would need to remain as far as I can tell, as cp is invoked by the standard compile target to actually put the iasl binary into the bin32/bin64 folder.

@adamv
Owner

We have a request for acpica in #19913 that seems to package iasl; should this be closed in favor of that?

@qwerty12

I would say yes, as it does everything this iasl formula does but without the patches and also installs the full set of ACPICA tools to boot.

@qwerty12 qwerty12 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 23, 2013
  1. Add iasl formula

    qwerty12 authored
This page is out of date. Refresh to see the latest.
Showing with 58 additions and 0 deletions.
  1. +58 −0 Library/Formula/iasl.rb
View
58 Library/Formula/iasl.rb
@@ -0,0 +1,58 @@
+require 'formula'
+
+class Iasl < Formula
+ homepage 'https://www.acpica.org'
+ url 'https://www.acpica.org/download/acpica-unix-20130214.tar.gz'
+ sha1 '5e4c0e1c4ed8f00f980e073f826b2d8fe5d92c15'
+
+ def patches
+ DATA
+ end
+
+ def install
+ ENV.j1
+
+ bin.mkpath
+
+ system "make iasl HOST=_LINUX"
+ system "make install PROGS=iasl INSTALLDIR=#{bin}"
+ end
+
+ def test
+ system "#{bin}/iasl -h"
+ end
+end
+
+__END__
+# BSD cp doesn't understand --remove-destination so use --force instead
+diff --git a/generate/unix/Makefile.config b/generate/unix/Makefile.config
+index 65242e0..14e49c4 100644
+--- a/generate/unix/Makefile.config
++++ b/generate/unix/Makefile.config
+@@ -61,7 +61,7 @@ RENAMEPROG = \
+ #
+ COPYPROG = \
+ @mkdir -p ../$(BINDIR); \
+- cp --remove-destination $(PROG) ../$(BINDIR); \
++ cp -f $(PROG) ../$(BINDIR); \
+ echo "Copied $(PROG) to $(FINAL_PROG)";
+
+ #
+
+# BSD install recursive directory creating won't let you copy the file also,
+# unlike GNU's. Just have install install the correct binary and rely on
+# bin.mkpath to create the destdir beforehand
+diff --git a/generate/unix/Makefile.config b/generate/unix/Makefile.config
+index 14e49c4..62eb4eb 100644
+--- a/generate/unix/Makefile.config
++++ b/generate/unix/Makefile.config
+@@ -45,7 +45,7 @@ BITSFLAG = -m$(BITS)
+ COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
+ LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS)
+ INSTALLDIR = /usr/bin
+-INSTALLPROG = install -D ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG)
++INSTALLPROG = install ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG)
+
+ #
+ # Rename a .exe file if necessary
+
Something went wrong with that request. Please try again.