Skip to content

Commit

Permalink
hashlink 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
tobil4sk authored and iMichka committed Dec 16, 2022
1 parent fc0eb09 commit e5cc910
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Formula/hashlink.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,18 @@ class Hashlink < Formula
end

def install
# 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}" unless OS.mac?
# remove with 1.13 release:
inreplace "Makefile", /PCRE_INCLUDE =/, "PCRE_FLAGS =" unless build.head?

system "make", "PREFIX=#{libexec}"
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

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

0 comments on commit e5cc910

Please sign in to comment.