Ticket #9722: trac_9722-pari-2.3.5.p2-p3.patch

File trac_9722-pari-2.3.5.p2-p3.patch, 4.0 KB (added by leif, 11 years ago)

SPKG patch, apply to PARI 2.3.5.p2. Fixes Fedora 13 link error when FLTK is used. (Updated version, only doc changes.)

  • SPKG.txt

    # HG changeset patch
    # User Leif Leonhardy <not.really@online.de>
    # Date 1282503988 -7200
    # Node ID dc34abfbcf0e74b75c09b1db5f3504cf207dfde4
    # Parent  b475dd68b19a8063b06065095ffb8c684bb3cee5
    #9722: Explicitly link against libstdc++ if FLTK is used, to support Fedora 13.
    
    === pari-2.3.5.p3 (Leif Leonhardy, August 11th 2010) ===
     * #9722: Explicitly link against libstdc++ if FLTK is used, to support
       Fedora 13.
     * TODO/FIXME: On Fedora 13, PARI was reported to try to use FLTK even if
       just the library (as opposed to the required developer) package of FLTK is
       installed, which resulted in a compiler (not the fixed linker) error.
       I though couldn't reproduce this on neither 32-bit nor 64-bit Fedora 13,
       so I believe this error is due to a broken/invalid FLTK installation on
       the machines at ETH Zurich. (One could add an extra test for presence of
       the FLTK include directory to make the build more robust.)
    
    diff -r b475dd68b19a -r dc34abfbcf0e SPKG.txt
    a b  
    6565
    6666== Changelog ==
    6767
     68=== pari-2.3.5.p3 (Leif Leonhardy, August 11th 2010) ===
     69 * #9722: Explicitly link against libstdc++ if FLTK is used, to support
     70   Fedora 13.
     71 * TODO/FIXME: On Fedora 13, PARI was reported to try to use FLTK even if
     72   just the library (as opposed to the required developer) package of FLTK is
     73   installed, which resulted in a compiler (not the fixed linker) error.
     74   I though couldn't reproduce this on neither 32-bit nor 64-bit Fedora 13,
     75   so I believe this error is due to a broken/invalid FLTK installation on
     76   the machines at ETH Zurich. (One could add an extra test for presence of
     77   the FLTK include directory to make the build more robust.)
     78   
     79
    6880=== pari-2.3.5.p2 (Mitesh Patel, July 26th 2010) ===
    6981 * #9597: Clean up first line of spkg-install.  Also, use
    7082    '/usr/bin/env bash' instead of '/bin/sh'.
  • new file patches/get_fltk

    diff -r b475dd68b19a -r dc34abfbcf0e patches/get_fltk
    - +  
     1if test -z "$with_fltk"; then
     2  case "$which_graphic_lib" in
     3    fltk) with_fltk=yes;;
     4  esac
     5  if test -z "$X11"; then with_fltk=yes; fi
     6fi
     7if test -n "$with_fltk"; then
     8  which_graphic_lib=fltk
     9  FLTKDIR=
     10  case "$with_fltk" in
     11  yes)
     12     pth=$libpth; lib=fltk; . ./locatelib
     13     if test -n "$fltk"; then
     14       FLTKDIR=`dirname $fltk | sed -e 's/lib\/$//'`
     15     fi
     16     ;;
     17  *) if test ! -d "$with_fltk"; then
     18      echo "### FLTK directory '$with_fltk' not found"
     19    else
     20      FLTKDIR=$with_fltk
     21    fi;;
     22  esac
     23  if test -n "$FLTKDIR"; then
     24    case "$FLTKDIR" in /) FLTKDIR=;; esac
     25    echo "Using FLTK library, FLTKDIR = $FLTKDIR"
     26  else
     27    echo "### FLTK not found. Building without FLTK support"
     28    which_graphic_lib=none
     29  fi
     30  case "$osname" in
     31    cygwin) FLTK_LIBS="-lgdi32 -lole32 -luuid -lwsock32 -lsupc++" ;;
     32    darwin) FLTK_LIBS="-framework Carbon -lsupc++" ;;
     33    *)      FLTK_LIBS="$X11_LIBS -lstdc++" ;;
     34  esac
     35fi
  • new file patches/get_fltk.patch

    diff -r b475dd68b19a -r dc34abfbcf0e patches/get_fltk.patch
    - +  
     1--- ../src/config/get_fltk      2008-03-31 13:43:59.000000000 +0200
     2+++ get_fltk    2010-08-11 19:13:17.000000000 +0200
     3@@ -30,6 +30,6 @@
     4   case "$osname" in
     5     cygwin) FLTK_LIBS="-lgdi32 -lole32 -luuid -lwsock32 -lsupc++" ;;
     6     darwin) FLTK_LIBS="-framework Carbon -lsupc++" ;;
     7-    *)      FLTK_LIBS="$X11_LIBS" ;;
     8+    *)      FLTK_LIBS="$X11_LIBS -lstdc++" ;;
     9   esac
     10 fi
  • spkg-install

    diff -r b475dd68b19a -r dc34abfbcf0e spkg-install
    a b  
    3737    cp "$TOP"/patches/get_cc config/get_cc
    3838fi
    3939
     40# leif: Add libstdc++ for Fedora 13 (if FLTK is present, see #9722):
     41cp "$TOP"/patches/get_fltk config/
     42
    4043# This is needed or there are weird locale problems involving rpath
    4144# with building Sage.
    4245LC_ALL=C