poppler: do not depend on qt, fix rpath

master
Francois-Xavier Coudert 2022-07-16 16:52:08 +02:00 committed by BrewTestBot
parent fc6363012c
commit 2d2446ef15
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 4 additions and 17 deletions

View File

@ -4,6 +4,7 @@ class Poppler < Formula
url "https://poppler.freedesktop.org/poppler-22.06.0.tar.xz"
sha256 "a0f9aaa3918bad781039fc307a635652a14d1b391cd559b66edec4bedba3c5d7"
license "GPL-2.0-only"
revision 1
head "https://gitlab.freedesktop.org/poppler/poppler.git", branch: "master"
livecheck do
@ -35,7 +36,6 @@ class Poppler < Formula
depends_on "nspr"
depends_on "nss"
depends_on "openjpeg"
depends_on "qt"
uses_from_macos "gperf" => :build
uses_from_macos "curl"
@ -58,15 +58,16 @@ class Poppler < Formula
def install
ENV.cxx11
args = std_cmake_args + %w[
args = std_cmake_args + %W[
-DBUILD_GTK_TESTS=OFF
-DENABLE_BOOST=OFF
-DENABLE_CMS=lcms2
-DENABLE_GLIB=ON
-DENABLE_QT5=OFF
-DENABLE_QT6=ON
-DENABLE_QT6=OFF
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON
-DWITH_GObjectIntrospection=ON
-DCMAKE_INSTALL_RPATH=#{rpath}
]
system "cmake", ".", *args
@ -80,20 +81,6 @@ class Poppler < Formula
resource("font-data").stage do
system "make", "install", "prefix=#{prefix}"
end
if OS.mac?
libpoppler = (lib/"libpoppler.dylib").readlink
[
"#{lib}/libpoppler-cpp.dylib",
"#{lib}/libpoppler-glib.dylib",
"#{lib}/libpoppler-qt#{Formula["qt"].version.major}.dylib",
*Dir["#{bin}/*"],
].each do |f|
macho = MachO.open(f)
macho.change_dylib("@rpath/#{libpoppler}", "#{opt_lib}/#{libpoppler}")
macho.write!
end
end
end
test do