Skip to content

Commit

Permalink
iTerm2: fix for powerpc
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Jan 3, 2025
1 parent ae6c366 commit 40c3913
Show file tree
Hide file tree
Showing 9 changed files with 369 additions and 2,461 deletions.
114 changes: 32 additions & 82 deletions aqua/iTerm2/Portfile
Original file line number Diff line number Diff line change
@@ -1,89 +1,39 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup github 1.0
PortGroup xcodeversion 1.0


if {${os.major} > 17} {
version 3.4.21
revision 0
checksums rmd160 00cc53ced493db0be593d730f518f56ba0ebe5a3 \
sha256 175b03c9ab41b7c3a5c62967c442fa306639effb5641554c5f6ae739198e0be3 \
size 28781228
patchfiles patch-Makefile-XC10.diff \
patch-remove-sparkle-3.4.diff \
patch-nsur.diff \
patch-xcode12.diff
} elseif {${os.major} > 16} {
version 3.3.12
revision 2
checksums rmd160 37d4204f97ac42431c5774a943ca0ab8f9a4c669 \
sha256 6eeeb3215d6725aa789d39108a8ebedbe1aa9f6d058dd33056d72471ecd02e14 \
size 20602868
patchfiles patch-Makefile-XC10.diff \
patch-remove-sparkle.diff \
patch-nsur.diff
} else {
version 3.2.0
revision 1
checksums rmd160 07915ff5db0545c0c059f47e7f71761e023a26e1 \
sha256 017aff348352369abcc994caaca0f6112e1f17c4d65041acdb9f19830b2b96bd \
size 11969144
patchfiles patch-Makefile.diff \
patch-nsur.diff
}

github.setup gnachman iTerm2 ${version} v
categories aqua shells
platforms darwin
maintainers {mark @markemer} openmaintainer
license GPL-2+
supported_archs x86_64 arm64
use_xcode yes

description Enhanced terminal emulator program, successor to iTerm
long_description \
iTerm2 is a replacement for Terminal and the successor to iTerm. Its focus is on \
performance, internationalization, and supporting innovative features \
that make your life better.

homepage https://iterm2.com/

livecheck.url https://raw.githubusercontent.com/gnachman/iterm2-website/master/source/appcasts/final_modern.xml
livecheck.regex {sparkle:version="([\d\.]+)"}
PortSystem 1.0
PortGroup github 1.0
PortGroup xcode 1.0

github.setup gnachman iTerm2 2.1.1 v
categories aqua shells
platforms {darwin > 8}
supported_archs i386 ppc x86_64
maintainers nomaintainer
license GPL-2+
description Enhanced terminal emulator program, successor to iTerm
long_description \
iTerm2 is a replacement for Terminal and the successor to iTerm. \
Its focus is on performance, internationalization, and supporting \
innovative features that make your life better.
homepage https://iterm2.com
checksums rmd160 55f801ce37da52432e23bd9805564360aabd1b7b \
sha256 a803b11e5068cc9f0863084e001b86660451d8242334a50b85d060d791dbee0f \
size 2551385
github.tarball_from archive

patch.pre_args-replace -p0 -p1
patchfiles 0001-Fixes-for-legacy-macOS-and-PowerPC.patch

xcode.project iTerm.xcodeproj
xcode.target iTerm

post-patch {
# patch the python script out since it does not set the correct version and may cause trouble
reinplace "s|exec tools/updateVersion.py|exec /usr/bin/true|g" ${worksrcpath}/iTerm2.xcodeproj/project.pbxproj
# macOS 13/Xcode 14 seems to be requiring code signing (macOS 12 with XC14 now requires the same)
if {${os.major} >= 21} {
reinplace "s|CODE_SIGN_IDENTITY = \".*\";|CODE_SIGN_IDENTITY = \"-\";|g" ${worksrcpath}/iTerm2.xcodeproj/project.pbxproj
} else {
reinplace "s|CODE_SIGN_IDENTITY = \".*\";|CODE_SIGN_IDENTITY = \"\";|g" ${worksrcpath}/iTerm2.xcodeproj/project.pbxproj
}
reinplace "s|enableUBSanitizer = \"YES\"||g" ${worksrcpath}/iTerm2.xcodeproj/xcshareddata/xcschemes/iTerm2.xcscheme
# Fix version number; see iTerm2/tools/updateVersion.py for version keys
foreach {key} {CFBundleGetInfoString CFBundleShortVersionString CFBundleVersion} {
system "/usr/libexec/PlistBuddy -c \"Set :${key} ${version}\" ${worksrcpath}/plists/iTerm2.plist"
}
reinplace "s|^version *= *.*$|version = \"${version}\"|" ${worksrcpath}/updateVersion.py
# disable Sparkle autoupdate
reinplace "s|.*Sparkle.*||g" ${worksrcpath}/${xcode.project}/project.pbxproj
}

compiler.cpath
compiler.library_path

use_configure no

build.target prod

destroot.destdir APPS=${destroot}${applications_dir}

minimum_xcodeversions {16 9.0 17 10.0 18 11.0}

if {${os.platform} eq "darwin" && ${os.major} < 16} {
known_fail yes
pre-fetch {
ui_error "${subport} @${version} requires macOS 10.12 or newer"
return -code error "unsupported OS X version"
}
destroot {
file copy ${build.dir}/build/Deployment/iTerm.app \
${destroot}${applications_dir}/${name}.app
}
Loading

0 comments on commit 40c3913

Please sign in to comment.