scribus: x86 patch

This commit is contained in:
Jerome Duval
2022-02-25 20:44:02 +01:00
parent 05e2ae7fbb
commit 2c03aa4c12

View File

@@ -1,14 +1,14 @@
From 8c5ce2814d6ac6889dba5d11b041bc530736765e Mon Sep 17 00:00:00 2001
From afa4cb6d40e13f22edc678a0bc52fee1f0dade55 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 16 Nov 2020 21:51:24 +1000
Subject: Fix build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a536a3..327ae32 100644
index a1f259e..a5b56d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -408,7 +408,7 @@ include(CMakeLists_Dependencies.cmake)
@@ -421,7 +421,7 @@ include(CMakeLists_Dependencies.cmake)
##############################################################################################################
########## Include Setup ##########
@@ -18,7 +18,7 @@ index 3a536a3..327ae32 100644
CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
if(HAVE_DLFCN_H)
diff --git a/scribus/scpaths.cpp b/scribus/scpaths.cpp
index 25369fa..289fe68 100644
index 7d5b424..66995bf 100644
--- a/scribus/scpaths.cpp
+++ b/scribus/scpaths.cpp
@@ -322,6 +322,15 @@ QStringList ScPaths::spellDirs() const
@@ -90,10 +90,10 @@ index 55a5828..f421582 100644
return errno;
} else {
diff --git a/scribus/util_debug.cpp b/scribus/util_debug.cpp
index 5adfab7..ebf0bdb 100644
index 6f19200..d3a8c61 100644
--- a/scribus/util_debug.cpp
+++ b/scribus/util_debug.cpp
@@ -54,7 +54,7 @@ void tDebug(const QString& message)
@@ -53,7 +53,7 @@ void tDebug(const QString& message)
*/
void printBacktrace ( int nFrames )
{
@@ -106,7 +106,7 @@ index 5adfab7..ebf0bdb 100644
2.30.2
From 62b59b80636fc7a3cab25ac5a3b79672ae5457db Mon Sep 17 00:00:00 2001
From 27b2024b2f783d09c103059924852838eff45407 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 8 Jan 2021 22:00:46 +1000
Subject: Fix for app font
@@ -128,10 +128,10 @@ index e50217e..a20ab3c 100644
initCrashHandler();
app.parseCommandLine();
diff --git a/scribus/prefsmanager.cpp b/scribus/prefsmanager.cpp
index 6821fed..1fa5936 100644
index e6fe249..98b672e 100644
--- a/scribus/prefsmanager.cpp
+++ b/scribus/prefsmanager.cpp
@@ -2776,9 +2776,11 @@ bool PrefsManager::readPref(const QString& filePath)
@@ -2783,9 +2783,11 @@ bool PrefsManager::readPref(const QString& filePath)
else
appPrefs.uiPrefs.style.clear();
}
@@ -144,10 +144,10 @@ index 6821fed..1fa5936 100644
}
diff --git a/scribus/scribus.cpp b/scribus/scribus.cpp
index 7deca71..e6e16a6 100644
index dca5b13..3a2e2bd 100644
--- a/scribus/scribus.cpp
+++ b/scribus/scribus.cpp
@@ -6460,12 +6460,14 @@ void ScribusMainWindow::slotPrefsOrg()
@@ -6484,12 +6484,14 @@ void ScribusMainWindow::slotPrefsOrg()
ScQApp->changeIconSet(newIconSet);
int newUIFontSize = m_prefsManager.guiFontSize();
@@ -166,17 +166,17 @@ index 7deca71..e6e16a6 100644
2.30.2
From 7e43f0330e65ebb944f859a6c6152da53fc35c25 Mon Sep 17 00:00:00 2001
From 4ad3b247e814bb8fddcf56508ac00ce1bdfd6fa0 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 22 Nov 2021 20:40:09 +0100
Subject: Prefer the shared libpython3
diff --git a/CMakeLists_Dependencies.cmake b/CMakeLists_Dependencies.cmake
index 4006cba..7b940a6 100644
index 0a660bf..281fc33 100644
--- a/CMakeLists_Dependencies.cmake
+++ b/CMakeLists_Dependencies.cmake
@@ -150,6 +150,7 @@ endif()
@@ -160,6 +160,7 @@ endif()
#<< PYTHON
if (NOT WANT_PYTHON_2X)
message("Python 3.x Selected")
@@ -187,3 +187,87 @@ index 4006cba..7b940a6 100644
--
2.30.2
From 06f52ede0e7b7c5b226791b16e499f185f19fd48 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 25 Feb 2022 20:42:38 +0100
Subject: fix uint32_t type for x86
diff --git a/scribus/imagedataloaders/scimgdataloader_tiff.cpp b/scribus/imagedataloaders/scimgdataloader_tiff.cpp
index 1073051..0a8e539 100644
--- a/scribus/imagedataloaders/scimgdataloader_tiff.cpp
+++ b/scribus/imagedataloaders/scimgdataloader_tiff.cpp
@@ -52,7 +52,7 @@ void ScImgDataLoader_TIFF::loadEmbeddedProfile(const QString& fn, int /*page*/)
if (!tif)
return;
- uint32_t EmbedLen = 0;
+ uint32 EmbedLen = 0;
void* EmbedBuffer;
if (TIFFGetField(tif, TIFFTAG_ICCPROFILE, &EmbedLen, &EmbedBuffer))
{
@@ -289,26 +289,26 @@ bool ScImgDataLoader_TIFF::getImageData(TIFF* tif, RawImage *image, uint widtht,
if (TIFFIsTiled(tif))
{
- uint32_t columns, rows;
- uint32_t *tile_buf;
- uint32_t xt, yt;
+ uint32 columns, rows;
+ uint32 *tile_buf;
+ uint32 xt, yt;
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &columns);
TIFFGetField(tif, TIFFTAG_TILELENGTH, &rows);
- tile_buf = (uint32_t*) _TIFFmalloc(columns * rows * sizeof(uint32_t));
+ tile_buf = (uint32*) _TIFFmalloc(columns * rows * sizeof(uint32));
if (tile_buf == nullptr)
{
TIFFClose(tif);
return false;
}
- uint32_t tileW = columns, tileH = rows;
- for (yt = 0; yt < (uint32_t) image->height(); yt += rows)
+ uint32 tileW = columns, tileH = rows;
+ for (yt = 0; yt < (uint32) image->height(); yt += rows)
{
if (yt > (uint) image->height())
break;
if (image->height() - yt < rows)
tileH = image->height() - yt;
tileW = columns;
- uint32_t yi;
+ uint32 yi;
int chans = image->channels();
for (xt = 0; xt < (uint) image->width(); xt += columns)
{
@@ -325,7 +325,7 @@ bool ScImgDataLoader_TIFF::getImageData(TIFF* tif, RawImage *image, uint widtht,
{
int chans = image->channels();
tsize_t bytesperrow = TIFFScanlineSize(tif);
- uint32_t *bits = (uint32_t *) _TIFFmalloc(bytesperrow);
+ uint32 *bits = (uint32 *) _TIFFmalloc(bytesperrow);
if (bits)
{
for (unsigned int y = 0; y < heightt; y++)
@@ -351,7 +351,7 @@ bool ScImgDataLoader_TIFF::getImageData(TIFF* tif, RawImage *image, uint widtht,
bool ScImgDataLoader_TIFF::getImageData_RGBA(TIFF* tif, RawImage *image, uint widtht, uint heightt, uint size, const SampleFormatInfo& sampleInfo)
{
- uint32_t* bits = (uint32_t *) _TIFFmalloc(size * sizeof(uint32_t));
+ uint32* bits = (uint32 *) _TIFFmalloc(size * sizeof(uint32));
if (!bits)
return false;
@@ -733,7 +733,7 @@ bool ScImgDataLoader_TIFF::loadPicture(const QString& fn, int page, int res, boo
m_imageInfoRecord.exifInfo.artist = QString(artist);
m_imageInfoRecord.exifInfo.thumbnail = QImage();
m_imageInfoRecord.exifDataValid = true;
- uint32_t EmbedLen = 0;
+ uint32 EmbedLen = 0;
void* EmbedBuffer;
if (TIFFGetField(tif, TIFFTAG_ICCPROFILE, &EmbedLen, &EmbedBuffer))
{
--
2.30.2