From 4210d1a3eacbdc6fa34c2beffb9b6a79bf9ef0c0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 8 Apr 2017 13:55:43 -0700 Subject: evince: Upgrade to 3.24.0 Fix build with security flags Signed-off-by: Khem Raj --- ...1-Add-format-attribute-to-_synctex_malloc.patch | 27 +++++++++ .../evince/evince/0002-fix-gcc6-errors.patch | 39 ------------- meta-gnome/recipes-gnome/evince/evince_3.18.2.bb | 52 ----------------- meta-gnome/recipes-gnome/evince/evince_3.24.0.bb | 65 ++++++++++++++++++++++ 4 files changed, 92 insertions(+), 91 deletions(-) create mode 100644 meta-gnome/recipes-gnome/evince/evince/0001-Add-format-attribute-to-_synctex_malloc.patch delete mode 100644 meta-gnome/recipes-gnome/evince/evince/0002-fix-gcc6-errors.patch delete mode 100644 meta-gnome/recipes-gnome/evince/evince_3.18.2.bb create mode 100644 meta-gnome/recipes-gnome/evince/evince_3.24.0.bb (limited to 'meta-gnome') diff --git a/meta-gnome/recipes-gnome/evince/evince/0001-Add-format-attribute-to-_synctex_malloc.patch b/meta-gnome/recipes-gnome/evince/evince/0001-Add-format-attribute-to-_synctex_malloc.patch new file mode 100644 index 0000000000..de739c5b39 --- /dev/null +++ b/meta-gnome/recipes-gnome/evince/evince/0001-Add-format-attribute-to-_synctex_malloc.patch @@ -0,0 +1,27 @@ +From 3776fd0b42e473fe51d3678bf26cdaa37e1d8e0d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 8 Apr 2017 13:36:12 -0700 +Subject: [PATCH] Add format attribute to _synctex_malloc + +Helps in avoiding compile errors about formating with clang + +Signed-off-by: Khem Raj +--- + cut-n-paste/synctex/synctex_parser_utils.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cut-n-paste/synctex/synctex_parser_utils.c b/cut-n-paste/synctex/synctex_parser_utils.c +index f8a9f6f..9459b2d 100644 +--- a/cut-n-paste/synctex/synctex_parser_utils.c ++++ b/cut-n-paste/synctex/synctex_parser_utils.c +@@ -78,6 +78,7 @@ void *_synctex_malloc(size_t size) { + return (void *)ptr; + } + ++__attribute__((__format__ (__printf__, 1, 0))) + int _synctex_error(const char * reason,...) { + va_list arg; + int result; +-- +2.12.2 + diff --git a/meta-gnome/recipes-gnome/evince/evince/0002-fix-gcc6-errors.patch b/meta-gnome/recipes-gnome/evince/evince/0002-fix-gcc6-errors.patch deleted file mode 100644 index b8e30f7d92..0000000000 --- a/meta-gnome/recipes-gnome/evince/evince/0002-fix-gcc6-errors.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- evince-3.18.2/backend/comics/comics-document.c.orig 2016-06-22 20:08:01.789805750 +0000 -+++ evince-3.18.2/backend/comics/comics-document.c 2016-06-22 20:07:00.817804688 +0000 -@@ -241,6 +241,8 @@ - /* This function shows how to use the choosen command for decompressing a - * comic book file. It modifies fields of the ComicsDocument struct with - * this information */ -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-nonliteral" - static gboolean - comics_generate_command_lines (ComicsDocument *comics_document, - GError **error) -@@ -296,6 +298,7 @@ - } - - } -+#pragma GCC diagnostic pop - - /* This function chooses an external command for decompressing a comic - * book based on its mime tipe. */ ---- evince-3.18.2/libdocument/ev-document-misc.c.orig 2016-06-22 20:01:49.205799262 +0000 -+++ evince-3.18.2/libdocument/ev-document-misc.c 2016-06-22 20:02:27.233799924 +0000 -@@ -519,7 +519,8 @@ - - return (dp / di); - } -- -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-y2k" - /* Returns a locale specific date and time representation */ - gchar * - ev_document_misc_format_date (GTime utime) -@@ -542,6 +543,7 @@ - - return g_locale_to_utf8 (s, -1, NULL, NULL, NULL); - } -+#pragma GCC diagnostic pop - - void - ev_document_misc_get_pointer_position (GtkWidget *widget, diff --git a/meta-gnome/recipes-gnome/evince/evince_3.18.2.bb b/meta-gnome/recipes-gnome/evince/evince_3.18.2.bb deleted file mode 100644 index 4e3e0f05c1..0000000000 --- a/meta-gnome/recipes-gnome/evince/evince_3.18.2.bb +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "Evince is a document viewer for document formats like pdf, ps, djvu" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=96f2f8d5ee576a2163977938ea36fa7b" -SECTION = "x11/office" -DEPENDS = "gtk+3 libsecret gnome-desktop3 poppler gstreamer1.0-plugins-base orc adwaita-icon-theme intltool-native gnome-common-native" -PR = "r5" - -inherit gnome pkgconfig gtk-icon-cache gsettings gobject-introspection distro_features_check - -REQUIRED_DISTRO_FEATURES = "x11" - -SRC_URI[archive.md5sum] = "c39af6b8b1c44d4393ef8ac9dab99c0b" -SRC_URI[archive.sha256sum] = "42ad6c7354d881a9ecab136ea84ff867acb942605bcfac48b6c12e1c2d8ecb17" - -SRC_URI += "file://0001-help-remove-YELP-macro.patch \ - file://0002-fix-gcc6-errors.patch \ -" - -EXTRA_OECONF = " --enable-thumbnailer \ -" - -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/libdocument/.libs" -} - - -do_install_append() { - install -d install -d ${D}${datadir}/pixmaps - install -m 0755 ${S}/data/icons/48x48/apps/evince.png ${D}${datadir}/pixmaps/ -} - -PACKAGECONFIG ??= "" -PACKAGECONFIG[nautilus] = "--enable-nautilus,--disable-nautilus,nautilus" -PACKAGECONFIG[browser-plugin] = "--enable-browser-plugin,--disable-browser-plugin," - -RDEPENDS_${PN} += "glib-2.0-utils" -RRECOMMMENDS_${PN} = "adwaita-icon-theme" - -PACKAGES =+ "${PN}-nautilus-extension" -PACKAGES =+ "${PN}-browser-plugin" -FILES_${PN} += "${datadir}/dbus-1 \ - ${datadir}/appdata \ - ${datadir}/thumbnailers \ - " -FILES_${PN}-dbg += "${libdir}/*/*/.debug \ - ${libdir}/*/*/*/.debug" -FILES_${PN}-dev += "${libdir}/nautilus/extensions-2.0/*.la \ - ${libdir}/evince/*/backends/*.la" -FILES_${PN}-staticdev += "${libdir}/nautilus/extensions-2.0/*.a \ - ${libdir}/evince/*/backends/*.a" -FILES_${PN}-nautilus-extension = "${libdir}/nautilus/*/*so" -FILES_${PN}-browser-plugin = "${libdir}/mozilla/*/*so" diff --git a/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb b/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb new file mode 100644 index 0000000000..2b75244fe5 --- /dev/null +++ b/meta-gnome/recipes-gnome/evince/evince_3.24.0.bb @@ -0,0 +1,65 @@ +SUMMARY = "Evince is a document viewer for document formats like pdf, ps, djvu" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=96f2f8d5ee576a2163977938ea36fa7b" +SECTION = "x11/office" +DEPENDS = "gtk+3 libsecret gnome-desktop3 poppler gstreamer1.0-plugins-base orc adwaita-icon-theme intltool-native gnome-common-native" +PR = "r5" + +inherit gnome pkgconfig gtk-icon-cache gsettings gobject-introspection distro_features_check systemd + +REQUIRED_DISTRO_FEATURES = "x11" + +SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \ + file://0001-help-remove-YELP-macro.patch \ + file://0001-Add-format-attribute-to-_synctex_malloc.patch \ + " +SRC_URI[archive.md5sum] = "3fb65ff46de191dc49c481f1fc66201c" +SRC_URI[archive.sha256sum] = "043895af7bbd6f1b57f9ab8778e78cf9c0af5dfcc347eaa94a17bf864c04dc8f" + +EXTRA_OECONF = " --enable-thumbnailer \ +" + +do_compile_prepend() { + export GIR_EXTRA_LIBS_PATH="${B}/libdocument/.libs" +} + + +do_install_append() { + install -d ${D}${datadir}/pixmaps + install -m 0755 ${S}/data/icons/48x48/apps/evince.png ${D}${datadir}/pixmaps/ + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)} + then + install -d ${D}${systemd_unitdir}/system + mv ${D}${libdir}/systemd/user/evince.service ${D}${systemd_unitdir}/system/evince.service + else + rm -rf ${D}${libdir}/systemd/user/evince.service + fi + rmdir --ignore-fail-on-non-empty ${D}${libdir}/systemd/user + rmdir --ignore-fail-on-non-empty ${D}${libdir}/systemd +} + +PACKAGECONFIG ??= "" +PACKAGECONFIG[nautilus] = "--enable-nautilus,--disable-nautilus,nautilus" +PACKAGECONFIG[browser-plugin] = "--enable-browser-plugin,--disable-browser-plugin," + +SYSTEMD_SERVICE_${PN} = "evince.service" + +RDEPENDS_${PN} += "glib-2.0-utils" +RRECOMMMENDS_${PN} = "adwaita-icon-theme" + +PACKAGES =+ "${PN}-nautilus-extension" +PACKAGES =+ "${PN}-browser-plugin" + +FILES_${PN} += "${datadir}/dbus-1 \ + ${datadir}/appdata \ + ${datadir}/thumbnailers \ + ${systemd_unitdir}/systemd/user/evince.service \ + " +FILES_${PN}-dbg += "${libdir}/*/*/.debug \ + ${libdir}/*/*/*/.debug" +FILES_${PN}-dev += "${libdir}/nautilus/extensions-2.0/*.la \ + ${libdir}/evince/*/backends/*.la" +FILES_${PN}-staticdev += "${libdir}/nautilus/extensions-2.0/*.a \ + ${libdir}/evince/*/backends/*.a" +FILES_${PN}-nautilus-extension = "${libdir}/nautilus/*/*so" +FILES_${PN}-browser-plugin = "${libdir}/mozilla/*/*so" -- cgit 1.2.3-korg