Merge remote-tracking branch 'origin/master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / patches / netsurf-system-utf8proc.patch
1 Use upstream utf8proc package, as suggested in
2 http://source.netsurf-browser.org/libutf8proc.git/commit/?id=770e329cceaf0620c7b482589a9b17ed1d19c16d
3
4 Work around upstream's lack of a pkg-config file and update API.
5
6 --- netsurf-3.6/Makefile
7 +++ netsurf-3.6/Makefile
8 @@ -527,10 +527,9 @@
9 $(eval $(call pkg_config_find_and_add,libcss,CSS))
10 $(eval $(call pkg_config_find_and_add,libdom,DOM))
11 $(eval $(call pkg_config_find_and_add,libnsutils,nsutils))
12 -$(eval $(call pkg_config_find_and_add,libutf8proc,utf8proc))
13
14 # Common libraries without pkg-config support
15 -LDFLAGS += -lz
16 +LDFLAGS += -lz -lutf8proc
17
18 # Optional libraries with pkgconfig
19
20 --- netsurf-3.6/utils/idna.c
21 +++ netsurf-3.6/utils/idna.c
22 @@ -26,7 +26,7 @@
23 #include <stdint.h>
24 #include <stdlib.h>
25 #include <string.h>
26 -#include <libutf8proc/utf8proc.h>
27 +#include <utf8proc.h>
28
29 #include "utils/errors.h"
30 #include "utils/idna.h"
31 @@ -250,7 +250,7 @@
32 return NSERROR_NOMEM;
33 }
34
35 - nfc_size = utf8proc_normalise(nfc_label, nfc_size,
36 + nfc_size = utf8proc_normalize_utf32(nfc_label, nfc_size,
37 UTF8PROC_STABLE | UTF8PROC_COMPOSE);
38 if (nfc_size < 0) {
39 return NSERROR_NOMEM;
40 @@ -565,7 +565,7 @@
41 }
42
43 /* Perform NFC normalisation */
44 - ucs4_len = utf8proc_normalise(ucs4, u_ucs4_len,
45 + ucs4_len = utf8proc_normalize_utf32(ucs4, u_ucs4_len,
46 UTF8PROC_STABLE | UTF8PROC_COMPOSE);
47 if (ucs4_len < 0) {
48 free(ucs4);
49 --- netsurf-3.6/test/Makefile
50 +++ netsurf-3.6/test/Makefile
51 @@ -112,11 +112,11 @@
52 -D_XOPEN_SOURCE=600 \
53 -Itest -Iinclude -Icontent/handlers -Ifrontends -I. -I.. \
54 -Dnsgtk \
55 - $(shell pkg-config --cflags libcurl libparserutils libwapcaplet libdom libnsutils libutf8proc libidn) \
56 + $(shell pkg-config --cflags libcurl libparserutils libwapcaplet libdom libnsutils libidn) \
57 $(LIB_CFLAGS) \
58 $(COV_CFLAGS)
59
60 -TESTLDFLAGS := $(shell pkg-config --libs libcurl libparserutils libwapcaplet libdom libnsutils libutf8proc libidn) -lz \
61 +TESTLDFLAGS := $(shell pkg-config --libs libcurl libparserutils libwapcaplet libdom libnsutils libidn) -lz -lutf8proc \
62 $(LIB_LDFLAGS)\
63 $(COV_LDFLAGS)
64