[72836] trunk/dports/devel/qscintilla
michaelld at macports.org
michaelld at macports.org
Thu Oct 28 06:50:01 PDT 2010
Revision: 72836
http://trac.macports.org/changeset/72836
Author: michaelld at macports.org
Date: 2010-10-28 06:49:57 -0700 (Thu, 28 Oct 2010)
Log Message:
-----------
qscintilla: Add debug variant, in QMake style.
Modified Paths:
--------------
trunk/dports/devel/qscintilla/Portfile
Added Paths:
-----------
trunk/dports/devel/qscintilla/files/
trunk/dports/devel/qscintilla/files/patch-add_debug.diff
Modified: trunk/dports/devel/qscintilla/Portfile
===================================================================
--- trunk/dports/devel/qscintilla/Portfile 2010-10-28 11:23:09 UTC (rev 72835)
+++ trunk/dports/devel/qscintilla/Portfile 2010-10-28 13:49:57 UTC (rev 72836)
@@ -42,7 +42,8 @@
universal_variant yes
post-patch {
- # allow for universal building, if desired
+ # allow for universal building, if desired,
+ # by fixing up the QMake .pro files.
if {[variant_exists universal] && [variant_isset universal]} {
# set universal arch types, depending on what the user has specified
array set macports_to_qt_build_arch {
@@ -78,12 +79,21 @@
post-configure {
# make sure the designer plugin finds the correct Qsci library, by
# putting its search path first of all -L paths
- reinplace "/LIBS/s@\-L${prefix}/lib@\-L../Qt4 at 1" \
- ${worksrcpath}/designer-Qt4/Makefile
- # make sure the designer plugin finds the correct Qsci includes, by
- # putting its search path first of all -I paths
- reinplace "/INCPATH/s@\-I@\-I../Qt4 \-I at 1" \
- ${worksrcpath}/designer-Qt4/Makefile
+ if {[variant_isset debug]} {
+ reinplace "/LIBS/s@\-L${prefix}/lib@\-L../Qt4 at 1" \
+ ${worksrcpath}/designer-Qt4/Makefile.Release
+ reinplace "/LIBS/s@\-L${prefix}/lib@\-L../Qt4 at 1" \
+ ${worksrcpath}/designer-Qt4/Makefile.Debug
+ reinplace "/INCPATH/s@\-I@\-I../Qt4 \-I at 1" \
+ ${worksrcpath}/designer-Qt4/Makefile.Release
+ reinplace "/INCPATH/s@\-I@\-I../Qt4 \-I at 1" \
+ ${worksrcpath}/designer-Qt4/Makefile.Debug
+ } else {
+ reinplace "/LIBS/s@\-L${prefix}/lib@\-L../Qt4 at 1" \
+ ${worksrcpath}/designer-Qt4/Makefile
+ reinplace "/INCPATH/s@\-I@\-I../Qt4 \-I at 1" \
+ ${worksrcpath}/designer-Qt4/Makefile
+ }
}
build.cmd "cd ${worksrcpath}/Qt4; make; cd ${worksrcpath}/designer-Qt4; make; echo"
@@ -102,8 +112,26 @@
libqscintilla2.5.dylib \
${qt_dir}/lib/libqscintilla2.5.dylib \
${worksrcpath}/designer-Qt4/libqscintillaplugin.dylib"
+ if {[variant_isset debug]} {
+ system "install_name_tool -id \
+ ${qt_dir}/lib/libqscintilla2_debug.5.dylib \
+ ${worksrcpath}/Qt4/libqscintilla2_debug.5.dylib"
+ system "install_name_tool -id \
+ ${qt_plugins_dir}/designer/libqscintillaplugin_debug.dylib \
+ ${worksrcpath}/designer-Qt4/libqscintillaplugin_debug.dylib"
+ system "install_name_tool -change \
+ libqscintilla2.5.dylib \
+ ${qt_dir}/lib/libqscintilla2_debug.5.dylib \
+ ${worksrcpath}/designer-Qt4/libqscintillaplugin_debug.dylib"
+ }
}
+variant debug \
+description {Produce both release and debug library and plugin} {
+ # fix up QMake .pro files for +debug, if selected
+ patchfiles-append patch-add_debug.diff
+}
+
livecheck.type regex
livecheck.url ${master_sites}
livecheck.regex QScintilla-gpl-\(\\d+.\\d+.\\d+\).tar.gz
Added: trunk/dports/devel/qscintilla/files/patch-add_debug.diff
===================================================================
--- trunk/dports/devel/qscintilla/files/patch-add_debug.diff (rev 0)
+++ trunk/dports/devel/qscintilla/files/patch-add_debug.diff 2010-10-28 13:49:57 UTC (rev 72836)
@@ -0,0 +1,42 @@
+--- Qt4/qscintilla.pro.orig 2010-10-27 18:33:43.000000000 -0400
++++ Qt4/qscintilla.pro 2010-10-27 18:34:11.000000000 -0400
+@@ -33,10 +33,16 @@
+
+ TEMPLATE = lib
+ TARGET = qscintilla2
+-CONFIG += qt warn_off release dll thread
+-INCLUDEPATH = . ../include ../src
++CONFIG += qt warn_off debug_and_release dll thread build_all
++INCLUDEPATH = . .. ../include ../src
+ DEFINES = QSCINTILLA_MAKE_DLL QT SCI_LEXER
+
++!debug_and_release|build_pass {
++ CONFIG(debug, debug|release) {
++ mac:TARGET = $$member(TARGET, 0)_debug
++ }
++}
++
+ # Handle both Qt v4 and v3.
+ target.path = $$[QT_INSTALL_LIBS]
+ isEmpty(target.path) {
+--- designer-Qt4/designer.pro.orig 2010-10-27 18:33:50.000000000 -0400
++++ designer-Qt4/designer.pro 2010-10-27 18:37:31.000000000 -0400
+@@ -4,7 +4,7 @@
+ TEMPLATE = lib
+ TARGET = qscintillaplugin
+
+-CONFIG += designer release plugin
++CONFIG += designer debug_and_release plugin build_all
+
+ HEADERS = qscintillaplugin.h
+ SOURCES = qscintillaplugin.cpp
+@@ -13,3 +13,9 @@
+ INSTALLS += target
+
+ LIBS += -lqscintilla2
++
++!debug_and_release|build_pass {
++ CONFIG(debug, debug|release) {
++ mac:TARGET = $$member(TARGET, 0)_debug
++ }
++}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101028/1f9bcee7/attachment.html>
More information about the macports-changes
mailing list