<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[150292] trunk/dports/tex/texlive-bin</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/150292">150292</a></dd>
<dt>Author</dt> <dd>mojca@macports.org</dd>
<dt>Date</dt> <dd>2016-07-15 01:08:31 -0700 (Fri, 15 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>texlive-bin: fix a compilation problem on Lion (closes #51779)</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportstextexlivebinPortfile">trunk/dports/tex/texlive-bin/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportstextexlivebinfilespatchtexk_gregoriodiff">trunk/dports/tex/texlive-bin/files/patch-texk_gregorio.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportstextexlivebinPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/tex/texlive-bin/Portfile (150291 => 150292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/tex/texlive-bin/Portfile        2016-07-15 08:04:42 UTC (rev 150291)
+++ trunk/dports/tex/texlive-bin/Portfile        2016-07-15 08:08:31 UTC (rev 150292)
</span><span class="lines">@@ -76,6 +76,7 @@
</span><span class="cx"> 
</span><span class="cx"> # patches related to changes in install paths
</span><span class="cx"> patchfiles-append  patch-texk_chktex_Makefile.in.diff \
</span><ins>+                   patch-texk_gregorio.diff \
</ins><span class="cx">                    patch-texk_kpathsea_Makefile.in.diff \
</span><span class="cx">                    patch-texk_tex4htk_Makefile.in.diff \
</span><span class="cx">                    patch-texk_texlive_linked_scripts_Makefile.in.diff \
</span></span></pre></div>
<a id="trunkdportstextexlivebinfilespatchtexk_gregoriodiff"></a>
<div class="addfile"><h4>Added: trunk/dports/tex/texlive-bin/files/patch-texk_gregorio.diff (0 => 150292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/tex/texlive-bin/files/patch-texk_gregorio.diff                                (rev 0)
+++ trunk/dports/tex/texlive-bin/files/patch-texk_gregorio.diff        2016-07-15 08:08:31 UTC (rev 150292)
</span><span class="lines">@@ -0,0 +1,334 @@
</span><ins>+https://trac.macports.org/ticket/51779
+https://github.com/gregorio-project/gregorio/pull/1186
+http://tug.org/svn/texlive?view=revision&amp;revision=41705
+
+--- texk/gregorio/config_.h.in.orig
++++ texk/gregorio/config_.h.in
+@@ -3,6 +3,9 @@
+ /* Define if building universal (internal helper macro) */
+ #undef AC_APPLE_UNIVERSAL_BUILD

++/* The normal alignment of `uint32_t', in bytes. */
++#undef ALIGNOF_UINT32_T
++
+ /* Define to 1 if the `closedir' function returns void instead of `int'. */
+ #undef CLOSEDIR_VOID

+--- texk/gregorio/configure.orig
++++ texk/gregorio/configure
+@@ -2186,6 +2186,189 @@ $as_echo &quot;$ac_res&quot; &gt;&amp;6; }
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

+ } # ac_fn_c_check_member
++
++# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
++# --------------------------------------------
++# Tries to find the compile-time value of EXPR in a program that includes
++# INCLUDES, setting VAR accordingly. Returns whether the value could be
++# computed
++ac_fn_c_compute_int ()
++{
++  as_lineno=${as_lineno-&quot;$1&quot;} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if test &quot;$cross_compiling&quot; = yes; then
++    # Depending upon the size, compute the lo and hi bounds.
++cat confdefs.h - &lt;&lt;_ACEOF &gt;conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) &gt;= 0)];
++test_array [0] = 0;
++return test_array [0];
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile &quot;$LINENO&quot;; then :
++  ac_lo=0 ac_mid=0
++  while :; do
++    cat confdefs.h - &lt;&lt;_ACEOF &gt;conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) &lt;= $ac_mid)];
++test_array [0] = 0;
++return test_array [0];
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile &quot;$LINENO&quot;; then :
++  ac_hi=$ac_mid; break
++else
++  as_fn_arith $ac_mid + 1 &amp;&amp; ac_lo=$as_val
++                        if test $ac_lo -le $ac_mid; then
++                          ac_lo= ac_hi=
++                          break
++                        fi
++                        as_fn_arith 2 '*' $ac_mid + 1 &amp;&amp; ac_mid=$as_val
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  done
++else
++  cat confdefs.h - &lt;&lt;_ACEOF &gt;conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) &lt; 0)];
++test_array [0] = 0;
++return test_array [0];
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile &quot;$LINENO&quot;; then :
++  ac_hi=-1 ac_mid=-1
++  while :; do
++    cat confdefs.h - &lt;&lt;_ACEOF &gt;conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) &gt;= $ac_mid)];
++test_array [0] = 0;
++return test_array [0];
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile &quot;$LINENO&quot;; then :
++  ac_lo=$ac_mid; break
++else
++  as_fn_arith '(' $ac_mid ')' - 1 &amp;&amp; ac_hi=$as_val
++                        if test $ac_mid -le $ac_hi; then
++                          ac_lo= ac_hi=
++                          break
++                        fi
++                        as_fn_arith 2 '*' $ac_mid &amp;&amp; ac_mid=$as_val
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  done
++else
++  ac_lo= ac_hi=
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test &quot;x$ac_lo&quot; != &quot;x$ac_hi&quot;; do
++  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo &amp;&amp; ac_mid=$as_val
++  cat confdefs.h - &lt;&lt;_ACEOF &gt;conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) &lt;= $ac_mid)];
++test_array [0] = 0;
++return test_array [0];
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile &quot;$LINENO&quot;; then :
++  ac_hi=$ac_mid
++else
++  as_fn_arith '(' $ac_mid ')' + 1 &amp;&amp; ac_lo=$as_val
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in #((
++?*) eval &quot;$3=\$ac_lo&quot;; ac_retval=0 ;;
++'') ac_retval=1 ;;
++esac
++  else
++    cat confdefs.h - &lt;&lt;_ACEOF &gt;conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++static long int longval () { return $2; }
++static unsigned long int ulongval () { return $2; }
++#include &lt;stdio.h&gt;
++#include &lt;stdlib.h&gt;
++int
++main ()
++{
++
++  FILE *f = fopen (&quot;conftest.val&quot;, &quot;w&quot;);
++  if (! f)
++    return 1;
++  if (($2) &lt; 0)
++    {
++      long int i = longval ();
++      if (i != ($2))
++        return 1;
++      fprintf (f, &quot;%ld&quot;, i);
++    }
++  else
++    {
++      unsigned long int i = ulongval ();
++      if (i != ($2))
++        return 1;
++      fprintf (f, &quot;%lu&quot;, i);
++    }
++  /* Do not output a trailing newline, as this causes \r\n confusion
++     on some platforms.  */
++  return ferror (f) || fclose (f) != 0;
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run &quot;$LINENO&quot;; then :
++  echo &gt;&gt;conftest.val; read $3 &lt;conftest.val; ac_retval=0
++else
++  ac_retval=1
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++rm -f conftest.val
++
++  fi
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++  as_fn_set_status $ac_retval
++
++} # ac_fn_c_compute_int
+ cat &gt;config.log &lt;&lt;_ACEOF
+ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+@@ -12707,7 +12890,7 @@ else
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T ((((off_t) 1 &lt;&lt; 31) &lt;&lt; 31) - 1 + (((off_t) 1 &lt;&lt; 31) &lt;&lt; 31))
++#define LARGE_OFF_T (((off_t) 1 &lt;&lt; 62) - 1 + ((off_t) 1 &lt;&lt; 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                        &amp;&amp; LARGE_OFF_T % 2147483647 == 1)
+                       ? 1 : -1];
+@@ -12753,7 +12936,7 @@ else
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T ((((off_t) 1 &lt;&lt; 31) &lt;&lt; 31) - 1 + (((off_t) 1 &lt;&lt; 31) &lt;&lt; 31))
++#define LARGE_OFF_T (((off_t) 1 &lt;&lt; 62) - 1 + ((off_t) 1 &lt;&lt; 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                        &amp;&amp; LARGE_OFF_T % 2147483647 == 1)
+                       ? 1 : -1];
+@@ -12777,7 +12960,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T ((((off_t) 1 &lt;&lt; 31) &lt;&lt; 31) - 1 + (((off_t) 1 &lt;&lt; 31) &lt;&lt; 31))
++#define LARGE_OFF_T (((off_t) 1 &lt;&lt; 62) - 1 + ((off_t) 1 &lt;&lt; 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                        &amp;&amp; LARGE_OFF_T % 2147483647 == 1)
+                       ? 1 : -1];
+@@ -12822,7 +13005,7 @@ else
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T ((((off_t) 1 &lt;&lt; 31) &lt;&lt; 31) - 1 + (((off_t) 1 &lt;&lt; 31) &lt;&lt; 31))
++#define LARGE_OFF_T (((off_t) 1 &lt;&lt; 62) - 1 + ((off_t) 1 &lt;&lt; 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                        &amp;&amp; LARGE_OFF_T % 2147483647 == 1)
+                       ? 1 : -1];
+@@ -12846,7 +13029,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T ((((off_t) 1 &lt;&lt; 31) &lt;&lt; 31) - 1 + (((off_t) 1 &lt;&lt; 31) &lt;&lt; 31))
++#define LARGE_OFF_T (((off_t) 1 &lt;&lt; 62) - 1 + ((off_t) 1 &lt;&lt; 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                        &amp;&amp; LARGE_OFF_T % 2147483647 == 1)
+                       ? 1 : -1];
+@@ -13623,6 +13806,42 @@ fi
+ done


