From 09a1da71c32c3be9bde5f5b275f081a49cf229c9 Mon Sep 17 00:00:00 2001 From: mycae Date: Apr 26 2014 13:44:00 +0000 Subject: * Add patch for upstream broken release build - isNotDirectory was hidden by ifdef --- diff --git a/3Depict-0.0.16-patch-debug-build.patch b/3Depict-0.0.16-patch-debug-build.patch new file mode 100644 index 0000000..df752cf --- /dev/null +++ b/3Depict-0.0.16-patch-debug-build.patch @@ -0,0 +1,60 @@ +diff -r 084988518fe8 src/common/basics.cpp +--- a/src/common/basics.cpp Sat Apr 26 09:27:35 2014 -0400 ++++ b/src/common/basics.cpp Sat Apr 26 09:42:07 2014 -0400 +@@ -1115,6 +1115,28 @@ + return 0; + } + ++//FIXME: Why negative? ++bool isNotDirectory(const char *filename) ++{ ++#if !defined(__WIN32__) && !defined(__WIN64__) ++ struct stat statbuf; ++ ++ if(stat(filename,&statbuf) == -1) ++ return false; ++ ++ return (statbuf.st_mode !=S_IFDIR); ++#else ++ ++ WARN(false, "Untested function. calling win api"); ++ DWORD fileAttribs; ++ fileAttribs=GetFileAttributes((LPCWSTR)filename); ++ if(fileAttribs == INVALID_FILE_ATTRIBUTES) ++ return false; ++ ++ return !(fileAttribs & FILE_ATTRIBUTE_DIRECTORY); ++#endif ++} ++ + #ifdef DEBUG + bool isValidXML(const char *filename) + { +@@ -1148,27 +1170,6 @@ + } + + +-//FIXME: Why negative? +-bool isNotDirectory(const char *filename) +-{ +-#if !defined(__WIN32__) && !defined(__WIN64__) +- struct stat statbuf; +- +- if(stat(filename,&statbuf) == -1) +- return false; +- +- return (statbuf.st_mode !=S_IFDIR); +-#else +- +- WARN(false, "Untested function. calling win api"); +- DWORD fileAttribs; +- fileAttribs=GetFileAttributes((LPCWSTR)filename); +- if(fileAttribs == INVALID_FILE_ATTRIBUTES) +- return false; +- +- return !(fileAttribs & FILE_ATTRIBUTE_DIRECTORY); +-#endif +-} + + bool rmFile(const std::string &filename) + { diff --git a/3Depict.spec b/3Depict.spec index 4273150..0873631 100644 --- a/3Depict.spec +++ b/3Depict.spec @@ -38,6 +38,9 @@ Patch0: %{name}-%{version}-manual-pdf-loc.patch Patch1: %{name}-%{version}-font-path.patch #Upstream patches from 0.0.16 release tarball Patch2: %{name}-0.0.16-upstream.patch +#Upstream bug where funciton is dropped in release mode +Patch3: %{name}-0.0.16-patch-debug-build.patch + %description This software is designed to help users visualize and analyze 3D point clouds @@ -52,6 +55,7 @@ useful for general scalar valued point data purposes. %patch0 %patch1 %patch2 +%patch3 %build %configure --disable-debug-checks --enable-openmp-parallel --enable-mgl2 @@ -112,7 +116,7 @@ rm -rf %{buildroot} %changelog -* Sun Apr 06 2014 D Haley - 0.0.16-1 +* Sat Apr 26 2014 D Haley - 0.0.16-1 - Update to 0.0.16 * Wed Feb 12 2014 D Haley - 0.0.15-4