From d9b7738e8b49a95de167357cba63bb3f01759fac Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Sun, 3 Apr 2022 19:02:27 +0300
Subject: [PATCH 6/6] Really fix build without dpx

---
 cinelerra-5.1/cinelerra/file.C    | 10 ++++++++--
 cinelerra-5.1/cinelerra/filedpx.h |  3 +++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C
index 37000b98..3e7b2e14 100644
--- a/cinelerra-5.1/cinelerra/file.C
+++ b/cinelerra-5.1/cinelerra/file.C
@@ -211,11 +211,13 @@ int File::get_options(FormatTools *format,
 		FileJPEG::get_parameters(parent_window, asset, format_window,
 			audio_options, video_options, edl);
 		break;
+#ifdef HAVE_LIBDPX
 	case FILE_DPX:
 	case FILE_DPX_LIST:
 		FileDPX::get_parameters(parent_window, asset, format_window,
 			audio_options, video_options, edl);
 		break;
+#endif
 #ifdef HAVE_OPENEXR
 	case FILE_EXR:
 	case FILE_EXR_LIST:
@@ -471,11 +473,13 @@ int File::probe()
 			else continue;
 			return FILE_OK;
 		}
+#ifdef HAVE_LIBDPX
 		if( !strcmp(pref->name,"DPX") ) { // DPX file
 			if( !FileDPX::check_sig(this->asset, data) ) continue;
 			file = new FileDPX(this->asset, this);
 			return FILE_OK;
 		}
+#endif
 #ifdef HAVE_OPENEXR
 		if( !strcmp(pref->name,"EXR") ) { // EXR file
 			if( !FileEXR::check_sig(this->asset, data)) continue;
@@ -602,12 +606,12 @@ int File::open_file(Preferences *preferences,
 	case FILE_GIF_LIST:
 		file = new FileGIFList(this->asset, this);
 		break;
-
+#ifdef HAVE_LIBDPX
 	case FILE_DPX:
 	case FILE_DPX_LIST:
 		file = new FileDPX(this->asset, this);
 		break;
-
+#endif
 #ifdef HAVE_OPENEXR
 	case FILE_EXR:
 	case FILE_EXR_LIST:
@@ -1434,8 +1438,10 @@ int File::get_best_colormodel(Asset *asset, int driver)
 #endif
 	case FILE_JPEG:
 	case FILE_JPEG_LIST:	return FileJPEG::get_best_colormodel(asset, driver);
+#ifdef HAVE_LIBDPX
 	case FILE_DPX:
 	case FILE_DPX_LIST:	return FileDPX::get_best_colormodel(asset, driver);	
+#endif
 #ifdef HAVE_OPENEXR
 	case FILE_EXR:
 	case FILE_EXR_LIST:	return FileEXR::get_best_colormodel(asset, driver);
diff --git a/cinelerra-5.1/cinelerra/filedpx.h b/cinelerra-5.1/cinelerra/filedpx.h
index 2fd4331f..c6b2952a 100644
--- a/cinelerra-5.1/cinelerra/filedpx.h
+++ b/cinelerra-5.1/cinelerra/filedpx.h
@@ -18,6 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
+#ifdef HAVE_LIBDPX
 
 #ifndef FILEDPX_H
 #define FILEDPX_H
@@ -27,6 +28,7 @@
 #include "filelist.h"
 #include "DPX.h"
 
+
 class FileDPX : public FileList
 {
 public:
@@ -47,3 +49,4 @@ private:
 };
 
 #endif
+#endif
-- 
2.35.1

