diff --git a/bockbuild.py b/bockbuild.py index 691060b..486d560 100755 --- a/bockbuild.py +++ b/bockbuild.py @@ -62,6 +62,7 @@ def find_profiles (base_path): if not progress_made: break assert Profile.loaded == None + progress ('Hello') return profiles class Bockbuild: @@ -105,16 +106,19 @@ def run(self): loginit('bockbuild (%s)' % (self.bockbuild_rev)) info('cmd: %s' % ' '.join(sys.argv)) - + progress ('here') if len (sys.argv) < 2: info ('Profiles in %s --' % self.git ('config --get remote.origin.url', self.profile_root)[0]) info(map (lambda x: '\t%s: %s' % (x.name, x.description), self.profiles)) finish (exit_codes.FAILURE) global active_profile + progress (sys.argv[1]) Package.profile = active_profile = self.load_profile (sys.argv[1]) + progress ('here34') self.parser = self.init_parser() + progress ('here2') self.cmd_options, self.cmd_args = self.parser.parse_args(sys.argv[2:]) self.packages_to_build = self.cmd_args or active_profile.packages @@ -139,8 +143,12 @@ def run(self): self.build() def init_parser(self): + + progress ('herep') parser = OptionParser( usage='usage: %prog [options] [package_names...]') + + progress ('here5') parser.add_option('--build', action='store_true', dest='do_build', default=True, help='build the profile') @@ -366,6 +374,7 @@ def load_profile(self, source): sys.path.append (path) self.resources.add (path) + progress (fullpath) execfile(fullpath, globals()) Profile.loaded.attach (self) diff --git a/bockbuild/darwinprofile.py b/bockbuild/darwinprofile.py index 026a0da..b2a23d0 100644 --- a/bockbuild/darwinprofile.py +++ b/bockbuild/darwinprofile.py @@ -132,19 +132,23 @@ def setup (self): self.bockbuild.cmd_options.arch = 'darwin-32' def arch_build(self, arch, package): - if arch == 'darwin-universal': - package.local_ld_flags = ['-arch i386', '-arch x86_64'] - package.local_gcc_flags = ['-arch i386', '-arch x86_64'] + if arch == 'darwin-arm64': + package.local_ld_flags = ['-arch arm64'] + package.local_gcc_flags = ['-arch arm64'] + elif arch == 'darwin-universal': + package.local_ld_flags = ['-arch arm64', '-arch x86_64'] + package.local_gcc_flags = ['-arch arm64', '-arch x86_64'] elif arch == 'darwin-32': - package.local_ld_flags = ['-arch i386', '-m32'] - package.local_gcc_flags = ['-arch i386', '-m32'] + package.local_ld_flags = ['-arch arm64'] + package.local_gcc_flags = ['-arch arm64'] package.local_configure_flags = [ - '--build=i386-apple-darwin13.0.0', '--host=i386-apple-darwin13.0.0', '--disable-dependency-tracking'] + '--build=arm64-apple-darwin13.0.0', '--host=arm64-apple-darwin13.0.0', '--disable-dependency-tracking'] elif arch == 'darwin-64': - package.local_ld_flags = ['-arch x86_64 -m64'] - package.local_gcc_flags = ['-arch x86_64 -m64'] - package.local_configure_flags = [ - '--build=x86_64-apple-darwin13.0.0', '--host=x86_64-apple-darwin13.0.0', '--disable-dependency-tracking'] + package.local_ld_flags = ['-arch arm64'] + package.local_gcc_flags = ['-arch arm64'] + + #package.local_ld_flags = ['-arch x86_64 -m64'] + #package.local_gcc_flags = ['-arch x86_64 -m64'] else: error('Unknown arch %s' % arch) @@ -306,7 +310,7 @@ def __init__(self): Profile.FileProcessor.__init__(self, match=match_stageable_binary) def process(self, path): - run_shell('dsymutil -t 2 "%s" >/dev/null' % path) + run_shell('dsymutil "%s" >/dev/null' % path) run_shell('strip -S "%s" > /dev/null' % path) class validate_rpaths (Profile.FileProcessor): diff --git a/packages/autoconf.py b/packages/autoconf.py index 7741a6e..3e521b0 100644 --- a/packages/autoconf.py +++ b/packages/autoconf.py @@ -13,12 +13,12 @@ def install(self): def arch_build(self, arch): if arch == 'darwin-universal': - self.local_ld_flags = ['-arch i386', '-arch x86_64'] - self.local_gcc_flags = ['-arch i386', '-arch x86_64'] + self.local_ld_flags = ['-arch arm64', '-arch x86_64'] + self.local_gcc_flags = ['-arch arm64', '-arch x86_64'] elif arch == 'darwin-32': - self.local_ld_flags = ['-arch i386', '-m32'] - self.local_gcc_flags = ['-arch i386', '-m32'] - self.local_configure_flags = ['--build=i386-apple-darwin13.0.0'] + self.local_ld_flags = ['-arch arm64'] + self.local_gcc_flags = ['-arch arm64'] + self.local_configure_flags = ['--build=arm64-apple-darwin13.0.0'] elif arch == 'darwin-64': self.local_ld_flags = ['-arch x86_64 -m64'] self.local_gcc_flags = ['-arch x86_64 -m64'] diff --git a/packages/automake.py b/packages/automake.py index c9cd305..7c35664 100644 --- a/packages/automake.py +++ b/packages/automake.py @@ -8,12 +8,12 @@ def __init__(self): def arch_build(self, arch): if arch == 'darwin-universal': - self.local_ld_flags = ['-arch i386', '-arch x86_64'] - self.local_gcc_flags = ['-arch i386', '-arch x86_64'] + self.local_ld_flags = ['-arch arm64', '-arch x86_64'] + self.local_gcc_flags = ['-arch arm64', '-arch x86_64'] elif arch == 'darwin-32': - self.local_ld_flags = ['-arch i386', '-m32'] - self.local_gcc_flags = ['-arch i386', '-m32'] - self.local_configure_flags = ['--build=i386-apple-darwin13.0.0'] + self.local_ld_flags = ['-arch arm64'] + self.local_gcc_flags = ['-arch arm64'] + self.local_configure_flags = ['--build=arm64-apple-darwin13.0.0'] elif arch == 'darwin-64': self.local_ld_flags = ['-arch x86_64 -m64'] self.local_gcc_flags = ['-arch x86_64 -m64'] diff --git a/packages/glib.py b/packages/glib.py index 5fac707..4d6e4a1 100644 --- a/packages/glib.py +++ b/packages/glib.py @@ -43,8 +43,8 @@ def prep(self): def arch_build(self, arch): Package.profile.arch_build(arch, self) if arch == 'darwin-universal': # multi-arch build pass - self.local_ld_flags = ['-arch i386', '-arch x86_64'] - self.local_gcc_flags = ['-arch i386', '-arch x86_64', '-Os'] + self.local_ld_flags = ['-arch arm64', '-arch x86_64'] + self.local_gcc_flags = ['-arch arm64', '-arch x86_64', '-Os'] self.local_configure_flags.extend(['--disable-dependency-tracking']) else: Package.arch_build(self, arch) diff --git a/packages/gtk+.py b/packages/gtk+.py index cec45bd..62a207a 100644 --- a/packages/gtk+.py +++ b/packages/gtk+.py @@ -235,7 +235,8 @@ def __init__(self): # https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1092021/ 'patches/gtk/0078-Optimize-querying-symbolic-hotkeys.patch', - 'patches/gtk/gdk-quartz-Remove-titlebar-handling-from-find_child.patch' + 'patches/gtk/gdk-quartz-Remove-titlebar-handling-from-find_child.patch', + 'patches/gtk/bigsurfix.patch' ]) def prep(self): diff --git a/packages/ige-mac-integration.py b/packages/ige-mac-integration.py index e381a9e..b3d0fc4 100644 --- a/packages/ige-mac-integration.py +++ b/packages/ige-mac-integration.py @@ -1,3 +1,14 @@ -SourceForgePackage('gtk-osx', 'ige-mac-integration', '0.9.4', ['--without-compile-warnings'], +class IgePackage(SourceForgePackage): + def __init__(self): + SourceForgePackage.__init__(self, 'gtk-osx', 'ige-mac-integration', '0.9.4', ['--without-compile-warnings'], override_properties={'configure': './configure --prefix="%{staged_prefix}"', 'makeinstall': 'make install'}) + self.sources.extend(["patches/ige-arm64.patch"]) + + def prep(self): + SourceForgePackage.prep(self) + if Package.profile.name == 'darwin': + for p in range(1, len(self.local_sources)): + self.sh('patch -p1 < "%{local_sources[' + str(p) + ']}"') + +IgePackage() diff --git a/packages/libcroco.py b/packages/libcroco.py index 45ff45c..29e0cb8 100644 --- a/packages/libcroco.py +++ b/packages/libcroco.py @@ -1,6 +1,5 @@ GnomeXzPackage('libcroco', version_major='0.6', version_minor='8', configure_flags=[ - '--host=i386-apple-darwin', '--disable-Bsymbolic', '--enable-gtk-doc-html=no' ]) diff --git a/packages/libffi.py b/packages/libffi.py index 1aecc54..e47a741 100644 --- a/packages/libffi.py +++ b/packages/libffi.py @@ -1,7 +1,8 @@ class LibFfiPackage (Package): def __init__(self): - Package.__init__(self, 'libffi', '3.0.13', sources=[ + Package.__init__(self, 'libffi', '3.3', configure_flags=["--build=aarch64-apple-darwin20.0.0"], + sources=[ 'ftp://sourceware.org/pub/%{name}/%{name}-%{version}.tar.gz']) LibFfiPackage() diff --git a/packages/murrine.py b/packages/murrine.py index 5c84ff4..fa41018 100644 --- a/packages/murrine.py +++ b/packages/murrine.py @@ -8,8 +8,14 @@ def __init__(self): # FIXME: this may need porting # self.sources.append ('patches/murrine-osx.patch') + self.sources.append ('patches/murrine-prototypes.patch') def prep(self): + GnomeXzPackage.prep(self) + if Package.profile.name == 'darwin': + for p in range(1, len(self.local_sources)): + self.sh('patch -p1 < "%{local_sources[' + str(p) + ']}"') + Package.prep(self) MurrinePackage() diff --git a/packages/patches/gtk/bigsurfix.patch b/packages/patches/gtk/bigsurfix.patch new file mode 100644 index 0000000..498d0c3 --- /dev/null +++ b/packages/patches/gtk/bigsurfix.patch @@ -0,0 +1,43 @@ +diff --exclude='*.la*' --exclude=configure --exclude=.deps --exclude='config.*' --exclude=autom4te.cache --exclude='*m4' --exclude=.git --exclude=Makefile.in --exclude=Makefile -ru gtk-2.24.problem/gtk/gtkclipboard-quartz.c gtk-works/gtk/gtkclipboard-quartz.c +--- gtk-2.24.problem/gtk/gtkclipboard-quartz.c 2020-08-05 13:47:21.000000000 -0400 ++++ gtk-works/gtk/gtkclipboard-quartz.c 2020-08-05 13:42:56.000000000 -0400 +@@ -32,6 +32,7 @@ + #include "gtkintl.h" + #include "gtktextbuffer.h" + #include "gtkquartz.h" ++#include "gdk/quartz/gdkquartz.h" + #include "gtkalias.h" + + enum { +diff --exclude='*.la*' --exclude=configure --exclude=.deps --exclude='config.*' --exclude=autom4te.cache --exclude='*m4' --exclude=.git --exclude=Makefile.in --exclude=Makefile -ru gtk-2.24.problem/gtk/gtkiconfactory.c gtk-works/gtk/gtkiconfactory.c +--- gtk-2.24.problem/gtk/gtkiconfactory.c 2020-08-05 13:47:21.000000000 -0400 ++++ gtk-works/gtk/gtkiconfactory.c 2020-08-05 13:36:37.000000000 -0400 +@@ -27,6 +27,7 @@ + #include "config.h" + #include + #include ++#include + #include + #include "gtkiconfactory.h" + #include "gtkiconcache.h" +@@ -1490,6 +1491,8 @@ + { + tmp_pixbuf = gtk_icon_info_load_icon (info, &error); + gtk_icon_info_free (info); ++ } else { ++ tmp_pixbuf = NULL; + } + } + else +diff --exclude='*.la*' --exclude=configure --exclude=.deps --exclude='config.*' --exclude=autom4te.cache --exclude='*m4' --exclude=.git --exclude=Makefile.in --exclude=Makefile -ru gtk-2.24.problem/gtk/gtkprivate.h gtk-works/gtk/gtkprivate.h +--- gtk-2.24.problem/gtk/gtkprivate.h 2020-08-05 13:47:21.000000000 -0400 ++++ gtk-works/gtk/gtkprivate.h 2020-08-05 13:34:39.000000000 -0400 +@@ -30,7 +30,7 @@ + #include + + G_BEGIN_DECLS +- ++gboolean gdk_quartz_get_fix_modifiers (void); + /* The private flags that are used in the private_flags member of GtkWidget. + */ + typedef enum diff --git a/packages/patches/ige-arm64.patch b/packages/patches/ige-arm64.patch new file mode 100644 index 0000000..120e566 --- /dev/null +++ b/packages/patches/ige-arm64.patch @@ -0,0 +1,97 @@ +diff -ruN ige-mac-integration-0.9.4.original/configure ige-mac-integration-0.9.4.problem/configure +--- ige-mac-integration-0.9.4.original/configure 2010-07-03 11:26:44.000000000 -0400 ++++ ige-mac-integration-0.9.4.problem/configure 2020-08-06 11:03:36.000000000 -0400 +@@ -11092,7 +11092,7 @@ + int + main () + { +-#ifndef __x86_64__ ++#if !(defined( __x86_64__)||defined(__arm64__)) + #error + #endif + +diff -ruN ige-mac-integration-0.9.4.original/configure.ac ige-mac-integration-0.9.4.problem/configure.ac +--- ige-mac-integration-0.9.4.original/configure.ac 2010-07-03 10:29:15.000000000 -0400 ++++ ige-mac-integration-0.9.4.problem/configure.ac 2020-08-06 11:02:53.000000000 -0400 +@@ -11,7 +11,7 @@ + AM_PROG_LIBTOOL + AC_MSG_CHECKING([Bitness]) + AC_PREPROC_IFELSE( +- [AC_LANG_PROGRAM([[]],[[#ifndef __x86_64__ ++ [AC_LANG_PROGRAM([[]],[[#if !(defined( __x86_64__)||defined(__arm64__)) + #error + #endif + ]])], +diff -ruN ige-mac-integration-0.9.4.original/src/ige-mac-bundle.c ige-mac-integration-0.9.4.problem/src/ige-mac-bundle.c +--- ige-mac-integration-0.9.4.original/src/ige-mac-bundle.c 2010-07-03 10:29:15.000000000 -0400 ++++ ige-mac-integration-0.9.4.problem/src/ige-mac-bundle.c 2020-08-06 11:06:41.000000000 -0400 +@@ -22,7 +22,7 @@ + * -psn_... arguments? + */ + +-#ifndef __x86_64__ ++#if !(defined(__x86_64__) || defined(__arm64__)) + #include + #include + +diff -ruN ige-mac-integration-0.9.4.original/src/ige-mac-bundle.h ige-mac-integration-0.9.4.problem/src/ige-mac-bundle.h +--- ige-mac-integration-0.9.4.original/src/ige-mac-bundle.h 2010-07-03 10:29:15.000000000 -0400 ++++ ige-mac-integration-0.9.4.problem/src/ige-mac-bundle.h 2020-08-06 11:06:46.000000000 -0400 +@@ -21,7 +21,7 @@ + #ifndef __IGE_MAC_BUNDLE_H__ + #define __IGE_MAC_BUNDLE_H__ + +-#ifndef __x86_64__ ++#if !(defined(__x86_64__) || defined(__arm64__)) + #include + + G_BEGIN_DECLS +diff -ruN ige-mac-integration-0.9.4.original/src/ige-mac-dock.c ige-mac-integration-0.9.4.problem/src/ige-mac-dock.c +--- ige-mac-integration-0.9.4.original/src/ige-mac-dock.c 2020-08-05 14:13:05.000000000 -0400 ++++ ige-mac-integration-0.9.4.problem/src/ige-mac-dock.c 2020-08-06 11:05:56.000000000 -0400 +@@ -17,8 +17,8 @@ + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ ++#if !(defined(__x86_64__) || defined(__arm64__)) + +-#ifndef __x86_64__ + /* FIXME: Add example like this to docs for the open documents stuff: + + CFBundleDocumentTypes +diff -ruN ige-mac-integration-0.9.4.original/src/ige-mac-dock.h ige-mac-integration-0.9.4.problem/src/ige-mac-dock.h +--- ige-mac-integration-0.9.4.original/src/ige-mac-dock.h 2010-07-03 10:29:15.000000000 -0400 ++++ ige-mac-integration-0.9.4.problem/src/ige-mac-dock.h 2020-08-06 11:06:28.000000000 -0400 +@@ -23,7 +23,7 @@ + + #ifndef __IGE_MAC_DOCK_H__ + #define __IGE_MAC_DOCK_H__ +-#ifndef __x86_64__ ++#if !(defined(__x86_64__) || defined(__arm64__)) + + #include + #include +diff -ruN ige-mac-integration-0.9.4.original/src/ige-mac-menu.c ige-mac-integration-0.9.4.problem/src/ige-mac-menu.c +--- ige-mac-integration-0.9.4.original/src/ige-mac-menu.c 2020-08-05 14:21:07.000000000 -0400 ++++ ige-mac-integration-0.9.4.problem/src/ige-mac-menu.c 2020-08-06 11:05:42.000000000 -0400 +@@ -23,7 +23,7 @@ + * Boston, MA 02111-1307, USA. + */ + +-#ifndef __x86_64__ ++#if !(defined(__x86_64__) || defined(__arm64__)) + #include "config.h" + + #include +diff -ruN ige-mac-integration-0.9.4.original/src/ige-mac-menu.h ige-mac-integration-0.9.4.problem/src/ige-mac-menu.h +--- ige-mac-integration-0.9.4.original/src/ige-mac-menu.h 2010-07-03 10:29:15.000000000 -0400 ++++ ige-mac-integration-0.9.4.problem/src/ige-mac-menu.h 2020-08-06 11:06:17.000000000 -0400 +@@ -25,7 +25,7 @@ + + #ifndef __IGE_MAC_MENU_H__ + #define __IGE_MAC_MENU_H__ +-#ifndef __x86_64__ ++#if !(defined(__x86_64__) || defined(__arm64__)) + + #include + diff --git a/packages/patches/murrine-prototypes.patch b/packages/patches/murrine-prototypes.patch new file mode 100644 index 0000000..3d35f16 --- /dev/null +++ b/packages/patches/murrine-prototypes.patch @@ -0,0 +1,38 @@ +Binary files murrine-0.98.2.orig/src/.support.h.swp and murrine-0.98.2.problem/src/.support.h.swp differ +diff --exclude='*.*o' --exclude=.libs --exclude='*la' -ruN murrine-0.98.2.orig/src/murrine_rc_style.h murrine-0.98.2.problem/src/murrine_rc_style.h +--- murrine-0.98.2.orig/src/murrine_rc_style.h 2012-01-17 12:46:01.000000000 -0500 ++++ murrine-0.98.2.problem/src/murrine_rc_style.h 2020-08-06 11:54:33.000000000 -0400 +@@ -154,5 +154,7 @@ + }; + + GType murrine_rc_style_get_type (void); ++void ++murrine_rc_style_register_types (GTypeModule *module); + + #endif /* MURRINE_RC_STYLE_H */ +diff --exclude='*.*o' --exclude=.libs --exclude='*la' -ruN murrine-0.98.2.orig/src/murrine_style.h murrine-0.98.2.problem/src/murrine_style.h +--- murrine-0.98.2.orig/src/murrine_style.h 2012-01-17 12:46:01.000000000 -0500 ++++ murrine-0.98.2.problem/src/murrine_style.h 2020-08-06 11:53:52.000000000 -0400 +@@ -102,5 +102,7 @@ + }; + + GType murrine_style_get_type (void); ++void ++murrine_style_register_types (GTypeModule *module); + + #endif /* MURRINE_STYLE_H */ +diff --exclude='*.*o' --exclude=.libs --exclude='*la' -ruN murrine-0.98.2.orig/src/support.h murrine-0.98.2.problem/src/support.h +--- murrine-0.98.2.orig/src/support.h 2012-01-17 12:46:01.000000000 -0500 ++++ murrine-0.98.2.problem/src/support.h 2020-08-06 11:53:17.000000000 -0400 +@@ -44,6 +44,11 @@ + #define MENU_OPACITY 0.90 + #define TOOLTIP_OPACITY 0.90 + ++gboolean murrine_widget_is_ltr (GtkWidget *widget); ++gboolean ++murrine_object_is_a (const GObject * object, const gchar * type_name); ++ ++ + /* From gtk-engines 20071109 */ + #define MRN_IS_WIDGET(object) ((object) && murrine_object_is_a ((GObject*)(object), "GtkWidget")) + #define MRN_IS_CONTAINER(object) ((object) && murrine_object_is_a ((GObject*)(object), "GtkContainer")) diff --git a/packages/patches/xamarin-gtk-theme-prototype.patch b/packages/patches/xamarin-gtk-theme-prototype.patch new file mode 100644 index 0000000..2ea2ba4 --- /dev/null +++ b/packages/patches/xamarin-gtk-theme-prototype.patch @@ -0,0 +1,39 @@ +diff --exclude='*.*o' --exclude=.libs --exclude='*la' -ruN xamarin-gtk-theme-None.orig/src/murrine_rc_style.h xamarin-gtk-theme-None.problem/src/murrine_rc_style.h +--- xamarin-gtk-theme-None.orig/src/murrine_rc_style.h 2020-08-03 14:42:53.000000000 -0400 ++++ xamarin-gtk-theme-None.problem/src/murrine_rc_style.h 2020-08-06 12:04:11.000000000 -0400 +@@ -35,6 +35,8 @@ + #define MURRINE_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MURRINE_TYPE_RC_STYLE)) + #define MURRINE_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MURRINE_TYPE_RC_STYLE, MurrineRcStyleClass)) + ++void ++murrine_rc_style_register_types (GTypeModule *module); + typedef enum + { + // MRN_FLAG_UNUSED = 1 << 0, +diff --exclude='*.*o' --exclude=.libs --exclude='*la' -ruN xamarin-gtk-theme-None.orig/src/murrine_style.h xamarin-gtk-theme-None.problem/src/murrine_style.h +--- xamarin-gtk-theme-None.orig/src/murrine_style.h 2020-08-03 14:42:53.000000000 -0400 ++++ xamarin-gtk-theme-None.problem/src/murrine_style.h 2020-08-06 12:04:32.000000000 -0400 +@@ -38,6 +38,9 @@ + #define MURRINE_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MURRINE_TYPE_STYLE)) + #define MURRINE_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MURRINE_TYPE_STYLE, MurrineStyleClass)) + ++void ++murrine_style_register_types (GTypeModule *module); ++ + struct _MurrineStyle + { + GtkStyle parent_instance; +diff --exclude='*.*o' --exclude=.libs --exclude='*la' -ruN xamarin-gtk-theme-None.orig/src/support.h xamarin-gtk-theme-None.problem/src/support.h +--- xamarin-gtk-theme-None.orig/src/support.h 2020-08-03 14:42:53.000000000 -0400 ++++ xamarin-gtk-theme-None.problem/src/support.h 2020-08-06 12:03:40.000000000 -0400 +@@ -44,6 +44,10 @@ + #define MENU_OPACITY 0.90 + #define TOOLTIP_OPACITY 0.90 + ++gboolean murrine_widget_is_ltr (GtkWidget *widget); ++gboolean ++murrine_object_is_a (const GObject * object, const gchar * type_name); ++ + /* From gtk-engines 20071109 */ + #define MRN_IS_WIDGET(object) ((object) && murrine_object_is_a ((GObject*)(object), "GtkWidget")) + #define MRN_IS_CONTAINER(object) ((object) && murrine_object_is_a ((GObject*)(object), "GtkContainer"))