summaryrefslogtreecommitdiff
path: root/homebrew/dspdfviewer/.make.sh-auto
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/dspdfviewer/.make.sh-auto')
-rw-r--r--homebrew/dspdfviewer/.make.sh-auto11
1 files changed, 11 insertions, 0 deletions
diff --git a/homebrew/dspdfviewer/.make.sh-auto b/homebrew/dspdfviewer/.make.sh-auto
new file mode 100644
index 000000000..a36b862dd
--- /dev/null
+++ b/homebrew/dspdfviewer/.make.sh-auto
@@ -0,0 +1,11 @@
+pkg:setup
+ENV.cxx11
+resource("poppler").stage do
+cmake . -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_INSTALL_PREFIX=#{libexec} -DBUILD_GTK_TESTS=OFF -DENABLE_CMS=none -DENABLE_GLIB=ON -DENABLE_QT5=ON -DWITH_GObjectIntrospection=ON -DENABLE_XPDF_HEADERS=ON
+make DESTDIR=${PKG_DEST} install
+libpoppler = (libexec/"lib/libpoppler.dylib").readlink
+to_fix = ["#{libexec}/lib/libpoppler-cpp.dylib", "#{libexec}/lib/libpoppler-glib.dylib", "#{libexec}/lib/libpoppler-qt5.dylib", *Dir["#{libexec}/bin/*"]]
+to_fix.each do |f|
+macho = MachO.open(f)
+macho.change_dylib("@rpath/#{libpoppler}", "#{libexec}/lib/#{libpoppler}")
+macho.write!