Index: head/www/netsurf/Makefile =================================================================== --- head/www/netsurf/Makefile (revision 427775) +++ head/www/netsurf/Makefile (revision 427776) @@ -1,87 +1,89 @@ # Created by: Andrew Pantyukhin # $FreeBSD$ PORTNAME= netsurf PORTVERSION= 3.6 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://download.netsurf-browser.org/netsurf/releases/source/ DISTNAME= ${PORTNAME}-${PORTVERSION}-src MAINTAINER= olivierd@FreeBSD.org COMMENT= Lightweight web browser LICENSE= GPLv2 MIT LICENSE_COMB= multi BUILD_DEPENDS= duk:lang/duktape \ nsgenbind:devel/nsgenbind \ p5-HTML-Parser>=3.72:www/p5-HTML-Parser LIB_DEPENDS= libcurl.so:ftp/curl \ libpng.so:graphics/png \ libnsutils.so:devel/libnsutils \ libutf8proc.so:textproc/libutf8proc \ libnsgif.so:graphics/libnsgif \ libnsbmp.so:graphics/libnsbmp \ libdom.so:www/libdom \ libcss.so:textproc/libcss \ libparserutils.so:devel/libparserutils \ libwapcaplet.so:textproc/libwapcaplet \ libhubbub.so:www/libhubbub \ libexpat.so:textproc/expat2 \ libnspsl.so:dns/libnspsl RUN_DEPENDS= duk:lang/duktape \ ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss ALL_TARGET= #empty LDFLAGS+= -L${OPENSSLLIB} -lssl -lcrypto ${ICONV_LIB} CFLAGS+= -I${OPENSSLINC} MAKE_ARGS= HOST_CC="${CC}" CC="${CC}" CCOPT="" HOST="${OPSYS}" \ TARGET="gtk3" \ WARNFLAGS="" Q="" OPTCFLAGS="${CFLAGS}" MAKE_ENV+= COMPONENT_TYPE="lib-shared" \ FLEX="${LOCALBASE}/bin/flex" USES= bison desktop-file-utils gettext-runtime gmake iconv jpeg \ localbase pkgconfig shebangfix ssl USE_GNOME= glib20 gtk30 cairo librsvg2 WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//} SHEBANG_FILES= utils/split-messages.pl perl_CMD= ${SETENV} perl OPTIONS_DEFINE= GSTREAMER -GSTREAMER_USE= GSTREAMER=yes +OPTIONS_EXCLUDE= GSTREAMER +GSTREAMER_USE= GSTREAMER=yes, good .include post-patch: @${REINPLACE_CMD} '/CFLAGS/d' \ ${WRKSRC}//Makefile.defaults @${REINPLACE_CMD} 's| -O2||' \ ${WRKSRC}/frontends/gtk/Makefile.defaults @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \ ${WRKSRC}/frontends/gtk/gui.c do-configure: @${CP} ${FILESDIR}/Makefile.config ${WRKSRC} .if empty(ICONV_LIB) @${REINPLACE_CMD} '/NETSURF_USE_LIBICONV_PLUG/ s|NO|YES|' \ ${WRKSRC}/Makefile.config .endif .if ${PORT_OPTIONS:MGSTREAMER} @${REINPLACE_CMD} '/NETSURF_USE_VIDEO/ s|NO|YES|' \ ${WRKSRC}/Makefile.config .endif post-install: cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf netsurf-gtk3 \ netsurf-gtk .for d in applications pixmaps ${MKDIR} ${STAGEDIR}${PREFIX}/share/${d} .endfor ${INSTALL_DATA} ${WRKSRC}/frontends/gtk/res/netsurf-gtk.desktop \ ${STAGEDIR}${PREFIX}/share/applications ${INSTALL_DATA} ${WRKSRC}/frontends/gtk/res/netsurf.xpm \ ${STAGEDIR}${PREFIX}/share/pixmaps .include Index: head/www/netsurf/files/patch-content_fetchers_curl.c =================================================================== --- head/www/netsurf/files/patch-content_fetchers_curl.c (nonexistent) +++ head/www/netsurf/files/patch-content_fetchers_curl.c (revision 427776) @@ -0,0 +1,64 @@ +--- content/fetchers/curl.c.orig 2016-11-19 13:37:41 UTC ++++ content/fetchers/curl.c +@@ -128,6 +128,28 @@ static char fetch_error_buffer[CURL_ERRO + static char fetch_proxy_userpwd[100]; + + ++/* OpenSSL 1.0.x to 1.1.0 certificate reference counting changed ++ * LibreSSL declares its OpenSSL version as 2.1 but only supports the old way ++ */ ++#if (defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x1010000fL)) ++static int ns_X509_up_ref(X509 *cert) ++{ ++ cert->references++; ++ return 1; ++} ++ ++static void ns_X509_free(X509 *cert) ++{ ++ cert->references--; ++ if (cert->references == 0) { ++ X509_free(cert); ++ } ++} ++#else ++#define ns_X509_up_ref X509_up_ref ++#define ns_X509_free X509_free ++#endif ++ + /** + * Initialise a cURL fetcher. + */ +@@ -438,7 +460,7 @@ fetch_curl_verify_callback(int verify_ok + */ + if (!fetch->cert_data[depth].cert) { + fetch->cert_data[depth].cert = X509_STORE_CTX_get_current_cert(x509_ctx); +- fetch->cert_data[depth].cert->references++; ++ ns_X509_up_ref(fetch->cert_data[depth].cert); + fetch->cert_data[depth].err = X509_STORE_CTX_get_error(x509_ctx); + } + +@@ -815,10 +837,7 @@ static void fetch_curl_free(void *vf) + } + + for (i = 0; i < MAX_CERTS && f->cert_data[i].cert; i++) { +- f->cert_data[i].cert->references--; +- if (f->cert_data[i].cert->references == 0) { +- X509_free(f->cert_data[i].cert); +- } ++ ns_X509_free(f->cert_data[i].cert); + } + + free(f); +@@ -986,10 +1005,7 @@ curl_start_cert_validate(struct curl_fet + X509_get_pubkey(certs[depth].cert)); + + /* and clean up */ +- certs[depth].cert->references--; +- if (certs[depth].cert->references == 0) { +- X509_free(certs[depth].cert); +- } ++ ns_X509_free(certs[depth].cert); + } + + msg.type = FETCH_CERT_ERR; Property changes on: head/www/netsurf/files/patch-content_fetchers_curl.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property