2011-05-04 20:25:00 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Diffpdf < Formula
|
|
|
|
homepage 'http://www.qtrac.eu/diffpdf.html'
|
2012-05-23 21:05:24 +00:00
|
|
|
url 'http://www.qtrac.eu/diffpdf-2.0.0.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'b6a52f48927721721960aa1f581f127aa8454830'
|
2011-05-04 20:25:00 +00:00
|
|
|
|
|
|
|
depends_on 'qt'
|
2013-01-26 17:57:16 +00:00
|
|
|
depends_on 'poppler' => 'with-qt4'
|
2011-05-04 20:25:00 +00:00
|
|
|
|
2012-02-13 06:17:17 +00:00
|
|
|
# The location of Poppler library/include paths is hardcoded in the project file
|
|
|
|
# which causes builds to fail if Homebrew is not installed to /usr/local.
|
2011-10-05 06:37:40 +00:00
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2011-05-04 20:25:00 +00:00
|
|
|
def install
|
2012-05-23 21:05:24 +00:00
|
|
|
# The 2.0 sources shipped without translation files. Generate them so that
|
|
|
|
# compilation does not fail.
|
|
|
|
system 'lrelease', 'diffpdf.pro'
|
2012-02-13 06:17:17 +00:00
|
|
|
# Generate makefile and disable .app creation
|
|
|
|
system 'qmake -spec macx-g++ CONFIG-=app_bundle'
|
|
|
|
system 'make'
|
|
|
|
|
|
|
|
bin.install 'diffpdf'
|
|
|
|
man1.install 'diffpdf.1'
|
2011-05-04 20:25:00 +00:00
|
|
|
end
|
|
|
|
end
|
2011-10-05 06:37:40 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
|
|
|
|
diff --git a/diffpdf.pro b/diffpdf.pro
|
2012-05-23 21:05:24 +00:00
|
|
|
index 8b511b6..2079247 100644
|
2011-10-05 06:37:40 +00:00
|
|
|
--- a/diffpdf.pro
|
|
|
|
+++ b/diffpdf.pro
|
2012-05-23 21:05:24 +00:00
|
|
|
@@ -31,36 +31,7 @@ LIBS += -lpoppler-qt4
|
|
|
|
win32 {
|
|
|
|
CONFIG += release
|
|
|
|
}
|
2012-01-27 08:49:53 +00:00
|
|
|
-exists($(HOME)/opt/poppler018/) {
|
2011-10-05 06:37:40 +00:00
|
|
|
- message(Using locally built Poppler library)
|
2012-05-23 21:05:24 +00:00
|
|
|
- INCLUDEPATH += $(HOME)/opt/poppler018/include/poppler/cpp
|
2012-01-27 08:49:53 +00:00
|
|
|
- INCLUDEPATH += $(HOME)/opt/poppler018/include/poppler/qt4
|
|
|
|
- LIBS += -Wl,-rpath -Wl,$(HOME)/opt/poppler018/lib -Wl,-L$(HOME)/opt/poppler018/lib
|
2011-10-05 06:37:40 +00:00
|
|
|
-} else {
|
2012-05-23 21:05:24 +00:00
|
|
|
- exists(/poppler_lib) {
|
|
|
|
- message(Using locally built Poppler library on Windows)
|
|
|
|
- INCLUDEPATH += /c/poppler_lib/include/poppler/cpp
|
|
|
|
- INCLUDEPATH += /c/poppler_lib/include/poppler/qt4
|
|
|
|
- LIBS += -Wl,-rpath -Wl,/c/poppler_lib/bin -Wl,-L/c/poppler_lib/bin
|
2011-10-05 06:37:40 +00:00
|
|
|
- } else {
|
2012-05-23 21:05:24 +00:00
|
|
|
- exists(/usr/include/poppler/qt4) {
|
|
|
|
- INCLUDEPATH += /usr/include/poppler/cpp
|
|
|
|
- INCLUDEPATH += /usr/include/poppler/qt4
|
|
|
|
- } else {
|
|
|
|
- INCLUDEPATH += /usr/local/include/poppler/cpp
|
|
|
|
- INCLUDEPATH += /usr/local/include/poppler/qt4
|
|
|
|
- }
|
2011-10-05 06:37:40 +00:00
|
|
|
- }
|
|
|
|
-}
|
2012-05-23 21:05:24 +00:00
|
|
|
-#exists($(HOME)/opt/podofo09/) {
|
|
|
|
-# message(Using locally built PoDoFo library)
|
|
|
|
-# INCLUDEPATH += $(HOME)/opt/podofo09/include/poppler/cpp
|
|
|
|
-# INCLUDEPATH += $(HOME)/opt/podofo09/include/poppler/qt4
|
|
|
|
-# LIBS += -Wl,-rpath -Wl,$(HOME)/opt/podofo09/lib64 -Wl,-L$(HOME)/opt/podofo09/lib64
|
|
|
|
-#} else {
|
|
|
|
-# exists(/usr/include/podofo) {
|
|
|
|
-# INCLUDEPATH += /usr/include/podofo
|
|
|
|
-# } else {
|
|
|
|
-# INCLUDEPATH += /usr/local/include/podofo
|
|
|
|
-# }
|
|
|
|
-#}
|
2012-01-27 08:49:53 +00:00
|
|
|
+
|
|
|
|
+LIBS += -L$$quote(HOMEBREW_PREFIX/lib) -lpoppler-qt4
|
2012-05-23 21:05:24 +00:00
|
|
|
+INCLUDEPATH += $$quote(HOMEBREW_PREFIX/include/poppler/cpp)
|
2011-10-05 06:47:26 +00:00
|
|
|
+INCLUDEPATH += $$quote(HOMEBREW_PREFIX/include/poppler/qt4)
|