-
Notifications
You must be signed in to change notification settings - Fork 36
Make this work on BigSur/M1 #169
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Many other places. |
||
|
|
||
| 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) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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'] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation. |
||
| 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'] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this in the darwin-32 block ? |
||
| 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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed ? |
||
| run_shell('strip -S "%s" > /dev/null' % path) | ||
|
|
||
| class validate_rpaths (Profile.FileProcessor): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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'] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we still care for 32 bit ? |
||
| 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'] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps newer versions don't need this (or other) patches ? |
||
| ]) | ||
|
|
||
| def prep(self): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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' | ||
| ]) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <stdlib.h> | ||
| #include <errno.h> | ||
| +#include <math.h> | ||
| #include <string.h> | ||
| #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 <gtk/gtkwidget.h> | ||
|
|
||
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <gtk/gtk.h> | ||
| #include <Carbon/Carbon.h> | ||
|
|
||
| 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 <glib-object.h> | ||
|
|
||
| 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: | ||
|
|
||
| <key>CFBundleDocumentTypes</key> | ||
| 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 <gtk/gtk.h> | ||
| #include <ige-mac-bundle.h> | ||
| 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 <gtk/gtk.h> | ||
| 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 <gtk/gtk.h> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug printf.