35 | | depends_lib |
36 | | pre-fetch { |
37 | | ui_error "${name} 2.x only works with OS X 10.9 Mavericks or later." |
38 | | ui_error "You might want to try a 1.x series release instead." |
39 | | error "incompatible OS X version" |
40 | | } |
| 35 | configure.compiler macports-gcc-4.8 |
| 36 | # -r ensure's that we will build all Makefiles when QMake get's executed |
| 37 | configure.pre_args -r |
| 38 | |
| 39 | # Fixing -Xarch_X86_64 issues within the Makefile |
| 40 | post-configure { |
| 41 | ui_info "Removing -Xarch_x86_64 from Makefiles" |
| 42 | fs-traverse Makefile ${worksrcpath} { |
| 43 | if {[string match "*/Makefile" ${Makefile}]} { |
| 44 | ui_info "Fixing Xarch ${Makefile}" |
| 45 | reinplace "s|-Xarch_x86_64||" ${Makefile} |
| 46 | } |
| 47 | } |
| 48 | } |
| 58 | if {${os.platform} eq "darwin" && ${os.major} < 13} { |
| 59 | |
| 60 | # copy libgcc files over to within the application, a bug in macdeployqt prevent's this from happening correctly |
| 61 | set librecad "${worksrcpath}/LibreCAD.app/Contents/MacOS/LibreCAD" |
| 62 | file mkdir ${worksrcpath}/LibreCAD.app/Contents/Frameworks |
| 63 | foreach dep [exec otool -L ${librecad} | grep libgcc] { |
| 64 | if [string match -nocase "*/libgcc*.dylib" ${dep}] { |
| 65 | ui_info "Copy libgcc files over from ${dep} to ${worksrcpath}/LibreCAD.app/Contents/Frameworks" |
| 66 | file copy ${dep} ${worksrcpath}/LibreCAD.app/Contents/Frameworks/ |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | # Set these libgcc libraries to local |
| 71 | # TODO: Put these in the foreach loop somehow |
| 72 | system "install_name_tool -change /opt/local/lib/libgcc/libstdc++.6.dylib \ |
| 73 | @executable_path/../Frameworks/libstdc++.6.dylib ${librecad}" |
| 74 | system "install_name_tool -change /opt/local/lib/libgcc/libgcc_s.1.dylib \ |
| 75 | @executable_path/../Frameworks/libgcc_s.1.dylib ${librecad}" |
| 76 | |
| 77 | } |