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

hashlink 1.12 #113509

Closed
wants to merge 2 commits 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
21 changes: 14 additions & 7 deletions Formula/hashlink.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Hashlink < Formula
desc "Virtual machine for Haxe"
homepage "https://hashlink.haxe.org/"
url "https://github.com/HaxeFoundation/hashlink/archive/1.11.tar.gz"
sha256 "b087ded7b93c7077f5b093b999f279a37aa1e31df829d882fa965389b5ad1aea"
url "https://github.com/HaxeFoundation/hashlink/archive/1.12.tar.gz"
sha256 "7632840f4f64b06662210858418c6d26b8492cf7486a4e86ebe242e27cf8babd"
license "MIT"
revision 5
head "https://github.com/HaxeFoundation/hashlink.git", branch: "master"

bottle do
Expand All @@ -31,10 +30,18 @@ class Hashlink < Formula
end

def install
inreplace "Makefile", /\$\{LFLAGS\}/, "${LFLAGS} ${EXTRA_LFLAGS}" unless build.head?
# On Linux, also pass EXTRA_FLAGS to LIBFLAGS, so that the linker will also add the RPATH to .hdll files.
inreplace "Makefile", "LIBFLAGS =", "LIBFLAGS = ${EXTRA_LFLAGS}"
system "make", "EXTRA_LFLAGS=-Wl,-rpath,#{libexec}/lib"
# remove with 1.13 release:
inreplace "Makefile", /PCRE_INCLUDE =/, "PCRE_FLAGS =" unless build.head?

if OS.mac?
# make file doesn't set rpath on mac yet
system "make", "PREFIX=#{libexec}", "EXTRA_LFLAGS=-Wl,-rpath,#{libexec}/lib"
else
# On Linux, also set RPATH in LIBFLAGS, so that the linker will also add the RPATH to .hdll files.
inreplace "Makefile", "LIBFLAGS =", "LIBFLAGS = -Wl,-rpath,${INSTALL_LIB_DIR}"
system "make", "PREFIX=#{libexec}"
end
iMichka marked this conversation as resolved.
Show resolved Hide resolved

system "make", "install", "PREFIX=#{libexec}"
bin.install_symlink Dir[libexec/"bin/*"]
end
Expand Down