Skip to content

Commit

Permalink
gdal: add freexl support
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Jun 10, 2020
1 parent 6061a03 commit b48b4b1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
12 changes: 7 additions & 5 deletions recipes/gdal/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class GdalConan(ConanFile):
# "with_sfcgal": [True, False],
"with_qhull": [True, False],
# "with_opencl": [True, False],
# "with_freexl": [True, False],
"with_freexl": [True, False],
"without_pam": [True, False],
# "with_poppler": [True, False],
# "with_podofo": [True, False],
Expand Down Expand Up @@ -125,7 +125,7 @@ class GdalConan(ConanFile):
# "with_sfcgal": False,
"with_qhull": True,
# "with_opencl": False,
# "with_freexl": False,
"with_freexl": False,
"without_pam": False,
# "with_poppler": False,
# "with_podofo": False,
Expand Down Expand Up @@ -283,8 +283,8 @@ def requirements(self):
self.requires("qhull/7.3.2")
# if self.options.with_opencl:
# self.requires("opencl-headers/x.x.x")
# if self.options.with_freexl:
# self.requires("freexl/1.0.5")
if self.options.with_freexl:
self.requires("freexl/1.0.5")
# if self.options.with_poppler:
# self.requires("poppler/0.83.0")
# if self.options.with_podofo:
Expand Down Expand Up @@ -424,6 +424,8 @@ def _get_nmake_args(self):
args.append("WEBP_CFLAGS=\"-I{}\"".format(" -I".join(self.deps_cpp_info["libwebp"].include_paths)))
if self.options.with_xml2:
args.append("LIBXML2_INC=\"-I{}\"".format(" -I".join(self.deps_cpp_info["libxml2"].include_paths)))
if self.options.with_freexl:
self._replace_in_nmake("#FREEXL_LIBS = e:/freexl-1.0.0a/freexl_i.lib", "FREEXL_LIBS=")
if self.options.with_gta:
args.append("GTA_CFLAGS=\"-I{}\"".format(" -I".join(self.deps_cpp_info["libgta"].include_paths)))
args.append("QHULL_SETTING={}".format("EXTERNAL" if self.options.with_qhull else "NO"))
Expand Down Expand Up @@ -559,7 +561,7 @@ def _configure_autotools(self):
args.append("--without-sfcgal") # TODO: to implement when sfcgal lib available
args.append("--with-qhull={}".format("yes" if self.options.with_qhull else "no"))
args.append("--without-opencl") # TODO: to implement when opencl-headers available (and also OpenCL lib?)
args.append("--without-freexl") # TODO: to implement when freexl lib available
args.append("--with-freexl={}".format("yes" if self.options.with_freexl else "no"))
args.append("--with-libjson-c={}".format(self._unix_path(self.deps_cpp_info["json-c"].rootpath))) # always required !
if self.options.without_pam:
args.append("--without-pam")
Expand Down
15 changes: 13 additions & 2 deletions recipes/gdal/all/patches/fix-autotools.patch
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,18 @@
fi
fi

@@ -4846,8 +4838,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs
@@ -4740,7 +4732,9 @@ AC_MSG_CHECKING([for FreeXL support])
HAVE_FREEXL=no
FREEXL_INCLUDE=

-if test "$with_freexl" = "" -o "$with_freexl" = "yes" ; then
+if test "$with_freexl" = "yes"; then
+ PKG_CHECK_MODULES([FREEXL], [freexl >= 1.0.0], [HAVE_FREEXL=yes], [HAVE_FREEXL=no])
+elif test "$with_freexl" = ""; then
AC_CHECK_HEADERS(freexl.h)
AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl",FREEXL_LIBS=missing)

@@ -4846,8 +4840,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs
elif test "$with_libjson_c" = "internal" ; then
LIBJSONC_SETTING=internal
elif test "$with_libjson_c" != "no"; then
Expand All @@ -224,7 +235,7 @@
else
AC_MSG_ERROR([libjson-c (internal or external) is required])
fi
@@ -5951,7 +5942,6 @@ else
@@ -5951,7 +5944,6 @@ else
# Test that the package found is for the right architecture
saved_LIBS="$LIBS"
LIBS="$EXR_LIBS"
Expand Down

0 comments on commit b48b4b1

Please sign in to comment.