Copy of osx-environment at 9993042d6
authorCarl Hetherington <cth@carlh.net>
Fri, 26 Nov 2021 10:08:54 +0000 (10:08 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 26 Nov 2021 10:08:54 +0000 (10:08 +0000)
101 files changed:
.gitignore [new file with mode: 0644]
Patches/aubio-32.patch [new file with mode: 0644]
Patches/aubio-64.patch [new file with mode: 0644]
Patches/boost-arm64.patch [new file with mode: 0644]
Patches/boost-macos-warning.patch [new file with mode: 0644]
Patches/db.patch [new file with mode: 0644]
Patches/glib-avail-len.patch [new file with mode: 0644]
Patches/glib-iconv.patch [new file with mode: 0644]
Patches/glib-meson.patch [new file with mode: 0644]
Patches/jack-2.patch [new file with mode: 0644]
Patches/jack.patch [new file with mode: 0644]
Patches/openssl-arm64.patch [new file with mode: 0644]
Patches/rubberband.patch [new file with mode: 0644]
Patches/sndfile-disable-examples.patch [new file with mode: 0644]
Patches/sndfile-link.patch [new file with mode: 0644]
Patches/sndfile-unnecessary-include.patch [new file with mode: 0644]
Patches/vamp-plugin-sdk-32.patch [new file with mode: 0644]
Patches/vamp-plugin-sdk-64.patch [new file with mode: 0644]
Patches/wxwidgets-change-install-names.patch [new file with mode: 0644]
Patches/wxwidgets-checkbox-colours.patch [new file with mode: 0644]
Patches/wxwidgets-host-suffix.patch [new file with mode: 0644]
Patches/wxwidgets-osx-zorder.patch [new file with mode: 0644]
Patches/wxwidgets-ru-advanced.patch [new file with mode: 0644]
Patches/xerces-cross-compile.patch [new file with mode: 0644]
Scripts/art.sh [new file with mode: 0644]
Scripts/atk.sh [new file with mode: 0644]
Scripts/atkmm.sh [new file with mode: 0644]
Scripts/aubio.sh [new file with mode: 0644]
Scripts/boost.sh [new file with mode: 0644]
Scripts/cairo.sh [new file with mode: 0644]
Scripts/cairomm.sh [new file with mode: 0644]
Scripts/curl.sh [new file with mode: 0644]
Scripts/db.sh [new file with mode: 0644]
Scripts/expat.sh [new file with mode: 0644]
Scripts/ffi.sh [new file with mode: 0644]
Scripts/fftw.sh [new file with mode: 0644]
Scripts/flac.sh [new file with mode: 0644]
Scripts/fontconfig.sh [new file with mode: 0644]
Scripts/freetype.sh [new file with mode: 0644]
Scripts/gdk-pixbuf.sh [new file with mode: 0644]
Scripts/gettext.sh [new file with mode: 0644]
Scripts/glib.sh [new file with mode: 0644]
Scripts/glibmm.sh [new file with mode: 0644]
Scripts/gnomecanvas.sh [new file with mode: 0644]
Scripts/gnomecanvasmm.sh [new file with mode: 0644]
Scripts/harfbuzz.sh [new file with mode: 0644]
Scripts/iconv.sh [new file with mode: 0644]
Scripts/icu.sh [new file with mode: 0644]
Scripts/imagemagick.sh [new file with mode: 0644]
Scripts/intltool.sh [new file with mode: 0644]
Scripts/jack.sh [new file with mode: 0644]
Scripts/jpeg.sh [new file with mode: 0644]
Scripts/ladspa.sh [new file with mode: 0644]
Scripts/libtool.sh [new file with mode: 0644]
Scripts/lilv.sh [new file with mode: 0644]
Scripts/lo.sh [new file with mode: 0644]
Scripts/lrdf.sh [new file with mode: 0644]
Scripts/lv2.sh [new file with mode: 0644]
Scripts/nanomsg.sh [new file with mode: 0644]
Scripts/nettle.sh [new file with mode: 0644]
Scripts/ogg.sh [new file with mode: 0644]
Scripts/openssl.sh [new file with mode: 0644]
Scripts/pango.sh [new file with mode: 0644]
Scripts/pangomm.sh [new file with mode: 0644]
Scripts/pixman.sh [new file with mode: 0644]
Scripts/pkg-config.sh [new file with mode: 0644]
Scripts/png.sh [new file with mode: 0644]
Scripts/quickmail.sh [new file with mode: 0644]
Scripts/raptor.sh [new file with mode: 0644]
Scripts/rtaudio.sh [new file with mode: 0644]
Scripts/rubberband.sh [new file with mode: 0644]
Scripts/samplerate.sh [new file with mode: 0644]
Scripts/serd.sh [new file with mode: 0644]
Scripts/sigc++.sh [new file with mode: 0644]
Scripts/sndfile.sh [new file with mode: 0644]
Scripts/sord.sh [new file with mode: 0644]
Scripts/soxr.sh [new file with mode: 0644]
Scripts/sratom.sh [new file with mode: 0644]
Scripts/ssh.sh [new file with mode: 0644]
Scripts/suil.sh [new file with mode: 0644]
Scripts/taglib.sh [new file with mode: 0644]
Scripts/tiff.sh [new file with mode: 0644]
Scripts/vamp-plugin-sdk.sh [new file with mode: 0644]
Scripts/vorbis.sh [new file with mode: 0644]
Scripts/vtk.sh [new file with mode: 0644]
Scripts/wxwidgets.sh [new file with mode: 0644]
Scripts/x264.sh [new file with mode: 0644]
Scripts/xerces.sh [new file with mode: 0644]
Scripts/xml++.sh [new file with mode: 0644]
Scripts/xml2.sh [new file with mode: 0644]
Scripts/xmlsec.sh [new file with mode: 0644]
Scripts/xslt.sh [new file with mode: 0644]
Scripts/zip.sh [new file with mode: 0644]
Scripts/zlib.sh [new file with mode: 0644]
build_one [new file with mode: 0644]
clean [new file with mode: 0644]
config.sh [new file with mode: 0644]
download_all [new file with mode: 0644]
env [new file with mode: 0644]
rebuild_all [new file with mode: 0644]
tools.sh [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..68847dd
--- /dev/null
@@ -0,0 +1,10 @@
+*~
+arm64
+x86_64
+Archives
+Build
+Log
+Repos
+.*.swp
+.DS_Store
+meson-*
diff --git a/Patches/aubio-32.patch b/Patches/aubio-32.patch
new file mode 100644 (file)
index 0000000..5c4be7a
--- /dev/null
@@ -0,0 +1,13 @@
+--- wscript.orig       2014-04-11 21:56:11.000000000 +0100
++++ wscript    2014-04-11 21:57:18.000000000 +0100
+@@ -103,8 +103,8 @@
+         ctx.env['cshlib_PATTERN'] = 'lib%s.dll'
+     if target_platform == 'darwin':
+-        ctx.env.CFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
+-        ctx.env.LINKFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
++        ctx.env.CFLAGS += ['-arch', 'i386']
++        ctx.env.LINKFLAGS += ['-arch', 'i386']
+         ctx.env.FRAMEWORK = ['CoreFoundation', 'AudioToolbox', 'Accelerate']
+         ctx.define('HAVE_ACCELERATE', 1)
diff --git a/Patches/aubio-64.patch b/Patches/aubio-64.patch
new file mode 100644 (file)
index 0000000..b098e05
--- /dev/null
@@ -0,0 +1,13 @@
+--- wscript.orig       2014-04-11 21:56:11.000000000 +0100
++++ wscript    2014-04-11 21:56:39.000000000 +0100
+@@ -103,8 +103,8 @@
+         ctx.env['cshlib_PATTERN'] = 'lib%s.dll'
+     if target_platform == 'darwin':
+-        ctx.env.CFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
+-        ctx.env.LINKFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
++        ctx.env.CFLAGS += ['-arch', 'x86_64']
++        ctx.env.LINKFLAGS += ['-arch', 'x86_64']
+         ctx.env.FRAMEWORK = ['CoreFoundation', 'AudioToolbox', 'Accelerate']
+         ctx.define('HAVE_ACCELERATE', 1)
diff --git a/Patches/boost-arm64.patch b/Patches/boost-arm64.patch
new file mode 100644 (file)
index 0000000..4d2f8e3
--- /dev/null
@@ -0,0 +1,25 @@
+From 456be0b7ecca065fbccf380c2f51e0985e608ba0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Aum=C3=BCller?= <aumuell@reserv.at>
+Date: Sat, 29 Aug 2020 07:02:45 +0200
+Subject: [PATCH] use '-arch arm64' for 64-bit builds using darwin.jam (#642)
+
+Even for 64-bit architectures, b2 would add '-arch arm' to the compiler
+options - but this is only valid for 32-bit arm builds.
+The problem was also observed here: https://stackoverflow.com/a/47096479
+---
+ src/tools/darwin.jam | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam
+index c28ca42b01e4f11f6e62b6b61f0a3db4af4588c6..4841cbf5c7941abc0955563bb273772672140bcb 100644
+--- a/src/tools/darwin.jam
++++ b/src/tools/darwin.jam
+@@ -502,6 +502,8 @@ rule setup-address-model ( targets * : sources * : properties * )
+         {
+             if $(instruction-set) {
+                 options = -arch$(_)$(instruction-set) ;
++            } else if $(address-model) = 64 {
++                options = -arch arm64 ;
+             } else {
+                 options = -arch arm ;
+             }
diff --git a/Patches/boost-macos-warning.patch b/Patches/boost-macos-warning.patch
new file mode 100644 (file)
index 0000000..5457022
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/boost/signals2/detail/null_output_iterator.hpp b/boost/signals2/detail/null_output_iterator.hpp
+index 9e9869591..dee4373c9 100644
+--- a/boost/signals2/detail/null_output_iterator.hpp
++++ b/boost/signals2/detail/null_output_iterator.hpp
+@@ -11,7 +11,7 @@
+ #ifndef BOOST_SIGNALS2_NULL_OUTPUT_ITERATOR_HPP
+ #define BOOST_SIGNALS2_NULL_OUTPUT_ITERATOR_HPP
+-#include <boost/function_output_iterator.hpp>
++#include <boost/iterator/function_output_iterator.hpp>
+ namespace boost
+ {
diff --git a/Patches/db.patch b/Patches/db.patch
new file mode 100644 (file)
index 0000000..398aa1d
--- /dev/null
@@ -0,0 +1,20 @@
+--- src/dbinc/atomic.h 2013-03-12 14:07:22.000000000 -0400
++++ src/dbinc/atomic.h.change  2013-03-12 14:06:35.000000000 -0400
+@@ -144,7 +144,7 @@
+ #define       atomic_inc(env, p)      __atomic_inc(p)
+ #define       atomic_dec(env, p)      __atomic_dec(p)
+ #define       atomic_compare_exchange(env, p, o, n)   \
+-      __atomic_compare_exchange((p), (o), (n))
++      __atomic_compare_exchange_db((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+       int     temp;
+@@ -176,7 +176,7 @@
+  * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+  * which configure could be changed to use.
+  */
+-static inline int __atomic_compare_exchange(
++static inline int __atomic_compare_exchange_db(
+       db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+       atomic_value_t was;
diff --git a/Patches/glib-avail-len.patch b/Patches/glib-avail-len.patch
new file mode 100644 (file)
index 0000000..8180d59
--- /dev/null
@@ -0,0 +1,121 @@
+From c1609942ea9d9ff9b04560405162fda008e38e44 Mon Sep 17 00:00:00 2001
+From: Dan Winship <danw@gnome.org>
+Date: Tue, 20 Nov 2012 04:13:29 +0000
+Subject: Revert "Return correct value for g_socket_get_available_bytes() on Windows and OSX"
+
+This neither compiles nor does what it's supposed to on Windows.
+
+This reverts commit 49ad4e9494e4497cffcf145d3515231bcf05de29.
+---
+diff --git a/gio/gsocket.c b/gio/gsocket.c
+index 1a8ed50..13dff46 100644
+--- a/gio/gsocket.c
++++ b/gio/gsocket.c
+@@ -2368,10 +2368,7 @@ g_socket_check_connect_result (GSocket  *socket,
+  * g_socket_get_available_bytes:
+  * @socket: a #GSocket
+  *
+- * Get the amount of data that can be read from the socket without
+- * blocking. In the case of datagram sockets this returns the size
+- * of the first datagram and not the sum of the sizes of all currently
+- * queued datagrams.
++ * Get the amount of data pending in the OS input buffer.
+  *
+  * Returns: the number of bytes that can be read from the socket
+  * without blocking or -1 on error.
+@@ -2385,19 +2382,15 @@ g_socket_get_available_bytes (GSocket *socket)
+   gulong avail = 0;
+ #else
+   gint avail = 0;
+-  gsize avail_len = sizeof (avail);
+ #endif
+   g_return_val_if_fail (G_IS_SOCKET (socket), -1);
+-#if defined(G_OS_WIN32)
+-  if (WSAIoctl (socket->priv->fd, FIONREAD, NULL, 0, &avail, sizeof (avail), 0, 0) == SOCKET_ERROR)
+-    return -1;
+-#elif defined(SO_NREAD)
+-  if (getsockopt (socket->priv->fd, SOL_SOCKET, SO_NREAD, &avail, &avail_len) < 0)
++#ifndef G_OS_WIN32
++  if (ioctl (socket->priv->fd, FIONREAD, &avail) < 0)
+     return -1;
+ #else
+-  if (ioctl (socket->priv->fd, FIONREAD, &avail) < 0)
++  if (ioctlsocket (socket->priv->fd, FIONREAD, &avail) == SOCKET_ERROR)
+     return -1;
+ #endif
+diff --git a/gio/tests/socket.c b/gio/tests/socket.c
+index 3790415..0a61c9f 100644
+--- a/gio/tests/socket.c
++++ b/gio/tests/socket.c
+@@ -813,58 +813,6 @@ test_unix_connection_ancillary_data (void)
+ }
+ #endif /* G_OS_UNIX */
+-static void
+-test_datagram_get_available (void)
+-{
+-  GError *err = NULL;
+-  GSocket *server, *client;
+-  GInetAddress *addr;
+-  GSocketAddress *saddr;
+-  gchar data[] = "0123456789abcdef";
+-
+-  server = g_socket_new (G_SOCKET_FAMILY_IPV4,
+-                                G_SOCKET_TYPE_DATAGRAM,
+-                                G_SOCKET_PROTOCOL_DEFAULT,
+-                                &err);
+-  g_assert_no_error (err);
+-  g_assert (G_IS_SOCKET (server));
+-
+-  client = g_socket_new (G_SOCKET_FAMILY_IPV4,
+-                       G_SOCKET_TYPE_DATAGRAM,
+-                       G_SOCKET_PROTOCOL_DEFAULT,
+-                       &err);
+-  g_assert_no_error (err);
+-  g_assert (G_IS_SOCKET (client));
+-
+-  addr = g_inet_address_new_any (G_SOCKET_FAMILY_IPV4);
+-  saddr = g_inet_socket_address_new (addr, 0);
+-
+-  g_socket_bind (server, saddr, TRUE, &err);
+-  g_assert_no_error (err);
+-  g_object_unref (saddr);
+-  g_object_unref (addr);
+-
+-  saddr = g_socket_get_local_address (server, &err);
+-  g_assert_no_error (err);
+-
+-  g_socket_send_to (client, saddr, data, sizeof (data), NULL, &err);
+-  g_assert_no_error (err);
+-
+-  g_assert_cmpint (g_socket_get_available_bytes (server), ==, sizeof (data));
+-
+-  g_socket_send_to (client, saddr, data, sizeof (data), NULL, &err);
+-  g_assert_no_error (err);
+-
+-  g_assert_cmpint (g_socket_get_available_bytes (server), ==, sizeof (data));
+-
+-  g_socket_close (server, &err);
+-  g_assert_no_error (err);
+-
+-  g_object_unref (saddr);
+-  g_object_unref (server);
+-  g_object_unref (client);
+-}
+-
+ int
+ main (int   argc,
+       char *argv[])
+@@ -887,7 +835,6 @@ main (int   argc,
+   g_test_add_func ("/socket/unix-connection", test_unix_connection);
+   g_test_add_func ("/socket/unix-connection-ancillary-data", test_unix_connection_ancillary_data);
+ #endif
+-  g_test_add_func ("/socket/datagram_get_available", test_datagram_get_available);
+   return g_test_run();
+ }
+--
+cgit v0.9.2
diff --git a/Patches/glib-iconv.patch b/Patches/glib-iconv.patch
new file mode 100644 (file)
index 0000000..51603a0
--- /dev/null
@@ -0,0 +1,11 @@
+--- glib/gconvert.c.orig       2013-05-29 15:24:56.000000000 +0100
++++ glib/gconvert.c    2013-05-29 15:24:59.000000000 +0100
+@@ -62,7 +62,7 @@
+ #error GNU libiconv in use but included iconv.h not from libiconv
+ #endif
+ #if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)
+-#error GNU libiconv not in use but included iconv.h is from libiconv
++//#error GNU libiconv not in use but included iconv.h is from libiconv
+ #endif
diff --git a/Patches/glib-meson.patch b/Patches/glib-meson.patch
new file mode 100644 (file)
index 0000000..ab74b87
--- /dev/null
@@ -0,0 +1,36 @@
+--- meson.build.orig   2020-12-27 00:03:18.000000000 +0100
++++ meson.build        2020-12-27 00:15:23.000000000 +0100
+@@ -730,33 +730,13 @@
+ glib_have_carbon = false
+ glib_have_cocoa = false
+ if host_system == 'darwin'
+-  add_languages('objc')
+-  objcc = meson.get_compiler('objc')
+-
+   osx_ldflags += ['-Wl,-framework,CoreFoundation']
+-  # Mac OS X Carbon support
+-  glib_have_carbon = objcc.compiles('''#include <Carbon/Carbon.h>
+-                                       #include <CoreServices/CoreServices.h>''',
+-                                    name : 'Mac OS X Carbon support')
+-
+   if glib_have_carbon
+     glib_conf.set('HAVE_CARBON', true)
+     osx_ldflags += '-Wl,-framework,Carbon'
+-    glib_have_os_x_9_or_later = objcc.compiles('''#include <AvailabilityMacros.h>
+-                                                  #if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
+-                                                  #error Compiling for minimum OS X version before 10.9
+-                                                  #endif''',
+-                                               name : 'OS X 9 or later')
+   endif
+-  # Mac OS X Cocoa support
+-  glib_have_cocoa = objcc.compiles('''#include <Cocoa/Cocoa.h>
+-                                      #ifdef GNUSTEP_BASE_VERSION
+-                                      #error "Detected GNUstep, not Cocoa"
+-                                      #endif''',
+-                                   name : 'Mac OS X Cocoa support')
+-
+   if glib_have_cocoa
+     glib_conf.set('HAVE_COCOA', true)
+     osx_ldflags += ['-Wl,-framework,Foundation', '-Wl,-framework,AppKit']
diff --git a/Patches/jack-2.patch b/Patches/jack-2.patch
new file mode 100644 (file)
index 0000000..9969083
--- /dev/null
@@ -0,0 +1,29 @@
+--- libjack/client.c.orig      2014-04-16 19:54:39.000000000 +0100
++++ libjack/client.c   2014-04-16 19:54:48.000000000 +0100
+@@ -168,7 +168,7 @@
+       }
+       if (fgets (buf, sizeof (buf), in) == NULL) {
+-              fclose (in);
++              pclose (in);
+               free (pathcopy);
+               return -1;
+       }
+@@ -177,7 +177,7 @@
+       if (buf[len-1] != '\n') {
+               /* didn't get a whole line */
+-              fclose (in);
++              pclose (in);
+               free (pathcopy);
+               return -1;
+       }
+@@ -190,7 +190,7 @@
+       memcpy (jack_tmpdir, buf, len-1);
+       jack_tmpdir[len-1] = '\0';
+       
+-      fclose (in);
++      pclose (in);
+       free (pathcopy);
+       return 0;
diff --git a/Patches/jack.patch b/Patches/jack.patch
new file mode 100644 (file)
index 0000000..430671f
--- /dev/null
@@ -0,0 +1,11 @@
+--- drivers/coreaudio/Makefile.orig    2014-04-12 12:20:12.000000000 +0100
++++ drivers/coreaudio/Makefile 2014-04-12 12:20:14.000000000 +0100
+@@ -249,7 +249,7 @@
+ top_builddir = ../..
+ top_srcdir = ../..
+ MAINTAINERCLEANFILES = Makefile.in
+-AM_CFLAGS = $(JACK_CFLAGS) -include /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h
++AM_CFLAGS = $(JACK_CFLAGS) -include /Users/carl/SDK/MacOSX10.6.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Headers/Carbon.h
+ plugindir = $(ADDON_DIR)
+ plugin_LTLIBRARIES = jack_coreaudio.la
+ jack_coreaudio_la_LDFLAGS = -module -avoid-version -framework CoreAudio -framework CoreServices -framework AudioUnit
diff --git a/Patches/openssl-arm64.patch b/Patches/openssl-arm64.patch
new file mode 100644 (file)
index 0000000..0603fb6
--- /dev/null
@@ -0,0 +1,28 @@
+From 4907cf01f63cc966a40d67eb2e030c4d8eb1d528 Mon Sep 17 00:00:00 2001
+From: Stuart Carnie <stuart.carnie@gmail.com>
+Date: Sat, 4 Jul 2020 11:41:43 -0700
+Subject: [PATCH] Configuration: darwin64-arm64-cc for Apple silicon
+
+---
+ Configurations/10-main.conf | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
+index 3b07731db8fc..fdcdb6a51425 100644
+--- a/Configurations/10-main.conf
++++ b/Configurations/10-main.conf
+@@ -1557,6 +1557,14 @@ my %targets = (
+         bn_ops           => "SIXTY_FOUR_BIT_LONG",
+         perlasm_scheme   => "macosx",
+     },
++    "darwin64-arm64-cc" => {
++        inherit_from     => [ "darwin-common", asm("aarch64_asm") ],
++        CFLAGS           => add("-Wall"),
++        cflags           => add("-arch arm64"),
++        lib_cppflags     => add("-DL_ENDIAN"),
++        bn_ops           => "SIXTY_FOUR_BIT_LONG",
++        perlasm_scheme   => "ios64",
++    },
+ ##### GNU Hurd
+     "hurd-x86" => {
diff --git a/Patches/rubberband.patch b/Patches/rubberband.patch
new file mode 100644 (file)
index 0000000..0a29102
--- /dev/null
@@ -0,0 +1,86 @@
+--- Makefile.osx.orig  2014-04-19 17:43:23.000000000 +0100
++++ Makefile.osx       2014-04-19 17:44:21.000000000 +0100
+@@ -1,28 +1,28 @@
+ CXX           := g++
+ CC            := gcc
+-ARCHFLAGS     := 
++ARCHFLAGS     := -isysroot /Users/carl/SDK/MacOSX10.7.sdk -I$$CBS_ROOT/include -L$$CBS_ROOT/lib
+ OPTFLAGS      := -DNDEBUG -ffast-math -mfpmath=sse -msse -msse2 -O3 -ftree-vectorize
+-CXXFLAGS      := $(ARCHFLAGS) $(OPTFLAGS) -I/usr/local/include -DUSE_PTHREADS -DMALLOC_IS_ALIGNED -DHAVE_VDSP -DUSE_SPEEX -DNO_THREAD_CHECKS -DNO_TIMING -Irubberband -I. -Isrc
++CXXFLAGS      := $(ARCHFLAGS) $(OPTFLAGS) -DUSE_PTHREADS -DMALLOC_IS_ALIGNED -DHAVE_VDSP -DUSE_SPEEX -DNO_THREAD_CHECKS -DNO_TIMING -Irubberband -I. -Isrc
+ LIBRARY_LIBS          := -framework Accelerate
+ CFLAGS                := $(ARCHFLAGS) $(OPTFLAGS)
+-LDFLAGS               := $(ARCHFLAGS) -lpthread $(LDFLAGS)
++LDFLAGS               := $(ARCHFLAGS) -lpthread $(LDFLAGS) -lfftw3 -lsamplerate -lc++
+-PROGRAM_LIBS          := -L/usr/local/lib -lsndfile $(LIBRARY_LIBS)
+-VAMP_PLUGIN_LIBS      := -L/usr/local/lib -lvamp-sdk $(LIBRARY_LIBS)
++PROGRAM_LIBS          := -lsndfile $(LIBRARY_LIBS)
++VAMP_PLUGIN_LIBS      := -lvamp-sdk $(LIBRARY_LIBS)
+ LADSPA_PLUGIN_LIBS    := $(LIBRARY_LIBS)
+ MKDIR                 := mkdir
+ AR                    := ar
+-DYNAMIC_LDFLAGS               := -dynamiclib
++DYNAMIC_LDFLAGS               := -dynamiclib -shared
+ DYNAMIC_EXTENSION     := .dylib
+ PROGRAM_TARGET                := bin/rubberband
+-STATIC_TARGET                 := lib/librubberband.a
++STATIC_TARGET                 := librubberband.a
+ DYNAMIC_TARGET                := lib/librubberband$(DYNAMIC_EXTENSION)
+ VAMP_TARGET                   := lib/vamp-rubberband$(DYNAMIC_EXTENSION)
+ LADSPA_TARGET                 := lib/ladspa-rubberband$(DYNAMIC_EXTENSION)
+@@ -130,10 +130,10 @@
+       $(CXX) $(DYNAMIC_LDFLAGS) $^ -o $@ $(LIBRARY_LIBS) $(LDFLAGS)
+ $(VAMP_TARGET):               $(LIBRARY_OBJECTS) $(VAMP_OBJECTS)
+-      $(CXX) $(VAMP_LDFLAGS) -o $@ $^ $(VAMP_PLUGIN_LIBS) $(LDFLAGS)
++      $(CXX) $(DYNAMIC_LDFLAGS) -o $@ $^ $(VAMP_PLUGIN_LIBS) $(LDFLAGS)
+ $(LADSPA_TARGET):     $(LIBRARY_OBJECTS) $(LADSPA_OBJECTS)
+-      $(CXX) $(LADSPA_LDFLAGS) -o $@ $^ $(LADSPA_PLUGIN_LIBS) $(LDFLAGS)
++      $(CXX) $(DYNAMIC_LDFLAGS) -o $@ $^ $(LADSPA_PLUGIN_LIBS) $(LDFLAGS)
+ bin:
+       $(MKDIR) $@
+@@ -149,7 +149,33 @@
+ depend:
+       makedepend -Y $(LIBRARY_SOURCES) $(PROGRAM_SOURCES)
+-
++INSTALL_BINDIR                := $$CBS_ROOT/bin
++INSTALL_INCDIR                := $$CBS_ROOT/include/rubberband
++INSTALL_LIBDIR                := $$CBS_ROOT/lib
++INSTALL_VAMPDIR               := $$CBS_ROOT/lib/vamp
++INSTALL_LADSPADIR     := $$CBS_ROOT/lib/ladspa
++INSTALL_LRDFDIR               := $$CBS_ROOT/share/ladspa/rdf
++INSTALL_PKGDIR                := $$CBS_ROOT/lib/pkgconfig
++
++install:      all
++      $(MKDIR) -p $(DESTDIR)$(INSTALL_BINDIR)
++      $(MKDIR) -p $(DESTDIR)$(INSTALL_INCDIR)
++      $(MKDIR) -p $(DESTDIR)$(INSTALL_LIBDIR)
++      $(MKDIR) -p $(DESTDIR)$(INSTALL_VAMPDIR)
++      $(MKDIR) -p $(DESTDIR)$(INSTALL_LADSPADIR)
++      $(MKDIR) -p $(DESTDIR)$(INSTALL_LRDFDIR)
++      $(MKDIR) -p $(DESTDIR)$(INSTALL_PKGDIR)
++      cp $(PROGRAM_TARGET) $(DESTDIR)$(INSTALL_BINDIR)
++      cp $(PUBLIC_INCLUDES) $(DESTDIR)$(INSTALL_INCDIR)
++      cp $(STATIC_TARGET) $(DESTDIR)$(INSTALL_LIBDIR)
++      cp $(DYNAMIC_TARGET) $(DESTDIR)$(INSTALL_LIBDIR)/$(DYNAMIC_LIBNAME)$(DYNAMIC_FULL_VERSION)
++      cp $(VAMP_TARGET) $(DESTDIR)$(INSTALL_VAMPDIR)
++      cp vamp/vamp-rubberband.cat $(DESTDIR)$(INSTALL_VAMPDIR)
++      cp $(LADSPA_TARGET) $(DESTDIR)$(INSTALL_LADSPADIR)
++      cp ladspa/ladspa-rubberband.cat $(DESTDIR)$(INSTALL_LADSPADIR)
++      cp ladspa/ladspa-rubberband.rdf $(DESTDIR)$(INSTALL_LRDFDIR)
++      sed "s,%PREFIX%,$$CBS_ROOT," rubberband.pc.in \
++        > $(DESTDIR)$(INSTALL_PKGDIR)/rubberband.pc
+ # DO NOT DELETE
+ src/rubberband-c.o: rubberband/rubberband-c.h
diff --git a/Patches/sndfile-disable-examples.patch b/Patches/sndfile-disable-examples.patch
new file mode 100644 (file)
index 0000000..42f3003
--- /dev/null
@@ -0,0 +1,13 @@
+--- Makefile.in.orig   2013-06-16 14:30:48.000000000 +0100
++++ Makefile.in        2013-06-16 14:31:00.000000000 +0100
+@@ -320,8 +320,8 @@
+ top_srcdir = @top_srcdir@
+ DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
+ @BUILD_OCTAVE_MOD_TRUE@octave_dir = Octave
+-SUBDIRS = M4 man doc Win32 src $(octave_dir) examples regtest tests programs
+-DIST_SUBDIRS = M4 man doc Win32 src Octave examples regtest tests programs
++SUBDIRS = M4 man doc Win32 src $(octave_dir)
++DIST_SUBDIRS = M4 man doc Win32 src Octave
+ EXTRA_DIST = libsndfile.spec.in sndfile.pc.in
+ CLEANFILES = *~
+ pkgconfigdir = $(libdir)/pkgconfig
diff --git a/Patches/sndfile-link.patch b/Patches/sndfile-link.patch
new file mode 100644 (file)
index 0000000..9f036ba
--- /dev/null
@@ -0,0 +1,11 @@
+--- configure.orig     2016-01-06 22:30:39.000000000 +0000
++++ configure  2016-01-06 22:31:29.000000000 +0000
+@@ -18497,7 +18497,7 @@
+               enable_external_libs=yes
+               EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS"
+-              EXTERNAL_LIBS="$FLAC_LIBS $VORBISENC_LIBS $SPEEX_LIBS"
++              EXTERNAL_LIBS="$FLAC_LIBS $VORBISENC_LIBS $VORBIS_LIBS $OGG_LIBS $SPEEX_LIBS"
+       else
+               echo
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** One or more of the external libraries (ie libflac, libogg and" >&5
diff --git a/Patches/sndfile-unnecessary-include.patch b/Patches/sndfile-unnecessary-include.patch
new file mode 100644 (file)
index 0000000..c8c4703
--- /dev/null
@@ -0,0 +1,10 @@
+--- programs/sndfile-play.orig 2013-05-29 00:37:40.000000000 +0100
++++ programs/sndfile-play.c    2013-05-29 00:37:52.000000000 +0100
+@@ -58,7 +58,6 @@
+       #include        <sys/soundcard.h>
+ #elif (defined (__MACH__) && defined (__APPLE__))
+-      #include <Carbon.h>
+       #include <CoreAudio/AudioHardware.h>
+ #elif defined (HAVE_SNDIO_H)
diff --git a/Patches/vamp-plugin-sdk-32.patch b/Patches/vamp-plugin-sdk-32.patch
new file mode 100644 (file)
index 0000000..21e6d54
--- /dev/null
@@ -0,0 +1,24 @@
+--- build/Makefile.osx.orig    2014-04-19 16:35:50.000000000 +0100
++++ build/Makefile.osx 2014-04-19 16:36:42.000000000 +0100
+@@ -65,7 +65,7 @@
+ # Our default is to try to build for all architectures supported by
+ # the MINVERSION in a universal binary.
+ #
+-ARCHFLAGS = -mmacosx-version-min=$(MINVERSION) -arch x86_64 -arch i386
++ARCHFLAGS = -mmacosx-version-min=$(MINVERSION) -arch i386
+ # Compile flags
+ #
+@@ -108,10 +108,9 @@
+ # hidden except for the public entry point (making for a tidier library).
+ #
+ PLUGIN_LDFLAGS                = $(DYNAMIC_LDFLAGS) \
+-                        -install_name vamp-example-plugins.dylib \
+                         -exported_symbols_list build/vamp-plugin.list
+-SDK_DYNAMIC_LDFLAGS   = $(DYNAMIC_LDFLAGS) -install_name libvamp-sdk.dylib
+-HOSTSDK_DYNAMIC_LDFLAGS       = $(DYNAMIC_LDFLAGS) -install_name libvamp-hostsdk.dylib
++SDK_DYNAMIC_LDFLAGS   = $(DYNAMIC_LDFLAGS)
++HOSTSDK_DYNAMIC_LDFLAGS       = $(DYNAMIC_LDFLAGS)
+ ### End of user-serviceable parts
diff --git a/Patches/vamp-plugin-sdk-64.patch b/Patches/vamp-plugin-sdk-64.patch
new file mode 100644 (file)
index 0000000..55782b2
--- /dev/null
@@ -0,0 +1,24 @@
+--- build/Makefile.osx.orig    2014-04-19 16:35:50.000000000 +0100
++++ build/Makefile.osx 2014-04-19 16:36:16.000000000 +0100
+@@ -65,7 +65,7 @@
+ # Our default is to try to build for all architectures supported by
+ # the MINVERSION in a universal binary.
+ #
+-ARCHFLAGS = -mmacosx-version-min=$(MINVERSION) -arch x86_64 -arch i386
++ARCHFLAGS = -mmacosx-version-min=$(MINVERSION) -arch x86_64
+ # Compile flags
+ #
+@@ -108,10 +108,9 @@
+ # hidden except for the public entry point (making for a tidier library).
+ #
+ PLUGIN_LDFLAGS                = $(DYNAMIC_LDFLAGS) \
+-                        -install_name vamp-example-plugins.dylib \
+                         -exported_symbols_list build/vamp-plugin.list
+-SDK_DYNAMIC_LDFLAGS   = $(DYNAMIC_LDFLAGS) -install_name libvamp-sdk.dylib
+-HOSTSDK_DYNAMIC_LDFLAGS       = $(DYNAMIC_LDFLAGS) -install_name libvamp-hostsdk.dylib
++SDK_DYNAMIC_LDFLAGS   = $(DYNAMIC_LDFLAGS)
++HOSTSDK_DYNAMIC_LDFLAGS       = $(DYNAMIC_LDFLAGS)
+ ### End of user-serviceable parts
diff --git a/Patches/wxwidgets-change-install-names.patch b/Patches/wxwidgets-change-install-names.patch
new file mode 100644 (file)
index 0000000..ba21646
--- /dev/null
@@ -0,0 +1,11 @@
+--- configure.orig     2021-01-01 21:20:21.000000000 +0100
++++ configure  2021-01-01 21:28:22.000000000 +0100
+@@ -29229,7 +29229,7 @@
+             DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
+             cat <<EOF >change-install-names
+ #!/bin/sh
+-libnames=\`cd \${1} ; ls -1 | grep '\.[0-9][0-9]*\.dylib\$'\`
++libnames=\`find \${1} -mindepth 1 -type f -iname "libwx*.dylib" ! -type l -exec basename {} \;\`
+ changes=''
+ for dep in \${libnames} ; do
+     changes="\${changes} -change \${4}/\${dep} \${3}/\${dep}"
diff --git a/Patches/wxwidgets-checkbox-colours.patch b/Patches/wxwidgets-checkbox-colours.patch
new file mode 100644 (file)
index 0000000..7ef46eb
--- /dev/null
@@ -0,0 +1,108 @@
+--- src/osx/cocoa/window.mm.orig       2018-01-05 11:08:33.000000000 +0000
++++ src/osx/cocoa/window.mm    2018-01-05 11:11:17.000000000 +0000
+@@ -2444,6 +2444,63 @@
+ void wxWidgetCocoaImpl::SetLabel( const wxString& title, wxFontEncoding encoding )
+ {
++    if ( [m_osxView respondsToSelector:@selector(setAttributedTitle:) ] )
++    {
++        wxFont f = GetWXPeer()->GetFont();
++        // we should not override system font colors unless explicitly specified
++        wxColour col = GetWXPeer()->UseFgCol() ? GetWXPeer()->GetForegroundColour() : wxNullColour;
++        if ( f.GetStrikethrough() || f.GetUnderlined() || col.IsOk() )
++        {
++            wxCFStringRef cf(title, encoding );
++
++            NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]
++                                                     initWithString:cf.AsNSString()];
++
++            [attrString beginEditing];
++
++            NSTextAlignment textAlign;
++            if ( [m_osxView isKindOfClass:[NSControl class]] )
++                textAlign = [(id)m_osxView alignment];
++            else
++                textAlign = NSCenterTextAlignment;
++            [attrString setAlignment:textAlign
++                               range:NSMakeRange(0, [attrString length])];
++
++            [attrString addAttribute:NSFontAttributeName
++                               value:f.OSXGetNSFont()
++                               range:NSMakeRange(0, [attrString length])];
++            if ( f.GetStrikethrough() )
++            {
++                [attrString addAttribute:NSStrikethroughStyleAttributeName
++                                   value:@(NSUnderlineStyleSingle)
++                                   range:NSMakeRange(0, [attrString length])];
++            }
++
++            if ( f.GetUnderlined() )
++            {
++                [attrString addAttribute:NSUnderlineStyleAttributeName
++                                   value:@(NSUnderlineStyleSingle)
++                                   range:NSMakeRange(0, [attrString length])];
++
++            }
++
++            if ( col.IsOk() )
++            {
++                [attrString addAttribute:NSForegroundColorAttributeName
++                                   value:col.OSXGetNSColor()
++                                   range:NSMakeRange(0, [attrString length])];
++            }
++
++            [attrString endEditing];
++
++            [(id)m_osxView setAttributedTitle:attrString];
++            
++            [attrString release];
++
++            return;
++        }
++    }
++
+     if ( [m_osxView respondsToSelector:@selector(setTitle:) ] )
+     {
+         wxCFStringRef cf( title , encoding );
+@@ -2683,13 +2740,13 @@
+     if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
+         targetView = [(NSScrollView*) m_osxView documentView];
++
+     if ([targetView respondsToSelector:@selector(setFont:)])
+         [targetView setFont: font.OSXGetNSFont()];
+     if ([targetView respondsToSelector:@selector(setTextColor:)])
+-        [targetView setTextColor:[NSColor colorWithCalibratedRed:(CGFloat) (col.Red() / 255.0)
+-                                                                 green:(CGFloat) (col.Green() / 255.0)
+-                                                                  blue:(CGFloat) (col.Blue() / 255.0)
+-                                                                 alpha:(CGFloat) (col.Alpha() / 255.0)]];
++        [targetView setTextColor: col.OSXGetNSColor()];
++    if ([m_osxView respondsToSelector:@selector(setAttributedTitle:)])
++        SetLabel(wxStripMenuCodes(GetWXPeer()->GetLabel(), wxStrip_Mnemonics), GetWXPeer()->GetFont().GetEncoding());
+ }
+ void wxWidgetCocoaImpl::SetToolTip(wxToolTip* tooltip)
+--- include/wx/window.h.orig   2018-01-05 11:38:33.000000000 +0000
++++ include/wx/window.h        2018-01-05 11:38:59.000000000 +0000
+@@ -1089,6 +1089,10 @@
+     {
+         return m_hasBgCol;
+     }
++    bool UseFgCol() const
++    {
++        return m_hasFgCol;
++    }
+     virtual bool SetForegroundColour(const wxColour& colour);
+     void SetOwnForegroundColour(const wxColour& colour)
+--- interface/wx/window.h.orig 2018-01-05 11:37:43.000000000 +0000
++++ interface/wx/window.h      2018-01-05 11:38:18.000000000 +0000
+@@ -2060,6 +2060,8 @@
+     */
+     bool UseBgCol() const;
++    bool UseFgCol() const;
++
+     /**
+         Sets the font of the window but prevents it from being inherited by the
+         children of this window.
diff --git a/Patches/wxwidgets-host-suffix.patch b/Patches/wxwidgets-host-suffix.patch
new file mode 100644 (file)
index 0000000..229fc4a
--- /dev/null
@@ -0,0 +1,24 @@
+--- configure.orig     2020-12-29 23:46:50.000000000 +0100
++++ configure  2020-12-29 23:47:14.000000000 +0100
+@@ -3901,7 +3901,8 @@
+ if test "$cross_compiling" != "no"; then
+     HOST_PREFIX="${host_alias}-"
+-    HOST_SUFFIX="-$host_alias"
++#    HOST_SUFFIX="-$host_alias"
++    HOST_SUFFIX=""
+ else
+     HOST_PREFIX=
+     HOST_SUFFIX=
+--- wx-config.in.orig  2021-01-01 13:12:35.000000000 +0100
++++ wx-config.in       2021-01-01 13:14:10.000000000 +0100
+@@ -1113,7 +1113,8 @@
+             _libname="@WX_LIBRARY_BASENAME_GUI@"
+         fi
+         [ $lib = base ] || _libname="${_libname}_$lib"
+-        _libname="${_libname}-@WX_RELEASE@$_target"
++        #_libname="${_libname}-@WX_RELEASE@$_target"
++        _libname="${_libname}-@WX_RELEASE@"
+         if is_static; then
+             _wxlibs="$_wxlibs ${libdir}/lib${_libname}.a"
diff --git a/Patches/wxwidgets-osx-zorder.patch b/Patches/wxwidgets-osx-zorder.patch
new file mode 100644 (file)
index 0000000..b956b2c
--- /dev/null
@@ -0,0 +1,13 @@
+Index: src/osx/dialog_osx.cpp
+===================================================================
+--- src/osx/dialog_osx.cpp     (revision 3f66f6a5b3583b02c34854556eb83e3a808524ce)
++++ src/osx/dialog_osx.cpp     (revision 2fa4a0be4ecd4169aa655f296733fe6ca99048e2)
+@@ -179,4 +179,8 @@
+     SetReturnCode(retCode);
+     Show(false);
++
++    // Prevent app frame from taking z-order precedence
++    if( GetParent() )
++        GetParent()->Raise();
+ }
diff --git a/Patches/wxwidgets-ru-advanced.patch b/Patches/wxwidgets-ru-advanced.patch
new file mode 100644 (file)
index 0000000..dbb9a79
--- /dev/null
@@ -0,0 +1,19 @@
+commit af22b982346717ff77fdd3601bd6b5048b2d75c9
+Author: Carl Hetherington <cth@carlh.net>
+Date:   Sun Mar 8 09:24:22 2015 +0000
+
+    ru translation for 'Advanced'
+
+diff --git a/locale/ru.po b/locale/ru.po
+index f22848b..d58fe30 100644
+--- a/locale/ru.po
++++ b/locale/ru.po
+@@ -1229,7 +1229,7 @@ msgstr "Добавление вкус не utxt"
+ #: ../src/common/preferencescmn.cpp:41
+ msgid "Advanced"
+-msgstr ""
++msgstr "Продвинутые"
+ #: ../src/richtext/richtextliststylepage.cpp:435
+ msgid "After a paragraph:"
diff --git a/Patches/xerces-cross-compile.patch b/Patches/xerces-cross-compile.patch
new file mode 100644 (file)
index 0000000..8a29e0e
--- /dev/null
@@ -0,0 +1,120 @@
+--- configure.old      2020-12-22 20:13:42.000000000 +0100
++++ configure  2020-12-22 20:09:21.000000000 +0100
+@@ -18540,117 +18540,16 @@
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcsrtombs" >&5
+-$as_echo_n "checking for wcsrtombs... " >&6; }
+-if test "$cross_compiling" = yes; then :
+-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h.  */
+-#include <wchar.h>
+-#include <string.h>
+-int
+-main ()
+-{
+-
+-mbstate_t st;
+-memset(&st, 0, sizeof(st));
+-char buffer[32];
+-const wchar_t* src=L"help";
+-wcsrtombs(buffer, &src, 32, &st);
+-if(src==0)
+-    return 0;
+-else
+-    return 1;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-if ac_fn_cxx_try_run "$LINENO"; then :
+-
+-                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+-$as_echo "yes" >&6; }
+-
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_WCSRTOMBS 1
+ _ACEOF
+-
+-
+-else
+-
+-                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_WCSRTOMBS 0
+-_ACEOF
+-
+-
+-
+-fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+   conftest.$ac_objext conftest.beam conftest.$ac_ext
+-fi
+-
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbsrtowcs" >&5
+-$as_echo_n "checking for mbsrtowcs... " >&6; }
+-if test "$cross_compiling" = yes; then :
+-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h.  */
+-#include <wchar.h>
+-#include <string.h>
+-int
+-main ()
+-{
+-
+-mbstate_t st;
+-memset(&st, 0, sizeof(st));
+-wchar_t buffer[32];
+-const char* src="help";
+-mbsrtowcs(buffer, &src, 32, &st);
+-if(src==0)
+-    return 0;
+-else
+-    return 1;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-if ac_fn_cxx_try_run "$LINENO"; then :
+-
+-                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+-$as_echo "yes" >&6; }
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_MBSRTOWCS 1
+ _ACEOF
+-
+-else
+-
+-                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_MBSRTOWCS 0
+-_ACEOF
+-
+-
+-
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+-fi
+-
+-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if iconv uses const pointers" >&5
+ $as_echo_n "checking if iconv uses const pointers... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/Scripts/art.sh b/Scripts/art.sh
new file mode 100644 (file)
index 0000000..12c03b8
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/libart_lgpl-2.3.20.tar.gz
+cd libart_lgpl-2.3.20
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/atk.sh b/Scripts/atk.sh
new file mode 100644 (file)
index 0000000..dc600a6
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/atk-2.12.0.tar.xz
+cd atk-2.12.0
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --disable-modular-tests --prefix=$CBS_ROOT --with-iconv=no --disable-dependency-tracking
+PATH=$PATH:$CBS_ROOT/bin make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/atkmm.sh b/Scripts/atkmm.sh
new file mode 100644 (file)
index 0000000..4784448
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/atkmm-2.22.7.tar.xz
+cd atkmm-2.22.7
+CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" \
+    CXX=$CBS_CXX CXXFLAGS="$CBS_OSX_FLAGS -I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS" \
+    ./configure --prefix=$CBS_ROOT --disable-dependency-tracking
+PATH=$PATH:$CBS_ROOT/bin make $CBS_PARALLEL
+make install
diff --git a/Scripts/aubio.sh b/Scripts/aubio.sh
new file mode 100644 (file)
index 0000000..bab4409
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+set -e
+
+tar xjf $CBS_ARCHIVES/aubio-0.4.1.tar.bz2
+cd aubio-0.4.1
+if [ "$CBS_VARIANT" == "32" ]; then
+  patch -p0 < $CBS_PATCHES/aubio-32.patch
+else
+  patch -p0 < $CBS_PATCHES/aubio-64.patch
+fi
+./waf configure --prefix=$CBS_ROOT build install
+
diff --git a/Scripts/boost.sh b/Scripts/boost.sh
new file mode 100644 (file)
index 0000000..caf3154
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash -e
+
+tar xjf $CBS_ARCHIVES/boost_1_74_0.tar.bz2
+cd boost_1_74_0
+patch -p1 < $CBS_PATCHES/boost-macos-warning.patch
+pushd tools/build
+patch -p1 < $CBS_PATCHES/boost-arm64.patch
+popd
+
+./bootstrap.sh --without-icu --without-libraries=context,python,mpi,fiber,coroutine,container
+
+if [ "$CBS_CLANG_ARCH" == "x86_64" ]; then
+  short_arch=x86
+  long_arch=x86_64
+else
+  short_arch=arm
+  long_arch=arm64
+fi
+
+cat <<EOF > user-config.jam
+using darwin :
+: clang++ 
+: <address-model>$short_arch
+  <architecture>$long_arch
+  <toolset>clang
+;
+EOF
+
+./b2 --prefix=$CBS_ROOT $CBS_PARALLEL --user-config=user-config.jam install threading=multi \
+  cxxflags="-std=c++14 -stdlib=libc++ $CBS_OSX_FLAGS" \
+  linkflags="-stdlib=libc++ $CBS_OSX_FLAGS"
diff --git a/Scripts/cairo.sh b/Scripts/cairo.sh
new file mode 100644 (file)
index 0000000..15224e6
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/cairo-1.16.0.tar.xz
+cd cairo-1.16.0
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS -Wno-enum-conversion" CPPFLAGS="-I$CBS_ROOT/include" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT --disable-dependency-tracking \
+    --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/cairomm.sh b/Scripts/cairomm.sh
new file mode 100644 (file)
index 0000000..d49b139
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/cairomm-1.14.2.tar.xz
+cd cairomm-1.14.2
+
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+  cat > cross_file.txt <<EOF
+[host_machine]
+system = 'darwin'
+cpu_family = 'aarch64'
+cpu = 'arm'
+endian = 'little'
+[binaries]
+pkgconfig = 'pkg-config'
+cmake = 'cmake'
+EOF
+  cross_file="--cross-file cross_file.txt"
+fi
+
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CXX=$CBS_CXX CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include" \
+    CXXFLAGS="$CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    $MESON setup builddir $cross_file --prefix=$CBS_ROOT
+$CBS_BUILD_BIN/ninja -C builddir install
+
diff --git a/Scripts/curl.sh b/Scripts/curl.sh
new file mode 100644 (file)
index 0000000..b20406b
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xjf $CBS_ARCHIVES/curl-7.32.0.tar.bz2
+cd curl-7.32.0
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/db.sh b/Scripts/db.sh
new file mode 100644 (file)
index 0000000..b11a1ae
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/db-6.1.19.tar.gz
+cd db-6.1.19
+#patch src/dbinc/atomic.h < $CBS_PATCHES/db.patch
+cd build_unix
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ../dist/configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/expat.sh b/Scripts/expat.sh
new file mode 100644 (file)
index 0000000..e41d169
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/expat-2.2.10.tar.xz
+cd expat-2.2.10
+CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS -O2 -I$CBS_ROOT/include -L$CBS_ROOT/lib" LDFLAGS="$CBS_OSX_FLAGS" \
+    ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/ffi.sh b/Scripts/ffi.sh
new file mode 100644 (file)
index 0000000..42cd82e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/libffi-3.3.tar.gz
+cd libffi-3.3
+
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+  host="aarch64-apple-darwin"
+else
+  host=$CBS_HOST_TRIPLE
+fi
+
+CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS -I$CBS_ROOT/include -L$CBS_ROOT/lib" LDFLAGS="$CBS_OSX_FLAGS" \
+  ./configure --prefix=$CBS_ROOT --disable-dependency-tracking --disable-debug --build=$CBS_BUILD_TRIPLE --host=$host
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/fftw.sh b/Scripts/fftw.sh
new file mode 100644 (file)
index 0000000..05414f7
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/fftw-3.3.3.tar.gz
+cd fftw-3.3.3
+
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
+
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT --enable-single
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/flac.sh b/Scripts/flac.sh
new file mode 100644 (file)
index 0000000..66353b2
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/flac-1.3.3.tar.xz
+cd flac-1.3.3
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CXX=$CBS_CXX CXXFLAGS="$CBS_OSX_FLAGS" \
+    CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/fontconfig.sh b/Scripts/fontconfig.sh
new file mode 100644 (file)
index 0000000..d1659b8
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash -e
+
+tar xjf $CBS_ARCHIVES/fontconfig-2.13.93.tar.xz
+cd fontconfig-2.13.93
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS -O2 -I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+  LDFLAGS="$CBS_OSX_FLAGS" \
+  ./configure --prefix=$CBS_ROOT --disable-docs --disable-dependency-tracking --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/freetype.sh b/Scripts/freetype.sh
new file mode 100644 (file)
index 0000000..b1bef20
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/freetype-2.10.4.tar.xz
+cd freetype-2.10.4
+CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS -I$CBS_ROOT/include" LDFLAGS="-L$CBS_ROOT/lib $CBS_OSX_FLAGS" \
+    ./configure --enable-shared --with-sysroot=$CBS_ROOT --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/gdk-pixbuf.sh b/Scripts/gdk-pixbuf.sh
new file mode 100644 (file)
index 0000000..65a3ffb
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/gdk-pixbuf-2.28.2.tar.xz
+cd gdk-pixbuf-2.28.2
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --disable-modular-tests --prefix=$CBS_ROOT --with-iconv=no --disable-dependency-tracking
+PATH=$PATH:$CBS_ROOT/bin make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/gettext.sh b/Scripts/gettext.sh
new file mode 100644 (file)
index 0000000..093633e
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/gettext-0.20.1.tar.gz
+cd gettext-0.20.1
+CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS -O2 -I$CBS_ROOT/include" \
+    CXXFLAGS="$CBS_OSX_FLAGS -O2 -I$CBS_ROOT/include" \
+    LDFLAGS="$CBS_OSX_FLAGS" \
+    am_cv_func_iconv_works=yes \
+    gl_cv_func_memchr_works=yes \
+    ac_cv_func_strnlen_working=yes \
+    ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/glib.sh b/Scripts/glib.sh
new file mode 100644 (file)
index 0000000..95718b0
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/glib-2.66.4.tar.xz
+cd glib-2.66.4
+patch -p0 < $CBS_PATCHES/glib-meson.patch
+
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+  cat > cross_file.txt <<EOF
+[host_machine]
+system = 'darwin'
+cpu_family = 'aarch64'
+cpu = 'arm'
+endian = 'little'
+[binaries]
+pkgconfig = 'pkg-config'
+cmake = 'cmake'
+EOF
+  cross_file="--cross-file cross_file.txt"
+fi
+
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CXX=$CBS_CXX CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include" \
+    CXXFLAGS="$CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    $MESON setup builddir $cross_file --prefix=$CBS_ROOT
+PATH=$PATH:$CBS_BUILD_BIN $CBS_BUILD_BIN/ninja -C builddir install
+
diff --git a/Scripts/glibmm.sh b/Scripts/glibmm.sh
new file mode 100644 (file)
index 0000000..1345134
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash -e
+
+set -e
+
+# 2.59.x needs sigc++-3 but the latest cairomm needs sigc++-2,
+# so keep this to a version which works with sigc++-2
+tar xJf $CBS_ARCHIVES/glibmm-2.58.1.tar.xz
+cd glibmm-2.58.1
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" \
+    CXX=$CBS_CXX CXXFLAGS="$CBS_OSX_FLAGS -I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS" \
+    ./configure --prefix=$CBS_ROOT --disable-dependency-tracking \
+    --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+PATH=$PATH:$CBS_ROOT/bin make $CBS_PARALLEL
+make install
diff --git a/Scripts/gnomecanvas.sh b/Scripts/gnomecanvas.sh
new file mode 100644 (file)
index 0000000..d74cf69
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xjf $CBS_ARCHIVES/libgnomecanvas-2.30.3.tar.bz2
+cd libgnomecanvas-2.30.3
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/gnomecanvasmm.sh b/Scripts/gnomecanvasmm.sh
new file mode 100644 (file)
index 0000000..a4651b2
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xjf $CBS_ARCHIVES/libgnomecanvasmm-2.26.0.tar.bz2
+cd libgnomecanvasmm-2.26.0
+CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" \
+    CXX=$CBS_CXX CXXFLAGS="$CBS_OSX_FLAGS -I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS" \
+    ./configure --prefix=$CBS_ROOT --disable-dependency-tracking
+PATH=$PATH:$CBS_ROOT/bin make $CBS_PARALLEL
+make install
diff --git a/Scripts/harfbuzz.sh b/Scripts/harfbuzz.sh
new file mode 100644 (file)
index 0000000..6ebdd4a
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash -e
+
+set -e
+
+tar xjf $CBS_ARCHIVES/harfbuzz-2.7.2.tar.xz
+cd harfbuzz-2.7.2
+
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+  cat > cross_file.txt <<EOF
+[host_machine]
+system = 'darwin'
+cpu_family = 'aarch64'
+cpu = 'arm'
+endian = 'little'
+[binaries]
+pkgconfig = 'pkg-config'
+cmake = 'cmake'
+EOF
+  cross_file="--cross-file cross_file.txt"
+fi
+
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CXX=$CBS_CXX CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include" \
+    CXXFLAGS="$CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    $MESON setup builddir $cross_file --prefix=$CBS_ROOT -Dcoretext=enabled
+PATH=$PATH:$CBS_BUILD_BIN $CBS_BUILD_BIN/ninja -C builddir install
diff --git a/Scripts/iconv.sh b/Scripts/iconv.sh
new file mode 100644 (file)
index 0000000..2e0d83e
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/libiconv-1.14.tar.gz
+cd libiconv-1.14
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" CXXFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS" ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/icu.sh b/Scripts/icu.sh
new file mode 100644 (file)
index 0000000..b45e0af
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash -e
+
+set -e
+
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+    cross_build="--with-cross-build=$CBS_BASE/Build/x86_64/icu/source"
+fi
+
+tar xJf $CBS_ARCHIVES/icu4c-68_2-src.tgz
+cd icu/source
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CXXFLAGS="$CBS_OSX_FLAGS" \
+    CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib -headerpad_max_install_names" \
+    ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE $cross_build
+
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/imagemagick.sh b/Scripts/imagemagick.sh
new file mode 100644 (file)
index 0000000..067dea8
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/ImageMagick-7.0.10-31.tar.xz
+cd ImageMagick-7.0.10-31
+
+# We get a crash in omp_get_max_threads if we have OpenMP enabled
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" \
+CPPFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" \
+    CXXFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" \
+    LDFLAGS="-L$CBS_ROOT/lib $CBS_OSX_FLAGS" \
+    ./configure --without-x --prefix=$CBS_ROOT --disable-opencl --disable-dependency-tracking --disable-openmp --with-png=yes --with-tiff=yes
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/intltool.sh b/Scripts/intltool.sh
new file mode 100644 (file)
index 0000000..f0443dc
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/intltool-0.50.2.tar.gz
+cd intltool-0.50.2
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/jack.sh b/Scripts/jack.sh
new file mode 100644 (file)
index 0000000..153aea3
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash -e
+
+set -e
+
+#rm -rf jack2
+#git clone git://github.com/jackaudio/jack2.git
+#cd jack2
+#CFLAGS="-I$CBS_ROOT/include" CXXFLAGS="-I$CBS_ROOT/include" ./waf configure --prefix=$CBS_ROOT build install
+
+tar xjf $CBS_ARCHIVES/jack-audio-connection-kit-0.124.1.tar.gz
+cd jack-audio-connection-kit-0.124.1
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    configure --prefix=$CBS_ROOT
+patch -p0 < $CBS_PATCHES/jack.patch
+patch -p0 < $CBS_PATCHES/jack-2.patch
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/jpeg.sh b/Scripts/jpeg.sh
new file mode 100644 (file)
index 0000000..c87970c
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/jpegsrc.v8d.tar.gz
+cd jpeg-8d
+./configure CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS" --prefix=$CBS_ROOT --enable-static --disable-shared \
+  --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/ladspa.sh b/Scripts/ladspa.sh
new file mode 100644 (file)
index 0000000..c45358a
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash -e
+
+set -e
+
+cp $CBS_ARCHIVES/ladspa.h $CBS_ROOT/include
+
diff --git a/Scripts/libtool.sh b/Scripts/libtool.sh
new file mode 100644 (file)
index 0000000..21daee2
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+
+tar xzf $CBS_ARCHIVES/libtool-2.4.2.tar.gz
+cd libtool-2.4.2
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" CXXFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS" \
+  ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/lilv.sh b/Scripts/lilv.sh
new file mode 100644 (file)
index 0000000..040676a
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/lilv-0.18.0.tar.bz2
+cd lilv-0.18.0
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LINKFLAGS="-L$CBS_ROOT/lib $CBS_OSX_FLAGS" ./waf configure --prefix=$CBS_ROOT
+./waf $CBS_PARALLEL
+./waf install
diff --git a/Scripts/lo.sh b/Scripts/lo.sh
new file mode 100644 (file)
index 0000000..5c94dbc
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/liblo-0.26.tar.gz
+cd liblo-0.26
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/lrdf.sh b/Scripts/lrdf.sh
new file mode 100644 (file)
index 0000000..9a4bb6b
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/lrdf-0.5.0.tar.gz
+cd LRDF-0.5.0
+bash autogen.sh
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/lv2.sh b/Scripts/lv2.sh
new file mode 100644 (file)
index 0000000..720f30d
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/lv2-1.8.0.tar.bz2
+cd lv2-1.8.0
+CXXFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LINKFLAGS="-L$CBS_ROOT/lib $CBS_OSX_FLAGS" ./waf configure --prefix=$CBS_ROOT
+./waf $CBS_PARALLEL
+./waf install
diff --git a/Scripts/nanomsg.sh b/Scripts/nanomsg.sh
new file mode 100644 (file)
index 0000000..0df9b75
--- /dev/null
@@ -0,0 +1,12 @@
+# This is being built static, for the same reasons as discussed in
+# zip.sh
+
+tar xzf $CBS_ARCHIVES/nanomsg-1.1.5.tar.gz
+mkdir nanomsg-build
+cd nanomsg-build
+CMAKE_OSX_ARCHITECTURES="$CBS_CLANG_ARCH" $CBS_CMAKE ../nanomsg-1.1.5 \
+    -DCMAKE_INSTALL_PREFIX=$CBS_ROOT -DCMAKE_OSX_SYSROOT=$CBS_MACOSX_SDK \
+    -DNN_STATIC_LIB=TRUE
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/nettle.sh b/Scripts/nettle.sh
new file mode 100644 (file)
index 0000000..ae38622
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+  assembler="--disable-assembler"
+fi
+
+tar xzf $CBS_ARCHIVES/nettle-3.6.tar.gz
+cd nettle-3.6
+CFLAGS="-O2 $CBS_OSX_FLAGS -I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+   LDFLAGS="$CBS_OSX_FLAGS" \
+   CC_FOR_BUILD="clang -Wno-implicit-function-declaration" \
+  ./configure --prefix=$CBS_ROOT --enable-static --disable-shared $assembler \
+  --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL && make install
diff --git a/Scripts/ogg.sh b/Scripts/ogg.sh
new file mode 100644 (file)
index 0000000..db47ba8
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/libogg-1.3.1.tar.gz
+cd libogg-1.3.1
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/openssl.sh b/Scripts/openssl.sh
new file mode 100644 (file)
index 0000000..68ed2cd
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/openssl-1.1.1h.tar.gz
+cd openssl-1.1.1h
+patch -p1 < $CBS_PATCHES/openssl-arm64.patch
+
+if [ "$CBS_VARIANT" == "32" ]; then
+  arch="darwin-i386-cc"
+else
+  arch="darwin64-$CBS_CLANG_ARCH-cc"
+fi
+
+CC="$CBS_CC $CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./Configure --prefix=$CBS_ROOT $arch
+
+make -j1
+make install
+
diff --git a/Scripts/pango.sh b/Scripts/pango.sh
new file mode 100644 (file)
index 0000000..21d58d0
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/pango-1.48.0.tar.xz
+cd pango-1.48.0
+
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+  cat > cross_file.txt <<EOF
+[host_machine]
+system = 'darwin'
+cpu_family = 'aarch64'
+cpu = 'arm'
+endian = 'little'
+[binaries]
+pkgconfig = 'pkg-config'
+EOF
+  cross_file="--cross-file cross_file.txt"
+fi
+
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CXX=$CBS_CXX CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    CXXFLAGS="$CBS_OSX_FLAGS -std=c++11" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    $MESON setup builddir $cross_file --prefix=$CBS_ROOT
+PATH=$PATH:$CBS_BUILD_BIN $CBS_BUILD_BIN/ninja -C builddir install
+
diff --git a/Scripts/pangomm.sh b/Scripts/pangomm.sh
new file mode 100644 (file)
index 0000000..8ab02b4
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/pangomm-2.42.2.tar.xz
+cd pangomm-2.42.2
+
+sed -i '' "9i\\
+dirs: \'$CBS_ROOT/lib\'
+" tools/extra_defs_gen/meson.build
+
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+  cat > cross_file.txt <<EOF
+[host_machine]
+system = 'darwin'
+cpu_family = 'aarch64'
+cpu = 'arm'
+endian = 'little'
+[binaries]
+pkgconfig = 'pkg-config'
+EOF
+  cross_file="--cross-file cross_file.txt"
+fi
+
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CXX=$CBS_CXX CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    CXXFLAGS="$CBS_OSX_FLAGS -std=c++11" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    $MESON setup builddir $cross_file --prefix=$CBS_ROOT
+PATH=$PATH:$CBS_BUILD_BIN $CBS_BUILD_BIN/ninja -C builddir install
+
diff --git a/Scripts/pixman.sh b/Scripts/pixman.sh
new file mode 100644 (file)
index 0000000..3ed6225
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/pixman-0.32.2.tar.gz
+cd pixman-0.32.2
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --disable-modular-tests --prefix=$CBS_ROOT --disable-dependency-tracking \
+    --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/pkg-config.sh b/Scripts/pkg-config.sh
new file mode 100644 (file)
index 0000000..4e56d74
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/pkg-config-0.29.2.tar.gz
+cd pkg-config-0.29.2
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT --with-internal-glib
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/png.sh b/Scripts/png.sh
new file mode 100644 (file)
index 0000000..03f997c
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash -e
+set -e
+
+tar xJf $CBS_ARCHIVES/libpng-1.5.13.tar.xz
+cd libpng-1.5.13
+CFLAGS="-O2 $CBS_OSX_FLAGS -I$CBS_ROOT/include -L$CBS_ROOT/lib" LDFLAGS="$CBS_OSX_FLAGS" ./configure --prefix=$CBS_ROOT --enable-static --disable-shared \
+  --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/quickmail.sh b/Scripts/quickmail.sh
new file mode 100644 (file)
index 0000000..baafbef
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/libquickmail-0.1.16.tar.xz
+cd libquickmail-0.1.16
+bash autogen.sh
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/raptor.sh b/Scripts/raptor.sh
new file mode 100644 (file)
index 0000000..4fa4ffc
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/raptor2-2.0.13.tar.gz
+cd raptor2-2.0.13
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/rtaudio.sh b/Scripts/rtaudio.sh
new file mode 100644 (file)
index 0000000..0d9bfb7
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xjf $CBS_ARCHIVES/rtaudio-4.1.2.tar.gz
+cd rtaudio-4.1.2
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    CXXFLAGS="$CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT
+PATH=$PATH:$CBS_ROOT/bin make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/rubberband.sh b/Scripts/rubberband.sh
new file mode 100644 (file)
index 0000000..ae1a504
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash -e
+
+set -e
+
+tar xjf $CBS_ARCHIVES/rubberband-1.8.1.tar.bz2
+cd rubberband-1.8.1
+patch -p0 < $CBS_PATCHES/rubberband.patch
+make $CBS_PARALLEL -f Makefile.osx static
+make -f Makefile.osx install
+
diff --git a/Scripts/samplerate.sh b/Scripts/samplerate.sh
new file mode 100644 (file)
index 0000000..9e9d4f8
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+
+set -e
+
+tar xzf $CBS_ARCHIVES/libsamplerate-0.1.8.tar.gz
+cd libsamplerate-0.1.8
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+awk '/^SUBDIRS/{gsub(/examples/, "")};{print}' < Makefile > Makefile.tmp
+mv Makefile.tmp Makefile
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/serd.sh b/Scripts/serd.sh
new file mode 100644 (file)
index 0000000..297d2e6
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/serd-0.18.2.tar.bz2
+cd serd-0.18.2
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LINKFLAGS="-L$CBS_ROOT/lib $CBS_OSX_FLAGS" ./waf configure --prefix=$CBS_ROOT
+./waf $CBS_PARALLEL
+./waf install
diff --git a/Scripts/sigc++.sh b/Scripts/sigc++.sh
new file mode 100644 (file)
index 0000000..6119ba0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash -e
+
+# cairomm-1.4.2 requires sigc++ 2.x
+tar xJf $CBS_ARCHIVES/libsigc++-2.10.6.tar.xz
+cd libsigc++-2.10.6
+
+cross=""
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+    cat > cross_file.txt <<EOF
+[host_machine]
+system = 'darwin'
+cpu_family = 'aarch64'
+cpu = 'arm'
+endian = 'little'
+[binaries]
+cmake = 'cmake'
+EOF
+    cross="--cross-file cross_file.txt"
+fi
+
+
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CXX=$CBS_CXX CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    CXXFLAGS="$CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    $MESON setup builddir $cross --prefix=$CBS_ROOT
+PATH=$PATH:$CBS_BUILD_BIN $CBS_BUILD_BIN/ninja -C builddir
+PATH=$PATH:$CBS_BUILD_BIN $CBS_BUILD_BIN/ninja -C builddir install
diff --git a/Scripts/sndfile.sh b/Scripts/sndfile.sh
new file mode 100644 (file)
index 0000000..c69fcf6
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/libsndfile-1.0.25.tar.gz
+cd libsndfile-1.0.25
+patch -p0 < $CBS_PATCHES/sndfile-unnecessary-include.patch
+patch -p0 < $CBS_PATCHES/sndfile-disable-examples.patch
+# From https://trac.macports.org/changeset/118290
+patch -p0 < $CBS_PATCHES/sndfile-link.patch
+CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS -I$CBS_ROOT/include" \
+    LDFLAGS="$CBS_OSX_FLAGS" \
+    ./configure --prefix=$CBS_ROOT --disable-dependency-tracking \
+    --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make V=1 $CBS_PARALLEL
+make install
diff --git a/Scripts/sord.sh b/Scripts/sord.sh
new file mode 100644 (file)
index 0000000..a29c017
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/sord-0.12.0.tar.bz2
+cd sord-0.12.0
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LINKFLAGS="-L$CBS_ROOT/lib $CBS_OSX_FLAGS" ./waf configure --prefix=$CBS_ROOT
+./waf $CBS_PARALLEL
+./waf install
diff --git a/Scripts/soxr.sh b/Scripts/soxr.sh
new file mode 100644 (file)
index 0000000..b14acca
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/soxr-0.1.1-Source.tar.xz
+mkdir -p soxr-build
+cd soxr-build
+CMAKE_OSX_ARCHITECTURES="$CBS_CLANG_ARCH" cmake ../soxr-0.1.1-Source -DCMAKE_INSTALL_PREFIX=$CBS_ROOT \
+  -DCMAKE_OSX_SYSROOT=$CBS_MACOSX_SDK \
+  -DBUILD_TESTS=OFF
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/sratom.sh b/Scripts/sratom.sh
new file mode 100644 (file)
index 0000000..9561368
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/sratom-0.4.4.tar.bz2
+cd sratom-0.4.4
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LINKFLAGS="-L$CBS_ROOT/lib $CBS_OSX_FLAGS" ./waf configure --prefix=$CBS_ROOT
+./waf $CBS_PARALLEL
+./waf install
diff --git a/Scripts/ssh.sh b/Scripts/ssh.sh
new file mode 100644 (file)
index 0000000..09252cf
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+VERSION=0.9.5
+
+tar xJf $CBS_ARCHIVES/libssh-${VERSION}.tar.xz
+mkdir -p libssh-build
+cd libssh-build
+CMAKE_OSX_ARCHITECTURES="$CBS_CLANG_ARCH" $CBS_CMAKE ../libssh-${VERSION} \
+  -DCMAKE_INSTALL_PREFIX=$CBS_ROOT -DCMAKE_OSX_SYSROOT=$CBS_MACOSX_SDK \
+  -DOPENSSL_INCLUDE_DIR=$CBS_ROOT/include \
+  -DOPENSSL_SSL_LIBRARY=$CBS_ROOT/lib/libssl.dylib -DOPENSSL_CRYPTO_LIBRARY=$CBS_ROOT/lib/libcrypto.dylib
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/suil.sh b/Scripts/suil.sh
new file mode 100644 (file)
index 0000000..a8e6a09
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/suil-0.8.0.tar.bz2
+cd suil-0.8.0
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LINKFLAGS="-L$CBS_ROOT/lib $CBS_OSX_FLAGS" ./waf configure --prefix=$CBS_ROOT
+./waf $CBS_PARALLEL
+./waf install
diff --git a/Scripts/taglib.sh b/Scripts/taglib.sh
new file mode 100644 (file)
index 0000000..d7f5107
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/taglib-1.9.1.tar.gz
+cd taglib-1.9.1
+CMAKE_OSX_ARCHITECTURES="$CBS_CLANG_ARCH" cmake . -DCMAKE_INSTALL_PREFIX=$CBS_ROOT -DCMAKE_OSX_SYSROOT="$CBS_MACOSX_SDK"
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/tiff.sh b/Scripts/tiff.sh
new file mode 100644 (file)
index 0000000..b5daddc
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/tiff-4.0.10.tar.gz
+cd tiff-4.0.10
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    CXXFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS" \
+    ./configure --prefix=$CBS_ROOT --enable-static --disable-shared \
+    --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/vamp-plugin-sdk.sh b/Scripts/vamp-plugin-sdk.sh
new file mode 100644 (file)
index 0000000..b9c9d27
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/vamp-plugin-sdk-2.5.tar.gz
+cd vamp-plugin-sdk-2.5
+patch -p0 < $CBS_PATCHES/vamp-plugin-sdk-$CBS_VARIANT.patch
+# Dynamic libs don't work for some strange reason
+make $CBS_PARALLEL -f build/Makefile.osx sdkstatic
+cp *.a $CBS_ROOT/lib
+cp -r vamp-sdk $CBS_ROOT/include
+cp -r vamp-hostsdk $CBS_ROOT/include
+cp -r vamp $CBS_ROOT/include
+sed "s,%PREFIX%,$CBS_ROOT," pkgconfig/vamp-sdk.pc.in > $CBS_ROOT/lib/pkgconfig/vamp-sdk.pc
+sed "s,%PREFIX%,$CBS_ROOT," pkgconfig/vamp-hostsdk.pc.in > $CBS_ROOT/lib/pkgconfig/vamp-hostsdk.pc
+make install
+
diff --git a/Scripts/vorbis.sh b/Scripts/vorbis.sh
new file mode 100644 (file)
index 0000000..603c085
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/libvorbis-1.3.5.tar.xz
+cd libvorbis-1.3.5
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/vtk.sh b/Scripts/vtk.sh
new file mode 100644 (file)
index 0000000..787c29f
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/bash
+set -e
+
+tar xzf $CBS_ARCHIVES/vtk-5.8.0.tar.gz
+patch -p0 < $CBS_PATCHES/vtk-2-findfreetype.patch
+patch -p0 < $CBS_PATCHES/vtk-3-compile-tools.patch
+if [ "$CBS_BITS" == "64" ]; then
+  cd VTK
+  patch -p1 < $CBS_PATCHES/vtk-msys-mingw64.patch
+  cd ..
+fi
+
+mkdir -p vtk-native-build
+cd vtk-native-build
+cmake ../VTK -DBUILD_TESTING=FALSE
+make -j $CBS_PARALLEL CompileTools
+cd ..
+
+rm -rf vtk-build
+mkdir -p vtk-build
+cd vtk-build
+
+cat > mingw.cmake <<EOF
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER $CBS_CC)
+SET(CMAKE_CXX_COMPILER $CBS_CXX)
+SET(CMAKE_RC_COMPILER $CBS_WINDRES)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH $CBS_MINGW_ROOT $CBS_ROOT)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+EOF
+
+cmake ../VTK/ \
+      -C$CBS_PATCHES/vtk-TryRunResults.cmake \
+      -DCMAKE_TOOLCHAIN_FILE=$CBS_BUILD/vtk-build/mingw.cmake \
+      -DCMAKE_INSTALL_PREFIX=$CBS_ROOT \
+      -DBUILD_TESTING=FALSE \
+      -DBUILD_SHARED_LIBS=TRUE \
+      -DVTKCompileTools_DIR=$CBS_BUILD/vtk-native-build \
+      -DVTK_USE_SYSTEM_EXPAT=TRUE \
+      -DVTK_USE_SYSTEM_FREETYPE=TRUE \
+      -DVTK_USE_SYSTEM_JPEG=TRUE \
+      -DVTK_USE_SYSTEM_LIBXML2=TRUE \
+      -DVTK_USE_SYSTEM_PNG=TRUE \
+      -DVTK_USE_SYSTEM_TIFF=TRUE \
+      -DVTK_USE_SYSTEM_ZLIB=TRUE
+
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/wxwidgets.sh b/Scripts/wxwidgets.sh
new file mode 100644 (file)
index 0000000..52c25a6
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash -e
+
+tar xjf $CBS_ARCHIVES/wxWidgets-1db3751.tar.bz2
+cd wxWidgets
+patch -p0 < $CBS_PATCHES/wxwidgets-host-suffix.patch
+# XCode 12.2's install_name_tool doesn't do the "right thing" when given a symlink;
+# it copies the file so the symlink is lost.  This screws up linking as the same
+# library is linked multiple times.  See:
+# http://mac-os-forge.2317878.n4.nabble.com/install-name-tool-problem-with-symlinks-on-Xcode-12-2-td406984.html
+patch -p0 < $CBS_PATCHES/wxwidgets-change-install-names.patch
+mkdir build-optimised
+cd build-optimised
+
+export PATH=$PATH:$CBS_BUILD_BIN
+CPPFLAGS="-I$CBS_ROOT/include" LDFLAGS="-L$CBS_ROOT/lib -lz" \
+  ../configure --prefix=$CBS_ROOT --disable-no_rtti --enable-exceptions --with-osx_cocoa --enable-prefseditor \
+  --with-macosx-version-min=$CBS_MACOSX_DEPLOYMENT --with-macosx-sdk=$CBS_MACOSX_SDK \
+  --enable-macosx-arch=$CBS_CLANG_ARCH --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make -C ../locale allmo
+make install
diff --git a/Scripts/x264.sh b/Scripts/x264.sh
new file mode 100644 (file)
index 0000000..e016696
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash -e
+
+tar xjf $CBS_ARCHIVES/x264-4121277.tar.bz2
+cd x264
+if [ "$CBS_VARIANT" == "32" ]; then
+  host="--host=i386-apple-darwin"
+elif [ "$CBS_CLANG_ARCH" == "x86_64" ]; then
+  host="--host=x86_64-apple-darwin"
+elif [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+  host="--host=arm64-apple-darwin"
+  asflags="$CBS_OSX_FLAGS"
+fi
+CFLAGS="-O2 $CBS_OSX_FLAGS -I$CBS_ROOT/include" LDFLAGS="$CBS_OSX_FLAGS" ASFLAGS=$asflags \
+  ./configure --prefix=$CBS_ROOT --enable-static --disable-shared $host
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/xerces.sh b/Scripts/xerces.sh
new file mode 100644 (file)
index 0000000..60dee51
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+
+set -e
+
+tar xJf $CBS_ARCHIVES/xerces-c-3.2.3.tar.xz
+cd xerces-c-3.2.3
+patch -p0 < $CBS_PATCHES/xerces-cross-compile.patch
+
+PATH=$PATH:$CBS_ROOT/bin CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS" CXXFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include -L$CBS_ROOT/lib" \
+    LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
+
diff --git a/Scripts/xml++.sh b/Scripts/xml++.sh
new file mode 100644 (file)
index 0000000..35f860a
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash -e
+
+tar xJf $CBS_ARCHIVES/libxml++-2.42.0.tar.xz
+cd libxml++-2.42.0
+
+if [ "$CBS_CLANG_ARCH" == "arm64" ]; then
+  cat > cross_file.txt <<EOF
+[host_machine]
+system = 'darwin'
+cpu_family = 'aarch64'
+cpu = 'arm'
+endian = 'little'
+[binaries]
+pkgconfig = 'pkg-config'
+cmake = 'cmake'
+EOF
+  cross_file="--cross-file cross_file.txt"
+fi
+
+PATH=$PATH:$CBS_BUILD_BIN CC=$CBS_CC CXX=$CBS_CXX CFLAGS="$CBS_OSX_FLAGS" CPPFLAGS="-I$CBS_ROOT/include" \
+    CXXFLAGS="$CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS -L$CBS_ROOT/lib" \
+    $MESON setup builddir $cross_file --prefix=$CBS_ROOT
+PATH=$PATH:$CBS_BUILD_BIN $CBS_BUILD_BIN/ninja -C builddir install
diff --git a/Scripts/xml2.sh b/Scripts/xml2.sh
new file mode 100644 (file)
index 0000000..c3e42dc
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/libxml2-2.9.1.tar.gz
+cd libxml2-2.9.1
+CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS -O2 -I$CBS_ROOT/include" \
+    LDFLAGS="$CBS_OSX_FLAGS" \
+    ./configure --without-python --with-zlib=$CBS_ROOT --prefix=$CBS_ROOT --disable-dependency-tracking \
+    --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/xmlsec.sh b/Scripts/xmlsec.sh
new file mode 100644 (file)
index 0000000..2329532
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/xmlsec1-1.2.31.tar.gz
+cd xmlsec1-1.2.31
+PKG_CONFIG_PATH=$CBS_ROOT/lib/pkgconfig CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LDFLAGS="-L$CBS_ROOT/lib $CBS_OSX_FLAGS" PATH=$CBS_ROOT/bin:$PATH \
+  ./configure --prefix=$CBS_ROOT --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE --with-openssl=$CBS_ROOT --disable-crypto-dl
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/xslt.sh b/Scripts/xslt.sh
new file mode 100644 (file)
index 0000000..61c968d
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/libxslt-1.1.28.tar.gz
+cd libxslt-1.1.28
+CFLAGS="-I$CBS_ROOT/include $CBS_OSX_FLAGS" LDFLAGS="$CBS_OSX_FLAGS" \
+    ./configure --prefix=$CBS_ROOT --without-python --with-libxml-src=$CBS_BUILD/libxml2-2.9.1 \
+    --build=$CBS_BUILD_TRIPLE --host=$CBS_HOST_TRIPLE
+make $CBS_PARALLEL
+make install
diff --git a/Scripts/zip.sh b/Scripts/zip.sh
new file mode 100644 (file)
index 0000000..3ba9385
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash -e
+
+# I'm building this static, as the shared libraries cmake spits out
+# have their dependencies listed as @rpath/thing.dylib which confuses
+# the DCP-o-matic build scripts.  I tried to make fucking cmake do 
+# the same as everybody else and list deps with absolute paths but
+# I failed.
+
+set -e
+
+tar xJf $CBS_ARCHIVES/libzip-1.7.3.tar.xz
+mkdir -p libzip-build
+cd libzip-build
+CMAKE_OSX_ARCHITECTURES="$CBS_CLANG_ARCH" $CBS_CMAKE ../libzip-1.7.3 \
+   -DCMAKE_INSTALL_PREFIX=$CBS_ROOT -DCMAKE_OSX_SYSROOT=$CBS_MACOSX_SDK -DBUILD_SHARED_LIBS=FALSE
+make $CBS_PARALLEL
+make install
+
+
diff --git a/Scripts/zlib.sh b/Scripts/zlib.sh
new file mode 100644 (file)
index 0000000..78fd5a0
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash -e
+
+tar xzf $CBS_ARCHIVES/zlib-1.2.11.tar.gz
+cd zlib-1.2.11
+CC=$CBS_CC CFLAGS="$CBS_OSX_FLAGS -I$CBS_ROOT/include" \
+    LDFLAGS="$CBS_OSX_FLAGS" \
+    ./configure --prefix=$CBS_ROOT
+make $CBS_PARALLEL
+make install
diff --git a/build_one b/build_one
new file mode 100644 (file)
index 0000000..d978231
--- /dev/null
+++ b/build_one
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+export CBS_BASE=$(cd $(dirname "$0"); pwd)
+
+if [ -e $CBS_BASE/config.sh ]; then
+  . $CBS_BASE/config.sh
+else
+  echo "config.sh not found."
+  exit 1
+fi
+
+if [ "$CBS_PARALLEL" == "" ]; then
+  echo "    (\$CBS_PARALLEL not set; add export CBS_PARALLEL=\"-j4\" or similar to config.sh to do parallel builds)"
+fi
+
+# $1 must be package name
+if [ "$1" == "" ]; then
+  echo "Syntax: $0 <package> [variant]"
+  exit 1
+fi
+
+PACKAGE=$1
+shift;
+VARIANT=$1
+
+export CBS_ARCHIVES=$CBS_BASE/Archives
+export CBS_PATCHES=$CBS_BASE/Patches
+export CBS_REPOS=$CBS_BASE/Repos
+
+errors=0
+
+# Some packages (e.g. glib with glib-genmarshal) require native tools
+# (that they build) as part of the build process, so we need to build
+# the build host's version first.
+for v in x86_64 arm64; do
+
+  export CBS_VARIANT=$v
+  if [ "$VARIANT" == "" -o "$VARIANT" == "$CBS_VARIANT" ]; then
+
+    source $CBS_BASE/tools.sh
+    source $CBS_BASE/Variants/$CBS_VARIANT
+
+    export CBS_ROOT=$CBS_BASE/$CBS_CLANG_ARCH
+    export CBS_BUILD=$CBS_BASE/Build/$CBS_CLANG_ARCH
+    export CBS_BUILD_BIN=$CBS_BASE/x86_64/bin
+    export PKG_CONFIG_LIBDIR=$CBS_ROOT/lib/pkgconfig
+    export PKG_CONFIG_PATH=
+
+    # Magic variable to set target OS X version
+    export MACOSX_DEPLOYMENT_TARGET=$CBS_MACOSX_DEPLOYMENT
+    export CBS_MACOSX_SDK=$CBS_MACOSX_SDK_PREFIX/MacOSX${CBS_MACOSX_SDK_VERSION}.sdk
+
+    export CBS_OSX_FLAGS="-arch $CBS_CLANG_ARCH -isysroot $CBS_MACOSX_SDK"
+    export CBS_BUILD_TRIPLE=x86_64-apple-darwin
+    export CBS_HOST_TRIPLE=$CBS_CONFIGURE_ARCH-apple-darwin
+    export MESON=$CBS_BASE/meson-0.56.0/meson.py
+    mkdir -p $CBS_ROOT $CBS_BUILD $CBS_BASE/Log/$CBS_CLANG_ARCH
+
+    cd $CBS_BUILD
+    echo -n "    $PACKAGE for $CBS_VARIANT... "
+    bash $CBS_BASE/Scripts/$PACKAGE.sh > $CBS_BASE/Log/$CBS_CLANG_ARCH/$PACKAGE.log 2>&1
+    if [ "$?" != "0" ]; then
+      echo "********* ERROR!"
+      errors=`expr $errors + 1`
+    else
+      echo "OK"
+    fi
+  fi
+done
+
+exit $errors
diff --git a/clean b/clean
new file mode 100644 (file)
index 0000000..b0aafd9
--- /dev/null
+++ b/clean
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+export CBS_BASE=$(cd $(dirname "$0"); pwd)
+
+echo "Base: $CBS_BASE"
+
+# Clean old logs, builds and installs
+echo "Removing $CBS_BASE/Log and $CBS_BASE/Build"
+rm -rf $CBS_BASE/Log $CBS_BASE/Build
+for v in $CBS_BASE/Variants/*; do
+  echo "Removing installs for `basename $v`"
+  rm -rf $CBS_BASE/`basename $v`
+done
+rm -rf meson-*
+
diff --git a/config.sh b/config.sh
new file mode 100644 (file)
index 0000000..44e2043
--- /dev/null
+++ b/config.sh
@@ -0,0 +1,9 @@
+export CBS_CURL=curl
+# Parameter to pass to make for parallel builds
+# (set the number to the number of cores on your machine)
+export CBS_PARALLEL="-j4"
+# SDK to build against (not necessarily the minimum deployment version)
+export CBS_MACOSX_SDK_VERSION=11.0
+export CBS_MACOSX_SDK_PREFIX=/Users/ci/SDK
+export CBS_CMAKE="cmake"
+
diff --git a/download_all b/download_all
new file mode 100644 (file)
index 0000000..8c2a240
--- /dev/null
@@ -0,0 +1,84 @@
+#!/bin/bash -e
+set -e
+
+DIRECT=0
+
+source ./config.sh
+CURL="$CBS_CURL -L -O -f"
+
+dl() {
+  set +e
+  if [ "$DIRECT" == "1" ]; then
+    $CURL $1/$2
+    if [ "$?" != "0" ]; then
+      echo "Failed to download $1/$2"
+      exit 1
+    fi
+  else
+    $CURL https://dcpomatic.com/deps/osx/$2
+    if [ "$?" != "0" ]; then
+      echo "Failed to download $2 from dcpomatic.com"
+      exit 1
+    fi
+  fi
+  set -e
+}
+
+mkdir -p Archives
+cd Archives
+
+dl http://www.mega-nerd.com/libsndfile/files libsndfile-1.0.25.tar.gz
+dl https://libzip.org/download libzip-1.7.3.tar.xz
+dl https://curl.haxx.se/download curl-7.32.0.tar.bz2
+dl https://download.gnome.org/sources/glibmm/2.58 glibmm-2.58.1.tar.xz
+dl https://dl.bintray.com/boostorg/release/1.74.0/source boost_1_74_0.tar.bz2
+dl http://cairographics.org/releases cairo-1.16.0.tar.xz
+dl http://cairographics.org/releases cairomm-1.14.2.tar.xz
+dl https://github.com/libexpat/libexpat/releases/download/R_2_2_10 expat-2.2.10.tar.xz
+dl ftp://sourceware.org/pub/libffi libffi-3.3.tar.gz
+dl http://downloads.xiph.org/releases/flac flac-1.3.3.tar.xz
+dl http://download.savannah.gnu.org/releases/freetype freetype-2.10.4.tar.xz
+dl http://www.freedesktop.org/software/fontconfig/release fontconfig-2.13.93.tar.xz
+dl https://ftp.gnu.org/pub/gnu/gettext gettext-0.20.1.tar.gz
+dl http://www.freedesktop.org/software/harfbuzz/release harfbuzz-2.7.2.tar.xz
+dl http://www.ijg.org/files jpegsrc.v8d.tar.gz
+dl http://downloads.xiph.org/releases/ogg libogg-1.3.1.tar.gz
+dl https://www.libssh.org/files/0.9 libssh-0.9.5.tar.xz
+dl http://ftpmirror.gnu.org/libtool libtool-2.4.2.tar.gz
+dl https://download.gnome.org/sources/pango/1.48 pango-1.48.0.tar.xz
+dl http://download.osgeo.org/libtiff tiff-4.0.10.tar.gz
+dl http://downloads.sourceforge.net/project/libpng/libpng15/older-releases/1.5.13 libpng-1.5.13.tar.xz
+dl http://download.savannah.gnu.org/releases/freetype freetype-2.10.4.tar.xz
+dl http://xmlsoft.org/sources libxml2-2.9.1.tar.gz
+dl http://xmlsoft.org/sources libxslt-1.1.28.tar.gz
+dl https://imagemagick.org/download/releases/ImageMagick-7.0.10-31.tar.xz ImageMagick-7.0.10-31.tar.xz
+dl https://www.aleksey.com/xmlsec/download xmlsec1-1.2.31.tar.gz
+dl http://ftp.gnome.org/pub/gnome/sources/glib/2.66 glib-2.66.4.tar.xz
+dl https://github.com/libsigcplusplus/libsigcplusplus/releases/download/2.10.6 libsigc++-2.10.6.tar.xz
+dl http://cairographics.org/releases pixman-0.32.2.tar.gz
+dl https://download.gnome.org/sources/libxml++/2.42/ libxml++-2.42.0.tar.xz
+dl http://ftp.gnome.org/pub/GNOME/sources/pangomm/2.42 pangomm-2.42.2.tar.xz
+dl http://downloads.xiph.org/releases/vorbis libvorbis-1.3.5.tar.xz
+dl https://pkg-config.freedesktop.org/releases pkg-config-0.29.2.tar.gz
+dl https://www.openssl.org/source openssl-1.1.1h.tar.gz
+dl https://github.com/unicode-org/icu/releases/download/release-68-2 icu4c-68_2-src.tgz
+dl https://ftp.gnu.org/gnu/nettle nettle-3.6.tar.gz
+dl http://www.mega-nerd.com/SRC libsamplerate-0.1.8.tar.gz
+dl http://apache.mirror.iphh.net//xerces/c/3/sources xerces-c-3.2.3.tar.xz
+dl https://github.com/nanomsg/nanomsg/archive nanomsg-1.1.5.tar.gz
+dl https://github.com/ninja-build/ninja/releases/download/v1.10.1 ninja-mac.zip
+dl https://zlib.net zlib-1.2.11.tar.gz
+dl https://github.com/mesonbuild/meson/releases/download/0.56.0 meson-0.56.0.tar.gz
+
+rm -rf x264
+git clone git://git.carlh.net/git/x264.git
+git -C x264 checkout 4121277b40a667665d4eea1726aefdc55d12d110
+tar c x264 | bzip2 -f -9 > x264-4121277.tar.bz2
+
+rm -rf wxWidgets
+git clone git://git.carlh.net/git/wxWidgets.git
+pushd wxWidgets
+git submodule update --init --recursive
+git checkout 1db3751235b251ba5beadd04bccf00065ec8388c
+popd
+tar c wxWidgets | bzip2 -f -9 > wxWidgets-1db3751.tar.bz2
diff --git a/env b/env
new file mode 100644 (file)
index 0000000..c19d9a7
--- /dev/null
+++ b/env
@@ -0,0 +1,10 @@
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+source $DIR/config.sh
+
+export PKG_CONFIG_PATH=$DIR/64/lib/pkgconfig
+export PATH=$PATH:$DIR/64/bin
+export CFLAGS="-I$DIR/64/include -isysroot $CBS_MACOSX_SDK_PREFIX/MacOSX$CBS_MACOSX_VERSION.sdk -arch x86_64"
+export CXXFLAGS="-I$DIR/64/include -isysroot $CBS_MACOSX_SDK_PREFIX/MacOSX$CBS_MACOSX_VERSION.sdk -arch x86_64"
+export LDFLAGS=-L$DIR/64/lib
+export LINKFLAGS=-L$DIR/64/lib
+export MACOSX_DEPLOYMENT_TARGET=10.6
diff --git a/rebuild_all b/rebuild_all
new file mode 100644 (file)
index 0000000..2ae0347
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+export CBS_BASE=$(cd $(dirname "$0"); pwd)
+
+keep_going=0
+if [ "$1" == "-k" ]; then
+  keep_going=1
+fi
+
+$CBS_BASE/clean
+
+# pkg-config -> glib
+# glib -> gettext ffi 
+# glibmm -> sigc++
+# pango -> harfbuzz cairo freetype fontconfig
+# cairo -> pixman png
+# gdk-pixbuf -> tiff iconv jpeg
+# pangomm -> cairomm
+# harfbuzz -> freetype
+
+export CBS_ARCHIVES=$CBS_BASE/Archives
+
+./build_one pkg-config x86_64
+unzip $CBS_ARCHIVES/ninja-mac.zip
+mv ninja x86_64/bin
+tar xzf $CBS_ARCHIVES/meson-0.56.0.tar.gz
+
+# Packages in dependency order
+
+# Basics and DCP-o-matic
+builds="zlib zip curl jpeg tiff png expat freetype fontconfig xml2 xslt "
+builds="$builds ogg vorbis flac"
+builds="$builds boost sndfile libtool openssl ssh xmlsec x264"
+builds="$builds ffi gettext glib sigc++ glibmm xml++ wxwidgets"
+builds="$builds pixman cairo cairomm harfbuzz pango pangomm"
+builds="$builds icu nettle samplerate xerces nanomsg"
+
+echo "Building: $builds"
+
+errors=0
+for s in $builds; do
+  echo "  Build: $s"
+  $CBS_BASE/build_one $s
+  r=$?
+  error=`expr $errors + $r`
+  if [ "$r" != "0" -a "$keep_going" == "0" ]; then
+    exit 1
+  fi
+done
+
+if [ "$errors" == "0" ]; then
+  echo "OK."
+else
+  echo "$errors errors."
+fi
+
diff --git a/tools.sh b/tools.sh
new file mode 100644 (file)
index 0000000..d2ebc27
--- /dev/null
+++ b/tools.sh
@@ -0,0 +1,7 @@
+export CBS_CC=gcc
+export CBS_CXX=g++
+export CBS_AR=ar
+export CBS_NM=nm
+export CBS_STRIP=strip
+export CBS_OBJDUMP=objdump
+export CBS_LD=ld