From dab4468820bf30b5a0764b19f519006f0e6bb371 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 27 Aug 2022 20:54:43 +0100 Subject: gentoo auto-resync : 27:08:2022 - 20:54:42 --- app-text/gv/Manifest | 9 ++++ app-text/gv/files/gv-3.7.4-bounding-box.patch | 15 ++++++ app-text/gv/files/gv-3.7.4-bug1071238.patch | 22 ++++++++ app-text/gv/files/gv-3.7.4-bz1536211.patch | 28 ++++++++++ app-text/gv/files/gv-3.7.4-dat.patch | 15 ++++++ app-text/gv/files/gv-3.7.4-overflow.patch | 27 ++++++++++ .../files/gv-3.7.4-remove-aliasing-violation.patch | 18 +++++++ app-text/gv/files/gv-3.7.4-resource.patch | 33 ++++++++++++ app-text/gv/gv-3.7.4.ebuild | 62 ++++++++++++++++++++++ 9 files changed, 229 insertions(+) create mode 100644 app-text/gv/files/gv-3.7.4-bounding-box.patch create mode 100644 app-text/gv/files/gv-3.7.4-bug1071238.patch create mode 100644 app-text/gv/files/gv-3.7.4-bz1536211.patch create mode 100644 app-text/gv/files/gv-3.7.4-dat.patch create mode 100644 app-text/gv/files/gv-3.7.4-overflow.patch create mode 100644 app-text/gv/files/gv-3.7.4-remove-aliasing-violation.patch create mode 100644 app-text/gv/files/gv-3.7.4-resource.patch create mode 100644 app-text/gv/gv-3.7.4.ebuild (limited to 'app-text/gv') diff --git a/app-text/gv/Manifest b/app-text/gv/Manifest index a6791ad94ac9..fed3f564ec7d 100644 --- a/app-text/gv/Manifest +++ b/app-text/gv/Manifest @@ -1,4 +1,13 @@ +AUX gv-3.7.4-bounding-box.patch 477 BLAKE2B beebdcab09ca1252d0ba579d8791ea7c56e68302dc144e5603fedaf62f71520f92544068a4f8e4396e7d63ed4034b5ae086fcc23a489e0352a97871e316a2a15 SHA512 ac32aae03872cec69b344f6c89cc2d3a55e50e1448b5a8caad8485da9315d72eb39df676e837e9420b526795134fc4a1ead7bd773cd8800d60df3c4528d52eed +AUX gv-3.7.4-bug1071238.patch 735 BLAKE2B ea2e04fda0a05f06dde3a1fc4324f1bea862e9b466cc34f883d2e4b9f683277af4b33c51bb8c0fe58a4439f9402e26e36258a8316e791635962bf9322e8028a5 SHA512 28ae1bd31adf0f235eef05cc88f90943b4591fe2737000614fdd02ae8e020b3fe9bef446177de2de587f92998557d742a3e9f39bea08a3c0e81fe8ae245cf2c7 +AUX gv-3.7.4-bz1536211.patch 1948 BLAKE2B c13df91959f2cfbbaa74c09ec55b7d6d77deb2050363e9fda3f6c343cff68b05babcfc93498e029f11a99ed431ce17b3424ead50e4b50e1ea8dddf49f370c5e0 SHA512 dff9b3d5b046b8f9591c69e3b29b68c053596d0e827ae0793d19ae01cb7fd4e9b32b1b50e90ff4cf898323bd662504ba28c3e295276f6bef30fa2a06089d8d9d +AUX gv-3.7.4-dat.patch 455 BLAKE2B 4debc4fc87b9d4a5c162608729772f8d60b75d7a913a2055d9ad2fe11da2695fcb048e1e79e2a2c22e06ad221473683d7c84b1e338cbb7e3928a4a6d336e02ca SHA512 9b89d43ae7c4ecbf84a85f82548fb1e54c1e69ba0639f430f8258152b12ccd2ba7ab7b39c42ae25fa5f6c26f247286ea5c9b3572c3f64e47da2c1af955fdab61 +AUX gv-3.7.4-overflow.patch 950 BLAKE2B d62b3230a8e267e32d1b3711a0daacb6b8b2f3a2a8b55a00bc78be2ff51414b786736e0a27005ef8d6339a723970675d45a72954abee260c17d16db80a82112c SHA512 ea026c7c1527140206be4d89e08dc9178e28e535aa986166034f32568fd05b8978cb1bc6be59134b89a78c002f4ef80281ebcced6009bd546d88147fff1f80ec +AUX gv-3.7.4-remove-aliasing-violation.patch 590 BLAKE2B 2b1a0cf926763dbcc94ad6cb61db5112ad8ad841cf5dce8e7bd35d0f41d748f241207ffae1bf46880509cb938828c42e2b4dcb6afd423aac7118c832b2b22401 SHA512 9465c3bd6195038e852f41837757f6b6bd9f1a37218b320785554cbfee6b8e092490a5a567e23432b7f7dcd9c73293f3131a106247f8479c26e8c59d53622841 +AUX gv-3.7.4-resource.patch 1373 BLAKE2B ebcbd33be8997ae216f5ae23aaa61ec27c0aae978db769e1745bcc91d010e3c07fa5ead6d7bc7312b0f0a421e8e15dcf7ba55c444a1e4b5ae102fde14c93e120 SHA512 35b22b0aa677c43b29512f054e53e003c86367c6487a4ffbbd8552d64c6d4790800fd63e6907d7739882bd4ef75d54577ef9dbb1080deda51bb0b8c5b0a44551 AUX gv_icon.xpm 2837 BLAKE2B d4e15bbf39e183b0093c7f9effa2725e558b6f0fad3d44fc3831c7c142081e668c727cc1688d0bd2b61e1702b50351f841f7390d1873cf27c21474549eed87d3 SHA512 6aae3a463fbf3484028f7ca8f50cb7a332f5566f3bb84dd5c17843b581e1b6013b4f99a1de8600e9d4a0ba5b9b7ce131ee37b0fd80b97e32ef018d272f756076 DIST gv-3.7.3.90.tar.gz 757506 BLAKE2B f856d23d3b9b9164db414534dec4b9a1c441a88d644011a46429b29127364fe429fc72ed3ce76d4142106d10c6a5305b81ec22ed353716df1c1a824907f7b191 SHA512 a80ff303fda1d6f13d66847f4b20aee4b364a05ec750bdb08267aa46470b201edf9762e16ad39dfe9da03118658598697f411dc8c32ab8bbad05a1161e816c50 +DIST gv-3.7.4.tar.gz 759287 BLAKE2B 2f18309d16a3c11dc0da0fa507f43c8128a4cabff8c1675895fac011702db677ef51989d2536bcbc7d3b4aa3e3cdf470a2a3e4699109b501141caffeb7e532a8 SHA512 f6dc072b6b72b6c543733501c719aa38c81a2e2fc63fbf1459b8a3a50a1a70eca9fc9def2fbeb51cb7bb81cfc3b20f136732d935740693bf541d7135975df648 EBUILD gv-3.7.3.90.ebuild 1060 BLAKE2B 90f49d25a87d7c5d60c0965158a24de76871381651d0788975c24748304461277359cdba5577d0355a100a39741b0087430f74043c4029eafc43acd96f25b6bb SHA512 62ea7a9af6e7bd8f80a7224e6feb92e5943ec45b9050991758c13dfb55fc359b01a811d1d9a4f85e160948a305bec1b1b0c0e0874421e023f72e45bd62fe4af9 +EBUILD gv-3.7.4.ebuild 1398 BLAKE2B 7d037b87bc660e13f0a92317ef3ed93b7ef658b060fb8f72c558153c32ee4568349f2da2a51e95116069f4611d49e4de46a0f3e59eadd8f15c0a50f32e9dbbd5 SHA512 0377924ad49f8ddea0966643e93bd38e62167c52cf02280e9953a79adfd195c39261f8a62be546f79c752ce6408ef1bb5147d3ea9d00b24bdd57caf96f9c4c81 MISC metadata.xml 256 BLAKE2B 16ea76357721c3ab7d672ade29d27338ddf9da983571e4ca4efe2520c741fc71315d9609b711850b00c19ed4eea848dea0d5b3955eecb401c42c4db257c300bf SHA512 2748afab7ffea0b3ddadf72dc720f7d83a1d76453fa569091abffe834ec187144a47f9365ccb4a97f676dbcfd799a6be92671f283b179fe4589d95486d7fd24d diff --git a/app-text/gv/files/gv-3.7.4-bounding-box.patch b/app-text/gv/files/gv-3.7.4-bounding-box.patch new file mode 100644 index 000000000000..b55ddbd4a3ee --- /dev/null +++ b/app-text/gv/files/gv-3.7.4-bounding-box.patch @@ -0,0 +1,15 @@ +Fix bounding box recognition +https://src.fedoraproject.org/rpms/gv/blob/rawhide/f/gv-bounding-box.patch + +diff a/src/ps.c b/src/ps.c +--- a/src/ps.c ++++ b/src/ps.c +@@ -357,7 +357,7 @@ static int parse_boundingbox(const char *l, int *boundingbox) { + while (*p == ' ' || *p == '\t') + p++; + fury = strtod(p, &pe); +- if (*pe != '\n' && *pe != '\0' && *pe != ' ' && *pe != '\t') { ++ if (*pe != '\n' && *pe != '\r'&& *pe != '\0' && *pe != ' ' && *pe != '\t') { + return 0; + } + diff --git a/app-text/gv/files/gv-3.7.4-bug1071238.patch b/app-text/gv/files/gv-3.7.4-bug1071238.patch new file mode 100644 index 000000000000..d50f67c79cb8 --- /dev/null +++ b/app-text/gv/files/gv-3.7.4-bug1071238.patch @@ -0,0 +1,22 @@ +Fix NULL access segfault +https://bugzilla.redhat.com/show_bug.cgi?id=1071238 +https://src.fedoraproject.org/rpms/gv/blob/rawhide/f/gv-bug1071238.patch + +diff a/src/zoom.c b/src/zoom.c +--- a/src/zoom.c ++++ b/src/zoom.c +@@ -104,12 +104,12 @@ zoom_createZoom(Widget w _GL_UNUSED, XtP + + BEGINMESSAGE(zoom_createZoom) + +- if (!(gv_psfile != NULL || (gv_gs_arguments && *gv_gs_arguments))) { ++ if (!gv_psfile) { + INFMESSAGE(no file) ENDMESSAGE(zoom_createZoom) + return; + } + +- if (strcmp(gv_filename, "-")) { ++ if (gv_filename != NULL && strcmp(gv_filename, "-")) { + stat(gv_filename, &sbuf); + if (mtime != sbuf.st_mtime) { + INFMESSAGE1(file has changed) ENDMESSAGE1(zoom_createZoom)return; diff --git a/app-text/gv/files/gv-3.7.4-bz1536211.patch b/app-text/gv/files/gv-3.7.4-bz1536211.patch new file mode 100644 index 000000000000..94808a8b8ea8 --- /dev/null +++ b/app-text/gv/files/gv-3.7.4-bz1536211.patch @@ -0,0 +1,28 @@ +Fix PDF printing +https://bugzilla.redhat.com/show_bug.cgi?id=1536211 +https://src.fedoraproject.org/rpms/gv/blob/rawhide/f/gv-bz1536211.patch + +diff -up a/src/Makefile.am b/src/Makefile.am +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -198,7 +198,7 @@ gv_intern_res_unix.dat : + @echo "" >> gv_intern_res_unix.dat + @echo "GV.gsInterpreter: gs" >> gv_intern_res_unix.dat + @echo "GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s %s pdf2dsc.ps -c quit" >> gv_intern_res_unix.dat +- @echo "GV.gsCmdConvPDF: gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pswrite -sOutputFile=%s -f %s -c save pop quit" >> gv_intern_res_unix.dat ++ @echo "GV.gsCmdConvPDF: gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=ps2write -sOutputFile=%s -f %s -c save pop quit" >> gv_intern_res_unix.dat + @echo "GV.gsX11Device: -sDEVICE=x11" >> gv_intern_res_unix.dat + @echo "GV.gsX11AlphaDevice: -sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=2 -dMaxBitmap=10000000 -dNOPLATFONTS" >> gv_intern_res_unix.dat + @echo "GV.gsSafeDir: True" >> gv_intern_res_unix.dat +diff -up a/src/Makefile.in b/src/Makefile.in +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -1134,7 +1134,7 @@ gv_intern_res_unix.dat : + @echo "" >> gv_intern_res_unix.dat + @echo "GV.gsInterpreter: gs" >> gv_intern_res_unix.dat + @echo "GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s %s pdf2dsc.ps -c quit" >> gv_intern_res_unix.dat +- @echo "GV.gsCmdConvPDF: gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pswrite -sOutputFile=%s -f %s -c save pop quit" >> gv_intern_res_unix.dat ++ @echo "GV.gsCmdConvPDF: gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=ps2write -sOutputFile=%s -f %s -c save pop quit" >> gv_intern_res_unix.dat + @echo "GV.gsX11Device: -sDEVICE=x11" >> gv_intern_res_unix.dat + @echo "GV.gsX11AlphaDevice: -sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=2 -dMaxBitmap=10000000 -dNOPLATFONTS" >> gv_intern_res_unix.dat + @echo "GV.gsSafeDir: True" >> gv_intern_res_unix.dat diff --git a/app-text/gv/files/gv-3.7.4-dat.patch b/app-text/gv/files/gv-3.7.4-dat.patch new file mode 100644 index 000000000000..aeaea246d029 --- /dev/null +++ b/app-text/gv/files/gv-3.7.4-dat.patch @@ -0,0 +1,15 @@ +Change tab to space in gv_user_res.dat +http://savannah.gnu.org/patch/?7998 +https://src.fedoraproject.org/rpms/gv/blob/rawhide/f/gv-dat.patch + +--- a/src/gv_user_res.dat ++++ b/src/gv_user_res.dat +@@ -39,7 +39,7 @@ + save_marked + GV.scale: 0 + GV.scaleBase: 1 +-GV.scales: Natural size, 1.000, screen \n\ ++GV.scales: Natural size, 1.000, screen \n\ + Pixel based, 1.000, pixel \n\ + Arbitrary magnification, -2 \n\ + Fit height to window, -3 \n\ diff --git a/app-text/gv/files/gv-3.7.4-overflow.patch b/app-text/gv/files/gv-3.7.4-overflow.patch new file mode 100644 index 000000000000..05cbda055f63 --- /dev/null +++ b/app-text/gv/files/gv-3.7.4-overflow.patch @@ -0,0 +1,27 @@ +Fix buffer overflows in resource.c +https://savannah.gnu.org/patch/?10096 +https://src.fedoraproject.org/rpms/gv/blob/rawhide/f/gv-overflow.patch + +diff a/src/resource.c b/src/resource.c +--- a/src/resource.c ++++ b/src/resource.c +@@ -230,15 +230,15 @@ resource_buildDatabase ( + s = resource_getResource(db,app_class,app_name, "international",0); + if (s == NULL || !strcasecmp(s, "False")) + { +- sprintf(locale1, "noint:%s%s", loc_lang, loc_terr); +- sprintf(locale2, "noint:%s", loc_lang); ++ snprintf(locale1, 100, "noint:%s%s", loc_lang, loc_terr); ++ snprintf(locale2, 100, "noint:%s", loc_lang); + strcpy(locale3, "C"); + } + else + { + strcpy(locale1, locale); +- sprintf(locale2, "%s%s%s", loc_lang, loc_terr, loc_cs); +- sprintf(locale3, "%s%s", loc_lang, loc_cs); ++ snprintf(locale2, 100, "%s%s%s", loc_lang, loc_terr, loc_cs); ++ snprintf(locale3, 100, "%s%s", loc_lang, loc_cs); + } + + if (debug_p) diff --git a/app-text/gv/files/gv-3.7.4-remove-aliasing-violation.patch b/app-text/gv/files/gv-3.7.4-remove-aliasing-violation.patch new file mode 100644 index 000000000000..540d590e4520 --- /dev/null +++ b/app-text/gv/files/gv-3.7.4-remove-aliasing-violation.patch @@ -0,0 +1,18 @@ +https://bugs.gentoo.org/855011 + +diff -ruN a/src/Scrollbar.c b/src/Scrollbar.c +--- a/src/Scrollbar.c ++++ b/src/Scrollbar.c +@@ -1364,12 +1364,6 @@ + INFMESSAGE(returning due to LookAhead) ENDMESSAGE(NotifyThumb) + return; + } +- /* +- thumbProc is not pretty, but is necessary for backwards +- compatibility on those architectures for which it work{s,ed}; +- the intent is to pass a (truncated) float by value. +- */ +- XtCallCallbacks (w, XtNthumbProc, *(XtPointer*)&TOP); + XtCallCallbacks (w, XtNjumpProc, (XtPointer)&TOP); + ENDMESSAGE(NotifyThumb) + } diff --git a/app-text/gv/files/gv-3.7.4-resource.patch b/app-text/gv/files/gv-3.7.4-resource.patch new file mode 100644 index 000000000000..15c39e3cbdae --- /dev/null +++ b/app-text/gv/files/gv-3.7.4-resource.patch @@ -0,0 +1,33 @@ +Check for null pointers in resource requests +https://savannah.gnu.org/bugs/?38727 +https://src.fedoraproject.org/rpms/gv/blob/rawhide/f/gv-resource.patch + +--- a/src/main.c ++++ b/src/main.c +@@ -1449,7 +1449,7 @@ + if (s) gv_gs_arguments = s; + + s = resource_getResource(db,gv_class,gv_name,"gsSafeDir",NULL); +- if (!strcasecmp(s,"true")) gv_gs_safeDir = 1; else gv_gs_safeDir = 0; ++ if (s && !strcasecmp(s,"true")) gv_gs_safeDir = 1; else gv_gs_safeDir = 0; + + s = resource_getResource(db,gv_class,gv_name,"gsSafer",NULL); + if (s && !strcasecmp(s,"true")) gv_gs_safer = 1; else gv_gs_safer = 0; +@@ -1468,13 +1468,13 @@ + } + + s = resource_getResource(db,gv_class,gv_name,"infoVerbose",NULL); +- if (!strcasecmp(s, "Silent")) gv_infoVerbose=0; +- else if (!strcasecmp(s, "Errors")) gv_infoVerbose=1; +- else if (!strcasecmp(s, "All")) gv_infoVerbose=2; ++ if (!s || !strcasecmp(s, "Errors")) gv_infoVerbose=1; ++ else if (!strcasecmp(s, "Silent")) gv_infoVerbose=0; ++ else if (!strcasecmp(s, "All")) gv_infoVerbose=2; + else gv_infoVerbose = 1; + + s = resource_getResource(db,gv_class,gv_name,"xinerama",NULL); +- if (!strcasecmp(s, "Off")) gv_xinerama=0; ++ if (!s || !strcasecmp(s, "Off")) gv_xinerama=0; + else if (!strcasecmp(s, "On")) gv_xinerama=1; + else if (!strcasecmp(s, "Auto")) gv_xinerama=-1; + else gv_xinerama = 0; diff --git a/app-text/gv/gv-3.7.4.ebuild b/app-text/gv/gv-3.7.4.ebuild new file mode 100644 index 000000000000..5e5666d70fdd --- /dev/null +++ b/app-text/gv/gv-3.7.4.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop gnuconfig toolchain-funcs + +DESCRIPTION="Viewer for PostScript and PDF documents using Ghostscript" +HOMEPAGE="https://www.gnu.org/software/gv/" +SRC_URI="https://ftp.gnu.org/gnu/gv/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="xinerama" + +RDEPEND=" + app-text/ghostscript-gpl + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + >=x11-libs/libXaw3d-1.6-r1[unicode(+)] + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXpm + x11-libs/libXt + xinerama? ( x11-libs/libXinerama )" +DEPEND="${RDEPEND} + x11-base/xorg-proto" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-resource.patch + "${FILESDIR}"/${P}-dat.patch + "${FILESDIR}"/${P}-bounding-box.patch + "${FILESDIR}"/${P}-bug1071238.patch + "${FILESDIR}"/${P}-bz1536211.patch + "${FILESDIR}"/${P}-overflow.patch + "${FILESDIR}"/${P}-remove-aliasing-violation.patch +) + +src_prepare() { + default + gnuconfig_update +} + +src_configure() { + export ac_cv_lib_Xinerama_main=$(usex xinerama) + econf --enable-scrollbar-code +} + +src_compile() { + emake AR="$(tc-getAR)" +} + +src_install() { + rm README.{I18N,TRANSLATION} || die + default + + doicon "${FILESDIR}"/gv_icon.xpm + make_desktop_entry gv GhostView gv_icon 'Graphics;Viewer' +} -- cgit v1.2.3