Ticket #17618: libqalculate-0.9.6_macports.patch

File libqalculate-0.9.6_macports.patch, 2.7 KB (added by jjstickel@…, 16 years ago)

math/libqalculate/files/libqalculate-0.9.6_macports.patch

  • libqalculate-0.9.

    diff -ur libqalculate-0.9.6/configure.in libqalculate-0.9.6_patched/configure.in
    old new  
    9191
    9292AC_LANG([C++])
    9393
    94 AC_PATH_CLN(1.1.0, [
    95         LIBS="$LIBS $CLN_LIBS"
    96         CPPFLAGS="$CPPFLAGS $CLN_CPPFLAGS"
    97         AC_DEFINE(HAVE_LIBCLN,1,[If CLN can be used])
    98 ], AC_MSG_ERROR([No suitable installed version of CLN could be found.]))
    99 
    100 
    10194PKG_CHECK_MODULES(GLIB, [
    10295        glib-2.0
    10396        libxml-2.0 >= 2.3.8
     
    10598AC_SUBST(GLIB_CFLAGS)
    10699AC_SUBST(GLIB_LIBS)
    107100
     101PKG_CHECK_MODULES(CLN, [ cln >= 1.2 ],
     102                  [have_recent_cln=yes], [have_recent_cln=no])
     103AC_SUBST(CLN_CPPFLAGS)
     104AC_SUBST(CLN_LIBS)
     105
     106if test "$have_recent_cln" = "yes" ; then
     107   AC_DEFINE(HAVE_RECENT_CLN, 1, [Define if CLN can be used])
     108   LIBS="$LIBS $CLN_LIBS"
     109   CPPFLAGS="$CPPFLAGS $CLN_CPPFLAGS"
     110fi
     111
    108112dnl  --------------------------------
    109113dnl | check for readline            |-----------------------------------------
    110114dnl  --------------------------------
  • libqalculate/Calculator.cc

    diff -ur libqalculate-0.9.6/libqalculate/Calculator.cc libqalculate-0.9.6_patched/libqalculate/Calculator.cc
    old new  
    3333#include <sys/types.h>
    3434#include <sys/stat.h>
    3535#include <dirent.h>
    36 #include <wait.h>
     36#include <sys/wait.h>
    3737#include <queue>
    3838#include <glib.h>
    3939//#include <dlfcn.h>
  • libqalculate/Number.cc

    diff -ur libqalculate-0.9.6/libqalculate/Number.cc libqalculate-0.9.6_patched/libqalculate/Number.cc
    old new  
    2828
    2929using namespace cln;
    3030
     31/*
    3132void cln::cl_abort() {
    3233        CALCULATOR->error(true, "CLN Error: see terminal output (probably too large or small floating point number)", NULL);
    3334        if(CALCULATOR->busy()) {
     
    3637                exit(0);
    3738        }
    3839}
    39 
     40*/
    4041string printCL_I(cl_I integ, int base = 10, bool display_sign = true, BaseDisplay base_display = BASE_DISPLAY_NORMAL, bool lower_case = false) {
    4142        if(base == BASE_ROMAN_NUMERALS) {
    4243                if(!zerop(integ) && integ < 10000 && integ > -10000) {
  • libqalculate-0.9.

    diff -ur libqalculate-0.9.6/src/qalc.cc libqalculate-0.9.6_patched/src/qalc.cc
    old new  
    1616#include <time.h>
    1717#include <pthread.h>
    1818#include <dirent.h>
    19 #include <malloc.h>
     19#include <malloc/malloc.h>
    2020#include <stdio.h>
    2121#include <vector>
    2222#include <glib.h>