aboutsummaryrefslogtreecommitdiff
path: root/devel/glib20
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2018-11-02 13:32:34 +0000
committerRene Ladan <rene@FreeBSD.org>2018-11-02 13:32:34 +0000
commit8a502cb2d43b4059a5678ee4539ca03603104107 (patch)
tree2c2c3d0def8d9d1ad349013f7b532f0065f57789 /devel/glib20
parentf60d4bacdc58ec061406d72cace1ac1266952e39 (diff)
downloadports-8a502cb2d43b4059a5678ee4539ca03603104107.tar.gz
ports-8a502cb2d43b4059a5678ee4539ca03603104107.zip
Remove compatibility code for FreeBSD < 11.2 from all ports.
Simplify some ports where DragonFlyBSD no longer needs to be special-cased. Submitted by: rene Reviewed by: bapt, jbeich Differential Revision: https://reviews.freebsd.org/D17724
Notes
Notes: svn path=/head/; revision=483807
Diffstat (limited to 'devel/glib20')
-rw-r--r--devel/glib20/Makefile15
-rw-r--r--devel/glib20/files/extra-patch-glib_Makefile.in11
-rw-r--r--devel/glib20/files/extra-patch-glib_gunicollate.c124
3 files changed, 1 insertions, 149 deletions
diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile
index 344176643e68..af1f6bda2f1e 100644
--- a/devel/glib20/Makefile
+++ b/devel/glib20/Makefile
@@ -48,24 +48,11 @@ gio_MAN= gdbus.1 gsettings.1 gio-querymodules.1 gio.1 \
glib-compile-resources.1 gresource.1 gdbus-codegen.1
gobject_MAN= glib-genmarshal.1 glib-mkenums.1 gobject-query.1
-OPTIONS_DEFINE= COLLATION_FIX DEBUG NLS
+OPTIONS_DEFINE= DEBUG NLS
OPTIONS_SUB= yes
-# libc collation was fixed by https://svnweb.freebsd.org/changeset/base/290494
-COLLATION_FIX_DESC= Use ICU for UTF-8 string collation (if libc is broken)
-
-OPTIONS_EXCLUDE_FreeBSD_11= COLLATION_FIX
-OPTIONS_EXCLUDE_FreeBSD_12= COLLATION_FIX
-OPTIONS_EXCLUDE_FreeBSD_13= COLLATION_FIX
DEBUG_CONFIGURE_ON= --enable-debug=yes
-COLLATION_FIX_LIB_DEPENDS+= libicui18n.so:devel/icu
-COLLATION_FIX_EXTRA_PATCHES+= ${FILESDIR}/extra-patch-glib_Makefile.in \
- ${FILESDIR}/extra-patch-glib_gunicollate.c
-# Disable it until someone can figure why it causes net-im/pidgin crashed.
-# http://www.freebsd.org/cgi/query-pr.cgi?pr=175930 see comment by ed@
-#COLLATION_FIX_CONFIGURE_ENV+= CFLAGS="-D__STDC_ISO_10646__"
-
.include <bsd.port.pre.mk>
# doesn't build yet
diff --git a/devel/glib20/files/extra-patch-glib_Makefile.in b/devel/glib20/files/extra-patch-glib_Makefile.in
deleted file mode 100644
index 04e45460c4c8..000000000000
--- a/devel/glib20/files/extra-patch-glib_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- glib/Makefile.in.orig 2012-09-27 15:07:28.000000000 +0000
-+++ glib/Makefile.in 2012-09-27 15:08:02.000000000 +0000
-@@ -415,7 +415,7 @@
- INSTOBJEXT = @INSTOBJEXT@
- INTLLIBS = @INTLLIBS@
- LD = @LD@
--LDFLAGS = @LDFLAGS@
-+LDFLAGS = @LDFLAGS@ -licui18n
- LIBELF_CFLAGS = @LIBELF_CFLAGS@
- LIBELF_LIBS = @LIBELF_LIBS@
- LIBFFI_CFLAGS = @LIBFFI_CFLAGS@
diff --git a/devel/glib20/files/extra-patch-glib_gunicollate.c b/devel/glib20/files/extra-patch-glib_gunicollate.c
deleted file mode 100644
index 1d9af5fa72ca..000000000000
--- a/devel/glib20/files/extra-patch-glib_gunicollate.c
+++ /dev/null
@@ -1,124 +0,0 @@
---- glib/gunicollate.c.orig 2012-11-24 20:50:39.000000000 +0000
-+++ glib/gunicollate.c 2013-03-08 12:16:59.000000000 +0000
-@@ -26,6 +26,10 @@
- #include <wchar.h>
- #endif
-
-+#include <unicode/umachine.h>
-+#include <unicode/ustring.h>
-+#include <unicode/ucol.h>
-+
- #ifdef HAVE_CARBON
- #include <CoreServices/CoreServices.h>
- #endif
-@@ -36,11 +40,54 @@
- #include "gstring.h"
- #include "gstrfuncs.h"
- #include "gtestutils.h"
-+#include "gthread.h"
- #include "gcharset.h"
- #ifndef __STDC_ISO_10646__
- #include "gconvert.h"
- #endif
-
-+static gboolean icu_collator_initialized = FALSE;
-+static UCollator *icu_collator = NULL;
-+G_LOCK_DEFINE_STATIC(icu_collator);
-+
-+static void
-+init_icu_collator (void)
-+{
-+ G_LOCK(icu_collator);
-+ if (! icu_collator_initialized)
-+ {
-+ UErrorCode error = U_ZERO_ERROR;
-+
-+ icu_collator = ucol_open(NULL, &error);
-+ if (icu_collator == NULL)
-+ g_warning("unable to initialize the ICU collator (%s), FreeBSD collation routines will be used", u_errorName(error));
-+
-+ icu_collator_initialized = TRUE;
-+ }
-+ G_UNLOCK(icu_collator);
-+}
-+
-+static UChar *
-+utf8_to_uchar (const char *str, int32_t len, int32_t *result_len)
-+{
-+ UErrorCode error = U_ZERO_ERROR;
-+ UChar *result = NULL;
-+
-+ u_strFromUTF8(NULL, 0, result_len, str, len, &error);
-+ if (error <= U_ZERO_ERROR || error == U_BUFFER_OVERFLOW_ERROR)
-+ {
-+ error = U_ZERO_ERROR;
-+ result = g_new(UChar, *result_len);
-+ u_strFromUTF8(result, *result_len, NULL, str, len, &error);
-+ if (error > U_ZERO_ERROR)
-+ {
-+ g_free(result);
-+ result = NULL;
-+ }
-+ }
-+
-+ return result;
-+}
-
- #ifdef _MSC_VER
- /* Workaround for bug in MSVCR80.DLL */
-@@ -128,6 +175,28 @@
- g_return_val_if_fail (str1 != NULL, 0);
- g_return_val_if_fail (str2 != NULL, 0);
-
-+ init_icu_collator();
-+ if (icu_collator != NULL)
-+ {
-+ int32_t wstr1_len;
-+ UChar *wstr1 = utf8_to_uchar(str1, -1, &wstr1_len);
-+ if (wstr1 != NULL)
-+ {
-+ int32_t wstr2_len;
-+ UChar *wstr2 = utf8_to_uchar(str2, -1, &wstr2_len);
-+ if (wstr2 != NULL)
-+ {
-+ result = ucol_strcoll(icu_collator, wstr1, wstr1_len, wstr2, wstr2_len);
-+
-+ g_free(wstr1);
-+ g_free(wstr2);
-+
-+ return result;
-+ }
-+ g_free(wstr1);
-+ }
-+ }
-+
- str1_norm = g_utf8_normalize (str1, -1, G_NORMALIZE_ALL_COMPOSE);
- str2_norm = g_utf8_normalize (str2, -1, G_NORMALIZE_ALL_COMPOSE);
-
-@@ -419,6 +488,26 @@
-
- g_return_val_if_fail (str != NULL, NULL);
-
-+ init_icu_collator();
-+ if (icu_collator != NULL)
-+ {
-+ int32_t wstr_len;
-+ UChar *wstr = utf8_to_uchar(str, len, &wstr_len);
-+ if (wstr != NULL)
-+ {
-+ int32_t result_len;
-+
-+ /* get size of result */
-+ result_len = ucol_getSortKey(icu_collator, wstr, wstr_len, NULL, 0);
-+
-+ result = g_new(char, result_len);
-+ ucol_getSortKey(icu_collator, wstr, wstr_len, result, result_len);
-+ g_free(wstr);
-+
-+ return result;
-+ }
-+ }
-+
- str_norm = g_utf8_normalize (str, len, G_NORMALIZE_ALL_COMPOSE);
-
- result = NULL;