On 2025/04/15 20:26, Stuart Henderson wrote:
> cc'ing netsurf maintainer (in case you didn't read the earlier thread,
> neovim wants libutf8proc, Laurent has proposed a diff that builds a
> static library as part of neovim build, but this doesn't seem a good
> idea overall)
> 
> On 2025/04/15 15:49, Laurent Cheylus wrote:
> > Hi Edd,
> > 
> > ----- Mail original -----
> > > On Thu, Apr 03, 2025 at 05:12:38PM +0100, Stuart Henderson wrote:
> > > > You still need to be careful even if it's statically linked. In
> > > > particular you need to make sure that it can't accidentally pick up
> > > > anything from /usr/local/{include,lib} if present at build time.
> > > > Especially considering what Laurie reported.
> > > 
> > > Laurent, did you make any progress on resolving this?
> > 
> > No, I don't try to reproduce this "issue".
> > I think there is no issue with my patch to build and link utf8proc library 
> > with Neovim 0.11 (as you confirm in your other message).
> > 
> > Laurent
> > 
> 
> I don't see any evidence that this has been tested properly to make sure
> that files from /usr/local/{include,lib} are not picked up.

sorry, I see now that Edd tested lib, but not include

> I see that FreeBSD's netsurf port (same netsurf version as ours) uses a
> plain (updated) port of https://github.com/JuliaStrings/utf8proc rather
> than netsurf's outdated fork of that same library.
> 
> Here's a diff to do the same here. netsurf seems to work similarly well
> to how it does with the previous utf8proc version (generally, it's not
> doing particularly well at rendering the pages I was testing with, but
> that doesn't seem to be utf8-related, and I'm not seeing any noticeable
> difference).
> 
> It doesn't need quirks (@pkgpath marker added for the dir move, but the
> package stem doesn't change, and the version just goes upwards).
> 

