rebuilt by autoport with build requirements: libpoppler-devel>=24.02.0-1mamba [release 3.19.0-2mamba;Sun Feb 25 2024]

This commit is contained in:
Automatic Build System 2024-02-27 10:08:15 +01:00
parent ac5741a269
commit 1981fcda86
8 changed files with 77 additions and 263 deletions

View File

@ -1,29 +0,0 @@
From 36c093cb21d9dab3aae35f64d44e5883eefe020e Mon Sep 17 00:00:00 2001
From: Laurent Carlier <lordheavym@gmail.com>
Date: Thu, 23 Jan 2020 18:02:44 +0100
Subject: [PATCH] Fix segfault with poppler>0.83
[GB.PDF]
* BUG: Fix segfault with poppler > 0.83
Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
---
gb.pdf/src/main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gb.pdf/src/main.cpp b/gb.pdf/src/main.cpp
index 2d7f02ca0..62923cc34 100644
--- a/gb.pdf/src/main.cpp
+++ b/gb.pdf/src/main.cpp
@@ -56,7 +56,7 @@ int EXPORT GB_INIT(void)
if (!globalParams)
{
#if POPPLER_VERSION_0_83
- globalParams = std::unique_ptr<GlobalParams>();
+ globalParams = std::unique_ptr<GlobalParams>(new GlobalParams());
#else
globalParams = new GlobalParams();
#endif
--
2.25.0

View File

@ -1,54 +0,0 @@
From 6a16e02ee3a0f05cd70876d76f807ab5076440b1 Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
Date: Thu, 30 Jan 2020 21:08:47 +0200
Subject: [PATCH] Use GlobalParams::getUtf8Map() found in poppler 0.85
[GB.PDF]
* BUG: Make 'gb.pdf' compile with poppler >= 0.85.
---
gb.pdf/configure.ac | 2 ++
gb.pdf/src/CPdfDocument.cpp | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gb.pdf/configure.ac b/gb.pdf/configure.ac
index 691e3088a..1dd10b455 100644
--- a/gb.pdf/configure.ac
+++ b/gb.pdf/configure.ac
@@ -29,6 +29,8 @@ if test "$have_poppler" = "yes"; then
AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_76, $((1-$?)), Poppler version >= 0.76)
pkg-config --atleast-version=0.83.0 poppler
AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_83, $((1-$?)), Poppler version >= 0.83)
+ pkg-config --atleast-version=0.85.0 poppler
+ AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_85, $((1-$?)), Poppler version >= 0.85)
fi
AC_OUTPUT( \
diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp
index 9522d15db..4b53fd50d 100644
--- a/gb.pdf/src/CPdfDocument.cpp
+++ b/gb.pdf/src/CPdfDocument.cpp
@@ -104,12 +104,14 @@ END_PROPERTY
static void return_unicode_string(const Unicode *unicode, int len)
{
- static UnicodeMap *uMap = NULL;
-
GooString gstr;
char buf[8]; /* 8 is enough for mapping an unicode char to a string */
int i, n;
+#if POPPLER_VERSION_0_85
+ const UnicodeMap *uMap = globalParams->getUtf8Map();
+#else
+ static UnicodeMap *uMap = NULL;
if (uMap == NULL)
{
GooString *enc = new GooString("UTF-8");
@@ -117,6 +119,7 @@ static void return_unicode_string(const Unicode *unicode, int len)
uMap->incRefCnt();
delete enc;
}
+#endif
for (i = 0; i < len; ++i) {
n = uMap->mapUnicode(unicode[i], buf, sizeof(buf));

View File

@ -1,38 +0,0 @@
diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp
index 4b53fd50d..58a51aecf 100644
--- a/gb.pdf/src/CPdfDocument.cpp
+++ b/gb.pdf/src/CPdfDocument.cpp
@@ -256,7 +256,7 @@ static uint32_t aux_get_page_from_action(void *_object, const_LinkAction *act)
name = ((LinkGoTo*)act)->getNamedDest();
if (name) {
#if POPPLER_VERSION_0_64
- dest = THIS->doc->findDest(name);
+ dest = THIS->doc->findDest(name).get();
#else
dest = THIS->doc->findDest((GooString *) name);
#endif
@@ -307,6 +307,7 @@ static char* aux_get_target_from_action(const_LinkAction *act)
char *vl=NULL;
char *uni=NULL;
const_GooString *tmp=NULL;
+ GooString gstr;
switch (act->getKind())
{
@@ -317,13 +318,13 @@ static char* aux_get_target_from_action(const_LinkAction *act)
tmp=((LinkLaunch*)act)->getFileName(); break;
case actionURI:
- tmp=((LinkURI*)act)->getURI(); break;
+ gstr=GooString(((LinkURI*)act)->getURI()); tmp=&gstr; break;
case actionNamed:
- tmp=((LinkNamed*)act)->getName(); break;
+ gstr=GooString(((LinkNamed*)act)->getName()); tmp=&gstr; break;
case actionMovie:
- tmp=((LinkMovie*)act)->getAnnotTitle(); break;
+ gstr=GooString(((LinkMovie*)act)->getAnnotTitle()); tmp=&gstr; break;
default:
break;

View File

@ -0,0 +1,70 @@
From: Amin Bandali <bandali@canonical.com>
Date: Wed, 14 Feb 2024 09:56:10 -0500
Subject: make 'gb.pdf' compile with poppler 24.02.0
Forwarded: https://gitlab.com/gambas/gambas/-/merge_requests/330
---
gb.pdf/configure.ac | 2 ++
gb.pdf/src/CPdfDocument.cpp | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/gb.pdf/configure.ac b/gb.pdf/configure.ac
index 6931e2c48..6e612e40a 100644
--- a/gb.pdf/configure.ac
+++ b/gb.pdf/configure.ac
@@ -34,6 +34,8 @@ if test "$have_poppler" = "yes"; then
AC_DEFINE_UNQUOTED(POPPLER_VERSION_21_06_0, $((1-$?)), Poppler version >= 21.06.0)
$PKG_CONFIG --atleast-version=22.06.0 poppler
AC_DEFINE_UNQUOTED(POPPLER_VERSION_22_06_0, $((1-$?)), Poppler version >= 22.06.0)
+ $PKG_CONFIG --atleast-version=24.02.0 poppler
+ AC_DEFINE_UNQUOTED(POPPLER_VERSION_24_02_0, $((1-$?)), Poppler version >= 24.02.0)
fi
AC_CONFIG_FILES([\
diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp
index 8f4aac7fb..5dfbfefc1 100644
--- a/gb.pdf/src/CPdfDocument.cpp
+++ b/gb.pdf/src/CPdfDocument.cpp
@@ -102,6 +102,22 @@ END_PROPERTY
****************************************************************************/
+#if POPPLER_VERSION_24_02_0
+static void return_unicode_string(const std::vector<Unicode> &unicode)
+{
+ GooString gstr;
+ char buf[8]; /* 8 is enough for mapping an unicode char to a string */
+ int n;
+
+ const UnicodeMap *uMap = globalParams->getUtf8Map();
+ for (const auto &c : unicode) {
+ n = uMap->mapUnicode(c, buf, sizeof(buf));
+ gstr.append(buf, n);
+ }
+
+ GB.ReturnNewZeroString(gstr.getCString());
+}
+#else
static void return_unicode_string(const Unicode *unicode, int len)
{
GooString gstr;
@@ -128,6 +144,7 @@ static void return_unicode_string(const Unicode *unicode, int len)
GB.ReturnNewZeroString(gstr.getCString());
}
+#endif
static void aux_return_string_info(void *_object, const char *key)
@@ -776,7 +793,11 @@ END_PROPERTY
BEGIN_PROPERTY(PDFINDEX_title)
OutlineItem *item = CPDF_index_get(THIS->currindex);
+#if POPPLER_VERSION_24_02_0
+ return_unicode_string(item->getTitle());
+#else
return_unicode_string(item->getTitle(), item->getTitleLength());
+#endif
END_PROPERTY

View File

@ -1,45 +0,0 @@
--- gambas3-3.5.4/gb.jit/configure.ac.orig 2014-09-20 12:56:11.194690422 +0200
+++ gambas3-3.5.4/gb.jit/configure.ac 2014-09-20 12:56:18.108690753 +0200
@@ -25,7 +25,7 @@
GB_COMPONENT(
jit, JIT, gb.jit, [src],
- [GB_FIND(llvm/AutoUpgrade.h llvm-c/Core.h, /usr/lib/llvm* /usr/local/lib /usr/local /usr/lib /usr `$LLVM_CONFIG --prefix`, include)],
+ [GB_FIND(llvm/IR/AutoUpgrade.h llvm-c/Core.h, /usr/lib/llvm* /usr/local/lib /usr/local /usr/lib /usr `$LLVM_CONFIG --prefix`, include)],
[GB_FIND(libLLVM-$LLVM_VERSION.$SHLIBEXT, /usr/lib/llvm* /usr/local /usr `$LLVM_CONFIG --prefix`, lib)],
[$C_LIB `$LLVM_CONFIG --ldflags` -lLLVM-$LLVM_VERSION],
[-I../../main/gbx -I../../main/share -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS])
--- gambas3-3.5.4/gb.jit/src/jit.h.in 2014-09-20 12:45:48.639660707 +0200
+++ gambas3-3.5.4/gb.jit/src/jit.h 2014-09-20 12:48:35.516668616 +0200
@@ -34,6 +34,7 @@
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Instructions.h"
+#include "llvm/IR/Verifier.h"
#else
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
@@ -42,7 +43,11 @@
#include "llvm/Intrinsics.h"
#include "llvm/Instructions.h"
#endif
+#if (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
+#include "llvm/IR/Verifier.h"
+#else
#include "llvm/Analysis/Verifier.h"
+#endif
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/GenericValue.h"
@@ -57,7 +62,11 @@
#include "llvm/Support/IRBuilder.h"
#endif
#include "llvm/Support/DynamicLibrary.h"
+#if (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
+#include "llvm/IR/CFG.h"
+#else
#include "llvm/Support/CFG.h"
+#endif
#include "llvm/PassManager.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"

View File

@ -1,11 +0,0 @@
--- gambas3-3.8.4/main/share/gambas.h.fix 2015-12-15 13:24:50.959501153 -0500
+++ gambas3-3.8.4/main/share/gambas.h 2015-12-15 13:25:07.023387570 -0500
@@ -66,7 +66,7 @@
#endif
#if defined(__cplusplus) && !defined(__clang__)
- #define __null ((intptr_t)0)
+/* #define __null ((intptr_t)0) */
#else
#ifdef bool
#undef bool

View File

@ -1,76 +0,0 @@
--- a/gambas/trunk/main/share/gambas.h
+++ b/gambas/trunk/main/share/gambas.h
@@ -66,7 +66,8 @@
#endif
#if defined(__cplusplus) && !defined(__clang__)
- #define __null ((intptr_t)0)
+ #undef NULL
+ #define NULL ((intptr_t)0)
#else
#ifdef bool
#undef bool
--- a/gambas/trunk/gb.sdl/src/Cmouse.cpp
+++ b/gambas/trunk/gb.sdl/src/Cmouse.cpp
@@ -35,7 +35,7 @@
CMOUSE_INFO CMOUSE_info = { 0 };
#define CHECK_VALID() \
- if (UNLIKELY(CMOUSE_info.valid == NULL)) \
+ if (UNLIKELY(!CMOUSE_info.valid)) \
{ \
GB.Error("No mouse event data"); \
return; \
--- a/gambas/trunk/gb.sdl/src/Cjoystick.cpp
+++ b/gambas/trunk/gb.sdl/src/Cjoystick.cpp
@@ -46,7 +46,7 @@
CJOY_INFO CJOY_info = { 0 };
#define CHECK_VALID() \
- if (UNLIKELY(CJOY_info.valid == NULL)) \
+ if (UNLIKELY(!CJOY_info.valid)) \
{ \
GB.Error("No joystick event data"); \
return; \
--- a/gambas/trunk/gb.qt4/src/CWidget.cpp
+++ b/gambas/trunk/gb.qt4/src/CWidget.cpp
@@ -2297,7 +2297,7 @@
{
_post_check_hovered = true;
_post_check_hovered_window = top;
- GB.Post((void (*)())post_check_hovered, NULL);
+ GB.Post((void (*)())post_check_hovered, (intptr_t)NULL);
}
}
@@ -2392,7 +2392,7 @@
return;
_focus_change = TRUE;
- GB.Post((void (*)())post_focus_change, NULL);
+ GB.Post((void (*)())post_focus_change, (intptr_t)NULL);
}
void CWIDGET_finish_focus(void)
--- a/gambas/trunk/gb.qt4/src/CImage.cpp
+++ b/gambas/trunk/gb.qt4/src/CImage.cpp
@@ -126,7 +126,7 @@
CIMAGE *CIMAGE_create(QImage *image)
{
CIMAGE *img;
- static GB_CLASS class_id = NULL;
+ static GB_CLASS class_id = 0;
if (!class_id)
class_id = GB.FindClass("Image");
--- a/gambas/trunk/gb.gtk/src/CImage.cpp
+++ b/gambas/trunk/gb.gtk/src/CImage.cpp
@@ -79,7 +79,7 @@
CIMAGE *CIMAGE_create(gPicture *image)
{
CIMAGE *img;
- static GB_CLASS class_id = NULL;
+ static GB_CLASS class_id = 0;
if (!class_id)
class_id = GB.FindClass("Image");

View File

@ -1,7 +1,7 @@
%define with_v4l 1
Name: gambas3
Version: 3.19.0
Release: 1mamba
Release: 2mamba
Summary: A development environment based on a BASIC interpreter with object extensions
Group: Applications/Development
Vendor: openmamba
@ -9,12 +9,7 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://gambas.sourceforge.net/en/main.html
Source: https://gitlab.com/gambas/gambas/-/archive/%{version}/gambas-%{version}.tar.bz2
Patch0: gambas3-3.5.4-llvm-3.5.patch
Patch1: gambas3-3.8.4-gcc-6.1.0-2.patch
Patch2: gambas3-3.8.4-gcc-6.1.0.patch
Patch3: gambas3-3.14.3-poppler-0.86.patch
Patch4: gambas3-3.14.3-poppler-0.83.patch
Patch5: gambas3-3.14.3-poppler-0.85.patch
Patch0: gambas3-3.19.0-poppler-24.02.0.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -110,6 +105,7 @@ BuildRequires: libzstd-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtdeclarative-devel
## AUTOBUILDREQ-END
BuildRequires: libpoppler-devel >= 24.02.0-1mamba
BuildRequires: libllvm-devel >= 3.8.0-2mamba
#BuildRequires: libSDL_gfx-devel >= 2.0.13
#BuildRequires: libsmpeg-devel >= 0.4.5
@ -882,9 +878,7 @@ This component provides the Gambas WEB component.
%setup -q -n gambas-%{version}
#-D -T
#:<< _EOF
#%patch3 -p1
#%patch4 -p1
#%patch5 -p1
%patch 0 -p1 -b .poppler-24.02.0
./reconf
%build
@ -1474,6 +1468,9 @@ install -D -m0644 app/desktop/gambas3.svg %{buildroot}%{_datadir}/pixmaps/gambas
%{_libdir}/%{name}/gb.libxml.*
%changelog
* Sun Feb 25 2024 Automatic Build System <autodist@mambasoft.it> 3.19.0-2mamba
- rebuilt by autoport with build requirements: libpoppler-devel>=24.02.0-1mamba
* Mon Feb 12 2024 Automatic Build System <autodist@openmamba.org> 3.19.0-1mamba
- automatic version update by autodist