Skip to content

Commit

Permalink
ldid: submission
Browse files Browse the repository at this point in the history
  • Loading branch information
i0ntempest authored and cjones051073 committed May 12, 2020
1 parent 095173e commit eb2dbc2
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 0 deletions.
43 changes: 43 additions & 0 deletions devel/ldid/Portfile
@@ -0,0 +1,43 @@
# -*- 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 xcode 1.0

name ldid
version 2.1.2
set git_commit c2f8abf013b22c335f44241a6a552a7767e73419
categories devel
platforms darwin
maintainers {@i0ntempest me.com:szf1234} openmaintainer
license GPL-3

description Link Identity Editor
long_description Link Identity Editor lets you manipulate the signature block in a Mach-O binary.

homepage https://cydia.saurik.com/info/ldid/

depends_lib-append port:libxml2 \
path:lib/libssl.dylib:openssl

fetch.type git
git.url https://git.saurik.com/ldid.git
git.branch ${git_commit}

use_configure no
universal_variant no

post-fetch {
system -W ${worksrcpath} "git submodule update --init"
}

pre-build {
file mkdir ${worksrcpath}/out
}

build.env-append PREFIX=${prefix} os_ver=${macosx_version}
build.cmd ./make.sh
patchfiles patch-make.sh.diff

destroot {
copy ${worksrcpath}/out/ldid ${destroot}${prefix}/bin
}
74 changes: 74 additions & 0 deletions devel/ldid/files/patch-make.sh.diff
@@ -0,0 +1,74 @@
--- make.sh.orig 2020-05-04 13:08:18.000000000 -0400
+++ make.sh 2020-05-04 13:08:06.000000000 -0400
@@ -3,43 +3,17 @@
set -e
shopt -s extglob

-if [[ $# == 0 ]]; then
- ios=false
-else
- ios=$1
- shift
-fi
-
-export DEVELOPER_DIR=/Applications/Xcode-5.1.1.app
-
os=()

-if "${ios}"; then
-
-out=ios
-flags=(cycc -- -miphoneos-version-min=2.0 -arch armv6 -arch arm64)
-
-flags+=(-Xarch_armv6 -Isysroot32/usr/include)
-flags+=(-Xarch_arm64 -Isysroot64/usr/include)
-
-flags+=(-Xarch_armv6 -Lsysroot32/usr/lib)
-flags+=(-Xarch_arm64 -Lsysroot64/usr/lib)
-
-static=false
-flags+=(-framework CoreFoundation)
-
-flags+=(-lplist)
-flags+=(-lcrypto)
-
-else
-
out=out

if which xcrun &>/dev/null; then
flags=(xcrun -sdk macosx g++)
- flags+=(-mmacosx-version-min=10.4)
+ flags+=(-mmacosx-version-min="$os_ver")
+ flags+=(-I"$PREFIX"/include)
+ flags+=(-L"$PREFIX"/lib)

- for arch in i386 x86_64; do
+ for arch in x86_64; do
flags+=(-arch "${arch}")
done
else
@@ -54,8 +28,6 @@
flags+=(-lcrypto)
#flags+=(-Wl,/usr/lib/libcrypto.42.dylib)

-fi
-
sdk=$(xcodebuild -sdk iphoneos -version Path)

flags+=(-I.)
@@ -77,14 +49,8 @@

fi

-flags+=("$@")
-
mkdir -p "${out}"
set -x

"${flags[@]}" -O3 -g0 -c -std=c++11 -o "${out}"/ldid.o ldid.cpp
"${flags[@]}" -O3 -g0 -o "${out}"/ldid "${out}"/ldid.o "${os[@]}" -x c lookup2.c -lxml2 -framework Security
-
-if ! "${ios}"; then
- ln -sf out/ldid .
-fi

0 comments on commit eb2dbc2

Please sign in to comment.