mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-29 11:38:52 +02:00
gmic: bump version
This commit is contained in:
@@ -8,9 +8,9 @@ volumetric images, hence including 2D color images."
|
||||
HOMEPAGE="https://gmic.eu"
|
||||
COPYRIGHT="Sébastien Fourey"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="8"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://gmic.eu/files/source/gmic_$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="9f053338752ec96a6b619718037767682c5fd58e2471c08f3740fdb070605bc0"
|
||||
CHECKSUM_SHA256="d5070c559c75161a225d74a99c19faf2485a3983139290f998cc6359bb318ba4"
|
||||
SOURCE_DIR="gmic-$portVersion"
|
||||
PATCHES="gmic-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="
|
||||
@@ -21,10 +21,18 @@ ADDITIONAL_FILES="
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
gmic$secondaryArchSuffix = $portVersion
|
||||
app:GMIC$secondaryArchSuffix = $portVersion
|
||||
lib:libgmic${secondaryArchSuffix} = $portVersion
|
||||
app:GMIC = $portVersion
|
||||
cmd:gmic$commandSuffix = $portVersion
|
||||
lib:libgmic$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
@@ -105,34 +113,9 @@ BUILD()
|
||||
CUSTOM_CXX_FLAGS="-O1"
|
||||
fi
|
||||
|
||||
cmake $cmakeDirArgs \
|
||||
-B build -S . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_FLAGS=$CUSTOM_CXX_FLAGS \
|
||||
-DCUSTOM_CFLAGS=ON \
|
||||
-DBUILD_BASH_COMPLETION=OFF \
|
||||
-DBUILD_CLI=OFF \
|
||||
-DBUILD_LIB=ON \
|
||||
-DBUILD_LIB_STATIC=OFF \
|
||||
-DBUILD_MAN=OFF \
|
||||
-DENABLE_CURL=ON \
|
||||
-DENABLE_DYNAMIC_LINKING=ON \
|
||||
-DENABLE_FFMPEG=ON \
|
||||
-DENABLE_FFTW=ON \
|
||||
-DENABLE_GRAPHICSMAGICK=ON \
|
||||
-DENABLE_OPENCV=ON \
|
||||
-DENABLE_OPENEXR=ON \
|
||||
-DENABLE_OPENMP=ON \
|
||||
-DENABLE_PNG=ON \
|
||||
-DENABLE_TIFF=ON \
|
||||
-DENABLE_ZLIB=ON \
|
||||
-DENABLE_LTO=OFF
|
||||
make lib cli_shared
|
||||
|
||||
cd build
|
||||
make VERBOSE=1
|
||||
cd ..
|
||||
|
||||
export LDFLAGS="$LDFLAGS -L../build"
|
||||
export LDFLAGS="$LDFLAGS -L../src"
|
||||
|
||||
cmake -B build-qt -S ./gmic-qt \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
@@ -147,7 +130,7 @@ BUILD()
|
||||
-DENABLE_LTO=OFF
|
||||
|
||||
cd build-qt
|
||||
make VERBOSE=1
|
||||
make $jobArgs
|
||||
cd ..
|
||||
|
||||
cmake -B build-krita -S ./gmic-qt \
|
||||
@@ -163,14 +146,15 @@ BUILD()
|
||||
-DENABLE_LTO=OFF
|
||||
|
||||
cd build-krita
|
||||
make VERBOSE=1
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
cd ..
|
||||
mkdir -p $libDir $includeDir $commandBinDir
|
||||
cp src/libgmic.so* $libDir
|
||||
cp src/gmic.h $includeDir
|
||||
cp src/gmic $commandBinDir
|
||||
|
||||
mkdir -p "$appsDir/G'MIC"
|
||||
cp build-qt/gmic_qt "$appsDir/G'MIC/G'MIC"
|
||||
@@ -210,6 +194,5 @@ INSTALL()
|
||||
prepareInstalledDevelLibs libgmic
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
$developDir
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
From 822fced70522a4691fbae2e1af7a8910117e040b Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 1 Oct 2021 20:50:15 +1000
|
||||
Subject: Fix build for Haiku
|
||||
|
||||
|
||||
diff --git a/gmic-qt/CMakeLists.txt b/gmic-qt/CMakeLists.txt
|
||||
index 93119fa..149a61b 100644
|
||||
--- a/gmic-qt/CMakeLists.txt
|
||||
+++ b/gmic-qt/CMakeLists.txt
|
||||
@@ -240,7 +240,7 @@ add_definitions(-Dgmic_gui)
|
||||
add_definitions(-Dcimg_use_abort)
|
||||
add_definitions(-Dcimg_appname=\"gmic\")
|
||||
|
||||
-if (UNIX AND NOT APPLE)
|
||||
+if (UNIX AND NOT APPLE AND NOT HAIKU)
|
||||
add_definitions(-Dcimg_display=1)
|
||||
add_definitions(-D_IS_LINUX_)
|
||||
add_definitions(-Dcimg_use_vt100)
|
||||
@@ -261,6 +261,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 6698bc0..1546281 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 299
|
||||
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 8429831bfedfcf5a715fa44ed80dd865a5adf5dc Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 3 Oct 2021 00:00:52 +1000
|
||||
Subject: Add Haiku to detected OS
|
||||
|
||||
|
||||
diff --git a/src/CImg.h b/src/CImg.h
|
||||
index efdbaf4..da43a30 100644
|
||||
--- a/src/CImg.h
|
||||
+++ b/src/CImg.h
|
||||
@@ -7124,6 +7124,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.30.2
|
||||
|
||||
|
||||
From 43034ff8912068f280b22bddd66cbdcc2103a3d2 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 9 Oct 2021 21:23:21 +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.30.2
|
||||
|
||||
145
media-gfx/gmic/patches/gmic-3.1.2.patchset
Normal file
145
media-gfx/gmic/patches/gmic-3.1.2.patchset
Normal file
@@ -0,0 +1,145 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user