2015-02-22 17:53:02 +00:00
|
|
|
# -*- 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 xcode 1.0
|
|
|
|
|
|
|
|
|
|
github.setup alexzielenski optool 0.1
|
2025-01-29 14:52:05 +11:00
|
|
|
# Change github.tarball_from to 'releases' or 'archive' next update
|
|
|
|
|
github.tarball_from tarball
|
2023-04-02 21:41:48 -05:00
|
|
|
set optool_commit a20c514
|
|
|
|
|
revision 0
|
2015-02-22 17:53:02 +00:00
|
|
|
categories sysutils
|
2025-02-06 02:01:31 +01:00
|
|
|
maintainers nomaintainer
|
2015-02-22 17:53:02 +00:00
|
|
|
license BSD
|
|
|
|
|
|
|
|
|
|
description Editor for Mach-O binaries
|
|
|
|
|
|
|
|
|
|
long_description \
|
|
|
|
|
optool is a tool which interfaces with Mach-O binaries in order to insert \
|
|
|
|
|
or remove load commands, strip code signatures, resign, and remove ASLR.
|
|
|
|
|
|
|
|
|
|
# optool depends on these libraries
|
|
|
|
|
set argparser_commit 2802076
|
|
|
|
|
set coreparse_commit 1be510a
|
|
|
|
|
|
|
|
|
|
master_sites-append https://github.com/mysteriouspants/ArgumentParser/archive/${argparser_commit}.tar.gz?dummy=:argparser \
|
|
|
|
|
https://github.com/beelsebob/CoreParse/archive/${coreparse_commit}.tar.gz?dummy=:coreparse
|
|
|
|
|
|
|
|
|
|
distfiles-append argparser-${argparser_commit}.tar.gz:argparser \
|
|
|
|
|
coreparse-${coreparse_commit}.tar.gz:coreparse
|
|
|
|
|
|
|
|
|
|
checksums ${name}-${version}.tar.gz \
|
|
|
|
|
rmd160 d044c322651023bd87c1e2dc29b90d97d7207a0e \
|
|
|
|
|
sha256 4f6e815f86c4f7f63fe82118f5e52acb54ef61c40bd1195493715c9fde267f90 \
|
|
|
|
|
argparser-${argparser_commit}.tar.gz \
|
|
|
|
|
rmd160 dbb60b1d0194d264c477fedc19bfe894b5dbd1d3 \
|
|
|
|
|
sha256 cd4272e8a8cad6d8080c6ddf964b4c469337fdf61bb06cc0aed6de1daa7bd91f \
|
|
|
|
|
coreparse-${coreparse_commit}.tar.gz \
|
|
|
|
|
rmd160 a0e7cd15c6c927d2ead9f997553044c060a52023 \
|
|
|
|
|
sha256 3c468346405aa65f34b275fd23a94b600fbd60111ded67ec5d64ddfc462ef76e
|
|
|
|
|
|
2023-04-02 21:41:48 -05:00
|
|
|
worksrcdir ${github.author}-${github.project}-${optool_commit}
|
|
|
|
|
|
2015-02-22 17:53:02 +00:00
|
|
|
post-extract {
|
|
|
|
|
# Replace empty directories with the real library sources
|
|
|
|
|
delete ${worksrcpath}/${name}/FSArgumentParser
|
|
|
|
|
move [glob ${workpath}/ArgumentParser-${argparser_commit}*] ${worksrcpath}/${name}/FSArgumentParser
|
|
|
|
|
delete ${worksrcpath}/${name}/FSArgumentParser/CoreParse
|
|
|
|
|
move [glob ${workpath}/CoreParse-${coreparse_commit}*] ${worksrcpath}/${name}/FSArgumentParser/CoreParse
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-03 15:18:29 +01:00
|
|
|
patchfiles patch-ldflags-objc.diff \
|
|
|
|
|
patch-argparsermacOS-12.diff \
|
|
|
|
|
patch-coreparse-macOS-12.diff
|
2024-05-13 05:50:06 +10:00
|
|
|
patch.pre_args-replace -p0 -p1
|
2015-02-22 17:53:02 +00:00
|
|
|
|
2021-04-19 22:24:15 +01:00
|
|
|
if { ${os.major} < 12 } {
|
|
|
|
|
# optool/defines.h:68:22: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
|
|
|
|
|
# typedef NS_ENUM(int, OPError)
|
|
|
|
|
# ^~~~~~~
|
|
|
|
|
post-extract {
|
|
|
|
|
reinplace "s|NS_ENUM(int, OPError)|enum OPError|g" ${worksrcpath}/optool/defines.h
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-22 17:53:02 +00:00
|
|
|
destroot {
|
|
|
|
|
xinstall -m 755 ${worksrcpath}/build/Release/optool ${destroot}${prefix}/bin/
|
|
|
|
|
xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
|
|
|
|
|
xinstall -m 644 ${worksrcpath}/README.md ${destroot}${prefix}/share/doc/${name}
|
|
|
|
|
xinstall -m 644 ${worksrcpath}/LICENSE ${destroot}${prefix}/share/doc/${name}
|
|
|
|
|
}
|