> Index: textproc/libutf8proc/Makefile
> ===================================================================
> RCS file: textproc/libutf8proc/Makefile
> diff -N textproc/libutf8proc/Makefile
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ textproc/libutf8proc/Makefile     15 Apr 2025 19:24:00 -0000
> @@ -0,0 +1,24 @@
> +COMMENT =            unicode library
> +
> +V =                  2.10.0
> +DISTNAME =           utf8proc-$V
> +PKGNAME =            libutf8proc-$V
> +
> +HOMEPAGE =           https://juliastrings.github.io/utf8proc/
> +SITES =                      
> https://github.com/JuliaStrings/utf8proc/releases/download/v$V/
> +
> +CATEGORIES =         textproc
> +SHARED_LIBS =                utf8proc 2.2 # 3.1
> +
> +# MIT
> +PERMIT_PACKAGE =     Yes
> +
> +MODULES =            devel/cmake
> +DEBUG_PACKAGES =     ${BUILD_PACKAGES}
> +
> +CONFIGURE_ARGS =     -DBUILD_SHARED_LIBS=On
> +
> +# requires extra files downloaded by cmake
> +NO_TEST =            Yes
> +
> +.include <bsd.port.mk>
> Index: textproc/libutf8proc/distinfo
> ===================================================================
> RCS file: textproc/libutf8proc/distinfo
> diff -N textproc/libutf8proc/distinfo
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ textproc/libutf8proc/distinfo     15 Apr 2025 19:24:00 -0000
> @@ -0,0 +1,2 @@
> +SHA256 (utf8proc-2.10.0.tar.gz) = 
> J2o33E0d0k14loJqV59EOdHl/jNgOt14a7CDyrgC4j4=
> +SIZE (utf8proc-2.10.0.tar.gz) = 195848
> Index: textproc/libutf8proc/pkg/DESCR
> ===================================================================
> RCS file: textproc/libutf8proc/pkg/DESCR
> diff -N textproc/libutf8proc/pkg/DESCR
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ textproc/libutf8proc/pkg/DESCR    15 Apr 2025 19:24:00 -0000
> @@ -0,0 +1,7 @@
> +utf8proc is a library for processing UTF-8 encoded Unicode strings.
> +Some features are Unicode normalization, stripping of default ignorable
> +characters, case folding and detection of grapheme cluster boundaries.
> +A special character mapping is available, which converts for example the
> +characters "Hyphen" (U+2010), "Minus" (U+2212) and "Hyphen-Minus"
> +(U+002D, ASCII Minus) all into the ASCII minus sign, to make them equal
> +for comparisons.
> Index: textproc/libutf8proc/pkg/PLIST
> ===================================================================
> RCS file: textproc/libutf8proc/pkg/PLIST
> diff -N textproc/libutf8proc/pkg/PLIST
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ textproc/libutf8proc/pkg/PLIST    15 Apr 2025 19:24:00 -0000
> @@ -0,0 +1,4 @@
> +@pkgpath www/netsurf/libutf8proc
> +include/utf8proc.h
> +@lib lib/libutf8proc.so.${LIButf8proc_VERSION}
> +lib/pkgconfig/libutf8proc.pc
> Index: www/netsurf/Makefile
> ===================================================================
> RCS file: /cvs/ports/www/netsurf/Makefile,v
> diff -u -p -r1.8 Makefile
> --- www/netsurf/Makefile      11 Mar 2022 20:10:07 -0000      1.8
> +++ www/netsurf/Makefile      15 Apr 2025 19:24:00 -0000
> @@ -11,7 +11,6 @@
>       SUBDIR += libnsutils
>       SUBDIR += libparserutils
>       SUBDIR += libsvgtiny
> -     SUBDIR += libutf8proc
>       SUBDIR += libwapcaplet
>       SUBDIR += netsurf-fb
>       SUBDIR += nsgenbind
> Index: www/netsurf/browser/Makefile
> ===================================================================
> RCS file: /cvs/ports/www/netsurf/browser/Makefile,v
> diff -u -p -r1.48 Makefile
> --- www/netsurf/browser/Makefile      29 Oct 2024 09:46:26 -0000      1.48
> +++ www/netsurf/browser/Makefile      15 Apr 2025 19:24:00 -0000
> @@ -2,7 +2,7 @@ COMMENT =             lightweight web browser, with
>  
>  NETSURF_PROJECT =    netsurf
>  NETSURF_VERSION =    3.11
> -REVISION =           1
> +REVISION =           2
>  
>  HOMEPAGE =           https://www.netsurf-browser.org/
>  SITES =              
> https://download.netsurf-browser.org/netsurf/releases/source/
> @@ -12,6 +12,7 @@ BUILD_DEPENDS =             editors/vim \
>                       www/p5-HTML-Parser
>  LIB_DEPENDS =                graphics/libjxl \
>                       graphics/libwebp \
> +                     textproc/libutf8proc \
>                       www/netsurf/hubbub>=0.3.4 \
>                       www/netsurf/libcss>=0.7.0 \
>                       www/netsurf/libnsgif>=0.2.0 \
> @@ -20,7 +21,6 @@ LIB_DEPENDS =               graphics/libjxl \
>                       www/netsurf/libdom>=0.3.2 \
>                       www/netsurf/libnspsl>=0.1.2 \
>                       www/netsurf/libnsutils>=0.0.3 \
> -                     www/netsurf/libutf8proc>=1.3.1p0 \
>                       x11/gtk+3 \
>                       x11/gnome/librsvg \
>                       net/curl
> Index: www/netsurf/browser/patches/patch-utils_idna_c
> ===================================================================
> RCS file: www/netsurf/browser/patches/patch-utils_idna_c
> diff -N www/netsurf/browser/patches/patch-utils_idna_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ www/netsurf/browser/patches/patch-utils_idna_c    15 Apr 2025 19:24:00 
> -0000
> @@ -0,0 +1,12 @@
> +Index: utils/idna.c
> +--- utils/idna.c.orig
> ++++ utils/idna.c
> +@@ -167,7 +167,7 @@ idna__ace_to_ucs4(const char *ace_label,
> + 
> + #ifdef WITH_UTF8PROC
> + 
> +-#include <libutf8proc/utf8proc.h>
> ++#include <utf8proc.h>
> + 
> + int32_t idna_contexto[] = {
> +     /* CONTEXTO codepoints which have a rule defined */
> Index: www/netsurf/libutf8proc/Makefile
> ===================================================================
> RCS file: www/netsurf/libutf8proc/Makefile
> diff -N www/netsurf/libutf8proc/Makefile
> --- www/netsurf/libutf8proc/Makefile  11 Mar 2022 20:10:09 -0000      1.9
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,13 +0,0 @@
> -COMMENT =            unicode library
> -
> -NETSURF_PROJECT =    libutf8proc
> -NETSURF_VERSION =    2.4.0
> -DISTNAME =           libutf8proc-2.4.0-1-src
> -REVISION =           0
> -
> -CATEGORIES =         textproc
> -SHARED_LIBS =                utf8proc 2.1 #1.3.1-3
> -
> -TEST_DEPENDS =               devel/check
> -
> -.include <bsd.port.mk>
> Index: www/netsurf/libutf8proc/distinfo
> ===================================================================
> RCS file: www/netsurf/libutf8proc/distinfo
> diff -N www/netsurf/libutf8proc/distinfo
> --- www/netsurf/libutf8proc/distinfo  9 Aug 2019 22:37:28 -0000       1.5
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,2 +0,0 @@
> -SHA256 (libutf8proc-2.4.0-1-src.tar.gz) = 
> AasdaYnBx3VQkNskw/ZOSflcVgrknCa+xRQrrGgCxHI=
> -SIZE (libutf8proc-2.4.0-1-src.tar.gz) = 154746
> Index: www/netsurf/libutf8proc/pkg/DESCR
> ===================================================================
> RCS file: www/netsurf/libutf8proc/pkg/DESCR
> diff -N www/netsurf/libutf8proc/pkg/DESCR
> --- www/netsurf/libutf8proc/pkg/DESCR 30 Mar 2015 02:57:35 -0000      1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,7 +0,0 @@
> -utf8proc is a library for processing UTF-8 encoded Unicode strings.
> -Some features are Unicode normalization, stripping of default ignorable
> -characters, case folding and detection of grapheme cluster boundaries.
> -A special character mapping is available, which converts for example the
> -characters "Hyphen" (U+2010), "Minus" (U+2212) and "Hyphen-Minus"
> -(U+002D, ASCII Minus) all into the ASCII minus sign, to make them equal
> -for comparisons.
> Index: www/netsurf/libutf8proc/pkg/PLIST
> ===================================================================
> RCS file: www/netsurf/libutf8proc/pkg/PLIST
> diff -N www/netsurf/libutf8proc/pkg/PLIST
> --- www/netsurf/libutf8proc/pkg/PLIST 11 Mar 2022 20:10:09 -0000      1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,4 +0,0 @@
> -include/libutf8proc/
> -include/libutf8proc/utf8proc.h
> -@lib lib/libutf8proc.so.${LIButf8proc_VERSION}
> -lib/pkgconfig/libutf8proc.pc
> Index: www/netsurf/netsurf-fb/Makefile
> ===================================================================
> RCS file: /cvs/ports/www/netsurf/netsurf-fb/Makefile,v
> diff -u -p -r1.18 Makefile
> --- www/netsurf/netsurf-fb/Makefile   16 May 2024 04:52:59 -0000      1.18
> +++ www/netsurf/netsurf-fb/Makefile   15 Apr 2025 19:24:00 -0000
> @@ -2,7 +2,7 @@ COMMENT =             lightweight web browser, with
>  
>  NETSURF_PROJECT =    netsurf-fb
>  NETSURF_VERSION =    3.11
> -REVISION =           0
> +REVISION =           1
>  DISTNAME =           netsurf-${NETSURF_VERSION}-src
>  
>  HOMEPAGE =           https://www.netsurf-browser.org/
> @@ -16,6 +16,7 @@ LIB_DEPENDS =               devel/sdl \
>                       graphics/libjxl \
>                       graphics/libwebp \
>                       graphics/png \
> +                     textproc/libutf8proc \
>                       www/netsurf/hubbub>=0.3.4 \
>                       www/netsurf/libcss>=0.7.0 \
>                       www/netsurf/libnsgif>=0.2.0 \
> @@ -26,7 +27,6 @@ LIB_DEPENDS =               devel/sdl \
>                       www/netsurf/libnspsl>=0.1.2 \
>                       www/netsurf/libnsutils>=0.0.3 \
>                       www/netsurf/libsvgtiny>=0.1.6 \
> -                     www/netsurf/libutf8proc>=1.3.1p0 \
>                       net/curl
>  TEST_DEPENDS =               devel/check
>  
> Index: www/netsurf/netsurf-fb/patches/patch-utils_idna_c
> ===================================================================
> RCS file: www/netsurf/netsurf-fb/patches/patch-utils_idna_c
> diff -N www/netsurf/netsurf-fb/patches/patch-utils_idna_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ www/netsurf/netsurf-fb/patches/patch-utils_idna_c 15 Apr 2025 19:24:00 
> -0000
> @@ -0,0 +1,12 @@
> +Index: utils/idna.c
> +--- utils/idna.c.orig
> ++++ utils/idna.c
> +@@ -167,7 +167,7 @@ idna__ace_to_ucs4(const char *ace_label,
> + 
> + #ifdef WITH_UTF8PROC
> + 
> +-#include <libutf8proc/utf8proc.h>
> ++#include <utf8proc.h>
> + 
> + int32_t idna_contexto[] = {
> +     /* CONTEXTO codepoints which have a rule defined */

Reply via email to