app-misc/nci: bump 1.4.1 -> 1.5.0
[sgilles-overlay.git] / sci-mathematics / pari / files / pari-2.5.1-no-automagic.patch
blob8fee1f7eaf70db4ca7a2b421cef1f0b2dc5b3588
1 diff -Nur pari-2.5.1.orig/config/get_config_options pari-2.5.1/config/get_config_options
2 --- pari-2.5.1.orig/config/get_config_options 2012-08-01 18:32:03.000000000 +0100
3 +++ pari-2.5.1/config/get_config_options 2012-08-01 20:57:09.000000000 +0100
4 @@ -83,10 +83,12 @@
5 --with-ncurses-lib=*|--with-ncurses=*)
6 with_ncurses_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
8 + --without-qt|--with-qt=no) without_qt=yes ;;
9 --with-qt) with_qt=yes ;;
10 --with-qt=*)
11 with_qt=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
13 + --without-fltk|--with-fltk=no) without_fltk=yes ;;
14 --with-fltk) with_fltk=yes ;;
15 --with-fltk=*)
16 with_fltk=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
17 @@ -158,7 +160,9 @@
18 --with-gmp-lib=DIR specify location of gmp libs
20 --with-qt[=DIR] use the Qt graphical library [prefix for Qt dir.]
21 + --without-qt do not try to use the Qt lib
22 --with-fltk[=DIR] use the FLTK graphical library [prefix for FLTK dir.]
23 + --without-fltk do not try to use the FLTK lib
25 EOT
26 exit 1
27 diff -Nur pari-2.5.1.orig/config/get_fltk pari-2.5.1/config/get_fltk
28 --- pari-2.5.1.orig/config/get_fltk 2012-08-01 18:32:03.000000000 +0100
29 +++ pari-2.5.1/config/get_fltk 2012-08-01 22:28:23.000000000 +0100
30 @@ -2,6 +2,9 @@
31 with_fltk=yes
33 FLTKDIR=
34 +if test -z "$without_fltk; then
35 + FLTKDIR="`fltk-config --prefix 2>/dev/null`"
36 +fi
37 case "$with_fltk" in
38 yes)
39 pth=$libpth; lib=fltk; . ./locatelib
40 diff -Nur pari-2.5.1.orig/config/get_graphic_lib pari-2.5.1/config/get_graphic_lib
41 --- pari-2.5.1.orig/config/get_graphic_lib 2012-08-01 18:32:03.000000000 +0100
42 +++ pari-2.5.1/config/get_graphic_lib 2012-08-01 22:16:57.000000000 +0100
43 @@ -11,6 +11,7 @@
44 else
45 if test -n "$with_fltk"; then which_graphic_lib=fltk; fi
46 if test -n "$with_qt"; then which_graphic_lib=Qt; fi
47 + if test -n "$without_fltk" -a -n "$without_qt"; then which_graphic_lib=none; fi
48 if test "$which_graphic_lib" != none; then
49 case $osname in
50 mingw) case $which_graphic_lib in
51 @@ -41,7 +42,7 @@
52 case $which_graphic_lib in
53 auto|fltk)
54 . ./get_fltk # FLTKDIR, FLTK_LIBS
55 - if test -z "$FLTKDIR"; then
56 + if test -z "`fltk-config --ldflags 2> /dev/null`"; then
57 case $which_graphic_lib in fltk) which_graphic_lib=none;; esac
58 else
59 which_graphic_lib=fltk
60 diff -Nur pari-2.5.1.orig/config/get_Qt pari-2.5.1/config/get_Qt
61 --- pari-2.5.1.orig/config/get_Qt 2012-08-01 18:32:03.000000000 +0100
62 +++ pari-2.5.1/config/get_Qt 2012-08-01 20:39:28.000000000 +0100
63 @@ -5,7 +5,7 @@
64 case "$with_qt" in
65 yes)
66 pth="/usr/local/lib /usr/local/share /usr/lib /usr/share"
67 - QTDIR=`locatedir qt4/bin $pth`
68 + QTDIR=`locatedir qt4 $pth`
69 QTLIB="-lQtCore -lQtGui"
70 which_graphic_lib=Qt4
71 if test -z "$QTDIR"; then
72 diff -Nur pari-2.5.1.orig/config/Makefile.SH pari-2.5.1/config/Makefile.SH
73 --- pari-2.5.1.orig/config/Makefile.SH 2012-08-01 18:32:03.000000000 +0100
74 +++ pari-2.5.1/config/Makefile.SH 2012-08-01 21:08:20.000000000 +0100
75 @@ -65,12 +65,12 @@
76 PLOTLIBS="-L\$(QTDIR)/lib $QTLIB"
77 graph=plotQt;;
78 Qt4)
79 - PLOTCFLAGS='-D__FANCY_WIN__ -I$(QTDIR)/include'
80 - PLOTLIBS="-L\$(QTDIR)/lib $QTLIB"
81 + PLOTCFLAGS='-D__FANCY_WIN__ `pkg-config --cflags QtGui`'
82 + PLOTLIBS="`pkg-config --libs QtGui`"
83 graph=plotQt4;;
84 fltk)
85 - PLOTCFLAGS="-I\$(FLTKDIR)/include $X11_INC"
86 - PLOTLIBS="-L\$(FLTKDIR)/lib -lfltk $FLTK_LIBS"
87 + PLOTCFLAGS="`fltk-config --cxxflags` $X11_INC"
88 + PLOTLIBS="`fltk-config --ldflags`"
89 postconfig='-fltk-config --post '
90 graph=plotfltk;;
91 win32)
92 @@ -254,7 +254,7 @@
93 GMPINCLUDE = $GMPINCLUDE
94 # Graphic library.
95 QTDIR = "$QTDIR"
96 -MOC = \$(QTDIR)/bin/moc
97 +MOC = "`which moc`"
98 PLOTCFLAGS = $PLOTCFLAGS
99 PLOTLIBS = $PLOTLIBS
100 CPLUSPLUS = g++