Skip to content

Commit

Permalink
webkit2-gtk: fix build on 10.6 with macports-libstdc++
Browse files Browse the repository at this point in the history
last missing version of current system
snowmath.h should become part of libgcc at some point instead
  • Loading branch information
kencu committed Oct 4, 2017
1 parent 3bad732 commit 7889677
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions www/webkit2-gtk/Portfile
Expand Up @@ -179,6 +179,13 @@ if {${os.platform} eq "darwin" && ${os.major} < 13} {
if {[variant_isset x11]} {
patchfiles-append patch-snowleopard-npruntime-redefine-cursor.diff
}

# special case: fix build on 10.6 with macports-libstdc++
# contents of snowmath.h should someday become part of gcc6 cmath
if { ${configure.cxx_stdlib} eq "macports-libstdc++" && ${os.major} < 11 } {
configure.cxxflags-append -D_GLIBCXX_USE_C99_MATH_TR1=1
configure.cxxflags-append -include ${portpath}/${filesdir}/snowmath.h
}
}

variant quartz conflicts x11 gtk2 {
Expand Down
8 changes: 8 additions & 0 deletions www/webkit2-gtk/files/snowmath.h
@@ -0,0 +1,8 @@
extern "C" {
extern long long int llrint ( double );
extern long long int llrintf ( float );
extern long long int llround ( double );
extern long long int llroundf ( float );
extern long long int llrintl(long double);
extern long long int llroundl(long double);
}

0 comments on commit 7889677

Please sign in to comment.