From aecee8c4b2aead4b1ae1049bc020aae1f2c7066a Mon Sep 17 00:00:00 2001 From: verbalshadow Date: Thu, 3 Jul 2008 16:14:52 +0000 Subject: [PATCH] Patch so Inkscape will compile on Solaris 10 from LP https://bugs.launchpad.net/inkscape/+bug/245173 --- configure.ac | 17 +++++++++-------- src/2geom/isnan.h | 4 ++-- src/CMakeLists.txt | 6 +++--- src/display/nr-filter.cpp | 2 +- src/display/pixblock-transform.cpp | 2 +- src/isinf.h | 2 +- src/isnormal.h | 2 +- src/widgets/desktop-widget.cpp | 2 +- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/configure.ac b/configure.ac index 852970ba8..98b888977 100644 --- a/configure.ac +++ b/configure.ac @@ -257,19 +257,20 @@ esac AC_MSG_RESULT([$platform_win32]) AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes") -AC_MSG_CHECKING([for Solaris 2.8 platform]) +AC_MSG_CHECKING([for Solaris platform]) case "$host" in - *-solaris2.8) - platform_solaris_2_8=yes - CFLAGS="$CFLAGS -DSOLARIS_2_8" - CXXFLAGS="$CXXFLAGS -DSOLARIS_2_8" + *-solaris2.*) + platform_solaris=yes + solaris_version=`echo $host|sed -e 's/^.*-solaris2\.//' -e s'/\..*$//'` + CFLAGS="$CFLAGS -DSOLARIS=$solaris_version" + CXXFLAGS="$CXXFLAGS -DSOLARIS=$solaris_version" ;; *) - platform_solaris_2_8=no + platform_solaris=no ;; esac -AC_MSG_RESULT([$platform_solaris_2_8]) -AM_CONDITIONAL(PLATFORM_SOLARIS_2_8, test "$platform_solaris_2_8" = "yes") +AC_MSG_RESULT([$platform_solaris]) +AM_CONDITIONAL(PLATFORM_SOLARIS, test "$platform_solaris" = "yes") dnl ****************************** dnl Xft checking diff --git a/src/2geom/isnan.h b/src/2geom/isnan.h index 6b94daa6e..d95a45f10 100644 --- a/src/2geom/isnan.h +++ b/src/2geom/isnan.h @@ -34,7 +34,7 @@ # define IS_NAN(_a) (_isnan(_a)) /* Win32 definition */ #elif defined(isnan) || defined(__FreeBSD__) || defined(__osf__) # define IS_NAN(_a) (isnan(_a)) /* GNU definition */ -#elif defined (SOLARIS_2_8) && __GNUC__ == 3 && __GNUC_MINOR__ == 2 +#elif defined (SOLARIS) # define IS_NAN(_a) (isnan(_a)) /* GNU definition */ #else # define IS_NAN(_a) (std::isnan(_a)) @@ -55,7 +55,7 @@ # define IS_FINITE(_a) (isfinite(_a)) #elif defined(__osf__) # define IS_FINITE(_a) (finite(_a) && !IS_NAN(_a)) -#elif defined (SOLARIS_2_8) && __GNUC__ == 3 && __GNUC_MINOR__ == 2 +#elif defined (SOLARIS) #include #define IS_FINITE(_a) (finite(_a) && !IS_NAN(_a)) #else diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 23ac82fb6..a84909382 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -305,15 +305,15 @@ FOREACH(dirlistsrc ${libfolders}) ADD_SUBDIRECTORY(${dirlistsrc}) ENDFOREACH(dirlistsrc) - +message(status "${INKSCAPE_LIBS}") ADD_LIBRARY(sp STATIC ${SP_SRC}) TARGET_LINK_LIBRARIES(sp - "${INKSCAPE_LIBS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot sp + 2geom avoid cola croco gdl nr nrtype vpsc livarot ) # make executable for INKSCAPE ADD_EXECUTABLE(inkscape ${INKSCAPE_SRC}) TARGET_LINK_LIBRARIES(inkscape - "${INKSCAPE_LIBS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot sp + 2geom avoid cola croco gdl nr nrtype vpsc livarot sp ) # make executable for INKVIEW diff --git a/src/display/nr-filter.cpp b/src/display/nr-filter.cpp index 62b3893c2..f7a04fd50 100644 --- a/src/display/nr-filter.cpp +++ b/src/display/nr-filter.cpp @@ -46,7 +46,7 @@ #include "libnr/nr-scale.h" #include "svg/svg-length.h" #include "sp-filter-units.h" -#if defined (SOLARIS_2_8) +#if defined (SOLARIS) && (SOLARIS == 8) #include "round.h" using Inkscape::round; #endif diff --git a/src/display/pixblock-transform.cpp b/src/display/pixblock-transform.cpp index 730f0ad43..74ded2ae0 100644 --- a/src/display/pixblock-transform.cpp +++ b/src/display/pixblock-transform.cpp @@ -13,7 +13,7 @@ #include #include -#if defined (SOLARIS_2_8) +#if defined (SOLARIS) && (SOLARIS == 8) #include "round.h" using Inkscape::round; #endif diff --git a/src/isinf.h b/src/isinf.h index 92c885701..7799d2876 100644 --- a/src/isinf.h +++ b/src/isinf.h @@ -5,7 +5,7 @@ * Fix for missing std::isnormal with SOLARIS8/GCC3.2 */ -#if defined (SOLARIS_2_8) && __GNUC__ == 3 && __GNUC_MINOR__ == 2 +#if defined (SOLARIS) #include #define isinf(x) ((fpclass(x) == FP_NINF) || (fpclass(x) == FP_PINF)) diff --git a/src/isnormal.h b/src/isnormal.h index 6587331c3..d53105926 100644 --- a/src/isnormal.h +++ b/src/isnormal.h @@ -5,7 +5,7 @@ * Fix for missing std::isnormal with SOLARIS8/GCC3.2 */ -#if defined (SOLARIS_2_8) && __GNUC__ == 3 && __GNUC_MINOR__ == 2 +#if defined (SOLARIS) #include #define isnormal(x) (fpclass(x) >= FP_NZERO) diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index c6e36aa8e..8744a4be0 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -62,7 +62,7 @@ #include "box3d-context.h" #include "sp-image.h" -#if defined (SOLARIS_2_8) +#if defined (SOLARIS) && (SOLARIS == 8) #include "round.h" using Inkscape::round; #endif -- 2.30.2