[88087] trunk/dports/math/octave-devel

michaelld at macports.org michaelld at macports.org
Sun Dec 18 07:31:06 PST 2011


Revision: 88087
          http://trac.macports.org/changeset/88087
Author:   michaelld at macports.org
Date:     2011-12-18 07:31:05 -0800 (Sun, 18 Dec 2011)
Log Message:
-----------
octave-devel: fixes tickets #30737 and #31903.  Make +docs variant dependent on texlive-basic; patch src/display.cc only on 10.7 to fix removed function 'CGDisplayBitsPerPixel'.

Modified Paths:
--------------
    trunk/dports/math/octave-devel/Portfile

Added Paths:
-----------
    trunk/dports/math/octave-devel/files/patch-src-display.cc.diff

Modified: trunk/dports/math/octave-devel/Portfile
===================================================================
--- trunk/dports/math/octave-devel/Portfile	2011-12-18 14:32:56 UTC (rev 88086)
+++ trunk/dports/math/octave-devel/Portfile	2011-12-18 15:31:05 UTC (rev 88087)
@@ -69,9 +69,10 @@
 configure.args      --disable-dependency-tracking \
                     --without-x \
                     --disable-docs \
-                    --with-cholmod="-lcholmod -lmetis" \
-                    --without-framework-carbon
+                    --with-cholmod="-lcholmod -lmetis"
 
+#                    --without-framework-carbon
+
 # octave uses a number of other ports to create sources from template:
 # perl, gawk, gsed, flex, bison, texinfo.  Make sure these are the
 # MacPorts' versions.  Python is not used if perl is available, so
@@ -91,6 +92,12 @@
 test.run            yes
 test.target         check
 
+platform darwin 11 {
+    # 10.7 requires an extra patch; this patch will break the build on
+    # 10.6 and prior, so apply it only under 10.7.
+    patchfiles-append patch-src-display.cc.diff
+}
+
 variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc46 gcc45 gcc44 g95 {}
 
 variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc46 gcc45 gcc43 g95 {}
@@ -156,6 +163,7 @@
 }
 
 variant docs description {Enable creation and installation of documentation} {
+    depends_run-append port:texlive-basic
     configure.args-replace s|--disable-docs|--enable-docs|
 }
 
@@ -164,21 +172,6 @@
     configure.args-append --x-includes=${prefix}
 }
 
-variant debug description {Produce debugging information in compiled code} {
-    configure.cflags-delete    -O2
-    configure.cxxflags-delete  -O2
-    configure.fflags-delete    -O2
-    configure.fcflags-delete   -O2
-    configure.f90flags-delete  -O2
-    configure.objcflags-delete -O2
-    configure.cflags-append    -g3 -O0
-    configure.cxxflags-append  -g3 -O0
-    configure.fcflags-append   -g3 -O0
-    configure.f90flags-append  -g3 -O0
-    configure.fflags-append    -g3 -O0
-    configure.objcflags-append -g3 -O0
-}
-
 variant fltk description {Include FLTK for graphical front-end} {
     depends_lib-append port:fltk-devel
     depends_run-append  port:epstool \

Added: trunk/dports/math/octave-devel/files/patch-src-display.cc.diff
===================================================================
--- trunk/dports/math/octave-devel/files/patch-src-display.cc.diff	                        (rev 0)
+++ trunk/dports/math/octave-devel/files/patch-src-display.cc.diff	2011-12-18 15:31:05 UTC (rev 88087)
@@ -0,0 +1,32 @@
+--- src/display.cc.orig	2011-12-14 15:03:12.000000000 -0500
++++ src/display.cc	2011-12-14 15:25:30.000000000 -0500
+@@ -39,6 +39,29 @@
+ 
+ display_info *display_info::instance = 0;
+ 
++#if defined (HAVE_FRAMEWORK_CARBON)
++// for 10.7 and newer only; would work with 10.6, but the function
++// "CGDisplayBitsPerPixel" is still provided by the Carbon framework
++// with a warning that it will be deprecated (but, it works).
++size_t
++CGDisplayBitsPerPixel (CGDirectDisplayID display)
++{
++  CGDisplayModeRef originalMode = CGDisplayCopyDisplayMode (display);
++  CFStringRef pixelEncoding = CGDisplayModeCopyPixelEncoding (originalMode);
++  size_t rv = 8;
++
++  if (CFStringCompare (pixelEncoding, CFSTR (IO32BitDirectPixels), 0) == 0) {
++    rv = 32;
++  } else {
++    if (CFStringCompare (pixelEncoding, CFSTR (IO16BitDirectPixels), 0) == 0) {
++      rv = 16;
++    }
++    // else rv <= 8, by default.
++  }
++  return  (rv);
++}
++#endif
++
+ void
+ display_info::init (bool query)
+ {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111218/06d0ea7b/attachment.html>


More information about the macports-changes mailing list