diff options
Diffstat (limited to 'dev-lang/gdl/files/gdl-0.9_rc3-proj4.patch')
-rw-r--r-- | dev-lang/gdl/files/gdl-0.9_rc3-proj4.patch | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/dev-lang/gdl/files/gdl-0.9_rc3-proj4.patch b/dev-lang/gdl/files/gdl-0.9_rc3-proj4.patch new file mode 100644 index 000000000000..67ab61126620 --- /dev/null +++ b/dev-lang/gdl/files/gdl-0.9_rc3-proj4.patch @@ -0,0 +1,118 @@ +diff -Naur gdl-0.9rc3/configure.in gdl-0.9rc3.new/configure.in +--- gdl-0.9rc3/configure.in 2009-09-11 12:04:15.000000000 -0400 ++++ gdl-0.9rc3.new/configure.in 2010-01-11 22:40:55.000000000 -0500 +@@ -534,20 +534,20 @@ + + if test "x$with_libproj4" != "xno"; then + if test "x$with_libproj4" != "xyes"; then +- LIBS="$LIBS -L$with_libproj4/lib -lproj4" ++ LIBS="$LIBS -L$with_libproj4/lib -lproj" + INCLUDES="$INCLUDES -I$with_libproj4/include" + else + INCLUDES="$INCLUDES -I/usr/include" +- LIBS="$LIBS -lproj4" ++ LIBS="$LIBS -lproj" + fi + +- AC_CHECK_LIB(proj4, proj_init, [AC_DEFINE([USE_LIBPROJ4], [1], ++ AC_CHECK_LIB(proj, proj_init, [AC_DEFINE([USE_LIBPROJ4], [1], + [Define if you want to use LIBPROJ4])], []) + +- AC_CHECK_LIB(proj4, proj_init, [AC_DEFINE([USE_LIBPROJ4_NEW], [1], ++ AC_CHECK_LIB(proj, proj_init, [AC_DEFINE([USE_LIBPROJ4_NEW], [1], + [Define if you want to use new LIBPROJ4])], [ + +- AC_CHECK_LIB(proj4, pj_init, [AC_DEFINE([USE_LIBPROJ4], [1], ++ AC_CHECK_LIB(proj, pj_init, [AC_DEFINE([USE_LIBPROJ4], [1], + [Define if you want to use LIBPROJ4])], [ + echo "" + echo "Error! LIBPROJ4 is required but was not found" +diff -Naur gdl-0.9rc3/src/math_utl.hpp gdl-0.9rc3.new/src/math_utl.hpp +--- gdl-0.9rc3/src/math_utl.hpp 2009-09-11 12:04:10.000000000 -0400 ++++ gdl-0.9rc3.new/src/math_utl.hpp 2010-01-11 22:37:48.000000000 -0500 +@@ -58,7 +58,7 @@ + #endif + + extern "C" { +-#include "lib_proj.h" ++#include <projects.h> + } + + PROJTYPE *map_init(); +diff -Naur gdl-0.9rc3/src/math_utl.hpp.orig gdl-0.9rc3.new/src/math_utl.hpp.orig +--- gdl-0.9rc3/src/math_utl.hpp.orig 1969-12-31 19:00:00.000000000 -0500 ++++ gdl-0.9rc3.new/src/math_utl.hpp.orig 2009-09-11 12:04:10.000000000 -0400 +@@ -0,0 +1,73 @@ ++/*************************************************************************** ++ math_utl.hpp - math utilities GDL library function ++ ------------------- ++ begin : Feb 11 2004 ++ copyright : (C) 2004 by Joel Gales ++ email : jomoga@users.sourceforge.net ++ ***************************************************************************/ ++ ++/*************************************************************************** ++ * * ++ * This program is free software; you can redistribute it and/or modify * ++ * it under the terms of the GNU General Public License as published by * ++ * the Free Software Foundation; either version 2 of the License, or * ++ * (at your option) any later version. * ++ * * ++ ***************************************************************************/ ++ ++#ifndef MATH_UTL_HPP_ ++#define MATH_UTL_HPP_ ++ ++#include "basegdl.hpp" ++ ++//#define ABS(xxx) (( xxx > -xxx)?(xxx):(-xxx)) ++ ++template< typename T> ++inline T abs( T a) { return (a>=T(0))?a:-a;} ++ ++namespace lib { ++ ++// int trans513(char *, int, int, int, DType); ++// int transpose(char *, SizeT, SizeT [], SizeT, DType); ++// int transpose_perm(char *, SizeT, SizeT [], SizeT, DType, long []); ++ ++ void machar_s ( long int *ibeta, long int *it, long int *irnd, long int *ngrd, ++ long int *machep, long int *negep, long int *iexp, long int *minexp, ++ long int *maxexp, float *eps, float *epsneg, float *xmin, float *xmax ); ++ void machar_d ( long int *ibeta, long int *it, long int *irnd, long int *ngrd, ++ long int *machep, long int *negep, long int *iexp, long int *minexp, ++ long int *maxexp, double *eps, double *epsneg, double *xmin, double *xmax ); ++ ++#ifdef USE_LIBPROJ4 ++#define COMPLEX COMPLEX2 ++ ++#ifdef USE_LIBPROJ4_NEW ++#define PROJTYPE PROJ ++#define LPTYPE PROJ_LP ++#define XYTYPE PROJ_XY ++#define PJ_INIT proj_init ++#define PJ_FWD proj_fwd ++#define PJ_INV proj_inv ++#else ++#define PROJTYPE PJ ++#define LPTYPE LP ++#define XYTYPE XY ++#define PJ_INIT pj_init ++#define PJ_FWD pj_fwd ++#define PJ_INV pj_inv ++#endif ++ ++extern "C" { ++#include "lib_proj.h" ++} ++ ++ PROJTYPE *map_init(); ++ static PROJTYPE *ref; ++ static PROJTYPE *prev_ref; ++ ++#define COMPLEX2 COMPLEX ++#endif ++ ++} // namespace ++ ++#endif |