From 07e0e8e1f28eeb684d49683324ec1e95057305fe Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 26 Nov 2021 10:08:54 +0000 Subject: [PATCH] Copy of osx-environment at 9993042d6 --- .gitignore | 10 ++ Patches/aubio-32.patch | 13 ++ Patches/aubio-64.patch | 13 ++ Patches/boost-arm64.patch | 25 ++++ Patches/boost-macos-warning.patch | 13 ++ Patches/db.patch | 20 +++ Patches/glib-avail-len.patch | 121 +++++++++++++++++++ Patches/glib-iconv.patch | 11 ++ Patches/glib-meson.patch | 36 ++++++ Patches/jack-2.patch | 29 +++++ Patches/jack.patch | 11 ++ Patches/openssl-arm64.patch | 28 +++++ Patches/rubberband.patch | 86 +++++++++++++ Patches/sndfile-disable-examples.patch | 13 ++ Patches/sndfile-link.patch | 11 ++ Patches/sndfile-unnecessary-include.patch | 10 ++ Patches/vamp-plugin-sdk-32.patch | 24 ++++ Patches/vamp-plugin-sdk-64.patch | 24 ++++ Patches/wxwidgets-change-install-names.patch | 11 ++ Patches/wxwidgets-checkbox-colours.patch | 108 +++++++++++++++++ Patches/wxwidgets-host-suffix.patch | 24 ++++ Patches/wxwidgets-osx-zorder.patch | 13 ++ Patches/wxwidgets-ru-advanced.patch | 19 +++ Patches/xerces-cross-compile.patch | 120 ++++++++++++++++++ Scripts/art.sh | 12 ++ Scripts/atk.sh | 12 ++ Scripts/atkmm.sh | 12 ++ Scripts/aubio.sh | 13 ++ Scripts/boost.sh | 31 +++++ Scripts/cairo.sh | 13 ++ Scripts/cairomm.sh | 26 ++++ Scripts/curl.sh | 12 ++ Scripts/db.sh | 14 +++ Scripts/expat.sh | 8 ++ Scripts/ffi.sh | 15 +++ Scripts/fftw.sh | 19 +++ Scripts/flac.sh | 12 ++ Scripts/fontconfig.sh | 9 ++ Scripts/freetype.sh | 8 ++ Scripts/gdk-pixbuf.sh | 12 ++ Scripts/gettext.sh | 13 ++ Scripts/glib.sh | 27 +++++ Scripts/glibmm.sh | 15 +++ Scripts/gnomecanvas.sh | 12 ++ Scripts/gnomecanvasmm.sh | 12 ++ Scripts/harfbuzz.sh | 25 ++++ Scripts/iconv.sh | 7 ++ Scripts/icu.sh | 18 +++ Scripts/imagemagick.sh | 13 ++ Scripts/intltool.sh | 12 ++ Scripts/jack.sh | 18 +++ Scripts/jpeg.sh | 8 ++ Scripts/ladspa.sh | 6 + Scripts/libtool.sh | 10 ++ Scripts/lilv.sh | 7 ++ Scripts/lo.sh | 12 ++ Scripts/lrdf.sh | 13 ++ Scripts/lv2.sh | 7 ++ Scripts/nanomsg.sh | 12 ++ Scripts/nettle.sh | 14 +++ Scripts/ogg.sh | 12 ++ Scripts/openssl.sh | 20 +++ Scripts/pango.sh | 25 ++++ Scripts/pangomm.sh | 29 +++++ Scripts/pixman.sh | 13 ++ Scripts/pkg-config.sh | 12 ++ Scripts/png.sh | 9 ++ Scripts/quickmail.sh | 13 ++ Scripts/raptor.sh | 12 ++ Scripts/rtaudio.sh | 12 ++ Scripts/rubberband.sh | 10 ++ Scripts/samplerate.sh | 14 +++ Scripts/serd.sh | 7 ++ Scripts/sigc++.sh | 26 ++++ Scripts/sndfile.sh | 14 +++ Scripts/sord.sh | 7 ++ Scripts/soxr.sh | 10 ++ Scripts/sratom.sh | 7 ++ Scripts/ssh.sh | 13 ++ Scripts/suil.sh | 7 ++ Scripts/taglib.sh | 7 ++ Scripts/tiff.sh | 11 ++ Scripts/vamp-plugin-sdk.sh | 17 +++ Scripts/vorbis.sh | 12 ++ Scripts/vtk.sh | 59 +++++++++ Scripts/wxwidgets.sh | 21 ++++ Scripts/x264.sh | 16 +++ Scripts/xerces.sh | 14 +++ Scripts/xml++.sh | 23 ++++ Scripts/xml2.sh | 10 ++ Scripts/xmlsec.sh | 8 ++ Scripts/xslt.sh | 9 ++ Scripts/zip.sh | 19 +++ Scripts/zlib.sh | 9 ++ build_one | 71 +++++++++++ clean | 15 +++ config.sh | 9 ++ download_all | 84 +++++++++++++ env | 10 ++ rebuild_all | 56 +++++++++ tools.sh | 7 ++ 101 files changed, 2041 insertions(+) create mode 100644 .gitignore create mode 100644 Patches/aubio-32.patch create mode 100644 Patches/aubio-64.patch create mode 100644 Patches/boost-arm64.patch create mode 100644 Patches/boost-macos-warning.patch create mode 100644 Patches/db.patch create mode 100644 Patches/glib-avail-len.patch create mode 100644 Patches/glib-iconv.patch create mode 100644 Patches/glib-meson.patch create mode 100644 Patches/jack-2.patch create mode 100644 Patches/jack.patch create mode 100644 Patches/openssl-arm64.patch create mode 100644 Patches/rubberband.patch create mode 100644 Patches/sndfile-disable-examples.patch create mode 100644 Patches/sndfile-link.patch create mode 100644 Patches/sndfile-unnecessary-include.patch create mode 100644 Patches/vamp-plugin-sdk-32.patch create mode 100644 Patches/vamp-plugin-sdk-64.patch create mode 100644 Patches/wxwidgets-change-install-names.patch create mode 100644 Patches/wxwidgets-checkbox-colours.patch create mode 100644 Patches/wxwidgets-host-suffix.patch create mode 100644 Patches/wxwidgets-osx-zorder.patch create mode 100644 Patches/wxwidgets-ru-advanced.patch create mode 100644 Patches/xerces-cross-compile.patch create mode 100644 Scripts/art.sh create mode 100644 Scripts/atk.sh create mode 100644 Scripts/atkmm.sh create mode 100644 Scripts/aubio.sh create mode 100644 Scripts/boost.sh create mode 100644 Scripts/cairo.sh create mode 100644 Scripts/cairomm.sh create mode 100644 Scripts/curl.sh create mode 100644 Scripts/db.sh create mode 100644 Scripts/expat.sh create mode 100644 Scripts/ffi.sh create mode 100644 Scripts/fftw.sh create mode 100644 Scripts/flac.sh create mode 100644 Scripts/fontconfig.sh create mode 100644 Scripts/freetype.sh create mode 100644 Scripts/gdk-pixbuf.sh create mode 100644 Scripts/gettext.sh create mode 100644 Scripts/glib.sh create mode 100644 Scripts/glibmm.sh create mode 100644 Scripts/gnomecanvas.sh create mode 100644 Scripts/gnomecanvasmm.sh create mode 100644 Scripts/harfbuzz.sh create mode 100644 Scripts/iconv.sh create mode 100644 Scripts/icu.sh create mode 100644 Scripts/imagemagick.sh create mode 100644 Scripts/intltool.sh create mode 100644 Scripts/jack.sh create mode 100644 Scripts/jpeg.sh create mode 100644 Scripts/ladspa.sh create mode 100644 Scripts/libtool.sh create mode 100644 Scripts/lilv.sh create mode 100644 Scripts/lo.sh create mode 100644 Scripts/lrdf.sh create mode 100644 Scripts/lv2.sh create mode 100644 Scripts/nanomsg.sh create mode 100644 Scripts/nettle.sh create mode 100644 Scripts/ogg.sh create mode 100644 Scripts/openssl.sh create mode 100644 Scripts/pango.sh create mode 100644 Scripts/pangomm.sh create mode 100644 Scripts/pixman.sh create mode 100644 Scripts/pkg-config.sh create mode 100644 Scripts/png.sh create mode 100644 Scripts/quickmail.sh create mode 100644 Scripts/raptor.sh create mode 100644 Scripts/rtaudio.sh create mode 100644 Scripts/rubberband.sh create mode 100644 Scripts/samplerate.sh create mode 100644 Scripts/serd.sh create mode 100644 Scripts/sigc++.sh create mode 100644 Scripts/sndfile.sh create mode 100644 Scripts/sord.sh create mode 100644 Scripts/soxr.sh create mode 100644 Scripts/sratom.sh create mode 100644 Scripts/ssh.sh create mode 100644 Scripts/suil.sh create mode 100644 Scripts/taglib.sh create mode 100644 Scripts/tiff.sh create mode 100644 Scripts/vamp-plugin-sdk.sh create mode 100644 Scripts/vorbis.sh create mode 100644 Scripts/vtk.sh create mode 100644 Scripts/wxwidgets.sh create mode 100644 Scripts/x264.sh create mode 100644 Scripts/xerces.sh create mode 100644 Scripts/xml++.sh create mode 100644 Scripts/xml2.sh create mode 100644 Scripts/xmlsec.sh create mode 100644 Scripts/xslt.sh create mode 100644 Scripts/zip.sh create mode 100644 Scripts/zlib.sh create mode 100644 build_one create mode 100644 clean create mode 100644 config.sh create mode 100644 download_all create mode 100644 env create mode 100644 rebuild_all create mode 100644 tools.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..68847dd --- /dev/null +++ b/.gitignore @@ -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 index 0000000..5c4be7a --- /dev/null +++ b/Patches/aubio-32.patch @@ -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 index 0000000..b098e05 --- /dev/null +++ b/Patches/aubio-64.patch @@ -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 index 0000000..4d2f8e3 --- /dev/null +++ b/Patches/boost-arm64.patch @@ -0,0 +1,25 @@ +From 456be0b7ecca065fbccf380c2f51e0985e608ba0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Aum=C3=BCller?= +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 index 0000000..5457022 --- /dev/null +++ b/Patches/boost-macos-warning.patch @@ -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 ++#include + + namespace boost + { diff --git a/Patches/db.patch b/Patches/db.patch new file mode 100644 index 0000000..398aa1d --- /dev/null +++ b/Patches/db.patch @@ -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 index 0000000..8180d59 --- /dev/null +++ b/Patches/glib-avail-len.patch @@ -0,0 +1,121 @@ +From c1609942ea9d9ff9b04560405162fda008e38e44 Mon Sep 17 00:00:00 2001 +From: Dan Winship +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 index 0000000..51603a0 --- /dev/null +++ b/Patches/glib-iconv.patch @@ -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 index 0000000..ab74b87 --- /dev/null +++ b/Patches/glib-meson.patch @@ -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 +- #include ''', +- 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 +- #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 +- #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 index 0000000..9969083 --- /dev/null +++ b/Patches/jack-2.patch @@ -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 index 0000000..430671f --- /dev/null +++ b/Patches/jack.patch @@ -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 index 0000000..0603fb6 --- /dev/null +++ b/Patches/openssl-arm64.patch @@ -0,0 +1,28 @@ +From 4907cf01f63cc966a40d67eb2e030c4d8eb1d528 Mon Sep 17 00:00:00 2001 +From: Stuart Carnie +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 index 0000000..0a29102 --- /dev/null +++ b/Patches/rubberband.patch @@ -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 index 0000000..42f3003 --- /dev/null +++ b/Patches/sndfile-disable-examples.patch @@ -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 index 0000000..9f036ba --- /dev/null +++ b/Patches/sndfile-link.patch @@ -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 index 0000000..c8c4703 --- /dev/null +++ b/Patches/sndfile-unnecessary-include.patch @@ -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 + + #elif (defined (__MACH__) && defined (__APPLE__)) +- #include + #include + + #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 index 0000000..21e6d54 --- /dev/null +++ b/Patches/vamp-plugin-sdk-32.patch @@ -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 index 0000000..55782b2 --- /dev/null +++ b/Patches/vamp-plugin-sdk-64.patch @@ -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 index 0000000..ba21646 --- /dev/null +++ b/Patches/wxwidgets-change-install-names.patch @@ -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 <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 index 0000000..7ef46eb --- /dev/null +++ b/Patches/wxwidgets-checkbox-colours.patch @@ -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 index 0000000..229fc4a --- /dev/null +++ b/Patches/wxwidgets-host-suffix.patch @@ -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 index 0000000..b956b2c --- /dev/null +++ b/Patches/wxwidgets-osx-zorder.patch @@ -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 index 0000000..dbb9a79 --- /dev/null +++ b/Patches/wxwidgets-ru-advanced.patch @@ -0,0 +1,19 @@ +commit af22b982346717ff77fdd3601bd6b5048b2d75c9 +Author: Carl Hetherington +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 index 0000000..8a29e0e --- /dev/null +++ b/Patches/xerces-cross-compile.patch @@ -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 +-#include +-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 +-#include +-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 index 0000000..12c03b8 --- /dev/null +++ b/Scripts/art.sh @@ -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 index 0000000..dc600a6 --- /dev/null +++ b/Scripts/atk.sh @@ -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 index 0000000..4784448 --- /dev/null +++ b/Scripts/atkmm.sh @@ -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 index 0000000..bab4409 --- /dev/null +++ b/Scripts/aubio.sh @@ -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 index 0000000..caf3154 --- /dev/null +++ b/Scripts/boost.sh @@ -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 < user-config.jam +using darwin : +: clang++ +: $short_arch + $long_arch + 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 index 0000000..15224e6 --- /dev/null +++ b/Scripts/cairo.sh @@ -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 index 0000000..d49b139 --- /dev/null +++ b/Scripts/cairomm.sh @@ -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 < cross_file.txt < cross_file.txt < cross_file.txt < cross_file.txt < 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 index 0000000..297d2e6 --- /dev/null +++ b/Scripts/serd.sh @@ -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 index 0000000..6119ba0 --- /dev/null +++ b/Scripts/sigc++.sh @@ -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 < $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 index 0000000..603c085 --- /dev/null +++ b/Scripts/vorbis.sh @@ -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 index 0000000..787c29f --- /dev/null +++ b/Scripts/vtk.sh @@ -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 < cross_file.txt < [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 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 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 index 0000000..8c2a240 --- /dev/null +++ b/download_all @@ -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 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 index 0000000..2ae0347 --- /dev/null +++ b/rebuild_all @@ -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 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 -- 2.30.2