pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: pkgsrc/games/endless-sky
Dear David,
On 2020-07-28, Yorick Hardy wrote:
> Dear David,
>
> On 2020-07-28, David Holland wrote:
> > On Sun, Jul 26, 2020 at 12:14:17PM +0200, Yorick Hardy wrote:
> > > Should I remove wip/endless-sky? The package in wip still needs
> > > libjpegturbo. It seems to work fine, but with some visual problems
> > > (attached).
> >
> > I hadn't noticed it in wip, or, I'm afraid, even thought to look :-|
> >
> > I don't know if the jpeg patch I put in is actually good or not; I was
> > intending to check it before committing and then after it wouldn't run
> > forgot I hadn't.
> >
> > If it doesn't load the images correctly with the patch it ought to be
> > changed to demand libjpeg-turbo. (Unless someone wants to fiddle
> > further.)
> >
> > I didn't want to do that without testing it first because demanding
> > libjpeg-turbo is invasive...
>
> Sorry, I probably was not clear. No graphics issues with wip/endless-sky,
> some (minor, but visible) graphics issues with games/endless-sky. If we can
> fix the images I would prefer the libjpeg-turbo free games/endless-sky.
>
> I am thinking of taking a look at it, but no promises! I am completely
> useless at getting things done this year...
The patch below seems to do the trick. There are definitely better ways
to do this, but it only happens when loading so I guess it does not have
to be very fast.
--
Kind regards,
Yorick Hardy
Index: games/endless-sky/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/games/endless-sky/distinfo,v
retrieving revision 1.1
diff -u -u -r1.1 distinfo
--- games/endless-sky/distinfo 26 Jul 2020 05:21:20 -0000 1.1
+++ games/endless-sky/distinfo 31 Jul 2020 23:06:15 -0000
@@ -5,4 +5,4 @@
SHA512 (endless-sky/v0.9.12.tar.gz) = 694d3c6f50f80e8b4ff79580fa9510fde26a846dd227736af96a3eda7810d68b2ae051a72c0e02fe88eae9d839e48933614aa172a9bed6653e03ad30feaddc05
Size (endless-sky/v0.9.12.tar.gz) = 103105695 bytes
SHA1 (patch-source_Files.cpp) = 6adbe54302510e97a612cc949cf5a9c3d3b62c81
-SHA1 (patch-source_ImageBuffer.cpp) = cd22f1bc31b9241d0d0f472889e046239fbd5648
+SHA1 (patch-source_ImageBuffer.cpp) = ef8117d78049468d2f1b51746f9c1e7ee6e4696d
Index: games/endless-sky/patches/patch-source_ImageBuffer.cpp
===================================================================
RCS file: /cvsroot/pkgsrc/games/endless-sky/patches/patch-source_ImageBuffer.cpp,v
retrieving revision 1.1
diff -u -u -r1.1 patch-source_ImageBuffer.cpp
--- games/endless-sky/patches/patch-source_ImageBuffer.cpp 26 Jul 2020 05:21:20 -0000 1.1
+++ games/endless-sky/patches/patch-source_ImageBuffer.cpp 31 Jul 2020 23:06:15 -0000
@@ -2,7 +2,7 @@
Build with both jpeg and libjpeg-turbo.
---- source/ImageBuffer.cpp~ 2020-05-01 19:02:38.000000000 +0000
+--- source/ImageBuffer.cpp.orig 2020-05-01 19:02:38.000000000 +0000
+++ source/ImageBuffer.cpp
@@ -271,7 +271,11 @@ namespace {
@@ -16,3 +16,24 @@
jpeg_start_decompress(&cinfo);
int width = cinfo.image_width;
+@@ -297,6 +301,20 @@ namespace {
+ jpeg_finish_decompress(&cinfo);
+ jpeg_destroy_decompress(&cinfo);
+
++#ifndef JCS_EXTENSIONS
++ height = buffer.Height();
++ for(int y = 0; y < height; ++y)
++ {
++ for(int x = width-1; x >= 0; --x)
++ {
++ rows[y][4*x+3] = 255;
++ rows[y][4*x+2] = rows[y][3*x];
++ rows[y][4*x+1] = rows[y][3*x+1];
++ rows[y][4*x] = rows[y][3*x+2];
++ }
++ }
++#endif
++
+ return true;
+ }
+
Home |
Main Index |
Thread Index |
Old Index