mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 15:08:57 +02:00
146 lines
4.0 KiB
Plaintext
146 lines
4.0 KiB
Plaintext
From b3f34b1eaf80d92a0ae6bc6bccfbcddc594c1e88 Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Thu, 12 May 2022 10:07:44 +1000
|
|
Subject: Fix build for Haiku
|
|
|
|
|
|
diff --git a/gmic-qt/CMakeLists.txt b/gmic-qt/CMakeLists.txt
|
|
index 96cea7c..c85c3d1 100644
|
|
--- a/gmic-qt/CMakeLists.txt
|
|
+++ b/gmic-qt/CMakeLists.txt
|
|
@@ -314,6 +314,10 @@ if (APPLE)
|
|
add_definitions(-mmacosx-version-min=10.9 -Wno-macro-redefined -Wno-deprecated-register)
|
|
endif()
|
|
|
|
+if (HAIKU)
|
|
+ add_definitions(-Dcimg_display=0)
|
|
+endif()
|
|
+
|
|
if (WIN32)
|
|
add_definitions(-Dcimg_display=2)
|
|
add_definitions(-DPSAPI_VERSION=1)
|
|
diff --git a/src/gmic.h b/src/gmic.h
|
|
index 003d2bd..4669002 100644
|
|
--- a/src/gmic.h
|
|
+++ b/src/gmic.h
|
|
@@ -51,6 +51,11 @@
|
|
#
|
|
*/
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <sys/types.h>
|
|
+#include <sys/stat.h>
|
|
+#endif
|
|
+
|
|
#ifndef gmic_version
|
|
#define gmic_version 312
|
|
|
|
--
|
|
2.36.1
|
|
|
|
|
|
From 4f7ddc35db70888d59aa96eef0c766e3999801bc Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Thu, 12 May 2022 10:08:03 +1000
|
|
Subject: Add Haiku to detected OS
|
|
|
|
|
|
diff --git a/src/CImg.h b/src/CImg.h
|
|
index f956160..74c1b22 100644
|
|
--- a/src/CImg.h
|
|
+++ b/src/CImg.h
|
|
@@ -7157,6 +7157,8 @@ namespace cimg_library_suffixed {
|
|
static const char *const str = "Irix";
|
|
#elif defined(__MACOSX__) || defined(__APPLE__)
|
|
static const char *const str = "Mac OS";
|
|
+#elif defined(__HAIKU__)
|
|
+ static const char *const str = "Haiku";
|
|
#elif defined(unix) || defined(__unix) || defined(__unix__)
|
|
static const char *const str = "Generic Unix";
|
|
#elif defined(_MSC_VER) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || \
|
|
--
|
|
2.36.1
|
|
|
|
|
|
From 014bf026dc466e77ffd1b62f4435de8b98dd5b6b Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Thu, 12 May 2022 10:08:15 +1000
|
|
Subject: Fix save file with default quality
|
|
|
|
|
|
diff --git a/gmic-qt/src/Host/None/ImageDialog.cpp b/gmic-qt/src/Host/None/ImageDialog.cpp
|
|
index 973c0ae..73eb636 100644
|
|
--- a/gmic-qt/src/Host/None/ImageDialog.cpp
|
|
+++ b/gmic-qt/src/Host/None/ImageDialog.cpp
|
|
@@ -56,9 +56,6 @@ bool ImageView::save(const QString & filename, int quality)
|
|
if ((ext == "jpg" || ext == "jpeg") && (quality == -1)) {
|
|
quality = JpegQualityDialog::ask(dynamic_cast<QWidget *>(parent()), -1);
|
|
}
|
|
- if (quality == -1) {
|
|
- return false;
|
|
- }
|
|
if (!_image.save(filename, nullptr, quality)) {
|
|
QMessageBox::critical(this, tr("Error"), tr("Could not write image file %1").arg(filename));
|
|
return false;
|
|
--
|
|
2.36.1
|
|
|
|
|
|
From a19a4fd1f35883ca36272a4f190131d7a7e884e2 Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Mon, 13 Jun 2022 20:26:15 +1000
|
|
Subject: Disable flto, use -O1 optimization
|
|
|
|
|
|
diff --git a/gmic-qt/CMakeLists.txt b/gmic-qt/CMakeLists.txt
|
|
index c85c3d1..f1aba07 100644
|
|
--- a/gmic-qt/CMakeLists.txt
|
|
+++ b/gmic-qt/CMakeLists.txt
|
|
@@ -293,7 +293,7 @@ if (UNIX)
|
|
if(ANDROID)
|
|
add_definitions(-Dcimg_display=0)
|
|
add_definitions(-D_IS_UNIX_)
|
|
- elseif(NOT APPLE)
|
|
+ elseif(NOT APPLE AND NOT HAIKU)
|
|
add_definitions(-Dcimg_display=1)
|
|
add_definitions(-D_IS_LINUX_)
|
|
add_definitions(-Dcimg_use_vt100)
|
|
diff --git a/src/Makefile b/src/Makefile
|
|
index 970558c..746239e 100644
|
|
--- a/src/Makefile
|
|
+++ b/src/Makefile
|
|
@@ -208,10 +208,11 @@ MANDATORY_LIBS += -Wl,--stack,16777216
|
|
endif
|
|
|
|
# Enable optimizations for 'cli'.
|
|
-FLTO = -flto
|
|
+#FLTO = -flto
|
|
OPT_CFLAGS =
|
|
ifdef IS_GCC
|
|
-OPT_CFLAGS += -Ofast -mtune=generic # $(FLTO)
|
|
+#OPT_CFLAGS += -Ofast -mtune=generic # $(FLTO)
|
|
+OPT_CFLAGS += -O1
|
|
OPT_LIBS = # $(FLTO)
|
|
endif
|
|
ifdef icpc
|
|
@@ -347,11 +348,16 @@ else
|
|
ifeq ($(OS),Darwin) # MacOSX
|
|
GMIC_STD_CFLAGS += $(X11_CFLAGS) $(OPENEXR_CFLAGS)
|
|
GMIC_STD_LIBS += $(X11_LIBS) $(OPENEXR_LIBS)
|
|
+else
|
|
+ifeq ($(OS),Haiku) # Haiku
|
|
+GMIC_STD_CFLAGS += $(OPENEXR_CFLAGS) -Dcimg_display=0
|
|
+GMIC_STD_LIBS += $(OPENEXR_LIBS)
|
|
else # Windows
|
|
GMIC_STD_CFLAGS += $(OPENMP_CFLAGS) $(GDI32_CFLAGS)
|
|
GMIC_STD_LIBS += $(OPENMP_LIBS) $(GDI32_LIBS)
|
|
endif
|
|
endif
|
|
+endif
|
|
|
|
#-------------------------------
|
|
# Define main Makefile entries.
|
|
--
|
|
2.36.1
|
|
|