The attached patch, lilly_libcxx.patch, contains the changes which allow 
lilypond 2.17.95
to build against libc++ on Xcode 10.9 with the clang++ compiler. There is a 
glitch in the
configure/makefiles currently that requires that the user pass 
-DHAVE_STL_DATA_METHOD on
CXXFLAGS. The problem is odd as configure seems able to set...

/* define if you have stl data () method */
#define HAVE_STL_DATA_METHOD 1

in the top level config.hh but it doesn't seem to get passed down to 
flowers/include/std-vector.hh
when included in file-path.cc.
          Jack
--- lilypond-2.17.95/flower/string-convert.cc.orig      2013-11-14 
14:45:01.000000000 -0500
+++ lilypond-2.17.95/flower/string-convert.cc   2013-11-14 14:46:10.000000000 
-0500
@@ -165,7 +165,7 @@
     fill_char = '0';
 
   // ugh
-  string dec_string = to_string (i);
+  string dec_string = std::to_string (i);
 
   // ugh
   return to_string (fill_char, ssize_t (length_i - dec_string.length ())) + 
dec_string;
@@ -299,7 +299,7 @@
 string
 String_convert::precision_string (double x, int n)
 {
-  string format = "%." + to_string (max (0, n - 1)) + "e";
+  string format = "%." + std::to_string (max (0, n - 1)) + "e";
   string str = double_string (abs (x), format.c_str ());
 
   int exp = dec2int (str.substr (str.length () - 3));
--- lilypond-2.17.95/lily/arpeggio.cc.orig      2013-11-14 14:47:04.000000000 
-0500
+++ lilypond-2.17.95/lily/arpeggio.cc   2013-11-14 14:47:26.000000000 -0500
@@ -163,7 +163,7 @@
   if (dir)
     {
       Font_metric *fm = Font_interface::get_default_font (me);
-      arrow = fm->find_by_name ("scripts.arpeggio.arrow." + to_string (dir));
+      arrow = fm->find_by_name ("scripts.arpeggio.arrow." + std::to_string 
(dir));
       heads[dir] -= dir * arrow.extent (Y_AXIS).length ();
     }
 
--- lilypond-2.17.95/lily/flag.cc.orig  2013-11-14 14:49:19.000000000 -0500
+++ lilypond-2.17.95/lily/flag.cc       2013-11-14 14:49:49.000000000 -0500
@@ -105,7 +105,7 @@
 
   char dir = (d == UP) ? 'u' : 'd';
   string font_char = flag_style
-                     + to_string (dir) + staffline_offs + to_string (log);
+                     + std::to_string (dir) + staffline_offs + std::to_string 
(log);
   return ly_string2scm ("flags." + font_char);
 }
 
--- lilypond-2.17.95/lily/input.cc.orig 2013-11-14 14:50:47.000000000 -0500
+++ lilypond-2.17.95/lily/input.cc      2013-11-14 14:51:02.000000000 -0500
@@ -142,7 +142,7 @@
 Input::line_number_string () const
 {
   if (source_file_)
-    return to_string (source_file_->get_line (start_));
+    return std::to_string (source_file_->get_line (start_));
   return "?";
 }
 
--- lilypond-2.17.95/lily/mensural-ligature.cc.orig     2013-11-14 
14:51:58.000000000 -0500
+++ lilypond-2.17.95/lily/mensural-ligature.cc  2013-11-14 14:52:14.000000000 
-0500
@@ -168,7 +168,7 @@
       duration_log--;
     case MLP_BREVIS:
       duration_log--;
-      suffix = to_string (duration_log) + color
+      suffix = std::to_string (duration_log) + color
                + (duration_log < -1 ? "lig" : "") + "mensural";
       index = prefix + "s";
       out = fm->find_by_name (index + "r" + suffix);
