Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dmd: fix VERSION file #1040

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Formula/dmd.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class Dmd < Formula
desc "D programming language compiler for OS X"
homepage "https://dlang.org/"
revision 1

stable do
url "https://github.com/D-Programming-Language/dmd/archive/v2.071.0.tar.gz"
Expand Down Expand Up @@ -47,6 +48,11 @@ class Dmd < Formula
def install
make_args = ["INSTALL_DIR=#{prefix}", "MODEL=#{Hardware::CPU.bits}", "-f", "posix.mak"]

# VERSION file is wrong upstream, has happened before, so we just overwrite it here.
version_file = (buildpath/"VERSION")
rm version_file
version_file.write version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does (buildpath/"VERSION").write version work?

Copy link
Contributor Author

@John-Colvin John-Colvin May 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to rm first because otherwise it complains about overwriting an
existing file.
On 10 May 2016 9:33 am, "Mike McQuaid" notifications@github.com wrote:

In Formula/dmd.rb
#1040 (comment)
:

@@ -47,6 +48,11 @@ class Dmd < Formula
def install
make_args = ["INSTALL_DIR=#{prefix}", "MODEL=#{Hardware::CPU.bits}", "-f", "posix.mak"]

  • VERSION file is wrong upstream, has happened before, so we just overwrite it here.

  • version_file = (buildpath/"VERSION")
  • rm version_file
  • version_file.write version

Does (buildpath/"VERSION").write version work?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/Homebrew/homebrew-core/pull/1040/files/b12f2d681b433bba2522f0651bad81141fc2b35e#r62630959


system "make", "SYSCONFDIR=#{etc}", "TARGET_CPU=X86", "AUTO_BOOTSTRAP=1", "RELEASE=1", *make_args

bin.install "src/dmd"
Expand Down