diff options
author | Matt Turner <mattst88@gentoo.org> | 2022-08-27 10:02:06 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2022-08-27 11:29:37 -0400 |
commit | bad533b8968d8ad4a78854aee6caf4c9d811bbfe (patch) | |
tree | 6f69e765d8a7b4d3b60366559c112a649dae0a09 /app-text/gv/files | |
parent | app-editors/xemacs: Add (+) to libXaw3d's unicode USE-dep (diff) | |
download | gentoo-bad533b8968d8ad4a78854aee6caf4c9d811bbfe.tar.gz gentoo-bad533b8968d8ad4a78854aee6caf4c9d811bbfe.tar.bz2 gentoo-bad533b8968d8ad4a78854aee6caf4c9d811bbfe.zip |
app-text/gv: Version bump to 3.7.4
v3.7.4 was released in 2013, so this is a little overdue...
* Bump to EAPI=8
* Fix build with CFLAGS=-lflto (bug #855011)
* Fix build to call toolchain's AR (bug #729564)
* Add (+) to x11-libs/libXaw3d's unicode USE-dep
* Run gnuconfig_update since the included config.guess is ancient
* Apply a bunch of patches from Fedora
Closes: https://bugs.gentoo.org/729564
Closes: https://bugs.gentoo.org/855011
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'app-text/gv/files')
-rw-r--r-- | app-text/gv/files/gv-3.7.4-bounding-box.patch | 15 | ||||
-rw-r--r-- | app-text/gv/files/gv-3.7.4-bug1071238.patch | 22 | ||||
-rw-r--r-- | app-text/gv/files/gv-3.7.4-bz1536211.patch | 28 | ||||
-rw-r--r-- | app-text/gv/files/gv-3.7.4-dat.patch | 15 | ||||
-rw-r--r-- | app-text/gv/files/gv-3.7.4-overflow.patch | 27 | ||||
-rw-r--r-- | app-text/gv/files/gv-3.7.4-remove-aliasing-violation.patch | 18 | ||||
-rw-r--r-- | app-text/gv/files/gv-3.7.4-resource.patch | 33 |
7 files changed, 158 insertions, 0 deletions
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; |