aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorLarry Shaffer2014-08-07 16:37:49 -0600
committerMike McQuaid2014-08-27 10:17:19 +0100
commitd0c154b20731c04212f517e54bbeda3b2aac35ef (patch)
treeb8c0335ebc1a81a1937831d4de7294851359860d /Library
parente728c433700751053942e073e9e1af4f7a827e9a (diff)
downloadhomebrew-d0c154b20731c04212f517e54bbeda3b2aac35ef.tar.bz2
qscintilla2 2.8.3
Also add designer plugin support. Closes #31434. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/qscintilla2.rb30
1 files changed, 28 insertions, 2 deletions
diff --git a/Library/Formula/qscintilla2.rb b/Library/Formula/qscintilla2.rb
index 40b27be25..c4d55a774 100644
--- a/Library/Formula/qscintilla2.rb
+++ b/Library/Formula/qscintilla2.rb
@@ -2,12 +2,14 @@ require 'formula'
class Qscintilla2 < Formula
homepage 'http://www.riverbankcomputing.co.uk/software/qscintilla/intro'
- url 'https://downloads.sf.net/project/pyqt/QScintilla2/QScintilla-2.8/QScintilla-gpl-2.8.tar.gz'
- sha1 '3edf9d476d4e6af0706a4d33401667a38e3a697e'
+ url "https://downloads.sf.net/project/pyqt/QScintilla2/QScintilla-2.8.3/QScintilla-gpl-2.8.3.tar.gz"
+ sha1 "d3b4f0dc7358591c122518d932f797ae3e3dd9d4"
depends_on :python => :recommended
depends_on :python3 => :optional
+ option "without-plugin", "Skip building the Qt Designer plugin"
+
if build.with? "python3"
depends_on "pyqt" => "with-python3"
else
@@ -31,11 +33,19 @@ class Qscintilla2 < Formula
s.gsub! "$$[QT_INSTALL_DATA]", "#{prefix}/data"
end
+ inreplace "features/qscintilla2.prf" do |s|
+ s.gsub! '$$[QT_INSTALL_LIBS]', lib
+ s.gsub! "$$[QT_INSTALL_HEADERS]", include
+ end
+
system "qmake", "qscintilla.pro", *args
system "make"
system "make", "install"
end
+ # Add qscintilla2 features search path, since it is not installed in Qt keg's mkspecs/features/
+ ENV["QMAKEFEATURES"] = "#{prefix}/data/mkspecs/features"
+
cd 'Python' do
Language::Python.each_python(build) do |python, version|
(share/"sip").mkpath
@@ -50,6 +60,22 @@ class Qscintilla2 < Formula
system "make", "clean"
end
end
+
+ if build.with? "plugin"
+ mkpath prefix/"plugins/designer"
+ cd "designer-Qt4Qt5" do
+ inreplace "designer.pro" do |s|
+ s.sub! "$$[QT_INSTALL_PLUGINS]", "#{prefix}/plugins"
+ s.sub! "$$[QT_INSTALL_LIBS]", "#{lib}"
+ end
+ system "qmake", "designer.pro", *args
+ system "make"
+ system "make", "install"
+ end
+ # symlink Qt Designer plugin (note: not removed on qscintilla2 formula uninstall)
+ ln_sf prefix/"plugins/designer/libqscintillaplugin.dylib",
+ Formula["qt"].opt_prefix/"plugins/designer/"
+ end
end
test do