9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] Libpng and Zlib updates on the ports tree
@ 2020-02-14  1:33 kokamoto
  2020-02-14  6:37 ` jamos
  0 siblings, 1 reply; 6+ messages in thread
From: kokamoto @ 2020-02-14  1:33 UTC (permalink / raw)
  To: 9front

Ah, I forgot to write some more.

1) use /sys/ports/ape-libs/ libjpeg libpng zlib, the last can replace /sys/src/ape/lib/z
2) the zlib's version is 1.2.7, then one line change of ape-libs/libpng/work/libpng-1.6.17/pnglibcon.h
	#define PNG_ZLIB_VERNUM 0x1280
to:
	#define PNG_ZLIB_VERNUM 0x1270
compile above.

3) nsport/netsurf/mkfile, uncomment
#	content/handlers/image/jpeg.$O \
#	content/handlers/image/png.$O \

that's all.

Kenji



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Libpng and Zlib updates on the ports tree
  2020-02-14  1:33 [9front] Libpng and Zlib updates on the ports tree kokamoto
@ 2020-02-14  6:37 ` jamos
  0 siblings, 0 replies; 6+ messages in thread
From: jamos @ 2020-02-14  6:37 UTC (permalink / raw)
  To: 9front

Kenji,

I am glad you worked it out. I was preparing a lengthy reply detailing 
what you already found out now. I am waiting for libpng to compile 
cleanly in ports before I change the mkfile to include support. JPEG 
already works though. As an alternative to changing PNG_ZLIB_VERNUM you 
can apply Uramekus patch. Do your nsfb still crash viewing BBC News 
(linked from the welcome page)? It has started to work for me.

> 1) use /sys/ports/ape-libs/ libjpeg libpng zlib, the last can replace 
> /sys/src/ape/lib/z
> 2) the zlib's version is 1.2.7, then one line change of 
> ape-libs/libpng/work/libpng-1.6.17/pnglibcon.h
> #define PNG_ZLIB_VERNUM 0x1280
> to:
> #define PNG_ZLIB_VERNUM 0x1270
> compile above.
> 
> 3) nsport/netsurf/mkfile, uncomment
> #    content/handlers/image/jpeg.$O \
> #    content/handlers/image/png.$O \
> 
> CC=pcc -DWITH_BMP -DWITH_GIF -DWITH_BMP -DWITH_JPEG -DWITH_PNG

One might ask why to link against libjpeg and libpng when image viewing 
functions are alredy available natively in 9front. This is a valid 
question, but as it stands, netsurf as a whole is compiled using APE, 
and its viewers are made to use libjpeg and libpng which are also APE 
libs. At least we have avoided including ‘libgnu’ (an extension of APE, 
also available in ports, using a lot of messy GNU code) and are only 
using standard APE and some support libraries that also use standard APE 
to compile.

Jonas


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Libpng and Zlib updates on the ports tree
@ 2020-02-14  7:16 kokamoto
  0 siblings, 0 replies; 6+ messages in thread
From: kokamoto @ 2020-02-14  7:16 UTC (permalink / raw)
  To: 9front

> Do your nsfb still crash viewing BBC News 
> (linked from the welcome page)? 

Yes, it's still do.

> One might ask why to link against libjpeg and libpng when image viewing 
> functions are alredy available natively in 9front. This is a valid 
> question, but as it stands, netsurf as a whole is compiled using APE, 

As a start point, I agree with you.
It's much better to do it natively, however, it's also better to have a working nice
web browser for us.

> At least we have avoided including ‘libgnu’
For bison and flex?

I think we should make targets of javascript and truetype fonts.

If cinap or aiju is not busy, they can work it out easily...

Kenji



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Libpng and Zlib updates on the ports tree
@ 2020-02-14  0:29 kokamoto
  0 siblings, 0 replies; 6+ messages in thread
From: kokamoto @ 2020-02-14  0:29 UTC (permalink / raw)
  To: 9front

Ok, I got jpeg and png images shown on the current netsurf for
9front.
Chanegs are very small:
at nsport/netsurf/mkfile,
CC=pcc
line to:
CC=pcc -DWITH_BMP -DWITH_GIF -DWITH_BMP -DWITH_JPEG -DWITH_PNG

it just ok, and recompile whole.

Kenji

>> Right now, the ape/lib/z takes the code from gs,
>> but if we're updating from the outside world, it'd
>> probably be a good idea to invert that relationship.
> 
> I suppose you did it for compiling netsurf.
> I did it to cheating the zlib, and compiled libpng for ape.
> 
> However, both of jpeg and png images are not shown 
> on the current netsurf.
> 
> Kenji
> 
> PS: did you check its update will not suffer anything else?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Libpng and Zlib updates on the ports tree
@ 2020-02-12 23:19 kokamoto
  0 siblings, 0 replies; 6+ messages in thread
From: kokamoto @ 2020-02-12 23:19 UTC (permalink / raw)
  To: 9front

> Right now, the ape/lib/z takes the code from gs,
> but if we're updating from the outside world, it'd
> probably be a good idea to invert that relationship.

I suppose you did it for compiling netsurf.
I did it to cheating the zlib, and compiled libpng for ape.

However, both of jpeg and png images are not shown 
on the current netsurf.

Kenji

PS: did you check its update will not suffer anything else?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Libpng and Zlib updates on the ports tree
  2020-02-12 20:51 Lucas Francesco
@ 2020-02-12 21:01 ` ori
  0 siblings, 0 replies; 6+ messages in thread
From: ori @ 2020-02-12 21:01 UTC (permalink / raw)
  To: lucas.francesco93, 9front


> diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/zlib/mkfile
> --- a/ape-libs/zlib/mkfile	Sun Dec 08 12:26:27 2019 -0800
> +++ b/ape-libs/zlib/mkfile	Wed Feb 12 14:27:10 2020 -0400
> @@ -2,7 +2,7 @@
> 
>  OWNER='Jens Staal <staal1978@gmail.com>'
>  DESCRIPTION='zlib compression library for APE'
> -VERSION=1.2.7
> +VERSION=1.2.11
> 
>  WEBSOURCE=https://ftp.osuosl.org/pub/libpng/src/archive/gz/zlib/zlib-$VERSION.tar.gz
>  BUILDPATH=work/zlib-$VERSION

It feels like this port should be unnecessary.

We have /sys/src/ape/lib/z, which is a bit outdated.
We should just update this instead, and remove the
zlib port.

Right now, the ape/lib/z takes the code from gs,
but if we're updating from the outside world, it'd
probably be a good idea to invert that relationship.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-14  7:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14  1:33 [9front] Libpng and Zlib updates on the ports tree kokamoto
2020-02-14  6:37 ` jamos
  -- strict thread matches above, loose matches on Subject: below --
2020-02-14  7:16 kokamoto
2020-02-14  0:29 kokamoto
2020-02-12 23:19 kokamoto
2020-02-12 20:51 Lucas Francesco
2020-02-12 21:01 ` [9front] " ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).