--- lilypond-2.17.95/lily/note-head.cc.orig     2013-11-14 14:52:56.000000000 
-0500
+++ lilypond-2.17.95/lily/note-head.cc  2013-11-14 14:53:12.000000000 -0500
@@ -38,7 +38,7 @@
 {
   string style = robust_symbol2string (me->get_property ("style"), "default");
 
-  string suffix = to_string (min (robust_scm2int (me->get_property 
("duration-log"), 2), 2));
+  string suffix = std::to_string (min (robust_scm2int (me->get_property 
("duration-log"), 2), 2));
   if (style != "default")
     suffix = robust_scm2string (me->get_property ("glyph-name"), "");
 
--- lilypond-2.17.95/lily/page-turn-page-breaking.cc.orig       2013-11-14 
14:54:16.000000000 -0500
+++ lilypond-2.17.95/lily/page-turn-page-breaking.cc    2013-11-14 
14:54:51.000000000 -0500
@@ -232,7 +232,7 @@
   for (vsize i = 0; i < last_break_position (); i++)
     {
       calc_subproblem (i);
-      progress_indication (string ("[") + to_string (i + 1) + "]");
+      progress_indication (string ("[") + std::to_string (i + 1) + "]");
     }
   progress_indication ("\n");
 
--- lilypond-2.17.95/lily/paper-column-engraver.cc.orig 2013-11-14 
14:55:09.000000000 -0500
+++ lilypond-2.17.95/lily/paper-column-engraver.cc      2013-11-14 
14:55:53.000000000 -0500
@@ -50,7 +50,7 @@
 Paper_column_engraver::finalize ()
 {
   if (! (breaks_ % 8))
-    progress_indication ("[" + to_string (breaks_) + "]");
+    progress_indication ("[" + std::to_string (breaks_) + "]");
 
   if (!made_columns_)
     {
@@ -269,7 +269,7 @@
       breaks_++;
 
       if (! (breaks_ % 8))
-        progress_indication ("[" + to_string (breaks_) + "]");
+        progress_indication ("[" + std::to_string (breaks_) + "]");
     }
 
   context ()->get_score_context ()->unset_property (ly_symbol2scm 
("forbidBreak"));
--- lilypond-2.17.95/lily/paper-column.cc.orig  2013-11-14 14:56:09.000000000 
-0500
+++ lilypond-2.17.95/lily/paper-column.cc       2013-11-14 14:56:22.000000000 
-0500
@@ -237,7 +237,7 @@
 {
   Paper_column *me = dynamic_cast<Paper_column *> (unsmob_grob (p));
 
-  string r = to_string (Paper_column::get_rank (me));
+  string r = std::to_string (Paper_column::get_rank (me));
 
   Moment *mom = unsmob_moment (me->get_property ("when"));
   string when = mom ? mom->to_string () : "?/?";
--- lilypond-2.17.95/lily/performance.cc.orig   2013-11-14 14:56:50.000000000 
-0500
+++ lilypond-2.17.95/lily/performance.cc        2013-11-14 14:57:06.000000000 
-0500
@@ -56,7 +56,7 @@
   for (vsize i = 0; i < audio_staffs_.size (); i++)
     {
       Audio_staff *s = audio_staffs_[i];
-      debug_output ("[" + to_string (i), true);
+      debug_output ("[" + std::to_string (i), true);
       s->output (midi_stream, i, ports_);
       debug_output ("]", false);
     }
--- lilypond-2.17.95/lily/rest.cc.orig  2013-11-14 14:57:48.000000000 -0500
+++ lilypond-2.17.95/lily/rest.cc       2013-11-14 14:58:00.000000000 -0500
@@ -217,7 +217,7 @@
       actual_style = "";
     }
 
-  return ("rests." + to_string (durlog) + (is_ledgered ? "o" : "")
+  return ("rests." + std::to_string (durlog) + (is_ledgered ? "o" : "")
           + actual_style);
 }
 
--- lilypond-2.17.95/lily/simultaneous-music-iterator.cc.orig   2013-11-14 
14:58:48.000000000 -0500
+++ lilypond-2.17.95/lily/simultaneous-music-iterator.cc        2013-11-14 
14:59:04.000000000 -0500
@@ -63,7 +63,7 @@
 
       SCM name = ly_symbol2scm (get_outlet ()->context_name ().c_str ());
       Context *c = (j && create_separate_contexts_)
-                   ? get_outlet ()->find_create_context (name, to_string (j), 
SCM_EOL)
+                   ? get_outlet ()->find_create_context (name, std::to_string 
(j), SCM_EOL)
                    : get_outlet ();
 
       if (!c)
--- lilypond-2.17.95/lily/source-file.cc.orig   2013-11-14 14:59:39.000000000 
-0500
+++ lilypond-2.17.95/lily/source-file.cc        2013-11-14 15:00:38.000000000 
-0500
@@ -181,8 +181,8 @@
       int l, ch, col, offset;
       get_counts (context_str0, &l, &ch, &col, &offset);
 
-      return name_string () + ":" + to_string (l)
-             + ":" + to_string (col + 1);
+      return name_string () + ":" + std::to_string (l)
+             + ":" + std::to_string (col + 1);
     }
 }
 
