pinentry-mac: fix build on macOS =<10.10

* set platforms to {macosx >= 12}
This commit is contained in:
aeiouaeiouaeiouaeiouaeiouaeiou
2026-01-31 00:59:07 +03:00
committed by Renee Otten
parent 6308bb329d
commit cf5b3b7df7
3 changed files with 86 additions and 1 deletions
+17 -1
View File
@@ -9,7 +9,7 @@ github.tarball_from archive
categories aqua security
license GPL-3+
maintainers nomaintainer
platforms {macosx >= 11}
platforms {macosx >= 12}
description Cocoa interface for the password entry software pinentry.
long_description {*}${description} \
@@ -24,6 +24,22 @@ supported_archs x86_64 arm64
installs_libs no
use_xcode yes
# The UI layout file uses Xcode 8 format and its features
# available on macOS 10.11 and newer; this patch restores compatibility
# Unfortunately, the layout makes extensive use of the Auto Layout feature,
# which has been properly implemented since Xcode 5
# (meaning it is only compatible with macOS >=10.8)
if {${os.platform} eq "darwin" && ${os.major} < 15} {
patchfiles-append \
patch-xib-compatibility.diff
}
# add missing defines on macOS <10.9
if {${os.platform} eq "darwin" && ${os.major} < 13} {
patchfiles-append \
patch-defines-for-legacy-sdks.diff
}
depends_build path:bin/pkg-config:pkgconfig \
port:gettext
@@ -0,0 +1,24 @@
--- macosx/KeychainSupport.m
+++ macosx/KeychainSupport.m
@@ -24,6 +24,9 @@
#define GPG_SERVICE_NAME "GnuPG"
+#ifndef errSecUserCanceled
+#define errSecUserCanceled -128
+#endif
BOOL storePassphraseInKeychain(NSString *fingerprint, NSString *passphrase, NSString *label) {
OSStatus status;
--- macosx/PinentryMac.m
+++ macosx/PinentryMac.m
@@ -23,6 +23,9 @@
#define localized(x) [[NSBundle mainBundle] localizedStringForKey:x value:nil table:nil]
+#ifndef NSAppKitVersionNumber10_8
+#define NSAppKitVersionNumber10_8 1187
+#endif
@interface PinentryMac ()
@property (nonatomic, strong) IBOutlet NSWindow *window;
@@ -0,0 +1,45 @@
--- macosx/Main.xib
+++ macosx/Main.xib
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4439" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
- <deployment version="101200" identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4439"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner"/>
--- macosx/Pinentry.xib
+++ macosx/Pinentry.xib
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15705" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4439" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
- <deployment version="101200" identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15705"/>
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4439"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="PinentryMac">
@@ -138,7 +136,7 @@
</constraints>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="errorText" id="839">
<font key="font" metaFont="system"/>
- <color key="textColor" name="systemRedColor" catalog="System" colorSpace="catalog"/>
+ <color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
@@ -472,7 +470,7 @@ Gw
<constraint firstItem="814" firstAttribute="top" secondItem="838" secondAttribute="bottom" constant="8" id="r9z-Tr-C4x"/>
<constraint firstItem="814" firstAttribute="top" secondItem="820" secondAttribute="bottom" priority="751" constant="20" id="rH6-UL-Lbo"/>
<constraint firstItem="5Ch-Nw-7sb" firstAttribute="top" secondItem="814" secondAttribute="bottom" priority="751" constant="8" id="rP0-q6-cvX"/>
- <constraint firstItem="mZm-JY-bgq" firstAttribute="firstBaseline" secondItem="KJK-Es-8hH" secondAttribute="firstBaseline" id="sRN-zy-L3I"/>
+ <constraint firstItem="mZm-JY-bgq" firstAttribute="baseline" secondItem="KJK-Es-8hH" secondAttribute="baseline" id="sRN-zy-L3I"/>
<constraint firstItem="932" firstAttribute="leading" secondItem="813" secondAttribute="trailing" constant="8" id="sZD-aP-GZx"/>
<constraint firstItem="813" firstAttribute="bottom" secondItem="932" secondAttribute="bottom" id="sxK-Dw-QuL"/>
<constraint firstItem="KJK-Es-8hH" firstAttribute="leading" secondItem="8xy-6G-oMZ" secondAttribute="trailing" constant="8" id="tAT-Ad-KMb"/>