[47569] trunk/dports/lang/otcl/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Sat Feb 28 17:11:38 PST 2009


Revision: 47569
          http://trac.macports.org/changeset/47569
Author:   jeremyhu at macports.org
Date:     2009-02-28 17:11:38 -0800 (Sat, 28 Feb 2009)
Log Message:
-----------
otcl: Only use x11prefix if we need to

Modified Paths:
--------------
    trunk/dports/lang/otcl/Portfile

Modified: trunk/dports/lang/otcl/Portfile
===================================================================
--- trunk/dports/lang/otcl/Portfile	2009-03-01 01:10:32 UTC (rev 47568)
+++ trunk/dports/lang/otcl/Portfile	2009-03-01 01:11:38 UTC (rev 47569)
@@ -37,11 +37,22 @@
 
 configure.args		--with-Tcl=${prefix} --with-Tcl-ver=${tclmaj} \
 			--with-tk=${prefix} --with-tk-ver=${tclmaj} \
-			--prefix=${prefix} \
-			CPPFLAGS='-I${x11prefix}/include -I${workpath}/tcl${tclv}/generic/' \
-			CFLAGS='-I${x11prefix}/include -I${workpath}/tcl${tclv}/generic/' \
-			LDFLAGS='-L${x11prefix}/lib'
+			--prefix=${prefix}
 
+pre-configure {
+    if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] } {
+	configure.args-append \
+		CPPFLAGS='-I${prefix}/include -I${workpath}/tcl${tclv}/generic/' \
+		CFLAGS='-I${prefix}/include -I${workpath}/tcl${tclv}/generic/' \
+		LDFLAGS='-L${prefix}/lib'
+    } else {
+	configure.args-append \
+		CPPFLAGS='-I${x11prefix}/include -I${workpath}/tcl${tclv}/generic/' \
+		CFLAGS='-I${x11prefix}/include -I${workpath}/tcl${tclv}/generic/' \
+		LDFLAGS='-L${x11prefix}/lib'
+    }
+}
+
 post-configure          {
                         reinplace "s|-ltk8.4|-ltcl8.4 -ltk8.4|g" \
                                 ${worksrcpath}/Makefile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090228/a2feef18/attachment-0001.html>


More information about the macports-changes mailing list