arb
arb copied to clipboard
Incorrect macOS library naming: should be libarb.2.dylib not libarb.dylib.2
Detected by Homebrew CI:
Error: 1 problem in 1 formula
homebrew/science/arb:
* Non-libraries were installed to "/usr/local/Cellar/arb/2.9.0/lib"
Installing non-libraries to "lib" is discouraged.
The offending files are:
/usr/local/Cellar/arb/2.9.0/lib/libarb.dylib.2
As a workaround, I am doing this:
if OS.mac?
inreplace "Makefile.in" do |s|
s.gsub! "ln -sf \"$(ARB_LIB)\" \"$(ARB_LIBNAME).$(ARB_MAJOR)\";",
"ln -sf \"$(ARB_LIB)\" \"libarb.$(ARB_MAJOR).dylib\";"
s.gsub! "cp -a $(shell ls $(ARB_LIBNAME)*) \"$(DESTDIR)$(PREFIX)/$(LIBDIR)\";",
"cp -a $(shell ls libarb*) \"$(DESTDIR)$(PREFIX)/$(LIBDIR)\";"
end
end
Unlike .so, for .dylib it should be $major.dylib not dylib.$major
Thanks for the bug report. If you have a fix for the makefile, you're welcome to make a PR.
Unfortunately the workaround above just hacks it to be correct for macOS, but a proper fix will need to not break it on Linux, etc.