[MacPorts] #30737: octave-devel: error: 'CGDisplayBitsPerPixel' was not declared in this scope
MacPorts
noreply at macports.org
Thu Aug 25 16:35:23 PDT 2011
#30737: octave-devel: error: 'CGDisplayBitsPerPixel' was not declared in this scope
--------------------------+-------------------------------------------------
Reporter: liamg@… | Owner: michaelld@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.0.1
Keywords: lion | Port: octave-devel
--------------------------+-------------------------------------------------
Comment(by jkeeler@…):
I had no luck with the CFLAGS option, but --without-framework-carbon
option above worked for me. Using OS X 10.7.1
I also had success with this patch file, with carbon framework enabled.
{{{
1 ---
/opt/local/var/macports/sources/rsync.macports.org/release/ports/math
/octave-devel/work/octave-3.4.2/src/display.cc 2011-04-11
07:57:08.000000000 -0700
2 +++
/opt/local/var/macports/sources/rsync.macports.org/release/ports/math
/octave-devel/work/octave-3.4.2/src/display.cc.new 2011-08-25
15:17:02.000000000 -0700
3 @@ -39,6 +39,19 @@
4
5 display_info *display_info::instance = 0;
6
7 +size_t CGDisplayBitsPerPixel (CGDirectDisplayID display)
8 +{
9 + CGDisplayModeRef originalMode = CGDisplayCopyDisplayMode (display);
10 + CFStringRef pixelEncoding =
CGDisplayModeCopyPixelEncoding(originalMode);
11 +
12 + if (CFStringCompare(pixelEncoding,CFSTR(IO32BitDirectPixels),0)==0)
13 + return 32;
14 + else if
(CFStringCompare(pixelEncoding,CFSTR(IO16BitDirectPixels),0)==0)
15 + return 16;
16 + else
17 + return 8;
18 +}
19 +
20 void
21 display_info::init (bool query)
22 {
}}}
Also had to add this line to the Portfile:
{{{
patchfiles patch-src-display.cc.diff
}}}
and place the diff file above into
/opt/local/var/macports/sources/rsync.macports.org/release/ports/math
/octave-devel/files folder
good description for patching ports here:
[http://guide.macports.org/]
--
Ticket URL: <https://trac.macports.org/ticket/30737#comment:6>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list