--- lilypond-2.17.95/lily/system-start-delimiter.cc.orig        2013-11-14 
15:01:45.000000000 -0500
+++ lilypond-2.17.95/lily/system-start-delimiter.cc     2013-11-14 
15:02:49.000000000 -0500
@@ -169,7 +169,7 @@
     }
   while (hi - lo > 1);
 
-  Stencil stil (fm->find_by_name ("brace" + to_string (lo)));
+  Stencil stil (fm->find_by_name ("brace" + std::to_string (lo)));
   stil.translate_axis (-b[X_AXIS].length () / 2, X_AXIS);
 
   stil.translate_axis (-0.2, X_AXIS);
--- lilypond-2.17.95/lily/system.cc.orig        2013-11-14 15:03:12.000000000 
-0500
+++ lilypond-2.17.95/lily/system.cc     2013-11-14 15:03:28.000000000 -0500
@@ -223,7 +223,7 @@
       scm_vector_set_x (lines, scm_from_int (i),
                         system->get_paper_system ());
 
-      debug_output (to_string (i) + "]", false);
+      debug_output (std::to_string (i) + "]", false);
     }
   return lines;
 }
--- lilypond-2.17.95/lily/time-signature.cc.orig        2013-11-14 
15:04:04.000000000 -0500
+++ lilypond-2.17.95/lily/time-signature.cc     2013-11-14 15:05:29.000000000 
-0500
@@ -77,7 +77,7 @@
         return numbered_time_signature (me, n, d);
     }
 
-  string char_name = style + to_string (n) + to_string (d);
+  string char_name = style + std::to_string (n) + std::to_string (d);
   me->set_property ("font-encoding", ly_symbol2scm ("fetaMusic"));
   Stencil out = Font_interface::get_default_font (me)
                 ->find_by_name ("timesig." + char_name);
@@ -100,9 +100,9 @@
                     chain);
 
   SCM sn = Text_interface::interpret_markup (me->layout ()->self_scm (), chain,
-                                             ly_string2scm (to_string (num)));
+                                             ly_string2scm (std::to_string 
(num)));
   SCM sd = Text_interface::interpret_markup (me->layout ()->self_scm (), chain,
-                                             ly_string2scm (to_string (den)));
+                                             ly_string2scm (std::to_string 
(den)));
 
   Stencil n = *unsmob_stencil (sn);
   Stencil d = *unsmob_stencil (sd);
--- lilypond-2.17.95/lily/volta-repeat-iterator.cc.orig 2013-11-14 
15:06:05.000000000 -0500
+++ lilypond-2.17.95/lily/volta-repeat-iterator.cc      2013-11-14 
15:06:40.000000000 -0500
@@ -94,7 +94,7 @@
     {
       if (alt_count_)
         {
-          string repstr = to_string (rep_count_ - alt_count_ + done_count_) + 
".";
+          string repstr = std::to_string (rep_count_ - alt_count_ + 
done_count_) + ".";
           if (done_count_ > 1)
             {
               add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), 
SCM_BOOL_F, SCM_UNDEFINED));
@@ -104,7 +104,7 @@
             }
 
           if (done_count_ == 1 && alt_count_ < rep_count_)
-            repstr = "1.--" + to_string (rep_count_ - alt_count_ + 
done_count_) + ".";
+            repstr = "1.--" + std::to_string (rep_count_ - alt_count_ + 
done_count_) + ".";
 
           if (done_count_ <= alt_count_)
             add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to