mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
- Use the more common libpng instead of libmng.
- Add an icon to the desktop entry. - Use option helpers. - Respect CFLAGS. - Remove clang support patch. No longer necessary. - Add a patch to fix rendering of SVG and BMP images on little-endian systems and all image formats on big-endian systems. [1] PR: ports/187466 [1] Tested by: Craig Butler <craig001@lerwick.hopto.org> [1]
This commit is contained in:
parent
96d7569412
commit
1e3f68f039
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=348360
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= netsurf
|
||||
PORTVERSION= 3.0
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= http://download.netsurf-browser.org/netsurf/releases/source-full/
|
||||
DISTNAME= ${PORTNAME}-${PORTVERSION}-full-src
|
||||
@ -16,7 +16,8 @@ LICENSE_COMB= multi
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
|
||||
LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \
|
||||
libmng.so:${PORTSDIR}/graphics/libmng
|
||||
libjpeg.so:${PORTSDIR}/graphics/jpeg \
|
||||
libpng15.so:${PORTSDIR}/graphics/png
|
||||
|
||||
ALL_TARGET= #empty
|
||||
CFLAGS+= -I${LOCALBASE}/include
|
||||
@ -24,23 +25,20 @@ LDFLAGS+= -lssl -lcrypto -L${LOCALBASE}/lib ${ICONV_LIB}
|
||||
MAKE_ARGS= HOST_CC="${CC}" CC="${CC}" CCOPT="" HOST="${OPSYS}" \
|
||||
WARNFLAGS="" Q="" OPTCFLAGS="${CFLAGS}"
|
||||
USES= bison gmake pkgconfig iconv
|
||||
USE_GNOME= librsvg2
|
||||
USE_GNOME= gtk20 librsvg2
|
||||
|
||||
NSFB_VERSION= 0.1.0
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-full-${PORTVERSION}
|
||||
|
||||
DESKTOP_ENTRIES="NetSurf" "${COMMENT}" "" "${PORTNAME}" "" "true"
|
||||
DESKTOP_ENTRIES="NetSurf" "${COMMENT}" "${DATADIR}/${PORTNAME}.xpm" \
|
||||
"${PORTNAME}" "" "true"
|
||||
|
||||
OPTIONS_DEFINE= GSTREAMER WEBP
|
||||
|
||||
GSTREAMER_USE= GSTREAMER=yes
|
||||
WEBP_LIB_DEPENDS= libwebp.so:${PORTSDIR}/graphics/webp
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MGSTREAMER}
|
||||
USE_GSTREAMER= yes
|
||||
.endif
|
||||
|
||||
.if ${OPSYS} == DragonFly
|
||||
LIB_DEPENDS+= libssl.so:${PORTSDIR}/security/openssl
|
||||
BUILD_DEPENDS+= gperf:${PORTSDIR}/devel/gperf
|
||||
@ -53,12 +51,14 @@ post-patch:
|
||||
${WRKSRC}/src/libnsfb-${NSFB_VERSION}/Makefile
|
||||
@${REINPLACE_CMD} 's|endian|sys/endian|' \
|
||||
${WRKSRC}/src/libnsfb-${NSFB_VERSION}/src/plot/*bpp*.c
|
||||
@${REINPLACE_CMD} '/CFLAGS/d' \
|
||||
${WRKSRC}/src/netsurf-${PORTVERSION}/Makefile.defaults
|
||||
@${REINPLACE_CMD} 's| -O2||' \
|
||||
${WRKSRC}/src/netsurf-${PORTVERSION}/gtk/Makefile.defaults
|
||||
@${REINPLACE_CMD} '/OpenSSL/d ; s| -g|| ; s|-DG_DISABLE_DEPRECATED||' \
|
||||
@${REINPLACE_CMD} \
|
||||
-e '/OpenSSL/d' -e '/lcms/d' -e 's| -g||' \
|
||||
-e 's/-DG_DISABLE_DEPRECATED//' \
|
||||
${WRKSRC}/src/netsurf-${PORTVERSION}/gtk/Makefile.target
|
||||
@${REINPLACE_CMD} -e '/ifeq.*clang/s/word 1/filter clang/' \
|
||||
${WRKSRC}/src/buildsystem-1.0/makefiles/Makefile.tools
|
||||
@${REINPLACE_CMD} -e 's| -g|| ; s|flex|${LOCALBASE}/bin/&|' \
|
||||
${WRKSRC}/src/nsgenbind-0.0.1/src/Makefile
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
NETSURF_USE_HARU_PDF=NO
|
||||
NETSURF_USE_LIBICONV_PLUG=NO
|
||||
NETSURF_USE_MNG=NO
|
||||
NETSURF_USE_NSSVG=NO
|
||||
NETSURF_USE_ROSPRITE=NO
|
||||
NETSURF_USE_WEBP=NO
|
||||
NETSURF_USE_VIDEO=NO
|
||||
NETSURF_USE_WEBP=NO
|
||||
|
89
www/netsurf/files/patch-pixel-format
Normal file
89
www/netsurf/files/patch-pixel-format
Normal file
@ -0,0 +1,89 @@
|
||||
--- src/netsurf-3.0/gtk/bitmap.c.orig
|
||||
+++ src/netsurf-3.0/gtk/bitmap.c
|
||||
@@ -288,27 +288,27 @@
|
||||
|
||||
if (fmt == CAIRO_FORMAT_RGB24) {
|
||||
for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
|
||||
- pixel = pixels[pixel_loop];
|
||||
- pixels[pixel_loop] = (pixel & 0xff00ff00) |
|
||||
- ((pixel & 0xff) << 16) |
|
||||
- ((pixel & 0xff0000) >> 16);
|
||||
+ pixel = ((uint8_t *)(pixels + pixel_loop))[0] << 16 |
|
||||
+ ((uint8_t *)(pixels + pixel_loop))[1] << 8 |
|
||||
+ ((uint8_t *)(pixels + pixel_loop))[2] |
|
||||
+ ((uint8_t *)(pixels + pixel_loop))[3] << 24;
|
||||
+ pixels[pixel_loop] = pixel;
|
||||
}
|
||||
} else {
|
||||
uint8_t t, r, g, b;
|
||||
for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
|
||||
- pixel = pixels[pixel_loop];
|
||||
- t = (pixel & 0xff000000) >> 24;
|
||||
+ t = ((uint8_t *)(pixels + pixel_loop))[3];
|
||||
if (t == 0) {
|
||||
pixels[pixel_loop] = 0;
|
||||
} else {
|
||||
- r = (pixel & 0xff0000) >> 16;
|
||||
- g = (pixel & 0xff00) >> 8;
|
||||
- b = pixel & 0xff;
|
||||
+ r = ((uint8_t *)(pixels + pixel_loop))[0];
|
||||
+ g = ((uint8_t *)(pixels + pixel_loop))[1];
|
||||
+ b = ((uint8_t *)(pixels + pixel_loop))[2];
|
||||
|
||||
pixels[pixel_loop] = (t << 24) |
|
||||
- ((r * t) >> 8) |
|
||||
+ ((r * t) >> 8) << 16 |
|
||||
((g * t) >> 8) << 8 |
|
||||
- ((b * t) >> 8) << 16;
|
||||
+ ((b * t) >> 8);
|
||||
|
||||
}
|
||||
}
|
||||
--- src/netsurf-3.0/image/bmp.c.orig
|
||||
+++ src/netsurf-3.0/image/bmp.c
|
||||
@@ -171,7 +171,6 @@
|
||||
|
||||
/* exit as a success */
|
||||
bmp->bitmap = bmp->bmp->bitmap;
|
||||
- bitmap_modified(bmp->bitmap);
|
||||
|
||||
content_set_ready(c);
|
||||
content_set_done(c);
|
||||
@@ -190,6 +189,8 @@
|
||||
if (bmp->bmp->decoded == false)
|
||||
if (bmp_decode(bmp->bmp) != BMP_OK)
|
||||
return false;
|
||||
+ else
|
||||
+ bitmap_modified(bmp->bitmap);
|
||||
|
||||
bmp->bitmap = bmp->bmp->bitmap;
|
||||
|
||||
--- src/netsurf-3.0/image/rsvg.c.orig
|
||||
+++ src/netsurf-3.0/image/rsvg.c
|
||||
@@ -135,19 +135,17 @@
|
||||
static inline void rsvg_argb_to_abgr(uint8_t *pixels,
|
||||
int width, int height, size_t rowstride)
|
||||
{
|
||||
- uint8_t *p = pixels;
|
||||
+ uint32_t *p = (uint32_t *)pixels;
|
||||
|
||||
for (int y = 0; y < height; y++) {
|
||||
for (int x = 0; x < width; x++) {
|
||||
- /* Swap R and B */
|
||||
- const uint8_t r = p[x+3];
|
||||
-
|
||||
- p[x+3] = p[x];
|
||||
-
|
||||
- p[x] = r;
|
||||
+ uint32_t c = *p;
|
||||
+ ((uint8_t *)p)[0] = (c & 0xff0000) >> 16;
|
||||
+ ((uint8_t *)p)[1] = (c & 0xff00) >> 8;
|
||||
+ ((uint8_t *)p)[2] = (c & 0xff);
|
||||
+ ((uint8_t *)p)[3] = (c & 0xff000000) >> 24;
|
||||
+ p++;
|
||||
}
|
||||
-
|
||||
- p += rowstride;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user