Ticket #38388: libxml2-2.9.0.patch

File libxml2-2.9.0.patch, 2.8 KB (added by neverpanic (Clemens Lang), 12 years ago)

Patch to update libxml2 to 2.9.0

  • Portfile

     
    33PortSystem            1.0
    44
    55name                  libxml2
    6 version               2.8.0
     6version               2.9.0
    77categories            textproc
    88description           gnome xml library
    99platforms             darwin
     
    1616                      ${homepage}sources/ \
    1717                      ftp://xmlsoft.org/${name}/
    1818
    19 checksums             rmd160 45820c9f4939f642a87be9259c55fd081ea6759a \
    20                       sha256 f2e2d0e322685193d1affec83b21dc05d599e17a7306d7b90de95bb5b9ac622a
     19checksums             rmd160  d025639320bb34adbc45a43f46354190f6bbb7b5 \
     20                      sha256  ad25d91958b7212abdc12b9611cfb4dc4e5cddb6d1e9891532f48aacee422b82
    2121
    2222depends_lib           port:libiconv port:zlib port:xz
    2323
     
    2929        ${worksrcpath}/xmllint.c \
    3030        ${worksrcpath}/doc/xmlcatalog.1 \
    3131        ${worksrcpath}/doc/xmllint.1
    32 
    3332}
    3433
     34patch.args              -p1
     35patchfiles              patch-thread.cc-fix-portability.diff
     36
    3537configure.args          --enable-static \
    3638                        --without-python
    3739
  • files/patch-thread.cc-fix-portability.diff

     
     1From 3f6cfbd1d38d0634a2ddcb9a0a13e1b5a2195a5e Mon Sep 17 00:00:00 2001
     2From: Friedrich Haubensak <hsk@fli-leibniz.de>
     3Date: Wed, 12 Sep 2012 15:34:53 +0000
     4Subject: Fix a thread portability problem
     5
     6cannot compile libxml2-2.9.0 using studio 12.1 compiler on solaris 10
     7
     8I.M.O. structure initializer (as PTHREAD_ONCE_INIT) cannot be used in
     9a structure assignment anyway
     10---
     11diff --git a/threads.c b/threads.c
     12index f206149..7e85a26 100644
     13--- a/threads.c
     14+++ b/threads.c
     15@@ -146,6 +146,7 @@ struct _xmlRMutex {
     16 static pthread_key_t globalkey;
     17 static pthread_t mainthread;
     18 static pthread_once_t once_control = PTHREAD_ONCE_INIT;
     19+static pthread_once_t once_control_init = PTHREAD_ONCE_INIT;
     20 static pthread_mutex_t global_init_lock = PTHREAD_MUTEX_INITIALIZER;
     21 #elif defined HAVE_WIN32_THREADS
     22 #if defined(HAVE_COMPILER_TLS)
     23@@ -915,7 +916,7 @@ xmlCleanupThreads(void)
     24 #ifdef HAVE_PTHREAD_H
     25     if ((libxml_is_threaded)  && (pthread_key_delete != NULL))
     26         pthread_key_delete(globalkey);
     27-    once_control = PTHREAD_ONCE_INIT;
     28+    once_control = once_control_init;
     29 #elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
     30     if (globalkey != TLS_OUT_OF_INDEXES) {
     31         xmlGlobalStateCleanupHelperParams *p;
     32--
     33cgit v0.9.1