7 Commits

Author SHA256 Message Date
5f0542b3b1 Accepting request 1292477 from graphics
- define C and CXX standard to fix build with GCC 15

OBS-URL: https://build.opensuse.org/request/show/1292477
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opentoonz?expand=0&rev=22
2025-07-14 08:51:58 +00:00
Christophe Marin
f914796e5f - define C and CXX standard to fix build with GCC 15
OBS-URL: https://build.opensuse.org/package/show/graphics/opentoonz?expand=0&rev=58
2025-07-13 07:45:51 +00:00
794d8341c9 Accepting request 1266343 from graphics
- Add patches:
  * 0001-Use-system-TIFF.patch
    (gh#opentoonz/opentoonz#5592, gh#opentoonz/opentoonz#4199)
  * opentoonz-cmake4.patch
- Update the _service file and tarball

OBS-URL: https://build.opensuse.org/request/show/1266343
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opentoonz?expand=0&rev=21
2025-04-02 15:16:38 +00:00
Christophe Marin
1ac08ea0bc OBS-URL: https://build.opensuse.org/package/show/graphics/opentoonz?expand=0&rev=56 2025-04-02 00:26:06 +00:00
945bad9627 Accepting request 1250610 from graphics
- Add patch:
  * opentoonz-glew_config_compat.patch
- Stop using %suse_update_desktop_file
- Use system's kissfft dependency

- Add patch:
  * 0001-Use-system-stdfx.patch

OBS-URL: https://build.opensuse.org/request/show/1250610
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opentoonz?expand=0&rev=20
2025-03-06 13:49:46 +00:00
Christophe Marin
d77c587938 OBS-URL: https://build.opensuse.org/package/show/graphics/opentoonz?expand=0&rev=54 2025-03-06 11:13:00 +00:00
Christophe Marin
6efac2b4c8 TW build fix
OBS-URL: https://build.opensuse.org/package/show/graphics/opentoonz?expand=0&rev=53
2025-03-06 11:04:59 +00:00
8 changed files with 543 additions and 18 deletions

302
0001-Use-system-TIFF.patch Normal file
View File

@@ -0,0 +1,302 @@
From 8237b53909f5a5d64cd0069061aecceda4d4bf32 Mon Sep 17 00:00:00 2001
From: Christophe Marin <christophe@krop.fr>
Date: Wed, 2 Apr 2025 01:34:05 +0200
Subject: [PATCH 1/2] Use system TIFF
Opentoonz developers take security lightly and still embed outdated 3rdparty libraries with countless security issues.
Despite being asked to allow using system libraries for years [1], nothing was done.
Consequently, Fedora changes will be used, at the cost of a slight feature loss [2]
[1]
https://github.com/opentoonz/opentoonz/issues/5592
https://github.com/opentoonz/opentoonz/issues/4199
[2] https://src.fedoraproject.org/rpms/opentoonz/tree/rawhide
---
toonz/cmake/FindTIFF.cmake | 46 ---------
toonz/sources/image/CMakeLists.txt | 10 +-
toonz/sources/image/tif/tiio_tif.cpp | 137 ---------------------------
toonz/sources/image/tzp/tiio_tzp.cpp | 8 +-
4 files changed, 6 insertions(+), 195 deletions(-)
delete mode 100644 toonz/cmake/FindTIFF.cmake
diff --git a/toonz/cmake/FindTIFF.cmake b/toonz/cmake/FindTIFF.cmake
deleted file mode 100644
index b3db5fa0..00000000
--- a/toonz/cmake/FindTIFF.cmake
+++ /dev/null
@@ -1,46 +0,0 @@
-# looks for libtiff(4.0.3 modified)
-find_path(
- TIFF_INCLUDE_DIR
- NAMES
- tiffio.h
- HINTS
- ${SDKROOT}
- PATH_SUFFIXES
- tiff-4.0.3/libtiff/
-# if mono or another framework with a tif library
-# is installed, ignore it.
-if(BUILD_ENV_APPLE)
- NO_DEFAULT_PATH
- NO_CMAKE_ENVIRONMENTPATH
- NO_CMAKE_PATH
-endif()
-)
-
-find_library(
- TIFF_LIBRARY
- NAMES
- libtiff.a
- HINTS
- ${SDKROOT}
- PATH_SUFFIXES
- tiff-4.0.3/libtiff/.libs
- NO_DEFAULT_PATH
-)
-
-message("***** libtiff Header path:" ${TIFF_INCLUDE_DIR})
-message("***** libtiff Library path:" ${TIFF_LIBRARY})
-
-set(TIFF_NAMES ${TIFF_NAMES} TIFF)
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF
- DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR)
-
-if(TIFF_FOUND)
- set(TIFF_LIBRARIES ${TIFF_LIBRARY})
-endif()
-
-mark_as_advanced(
- TIFF_LIBRARY
- TIFF_INCLUDE_DIR
-)
diff --git a/toonz/sources/image/CMakeLists.txt b/toonz/sources/image/CMakeLists.txt
index 87953ced..ee5ff9ce 100644
--- a/toonz/sources/image/CMakeLists.txt
+++ b/toonz/sources/image/CMakeLists.txt
@@ -72,7 +72,8 @@ if(NOT BUILD_TARGET_BSD)
tif/tiio_tif.cpp
tzp/tiio_plt.cpp
tzp/tiio_tzp.cpp
- tzp/toonzrle.cpp
+ # Removed since it requires libtiff internal API access.
+ # tzp/toonzrle.cpp
tzp/avl.c
)
endif()
@@ -128,11 +129,6 @@ endif()
message("subdir: image")
message("Bin: " ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(
- SYSTEM
- ${TIFF_INCLUDE_DIR}
-)
-
if(NOT BUILD_TARGET_BSD)
include_directories(
${SDKROOT}/LibJPEG/jpeg-9
@@ -197,4 +193,4 @@ elseif(BUILD_ENV_UNIXLIKE)
endif()
endif()
-target_link_libraries(image Qt5::Core Qt5::Gui Qt5::Network ${Z_LIB} ${GLUT_LIB} ${GL_LIB} ${JPEG_LIB} ${TIFF_LIB} ${PNG_LIB} ${EXTRA_LIBS})
+target_link_libraries(image Qt5::Core Qt5::Gui Qt5::Network ${Z_LIB} ${GLUT_LIB} ${GL_LIB} ${JPEG_LIB} TIFF::TIFF ${PNG_LIB} ${EXTRA_LIBS})
diff --git a/toonz/sources/image/tif/tiio_tif.cpp b/toonz/sources/image/tif/tiio_tif.cpp
index c9682f2f..ea38b126 100644
--- a/toonz/sources/image/tif/tiio_tif.cpp
+++ b/toonz/sources/image/tif/tiio_tif.cpp
@@ -65,7 +65,6 @@ public:
int skipLines(int lineCount) override;
void readLine(char *buffer, int x0, int x1, int shrink) override;
- void readLine(short *buffer, int x0, int x1, int shrink) override;
};
//------------------------------------------------------------
@@ -422,145 +421,9 @@ int TifReader::skipLines(int lineCount) {
#include "timage_io.h"
-void TifReader::readLine(short *buffer, int x0, int x1, int shrink) {
- assert(shrink > 0);
-
- const int pixelSize = 8;
- int stripRowSize = m_rowLength * pixelSize;
-
- if (m_row < m_info.m_y0 || m_row > m_info.m_y1) {
- memset(buffer, 0, (x1 - x0 + 1) * pixelSize);
- m_row++;
- return;
- }
-
- int stripIndex = m_row / m_rowsPerStrip;
- if (m_stripIndex != stripIndex) {
- // Retrieve the strip holding current row. Please, observe that
- // TIFF functions will return the strip buffer in the BOTTOM-UP orientation,
- // no matter the internal tif's orientation storage
-
- m_stripIndex = stripIndex;
-
- if (TIFFIsTiled(m_tiff)) {
- // Retrieve tiles size
- uint32 tileWidth = 0, tileHeight = 0;
- TIFFGetField(m_tiff, TIFFTAG_TILEWIDTH, &tileWidth);
- TIFFGetField(m_tiff, TIFFTAG_TILELENGTH, &tileHeight);
- assert(tileWidth > 0 && tileHeight > 0);
-
- // Allocate a sufficient buffer to store a single tile
- int tileSize = tileWidth * tileHeight;
- std::unique_ptr<uint64[]> tile(new uint64[tileSize]);
-
- int x = 0;
- int y = tileHeight * m_stripIndex;
-
- // In case it's the last tiles row, the tile size might exceed the image
- // bounds
- int lastTy = std::min((int)tileHeight, m_info.m_ly - y);
-
- // Traverse the tiles row
- while (x < m_info.m_lx) {
- int ret = TIFFReadRGBATile_64(m_tiff, x, y, tile.get());
- assert(ret);
-
- int tileRowSize = std::min((int)tileWidth, m_info.m_lx - x) * pixelSize;
-
- // Copy the tile rows in the corresponding output strip rows
- for (int ty = 0; ty < lastTy; ++ty) {
- memcpy(m_stripBuffer + (ty * m_rowLength + x) * pixelSize,
- (UCHAR *)tile.get() + ty * tileWidth * pixelSize, tileRowSize);
- }
-
- x += tileWidth;
- }
- } else {
- int y = m_rowsPerStrip * m_stripIndex;
- int ok = TIFFReadRGBAStrip_64(m_tiff, y, (uint64 *)m_stripBuffer);
- assert(ok);
- }
- }
-
- uint16 orient = ORIENTATION_TOPLEFT;
- TIFFGetField(m_tiff, TIFFTAG_ORIENTATION, &orient);
-
- int r = m_rowsPerStrip - 1 - (m_row % m_rowsPerStrip);
- switch (orient) // Pretty weak check for top/bottom orientation
- {
- case ORIENTATION_TOPLEFT:
- case ORIENTATION_TOPRIGHT:
- case ORIENTATION_LEFTTOP:
- case ORIENTATION_RIGHTTOP:
- // We have to invert the fixed BOTTOM-UP returned by TIFF functions - since
- // this function is
- // supposed to ignore orientation issues (which are managed outside).
-
- // The last tiles row will actually start at the END OF THE IMAGE (not
- // necessarily at
- // m_rowsPerStrip multiples). So, we must adjust for that.
-
- r = std::min(m_rowsPerStrip, m_info.m_ly - m_rowsPerStrip * m_stripIndex) -
- 1 - (m_row % m_rowsPerStrip);
- break;
-
- case ORIENTATION_BOTRIGHT:
- case ORIENTATION_BOTLEFT:
- case ORIENTATION_RIGHTBOT:
- case ORIENTATION_LEFTBOT:
- r = m_row % m_rowsPerStrip;
- break;
- }
-
- // Finally, copy the strip row to the output row buffer
- TPixel64 *pix = (TPixel64 *)buffer;
- USHORT *v = (USHORT *)(m_stripBuffer + r * stripRowSize);
-
- pix += x0;
- v += 4 * x0;
-
- int width =
- (x1 < x0) ? (m_info.m_lx - 1) / shrink + 1 : (x1 - x0) / shrink + 1;
-
- for (int i = 0; i < width; i++) {
- USHORT c = *v++;
- pix->r = c;
- c = *v++;
- pix->g = c;
- c = *v++;
- pix->b = c;
- c = *v++;
- pix->m = c;
-
- pix += shrink;
- v += 4 * (shrink - 1);
- }
-
- m_row++;
-}
-
//===============================================================
void TifReader::readLine(char *buffer, int x0, int x1, int shrink) {
- if (this->m_info.m_bitsPerSample == 16 &&
- this->m_info.m_samplePerPixel >= 3) {
- std::vector<short> app(4 * (m_info.m_lx));
- readLine(&app[0], x0, x1, shrink);
-
- TPixel64 *pixin = (TPixel64 *)&app[0];
-
- TPixel32 *pixout = (TPixel32 *)buffer;
- for (int j = 0; j < x0; j++) {
- pixout++;
- pixin++;
- }
-
- for (int i = 0; i < (x1 - x0) + 1; i++)
- *pixout++ = PixelConverter<TPixel32>::from(*pixin++);
-
- return;
- }
-
assert(shrink > 0);
const int pixelSize = 4;
diff --git a/toonz/sources/image/tzp/tiio_tzp.cpp b/toonz/sources/image/tzp/tiio_tzp.cpp
index 080f9bdf..a22f9d0f 100644
--- a/toonz/sources/image/tzp/tiio_tzp.cpp
+++ b/toonz/sources/image/tzp/tiio_tzp.cpp
@@ -7,7 +7,7 @@
#include "texception.h"
#include "tiffio.h"
-#include "tiffiop.h"
+// #include "tiffiop.h"
// #include "tspecialstyleid.h"
#include <set>
@@ -225,8 +225,7 @@ void TzpReader::readLine(char *buffer, int x0, int x1, int shrink) {
static std::set<int> table;
/// per le tzp che vengono da Irix
- bool bigEndian =
- (m_tiff->tif_header.classic.tiff_magic == TIFF_BIGENDIAN);
+ bool bigEndian = TIFFIsBigEndian(m_tiff);
for (int i = 0; i < m_lx; i++) {
unsigned short inPix = line[i];
@@ -255,8 +254,7 @@ void TzpReader::readLine(char *buffer, int x0, int x1, int shrink) {
static std::set<int> table;
/// per le tzp che vengono da Irix
- bool bigEndian =
- (m_tiff->tif_header.classic.tiff_magic == TIFF_BIGENDIAN);
+ bool bigEndian = TIFFIsBigEndian(m_tiff);
for (int i = 0; i < m_lx; i++) {
unsigned short inPix = line[i];
--
2.49.0

126
0001-Use-system-stdfx.patch Normal file
View File

@@ -0,0 +1,126 @@
From 9d68d36c05cd89cf791d128cf46033865778b527 Mon Sep 17 00:00:00 2001
From: Christophe Marin <christophe@krop.fr>
Date: Wed, 11 Sep 2024 17:00:59 +0200
Subject: [PATCH] Use system stdfx
---
toonz/sources/CMakeLists.txt | 2 ++
toonz/sources/stdfx/CMakeLists.txt | 8 +-------
toonz/sources/stdfx/iwa_bokeh_util.h | 4 ++--
toonz/sources/stdfx/iwa_bokehfx.cpp | 4 ++--
toonz/sources/stdfx/iwa_glarefx.cpp | 4 ++--
toonz/sources/stdfx/iwa_glarefx.h | 2 +-
6 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt
index 9eb1149..54268ea 100644
--- a/toonz/sources/CMakeLists.txt
+++ b/toonz/sources/CMakeLists.txt
@@ -445,6 +445,8 @@ elseif(BUILD_ENV_UNIXLIKE)
find_package(JPEG REQUIRED)
+ find_package(kissfft REQUIRED)
+
# the libraries have .pc
find_package(PkgConfig)
diff --git a/toonz/sources/stdfx/CMakeLists.txt b/toonz/sources/stdfx/CMakeLists.txt
index 4de06ec..2100f72 100644
--- a/toonz/sources/stdfx/CMakeLists.txt
+++ b/toonz/sources/stdfx/CMakeLists.txt
@@ -270,8 +270,6 @@ set(SOURCES
iwa_noise1234.cpp
iwa_pnperspectivefx.cpp
iwa_soapbubblefx.cpp
- ${SDKROOT}/kiss_fft130/kiss_fft.c
- ${SDKROOT}/kiss_fft130/tools/kiss_fftnd.c
iwa_bokehfx.cpp
iwa_timecodefx.cpp
iwa_bokehreffx.cpp
@@ -325,13 +323,9 @@ else()
)
endif()
-include_directories(
- ${SDKROOT}/kiss_fft130
-)
-
_find_toonz_library(TNZLIBS "tnzcore;tnzbase;toonzlib")
-target_link_libraries(tnzstdfx Qt5::Core Qt5::Gui Qt5::OpenGL ${GL_LIB} ${GLEW_LIB} ${TNZLIBS} ${PTHREAD_LIBRARY})
+target_link_libraries(tnzstdfx Qt5::Core Qt5::Gui Qt5::OpenGL ${GL_LIB} ${GLEW_LIB} ${TNZLIBS} ${PTHREAD_LIBRARY} kissfft::kissfft-float)
if(OpenCV_FOUND)
target_link_libraries(tnzstdfx ${OpenCV_LIBS})
diff --git a/toonz/sources/stdfx/iwa_bokeh_util.h b/toonz/sources/stdfx/iwa_bokeh_util.h
index 5bb593c..118e8cb 100644
--- a/toonz/sources/stdfx/iwa_bokeh_util.h
+++ b/toonz/sources/stdfx/iwa_bokeh_util.h
@@ -5,8 +5,8 @@
#include "tgeometry.h"
#include "traster.h"
-#include "kiss_fft.h"
-#include "tools/kiss_fftnd.h"
+#include <kiss_fft.h>
+#include <kiss_fftnd.h>
#include "ttile.h"
#include "stdfx.h"
#include "tfxparam.h"
diff --git a/toonz/sources/stdfx/iwa_bokehfx.cpp b/toonz/sources/stdfx/iwa_bokehfx.cpp
index dda2eda..07ea6f5 100644
--- a/toonz/sources/stdfx/iwa_bokehfx.cpp
+++ b/toonz/sources/stdfx/iwa_bokehfx.cpp
@@ -5,7 +5,7 @@
#include "trasterfx.h"
#include "trasterimage.h"
-#include "kiss_fft.h"
+#include <kiss_fft.h>
#include <QPair>
#include <QVector>
@@ -272,4 +272,4 @@ QMap<int, double> Iwa_BokehFx::getIrisSizes(const double frame,
return irisSizes;
}
-FX_PLUGIN_IDENTIFIER(Iwa_BokehFx, "iwa_BokehFx")
\ No newline at end of file
+FX_PLUGIN_IDENTIFIER(Iwa_BokehFx, "iwa_BokehFx")
diff --git a/toonz/sources/stdfx/iwa_glarefx.cpp b/toonz/sources/stdfx/iwa_glarefx.cpp
index 9a834a6..b5a980b 100644
--- a/toonz/sources/stdfx/iwa_glarefx.cpp
+++ b/toonz/sources/stdfx/iwa_glarefx.cpp
@@ -7,7 +7,7 @@
#include "tparamuiconcept.h"
-#include "kiss_fft.h"
+#include <kiss_fft.h>
#include "iwa_cie_d65.h"
#include "iwa_xyz.h"
#include "iwa_simplexnoise.h"
@@ -1035,4 +1035,4 @@ bool Iwa_GlareFx::toBeComputedInLinearColorSpace(bool settingsIsLinear,
return settingsIsLinear;
}
-FX_PLUGIN_IDENTIFIER(Iwa_GlareFx, "iwa_GlareFx")
\ No newline at end of file
+FX_PLUGIN_IDENTIFIER(Iwa_GlareFx, "iwa_GlareFx")
diff --git a/toonz/sources/stdfx/iwa_glarefx.h b/toonz/sources/stdfx/iwa_glarefx.h
index 49873a4..763958e 100644
--- a/toonz/sources/stdfx/iwa_glarefx.h
+++ b/toonz/sources/stdfx/iwa_glarefx.h
@@ -15,7 +15,7 @@ Iwa_GlareFx
#include <QList>
#include <QThread>
-#include "tools/kiss_fftnd.h"
+#include <kiss_fftnd.h>
const int LAYER_NUM = 5;
--
2.46.0

View File

@@ -4,17 +4,17 @@
<param name="url">https://github.com/opentoonz/opentoonz</param>
<param name="revision">v1.7.1</param>
<param name="versionformat">1.7.1</param>
<!-- the openblas folder contains unredistributable files -->
<param name="exclude">thirdparty/openblas</param>
<!-- more thirdparty dependencies we don't need -->
<param name="exclude">thirdparty/Lz4</param>
<param name="exclude">thirdparty/glew</param>
<param name="exclude">thirdparty/glut</param>
<param name="exclude">thirdparty/kiss_fft130</param>
<param name="exclude">thirdparty/libjpeg-turbo</param>
<param name="exclude">thirdparty/libmypaint</param>
<param name="exclude">thirdparty/libpng-1.6.21</param>
<param name="exclude">thirdparty/libusb</param>
<param name="exclude">thirdparty/superlu</param>
<param name="exclude">thirdparty/tiff-4.0.3</param>
<param name="exclude">thirdparty/zlib-1.2.8</param>
<!-- thirdparty/lzo/driver is needed, but the 2.x subfolder can be dropped -->
<param name="exclude">thirdparty/lzo/2.03</param>

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5a1a11a4a513e171e8ed0ea8fb932fe0194034e77c42b96657c4838745bdc69d
size 28204396
oid sha256:0794ae6442069dbec4ce925b7adda1e9b314910cd3c6ff9e5545023da169fa90
size 27633592

31
opentoonz-cmake4.patch Normal file
View File

@@ -0,0 +1,31 @@
From 34f665351756840a244ee62086d423d9406baecd Mon Sep 17 00:00:00 2001
From: Christophe Marin <christophe@krop.fr>
Date: Wed, 2 Apr 2025 01:54:32 +0200
Subject: [PATCH] Fix build with CMake 4
---
toonz/sources/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt
index 397524c4..a56ebe82 100644
--- a/toonz/sources/CMakeLists.txt
+++ b/toonz/sources/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.16)
set(CMAKE_BUILD_TYPE_INIT Release)
@@ -187,7 +187,7 @@ elseif(BUILD_ENV_APPLE)
endif()
elseif(BUILD_ENV_UNIXLIKE)
# Needed for correct Qt detection
- cmake_minimum_required(VERSION 2.8.12)
+ cmake_minimum_required(VERSION 3.16)
set(PRELOAD_VARIABLE "LD_LIBRARY_PATH")
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
add_definitions(-DLINUX)
--
2.49.0

View File

@@ -0,0 +1,33 @@
From 4ebf30531234bcba635698566f728d34e8a97edd Mon Sep 17 00:00:00 2001
From: Christophe Marin <christophe@krop.fr>
Date: Mon, 3 Mar 2025 09:41:56 +0100
Subject: [PATCH] Work around incompatibility between GLEW config file and
CMake module
CMake FindGLEW.cmake and glew CMake config files are incompatible and cause
build errors.
---
toonz/sources/CMakeLists.txt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt
index 9eb1149..5ecec8b 100644
--- a/toonz/sources/CMakeLists.txt
+++ b/toonz/sources/CMakeLists.txt
@@ -438,7 +438,12 @@ elseif(BUILD_ENV_UNIXLIKE)
find_package(PNG REQUIRED)
set(PNG_LIB ${PNG_LIBRARY})
message("******* libpng:" ${PNG_LIB})
- find_package(GLEW)
+ find_package(glew CONFIG)
+ if(glew_FOUND)
+ set(GLEW_LIBRARIES GLEW::glew)
+ else()
+ find_package(GLEW)
+ endif()
find_package(SuperLU REQUIRED)
set(SUPERLU_LIB ${SUPERLU_LIBRARY})
--
2.48.1

View File

@@ -1,3 +1,31 @@
-------------------------------------------------------------------
Sun Jul 13 07:45:51 UTC 2025 - Christophe Marin <christophe@krop.fr>
- define C and CXX standard to fix build with GCC 15
-------------------------------------------------------------------
Tue Apr 1 23:45:44 UTC 2025 - Christophe Marin <christophe@krop.fr>
- Add patches:
* 0001-Use-system-TIFF.patch
(gh#opentoonz/opentoonz#5592, gh#opentoonz/opentoonz#4199)
* opentoonz-cmake4.patch
- Update the _service file and tarball
-------------------------------------------------------------------
Mon Mar 3 08:42:22 UTC 2025 - Christophe Marin <christophe@krop.fr>
- Add patch:
* opentoonz-glew_config_compat.patch
- Stop using %suse_update_desktop_file
- Use system's kissfft dependency
-------------------------------------------------------------------
Wed Sep 11 13:47:39 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Add patch:
* 0001-Use-system-stdfx.patch
-------------------------------------------------------------------
Wed May 10 21:50:59 UTC 2023 - Christophe Marin <christophe@krop.fr>

View File

@@ -1,7 +1,7 @@
#
# spec file for package opentoonz
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -29,6 +29,14 @@ Source99: %{name}-rpmlintrc
Patch0: 0001-Fix-linker-errors-on-Linux.patch
# PATCH-FIX-UPSTREAM
Patch1: 0001-Fix-build-with-Werror-return-type.patch
# Use system libraries when possible
Patch2: 0001-Use-system-stdfx.patch
# PATCH-FIX-OPENSUSE
Patch3: opentoonz-glew_config_compat.patch
# PATCH-FIX-UPSTREAM -- Use system TIFF
Patch4: 0001-Use-system-TIFF.patch
# PATCH-FIX-UPSTREAM
Patch6: opentoonz-cmake4.patch
BuildRequires: boost-devel >= 1.55
BuildRequires: cmake
BuildRequires: freeglut-devel
@@ -41,7 +49,6 @@ BuildRequires: pkgconfig
# needed to setup startup script paths
BuildRequires: sed
BuildRequires: superlu-devel
BuildRequires: update-desktop-files
BuildRequires: cmake(OpenCV)
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Gui)
@@ -56,6 +63,7 @@ BuildRequires: cmake(Qt5Svg)
BuildRequires: cmake(Qt5UiTools)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5Xml)
BuildRequires: cmake(kissfft)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(liblz4)
@@ -78,23 +86,22 @@ ExclusiveArch: %{ix86} x86_64 ppc64 ppc64le %{riscv}
%autosetup -p1
%build
# NOTE: Third party dependencies are dropped from the tarball thanks to the
# _service file. Only kissfft130, lzo/driver and tiff-4.0.3 shall be kept.
# TODO upstream planning to replace custom thirdparty libs with system versions
cd thirdparty/tiff-*
export CFLAGS="%{optflags} -fPIC"
%configure --disable-jbig
%make_build
cd -
# NOTE: Most third party dependencies are dropped from the tarball. Only tinyexr
# and lzodriver are kept
cd toonz
%define __sourcedir sources
# -DCMAKE_POLICY_VERSION_MINIMUM=3.5 is temporarily needed until dependencies build with cmake 4 (e.g. kissfft)
# -DCMAKE_C*_STANDARD is needed to build with GCC 15
%cmake \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DWITH_SYSTEM_LZO:BOOL=ON \
-DWITH_SYSTEM_SUPERLU:BOOL=ON \
-DWITH_TRANSLATION:BOOL=OFF
-DWITH_TRANSLATION:BOOL=OFF \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_C_STANDARD=99
%cmake_build
@@ -112,8 +119,6 @@ rm -r %{buildroot}%{_prefix}/lib/%{name}
sed -i 's|/lib/|/%{_lib}/|' %{buildroot}%{_bindir}/%{name}
%endif
%suse_update_desktop_file io.github.OpenToonz 2DGraphics
%files
%license LICENSE.txt
%dir %{_datadir}/metainfo