Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evince: update to 45.0 #20331

Merged
merged 1 commit into from Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions mingw-w64-evince/0002-missing-include.patch

This file was deleted.

68 changes: 65 additions & 3 deletions mingw-w64-evince/0003-mingw-dont-have-fcntl.patch
@@ -1,6 +1,6 @@
diff -Naur evince-3.32.0-orig/libdocument/ev-file-helpers.c evince-3.32.0/libdocument/ev-file-helpers.c
--- evince-3.32.0-orig/libdocument/ev-file-helpers.c 2019-01-31 06:03:59.000000000 +0300
+++ evince-3.32.0/libdocument/ev-file-helpers.c 2019-06-11 22:40:13.048270000 +0300
diff -Naur evince-45.0-orig/libdocument/ev-file-helpers.c evince-45.0/libdocument/ev-file-helpers.c
--- evince-45.0-orig/libdocument/ev-file-helpers.c 2019-01-31 06:03:59.000000000 +0300
+++ evince-45.0/libdocument/ev-file-helpers.c 2019-06-11 22:40:13.048270000 +0300
@@ -39,6 +39,10 @@
#define O_BINARY 0
#endif
Expand Down Expand Up @@ -40,3 +40,65 @@ diff -Naur evince-3.32.0-orig/libdocument/ev-file-helpers.c evince-3.32.0/libdoc
NULL,
NULL, &pout, NULL, &err)) {
GIOChannel *in, *out;
diff -Naur evince-45.0-orig/libdocument/ev-document.c evince-45.0/libdocument/ev-document.c
--- evince-45.0-orig/libdocument/ev-document.c 2019-01-31 06:03:59.000000000 +0300
+++ evince-45.0/libdocument/ev-document.c 2019-06-11 22:40:13.048270000 +0300
@@ -595,8 +595,12 @@ ev_document_load_fd (EvDocument *document,
return FALSE;
}

+#ifdef G_OS_WIN32
+ if (fstat(fd, &statbuf) == -1) {
+#else
if (fstat(fd, &statbuf) == -1 ||
(fd_flags = fcntl (fd, F_GETFL, &flags)) == -1) {
+#endif
int errsv = errno;
g_set_error_literal (error, G_FILE_ERROR,
g_file_error_from_errno (errsv),
diff -Naur evince-45.0-orig/libview/ev-jobs.c evince-45.0/libview/ev-jobs.c
--- evince-45.0-orig/libview/ev-jobs.c 2019-01-31 06:03:59.000000000 +0300
+++ evince-45.0/libview/ev-jobs.c 2019-06-11 22:40:13.048270000 +0300
@@ -1458,7 +1458,11 @@ ev_dupfd (int fd,
{
int new_fd;

+#ifdef G_OS_WIN32
+ new_fd = -1;
+#else
new_fd = fcntl (fd, F_DUPFD_CLOEXEC, 3);
+#endif
if (new_fd == -1) {
int errsv = errno;
g_set_error_literal (error, G_FILE_ERROR, g_file_error_from_errno (errsv),
diff -Naur evince-45.0-orig/previewer/ev-previewer-window.c evince-45.0/previewer/ev-previewer-window.c
--- evince-45.0-orig/previewer/ev-previewer-window.c 2019-01-31 06:03:59.000000000 +0300
+++ evince-45.0/previewer/ev-previewer-window.c 2019-06-11 22:40:13.048270000 +0300
@@ -648,7 +648,11 @@ ev_previewer_window_set_source_fd (EvPreviewerWindow *window,
g_return_val_if_fail (EV_IS_PREVIEWER_WINDOW (window), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);

+#ifdef G_OS_WIN32
+ nfd = -1;
+#else
nfd = fcntl (fd, F_DUPFD_CLOEXEC, 3);
+#endif
if (nfd == -1) {
int errsv = errno;
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),
diff -Naur evince-45.0-orig/previewer/ev-previewer.c evince-45.0/previewer/ev-previewer.c
--- evince-45.0-orig/previewer/ev-previewer.c 2019-01-31 06:03:59.000000000 +0300
+++ evince-45.0/previewer/ev-previewer.c 2019-06-11 22:40:13.048270000 +0300
@@ -166,8 +166,12 @@ check_arguments (int argc,
struct stat statbuf;
int flags;

+#ifdef G_OS_WIN32
+ if (fstat (input_fd, &statbuf) == -1 ) {
+#else
if (fstat (input_fd, &statbuf) == -1 ||
(flags = fcntl (input_fd, F_GETFL, &flags)) == -1) {
+#endif
int errsv = errno;
g_set_error_literal (error, G_FILE_ERROR,
g_file_error_from_errno(errsv),
13 changes: 0 additions & 13 deletions mingw-w64-evince/0005-previewer-unix-prin-only.patch

This file was deleted.

66 changes: 0 additions & 66 deletions mingw-w64-evince/0007-meson-fixes.patch

This file was deleted.

29 changes: 29 additions & 0 deletions mingw-w64-evince/0008-disable-pdf-document-load-fd.patch
@@ -0,0 +1,29 @@
diff -Naur evince-45.0-orig/backend/pdf/ev-poppler.c evince-45.0/backend/pdf/ev-poppler.c
--- evince-45.0-orig/backend/pdf/ev-poppler.c 2019-01-31 06:03:59.000000000 +0300
+++ evince-45.0/backend/pdf/ev-poppler.c 2019-06-11 22:40:13.048270000 +0300
@@ -315,6 +315,7 @@ pdf_document_load_gfile (EvDocument *document,
return TRUE;
}

+#ifndef G_OS_WIN32
static gboolean
pdf_document_load_fd (EvDocument *document,
int fd,
@@ -338,6 +339,7 @@ pdf_document_load_fd (EvDocument *document,

return TRUE;
}
+#endif

static int
pdf_document_get_n_pages (EvDocument *document)
@@ -788,7 +790,9 @@ pdf_document_class_init (PdfDocumentClass *klass)
ev_document_class->get_info = pdf_document_get_info;
ev_document_class->get_backend_info = pdf_document_get_backend_info;
ev_document_class->support_synctex = pdf_document_support_synctex;
+#ifndef G_OS_WIN32
ev_document_class->load_fd = pdf_document_load_fd;
+#endif
}

/* EvDocumentSecurity */
33 changes: 15 additions & 18 deletions mingw-w64-evince/PKGBUILD
Expand Up @@ -3,8 +3,8 @@
_realname=evince
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.38.0
pkgrel=6
pkgver=45.0
pkgrel=1
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
pkgdesc="Document (PostScript, PDF) viewer (mingw-w64)"
Expand All @@ -31,43 +31,40 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-pkgconf"
"${MINGW_PACKAGE_PREFIX}-desktop-file-utils"
"${MINGW_PACKAGE_PREFIX}-gettext-tools"
"${MINGW_PACKAGE_PREFIX}-gobject-introspection"
"${MINGW_PACKAGE_PREFIX}-gtk-doc"
"${MINGW_PACKAGE_PREFIX}-itstool"
"${MINGW_PACKAGE_PREFIX}-libhandy"
"${MINGW_PACKAGE_PREFIX}-yelp-tools")
source=(https://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz
0002-missing-include.patch
0003-mingw-dont-have-fcntl.patch
0005-previewer-unix-prin-only.patch
0007-meson-fixes.patch
https://gitlab.gnome.org/GNOME/evince/-/commit/1060b24d051607f14220f148d2f7723b29897a54.patch)
sha256sums=('26df897a417545b476d2606b14731122e84278ae994bd64ea535449c3cf01948'
'd2850c4bdfa87fa56bae2674d2c798f9181bfb3f19319fbc9966672caae48237'
'035f9cd952daa040d32309398b73022d199e27fed756126eb15663fb6a435c45'
'4e6a1ae77d36f0b36ea68ec2cc3abe4a706355ba02e4066d1b9add138052ba1b'
'b15ad558c060a62c03e54cb08696f859485708d29e317bd6e7d163cac0cfd368'
'25e5df47c3e0f190244b55018d31f1adadc86c0c241b21e06199d656e36e778a')
0008-disable-pdf-document-load-fd.patch)
sha256sums=('d18647d4275cbddf0d32817b1d04e307342a85be914ec4dad2d8082aaf8aa4a8'
'5c011fb1dec0564dcea06d145a2cc3572641dcd021477eb1172ecddd9cacbffd'
'f9e2010366f9185e1f6a18b9ac7207c792d970fd1636b3f3bd329f58259cf89e')
noextract=(${_realname}-${pkgver}.tar.xz)

prepare() {
cd "${srcdir}"/${_realname}-${pkgver}
cd "${srcdir}"
plain "Extracting ${_realname}-${pkgver}.tar.xz due to symlink(s) without pre-existing target(s)"
tar -xJf ${srcdir}/${_realname}-${pkgver}.tar.xz -C ${srcdir} || true
cd ${_realname}-${pkgver}

patch -p1 -i ${srcdir}/0002-missing-include.patch
patch -p1 -i ${srcdir}/0003-mingw-dont-have-fcntl.patch
patch -p1 -i ${srcdir}/0005-previewer-unix-prin-only.patch
patch -p1 -i ${srcdir}/0007-meson-fixes.patch
patch -p1 -i ${srcdir}/1060b24d051607f14220f148d2f7723b29897a54.patch
patch -p1 -i ${srcdir}/0008-disable-pdf-document-load-fd.patch
}

build() {
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}

CFLAGS+=" -Wno-implicit-function-declaration" \
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/meson \
--prefix=${MINGW_PREFIX} \
--buildtype=plain \
-Dplatform=win32 \
-Dbrowser_plugin=false \
-Ddbus=false \
-Dnautilus=false \
-Dgtk_doc=false \
Expand Down