aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Mitrak <lucas@lucasmitrak.com>2021-06-03 18:16:31 -0400
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-06-05 14:38:22 +0200
commit1853049bec92e1def4d2c1eb40b8ec66cc766f23 (patch)
tree35ea1782f722854a76d9b4603f50f2e9a09906b0 /media-libs/libgfx/files/1.1.0-libPNG-1.2.5.patch
parentsci-biology/KING: Remove old 2.2.5 (diff)
downloadsci-1853049bec92e1def4d2c1eb40b8ec66cc766f23.tar.gz
sci-1853049bec92e1def4d2c1eb40b8ec66cc766f23.tar.bz2
sci-1853049bec92e1def4d2c1eb40b8ec66cc766f23.zip
media-libs/libgfx: add test, dependencies, patches
* Add test, dependencies, and new patches to ebuild * Add cstring to needed files due to newer version of gcc * Change png jmpbuf to use the newer safer method due to GLSA 200408-03 Currently, media-libs/libgfx will not compile due to a vulnerability in libpng which has since been patched [1]. Therefore, the patch libPNG-1.2.5 updates the code to libPNG's newer and safer method. This also fixes bug https://bugs.gentoo.org/756061. However, even with this patch the package will not compile due to outdated C++, so the patch gcc-4.3 updates two files to include cstring, which is neccessary for memcpy. These patches will allow the package to compile. Without these patches, the package will not compile. In addition, the ebuild was updated to include these patches, as well as add the dependencies listed on upstream's homepage [2]. Without these dependencies, the package will not compile. Finally, a test IUSE flag as well as the src_test() function were added. Due to the package using outdated FLTK code, some of the tests had to be disabled using a sed command. This commit was tested in a docker image with dev-util/ebuildtester. This commit was written, tested, and submitted by Lucas Mitrak. [1] https://security.gentoo.org/glsa/200408-03 [2] http://mgarland.org/software/libgfx.html Closes: https://bugs.gentoo.org/756061 Signed-off-by: Lucas Mitrak <lucas@lucasmitrak.com> Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'media-libs/libgfx/files/1.1.0-libPNG-1.2.5.patch')
-rw-r--r--media-libs/libgfx/files/1.1.0-libPNG-1.2.5.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/media-libs/libgfx/files/1.1.0-libPNG-1.2.5.patch b/media-libs/libgfx/files/1.1.0-libPNG-1.2.5.patch
new file mode 100644
index 000000000..0d648d06e
--- /dev/null
+++ b/media-libs/libgfx/files/1.1.0-libPNG-1.2.5.patch
@@ -0,0 +1,24 @@
+Changes the png buffer pointer to the new function call.
+Written and tested by Lucas Mitrak.
+https://bugs.gentoo.org/756061
+
+--- a/src/raster-png.cxx
++++ b/src/raster-png.cxx
+@@ -43,7 +43,7 @@ ByteRaster *read_png_image(const char *file_name)
+ // Because we didn't set up any error handlers, we need to be
+ // prepared to handle longjmps out of the library on error
+ // conditions.
+- if( setjmp(png_ptr->jmpbuf) )
++ if( setjmp(png_jmpbuf(png_ptr)) )
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ fclose(fp);
+@@ -133,7 +133,7 @@ bool write_png_image(const char *file_name, const ByteRaster& img)
+ return false;
+ }
+
+- if( setjmp(png_ptr->jmpbuf) )
++ if( setjmp(png_jmpbuf(png_ptr)) )
+ {
+ fclose(fp);
+ png_destroy_write_struct(&png_ptr, (png_infopp)NULL);