From owner-svn-ports-all@FreeBSD.ORG Sat Mar 15 17:52:54 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58289978; Sat, 15 Mar 2014 17:52:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4450925F; Sat, 15 Mar 2014 17:52:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2FHqs56003034; Sat, 15 Mar 2014 17:52:54 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2FHqrCM003027; Sat, 15 Mar 2014 17:52:53 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201403151752.s2FHqrCM003027@svn.freebsd.org> From: Tijl Coosemans Date: Sat, 15 Mar 2014 17:52:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r348360 - in head/www/netsurf: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2014 17:52:54 -0000 Author: tijl Date: Sat Mar 15 17:52:53 2014 New Revision: 348360 URL: http://svnweb.freebsd.org/changeset/ports/348360 QAT: https://qat.redports.org/buildarchive/r348360/ Log: - 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 [1] Added: head/www/netsurf/files/patch-pixel-format (contents, props changed) Modified: head/www/netsurf/Makefile head/www/netsurf/files/Makefile.config Modified: head/www/netsurf/Makefile ============================================================================== --- head/www/netsurf/Makefile Sat Mar 15 17:43:25 2014 (r348359) +++ head/www/netsurf/Makefile Sat Mar 15 17:52:53 2014 (r348360) @@ -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}/ 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 -.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 Modified: head/www/netsurf/files/Makefile.config ============================================================================== --- head/www/netsurf/files/Makefile.config Sat Mar 15 17:43:25 2014 (r348359) +++ head/www/netsurf/files/Makefile.config Sat Mar 15 17:52:53 2014 (r348360) @@ -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 Added: head/www/netsurf/files/patch-pixel-format ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/netsurf/files/patch-pixel-format Sat Mar 15 17:52:53 2014 (r348360) @@ -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; + } + } +