++# The cast to long int works around a bug in the HP C Compiler,
++# see AC_CHECK_SIZEOF for more information.
++{ $as_echo &quot;$as_me:${as_lineno-$LINENO}: checking alignment of uint32_t&quot; &gt;&amp;5
++$as_echo_n &quot;checking alignment of uint32_t... &quot; &gt;&amp;6; }
++if ${ac_cv_alignof_uint32_t+:} false; then :
++  $as_echo_n &quot;(cached) &quot; &gt;&amp;6
++else
++  if ac_fn_c_compute_int &quot;$LINENO&quot; &quot;(long int) offsetof (ac__type_alignof_, y)&quot; &quot;ac_cv_alignof_uint32_t&quot;        &quot;$ac_includes_default
++#ifndef offsetof
++# define offsetof(type, member) ((char *) &amp;((type *) 0)-&gt;member - (char *) 0)
++#endif
++typedef struct { char x; uint32_t y; } ac__type_alignof_;&quot;; then :
++
++else
++  if test &quot;$ac_cv_type_uint32_t&quot; = yes; then
++     { { $as_echo &quot;$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':&quot; &gt;&amp;5
++$as_echo &quot;$as_me: error: in \`$ac_pwd':&quot; &gt;&amp;2;}
++as_fn_error 77 &quot;cannot compute alignment of uint32_t
++See \`config.log' for more details&quot; &quot;$LINENO&quot; 5; }
++   else
++     ac_cv_alignof_uint32_t=0
++   fi
++fi
++
++fi
++{ $as_echo &quot;$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_uint32_t&quot; &gt;&amp;5
++$as_echo &quot;$ac_cv_alignof_uint32_t&quot; &gt;&amp;6; }
++
++
++
++cat &gt;&gt;confdefs.h &lt;&lt;_ACEOF
++#define ALIGNOF_UINT32_T $ac_cv_alignof_uint32_t
++_ACEOF
++
++
++
+  { $as_echo &quot;$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian&quot; &gt;&amp;5
+ $as_echo_n &quot;checking whether byte ordering is bigendian... &quot; &gt;&amp;6; }
+ if ${ac_cv_c_bigendian+:} false; then :
+# --- texk/gregorio/configure.ac.orig
+# +++ texk/gregorio/configure.ac
+# @@ -97,6 +97,8 @@ dnl Checks for header files.
+#  AC_CHECK_HEADERS([stdint.h])
+#  AC_CHECK_HEADERS([stdalign.h])
+#  
+# +AC_CHECK_ALIGNOF(uint32_t)
+# +
+#  AC_C_BIGENDIAN
+#  
+#  AC_SUBST([GREGORIO_TREE], [gregorio-src])
+--- texk/gregorio/gregorio-src/src/sha1.c.orig
++++ texk/gregorio/gregorio-src/src/sha1.c
+@@ -37,15 +37,6 @@
+ #include &lt;stdlib.h&gt;
+ #include &lt;string.h&gt;

+-#ifdef HAVE_STDALIGN_H
+-#include &lt;stdalign.h&gt;
+-#ifdef __clang__
+-#pragma clang diagnostic ignored &quot;-Wc11-extensions&quot;
+-#endif
+-#else
+-#define alignof(x) sizeof(x)
+-#endif
+-
+ #ifdef WORDS_BIGENDIAN
+ #define SWAP(n) (n)
+ #else
+@@ -167,7 +158,7 @@ void sha1_process_bytes(const void *buffer, size_t len, struct sha1_ctx *ctx)
+     if (len &gt;= 64) {
+         /* architecture and data-specific; LCOV_EXCL_START */
+ #if !_STRING_ARCH_unaligned
+-#define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0)
++#define UNALIGNED_P(p) ((uintptr_t) (p) % ALIGNOF_UINT32_T != 0)
+         if (UNALIGNED_P(buffer)) {
+             while (len &gt; 64) {
+                 sha1_process_block(memcpy(ctx-&gt;buffer, buffer, 64), 64, ctx);
</ins></span></pre>
</div>
</div>

</body>
</html>