Revision: 108773 https://trac.macports.org/changeset/108773 Author: mojca@macports.org Date: 2013-08-01 10:58:09 -0700 (Thu, 01 Aug 2013) Log Message: ----------- mojca: initial attempt to make wxWidgets.confpath work Modified Paths: -------------- users/mojca/wxports/math/gnuplot/Portfile Added Paths: ----------- users/mojca/wxports/_resources/ users/mojca/wxports/_resources/port1.0/ users/mojca/wxports/_resources/port1.0/group/ users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl Added: users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl =================================================================== --- users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl (rev 0) +++ users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl 2013-08-01 17:58:09 UTC (rev 108773) @@ -0,0 +1,23 @@ +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 +# $Id: $ + +options wxWidgets.confpath +options wxWidgets.confscript + +options wxWidgets.use_version +option_proc wxWidgets.use_version wxWidgets._set_version + +proc wxWidgets._set_version {option action args} { + if {"set" != ${action}} { + return + } + + if {${args} == "2.8"} { + wxWidgets.confpath {${prefix}/libexec/wxWidgets/2.8} + } elseif {${args} == "3.0"} { + wxWidgets.confpath {${prefix}/libexec/wxWidgets/2.9} + } else { + # throw an error + } + wxWidgets.confscript {${wxWidgets.confpath}/wx-config} +} Modified: users/mojca/wxports/math/gnuplot/Portfile =================================================================== --- users/mojca/wxports/math/gnuplot/Portfile 2013-08-01 17:44:52 UTC (rev 108772) +++ users/mojca/wxports/math/gnuplot/Portfile 2013-08-01 17:58:09 UTC (rev 108773) @@ -5,6 +5,7 @@ PortGroup xcodeversion 1.0 PortGroup texlive 1.0 PortGroup elisp 1.0 +PortGroup wxwidgets 1.0 name gnuplot version 4.6.3 @@ -128,9 +129,10 @@ } variant wxwidgets30 conflicts wxwidgets wxwidgets_devel description "Enable wxt terminal (using wxWidgets 2.9, supports 64-bit)" { + wxWidgets.use_version 3.0 depends_lib-append port:wxWidgets30 path:lib/pkgconfig/pango.pc:pango configure.args-delete --disable-wxwidgets - configure.args-append --with-wx-config=${prefix}/bin/wx-config + configure.args-append --with-wx-config=${wxWidgets.confpath} } variant wxwidgets_devel conflicts wxwidgets wxwidgets30 description "Enable wxt terminal (using wxWidgets devel, supports 64-bit)" {