forked from macports/macports-ports
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0510200
commit f1b435f
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 | ||
|
||
PortSystem 1.0 | ||
PortGroup meson 1.0 | ||
|
||
name libadwaita | ||
version 1.5.1 | ||
revision 0 | ||
|
||
categories gnome devel | ||
license LGPL-2.1 | ||
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer | ||
|
||
description Building blocks for modern GNOME applications | ||
long_description {*}${description} | ||
homepage https://www.gnome.org | ||
|
||
set branch [join [lrange [split ${version} .] 0 1] .] | ||
master_sites gnome:sources/${name}/${branch}/ | ||
use_xz yes | ||
|
||
checksums rmd160 77df2ee32a29849b6d975b833b811509db051123 \ | ||
sha256 7f144c5887d6dd2d99517c00fd42395ee20abc13ce55958a4fda64e6d7e473f8 \ | ||
size 4453888 | ||
|
||
meson.wrap_mode nodownload | ||
|
||
depends_build-append \ | ||
port:gettext \ | ||
path:bin/pkg-config:pkgconfig \ | ||
port:sassc \ | ||
path:bin/vala:vala | ||
|
||
depends_lib-append port:appstream \ | ||
path:lib/pkgconfig/cairo.pc:cairo \ | ||
port:fribidi \ | ||
path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \ | ||
port:gettext-runtime \ | ||
path:lib/pkgconfig/glib-2.0.pc:glib2 \ | ||
path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection \ | ||
port:graphene \ | ||
path:lib/pkgconfig/gtk4.pc:gtk4 | ||
|
||
# adw-settings-impl-macos.c: error: stray '@' in program | ||
# Use this code where it is actually needed. | ||
patchfiles-append patch-fix-adw-settings-impl-macos.diff | ||
|
||
# cc1: error: unrecognized command line option "-std=gnu11" | ||
compiler.c_standard 2011 |
44 changes: 44 additions & 0 deletions
44
gnome/libadwaita/files/patch-fix-adw-settings-impl-macos.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- src/adw-settings-impl-macos.c 2024-05-24 13:03:30.000000000 +0800 | ||
+++ src/adw-settings-impl-macos.c 2024-06-10 07:43:01.000000000 +0800 | ||
@@ -8,6 +8,7 @@ | ||
|
||
#include "adw-settings-impl-private.h" | ||
|
||
+#include <AvailabilityMacros.h> | ||
#include <AppKit/AppKit.h> | ||
|
||
struct _AdwSettingsImplMacOS | ||
@@ -41,6 +42,7 @@ | ||
static AdwSystemColorScheme | ||
get_ns_color_scheme (void) | ||
{ | ||
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 | ||
if (@available(*, macOS 10.14)) { | ||
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; | ||
NSString *style = [userDefaults stringForKey:@"AppleInterfaceStyle"]; | ||
@@ -61,7 +63,7 @@ | ||
ADW_SYSTEM_COLOR_SCHEME_PREFER_DARK : | ||
ADW_SYSTEM_COLOR_SCHEME_DEFAULT; | ||
} | ||
- | ||
+#endif | ||
return ADW_SYSTEM_COLOR_SCHEME_DEFAULT; | ||
} | ||
|
||
@@ -90,7 +92,7 @@ | ||
|
||
if (!enable_color_scheme) | ||
return ADW_SETTINGS_IMPL (self); | ||
- | ||
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 | ||
if (@available(*, macOS 10.14)) { | ||
static ThemeChangedObserver *observer; | ||
|
||
@@ -108,6 +110,6 @@ | ||
/* has_color_scheme */ TRUE, | ||
/* has_high_contrast */ FALSE); | ||
} | ||
- | ||
+#endif | ||
return ADW_SETTINGS_IMPL (self); | ||
} |