mirror of
https://git.freebsd.org/ports.git
synced 2025-06-27 23:50:30 -04:00
are the latest stable releases. * Update vala to the newest stable release 0.18.1, also update a few ports in the gtk/gnome stack. * The c++ bindings ports for glib, atk, gconf, etc, have now USE_GNOME toggles. * Remove pkg-config run depends from glib20 and freetype2. This doesn't eliminate pkg-config run dependency completely, a second phase is needed and is planned. * Support for .:run. and .:build. for USE_GNOME components was added. Currently only libxml2 and libxslt support this mechanism. * Updates of the telepathy stack and empathy. * Trim makefile headers, convert ports to new options, trim off library versions for some ports. * Fix other ports so they build with the new glib version. Thanks to miwi and crees for helping out with some exp-runs. Approved by: portmgr (miwi & bapt) Obtained from: gnome team repo
91 lines
2.2 KiB
C
91 lines
2.2 KiB
C
--- common-src/glib-util.c.orig 2008-12-01 21:17:19.000000000 +0000
|
|
+++ common-src/glib-util.c 2013-02-07 15:54:40.000000000 +0000
|
|
@@ -38,26 +38,15 @@
|
|
if (did_glib_init) return;
|
|
did_glib_init = TRUE;
|
|
|
|
- /* Initialize glib's type system */
|
|
- g_type_init();
|
|
-
|
|
/* set up libcurl (this must happen before threading
|
|
* is initialized) */
|
|
#ifdef HAVE_LIBCURL
|
|
# ifdef G_THREADS_ENABLED
|
|
- g_assert(!g_thread_supported());
|
|
+ g_assert(!g_thread_supported()); /* assert threads aren't initialized yet */
|
|
# endif
|
|
g_assert(curl_global_init(CURL_GLOBAL_ALL) == 0);
|
|
#endif
|
|
|
|
- /* And set up glib's threads */
|
|
-#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
|
|
- if (g_thread_supported()) {
|
|
- return;
|
|
- }
|
|
- g_thread_init(NULL);
|
|
-#endif
|
|
-
|
|
/* do a version check */
|
|
#if GLIB_CHECK_VERSION(2,6,0)
|
|
{
|
|
@@ -71,6 +60,17 @@
|
|
}
|
|
}
|
|
#endif
|
|
+
|
|
+ /* Initialize glib's type system. On glib >= 2.24, this will initialize
|
|
+ * threads, so it must be done after curl is initialized. */
|
|
+ g_type_init();
|
|
+
|
|
+ /* And set up glib's threads */
|
|
+#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
|
|
+ if (!g_thread_supported())
|
|
+ g_thread_init(NULL);
|
|
+#endif
|
|
+
|
|
}
|
|
|
|
typedef enum {
|
|
@@ -107,38 +107,19 @@
|
|
return to;
|
|
}
|
|
|
|
-void g_list_free_full(GList * list) {
|
|
- GList * cur = list;
|
|
-
|
|
- while (cur != NULL) {
|
|
- gpointer data = cur->data;
|
|
- amfree(data);
|
|
- cur = g_list_next(cur);
|
|
- }
|
|
-
|
|
- g_list_free(list);
|
|
-}
|
|
-
|
|
-void g_slist_free_full(GSList * list) {
|
|
+#if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 28))
|
|
+void _slist_free_full(GSList * list, GDestroyNotify free_fn) {
|
|
GSList * cur = list;
|
|
|
|
while (cur != NULL) {
|
|
gpointer data = cur->data;
|
|
- amfree(data);
|
|
+ free_fn(data);
|
|
cur = g_slist_next(cur);
|
|
}
|
|
|
|
g_slist_free(list);
|
|
}
|
|
-
|
|
-void g_queue_free_full(GQueue * queue) {
|
|
- while (!g_queue_is_empty(queue)) {
|
|
- gpointer data;
|
|
- data = g_queue_pop_head(queue);
|
|
- amfree(data);
|
|
- }
|
|
- g_queue_free(queue);
|
|
-}
|
|
+#endif
|
|
|
|
void g_ptr_array_free_full(GPtrArray * array) {
|
|
size_t i;
|