Ticket #16975: glib2-2.18.2.diff

File glib2-2.18.2.diff, 6.3 KB (added by nox@…, 16 years ago)
  • files/patch-configure.diff

     
    1 --- configure   2008-07-14 14:57:48.000000000 +0200
    2 +++ configure   2008-07-14 15:00:04.000000000 +0200
    3 @@ -31818,23 +31818,11 @@
    4  fi
    5  { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
    6  $as_echo "$ac_cv_c_bigendian" >&6; }
    7 - case $ac_cv_c_bigendian in #(
    8 -   yes)
    9       cat >>confdefs.h <<\_ACEOF
    10 +#ifdef __BIG_ENDIAN__
    11  #define WORDS_BIGENDIAN 1
    12 +#endif
    13  _ACEOF
    14 -;; #(
    15 -   no)
    16 -      ;; #(
    17 -   universal)
    18 -      ;; #(
    19 -   *)
    20 -     { { $as_echo "$as_me:$LINENO: error: unknown endianness
    21 - presetting ac_cv_c_bigendian=no (or yes) will help" >&5
    22 -$as_echo "$as_me: error: unknown endianness
    23 - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
    24 -   { (exit 1); exit 1; }; } ;;
    25 - esac
    26  
    27  
    28  # check for header files
    29 @@ -42770,7 +42758,11 @@
    30  $as_echo "$glib_cv_byte_contents_gmutex" >&6; }
    31  
    32  cat >>confdefs.h <<_ACEOF
    33 -#define GLIB_BYTE_CONTENTS_GMUTEX $glib_cv_byte_contents_gmutex
    34 +#ifdef __BIG_ENDIAN__
    35 +#define GLIB_BYTE_CONTENTS_GMUTEX 50,-86,-85,-89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    36 +#else
    37 +#define GLIB_BYTE_CONTENTS_GMUTEX -89,-85,-86,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    38 +#endif
    39  _ACEOF
    40  
    41  
    42 @@ -48265,10 +48257,13 @@
    43  _______EOF
    44         fi
    45  
    46 -       case x$g_stack_grows in
    47 -       xyes) echo "#define G_HAVE_GROWING_STACK 1" >>$outfile ;;
    48 -       *)    echo "#define G_HAVE_GROWING_STACK 0" >>$outfile ;;
    49 -       esac
    50 +       cat >>$outfile <<_______EOF
    51 +#ifdef __BIG_ENDIAN__
    52 +#define G_HAVE_GROWING_STACK 1
    53 +#else
    54 +#define G_HAVE_GROWING_STACK 0
    55 +#endif
    56 +_______EOF
    57  
    58  
    59         echo >>$outfile
    60 @@ -48317,7 +48312,12 @@
    61      long   dummy_long;
    62    } static_mutex;
    63  };
    64 -#define        G_STATIC_MUTEX_INIT     { NULL, { { $g_mutex_contents} } }
    65 +#ifdef __BIG_ENDIAN__
    66 +#define G_STATIC_MUTEX_INIT     { NULL, { { 50,-86,-85,-89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
    67 +#else           
    68 +#define G_STATIC_MUTEX_INIT     { NULL, { { -89,-85,-86,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
    69 +#endif
    70 +
    71  #define        g_static_mutex_get_mutex(mutex) \\
    72    (g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \\
    73     g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
    74 @@ -48346,24 +48346,39 @@
    75    void  *dummy_pointer;
    76    long   dummy_long;
    77  };
    78 -_______EOF
    79 -       if test x"$g_memory_barrier_needed" != xno; then
    80 -         echo >>$outfile
    81 -         echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile
    82 -       fi
    83 +#ifdef __BIG_ENDIAN__
    84 +#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1
    85 +#define GINT16_TO_BE(val)      ((gint16) (val))
    86 +#define GUINT16_TO_BE(val)     ((guint16) (val))
    87 +#define GINT16_TO_LE(val)      ((gint16) GUINT16_SWAP_LE_BE (val))
    88 +#define GUINT16_TO_LE(val)     (GUINT16_SWAP_LE_BE (val))
    89 +#define GINT32_TO_BE(val)      ((gint32) (val))
    90 +#define GUINT32_TO_BE(val)     ((guint32) (val))
    91 +#define GINT32_TO_LE(val)      ((gint32) GUINT32_SWAP_LE_BE (val))
    92 +#define GUINT32_TO_LE(val)     (GUINT32_SWAP_LE_BE (val))
    93 +#define GINT64_TO_BE(val)      ((gint64) (val))
    94 +#define GUINT64_TO_BE(val)     ((guint64) (val))
    95 +#define GINT64_TO_LE(val)      ((gint64) GUINT64_SWAP_LE_BE (val))
    96 +#define GUINT64_TO_LE(val)     (GUINT64_SWAP_LE_BE (val))
    97 +
    98 +#else
    99 +
    100 +#define GINT16_TO_LE(val)      ((gint16) (val))
    101 +#define GUINT16_TO_LE(val)     ((guint16) (val))
    102 +#define GINT16_TO_BE(val)      ((gint16) GUINT16_SWAP_LE_BE (val))
    103 +#define GUINT16_TO_BE(val)     (GUINT16_SWAP_LE_BE (val))
    104 +#define GINT32_TO_LE(val)      ((gint32) (val))
    105 +#define GUINT32_TO_LE(val)     ((guint32) (val))
    106 +#define GINT32_TO_BE(val)      ((gint32) GUINT32_SWAP_LE_BE (val))
    107 +#define GUINT32_TO_BE(val)     (GUINT32_SWAP_LE_BE (val))
    108 +#define GINT64_TO_LE(val)      ((gint64) (val))
    109 +#define GUINT64_TO_LE(val)     ((guint64) (val))
    110 +#define GINT64_TO_BE(val)      ((gint64) GUINT64_SWAP_LE_BE (val))
    111 +#define GUINT64_TO_BE(val)     (GUINT64_SWAP_LE_BE (val))
    112 +
    113 +#endif
    114  
    115 -       echo >>$outfile
    116 -       g_bit_sizes="16 32 64"
    117 -       for bits in $g_bit_sizes; do
    118 -         cat >>$outfile <<_______EOF
    119 -#define GINT${bits}_TO_${g_bs_native}(val)     ((gint${bits}) (val))
    120 -#define GUINT${bits}_TO_${g_bs_native}(val)    ((guint${bits}) (val))
    121 -#define GINT${bits}_TO_${g_bs_alien}(val)      ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
    122 -#define GUINT${bits}_TO_${g_bs_alien}(val)     (GUINT${bits}_SWAP_LE_BE (val))
    123 -_______EOF
    124 -       done
    125  
    126 -       cat >>$outfile <<_______EOF
    127  #define GLONG_TO_LE(val)       ((glong) GINT${glongbits}_TO_LE (val))
    128  #define GULONG_TO_LE(val)      ((gulong) GUINT${glongbits}_TO_LE (val))
    129  #define GLONG_TO_BE(val)       ((glong) GINT${glongbits}_TO_BE (val))
    130 @@ -48372,7 +48387,11 @@
    131  #define GUINT_TO_LE(val)       ((guint) GUINT${gintbits}_TO_LE (val))
    132  #define GINT_TO_BE(val)                ((gint) GINT${gintbits}_TO_BE (val))
    133  #define GUINT_TO_BE(val)       ((guint) GUINT${gintbits}_TO_BE (val))
    134 -#define G_BYTE_ORDER $g_byte_order
    135 +#ifdef __BIG_ENDIAN__
    136 +#define G_BYTE_ORDER G_BIG_ENDIAN
    137 +#else
    138 +#define G_BYTE_ORDER G_LITTLE_ENDIAN
    139 +#endif
    140  
    141  #define GLIB_SYSDEF_POLLIN =$g_pollin
    142  #define GLIB_SYSDEF_POLLOUT =$g_pollout
  • Portfile

     
    44
    55name                    glib2
    66set my_name             glib
    7 version                 2.18.1
     7version                 2.18.2
    88set branch              [join [lrange [split ${version} .] 0 1] .]
    99categories              devel
    1010maintainers             ryandesign
     
    2727#    ftp://ftp.gtk.org/pub/${my_name}/${branch}/
    2828
    2929checksums \
    30     md5     51a9a33f49a4896d4d95d8e980666b9e \
    31     sha1    d34a30cfccc8322dfe4198d26cf6bfc0210f141b \
    32     rmd160  264b37584419d983685910adde8f7b282eccc1ad
     30    md5     d11a5cc5e08cff53349a3481816fdaff \
     31    sha1    4eaf73feda42e8ecf00654f56e38f7fedd6a9266 \
     32    rmd160  52df56375dd97c07837ae085dc045cf29d6f59a1
    3333
    3434patchfiles \
    3535    patch-glib-2.0.pc.in.diff \
     
    6363    reinplace "s|path = \"/bin|path = \"${prefix}/bin:/bin|g" ${worksrcpath}/glib/gutils.c ${worksrcpath}/glib/gspawn.c
    6464}
    6565
    66 platform darwin {
    67     patchfiles-append patch-configure.diff
    68 }
    69 
    7066platform powerpc {
    7167    if {[variant_isset universal]} {
    7268        post-configure {