parent
771839f0d7
commit
9ee8d3a428
@ -0,0 +1,11 @@
|
|||||||
|
# MacOS environment
|
||||||
|
|
||||||
|
* x86_64_elf_*:
|
||||||
|
<https://github.com/altkatz/homebrew-gcc_cross_compilers>
|
||||||
|
|
||||||
|
* grub.rb:
|
||||||
|
<https://github.com/nativeos/homebrew-i386-elf-toolchain/blob/master/Formula/i386-elf-grub.rb>
|
||||||
|
|
||||||
|
* objconv.rb:
|
||||||
|
<https://github.com/hawkw/homebrew-grub/blob/master/Formula/objconv.rb>
|
||||||
|
Change SHA256
|
@ -0,0 +1,31 @@
|
|||||||
|
class Grub < Formula
|
||||||
|
desc "GNU GRUB 2 targetting i386-elf"
|
||||||
|
homepage "https://www.gnu.org/software/grub/"
|
||||||
|
url "https://ftp.gnu.org/gnu/grub/grub-2.02.tar.xz"
|
||||||
|
version "2.02"
|
||||||
|
sha256 "810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f"
|
||||||
|
|
||||||
|
depends_on "i386-elf-gcc"
|
||||||
|
|
||||||
|
def install
|
||||||
|
mkdir "grub-build" do
|
||||||
|
system "../configure",
|
||||||
|
"--disable-nls",
|
||||||
|
"--disable-werror",
|
||||||
|
"--disable-efiemu",
|
||||||
|
"--target=i386-elf",
|
||||||
|
"--prefix=#{prefix}",
|
||||||
|
"TARGET_CC=i386-elf-gcc",
|
||||||
|
"TARGET_NM=i386-elf-nm",
|
||||||
|
"TARGET_OBJCOPY=i386-elf-objcopy",
|
||||||
|
"TARGET_RANLIB=i386-elf-ranlib",
|
||||||
|
"TARGET_STRIP=i386-elf-strip"
|
||||||
|
|
||||||
|
system "make", "install"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
system "grub-shell", "--version"
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,23 @@
|
|||||||
|
class Objconv < Formula
|
||||||
|
desc "Object file converter and disassembler"
|
||||||
|
homepage "http://www.agner.org/optimize/#objconv"
|
||||||
|
url "http://www.agner.org/optimize/objconv.zip"
|
||||||
|
version "2.44"
|
||||||
|
sha256 "f2c0c4cd6ff227e76ffed5796953cd9ae9eb228847ca9a14dba6392c573bb7a4"
|
||||||
|
def install
|
||||||
|
system "unzip", "source.zip",
|
||||||
|
"-dsrc"
|
||||||
|
# objconv doesn't have a Makefile, so we have to call
|
||||||
|
# the C++ compiler ourselves
|
||||||
|
system ENV.cxx, "-o", "objconv",
|
||||||
|
"-O2",
|
||||||
|
*Dir["src/*.cpp"],
|
||||||
|
"--prefix=#{prefix}"
|
||||||
|
bin.install "objconv"
|
||||||
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
system "#{bin}/objconv", "-h"
|
||||||
|
# TODO: write better tests
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue