summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/gnupg/_metadata/description2
-rw-r--r--data/gnupg/_metadata/name2
-rw-r--r--data/gnupg2/_metadata/description2
l---------data/ld64/_metadata/ldid.dep1
-rw-r--r--data/ld64/make.sh6
-rw-r--r--data/ld64/wrapper.c64
-rw-r--r--data/ldid/_metadata/version2
l---------data/odcctools/_metadata/_ld64.dep1
l---------data/odcctools/_metadata/ld64.dep1
l---------data/odcctools/_metadata/llvm-clang.dep1
-rw-r--r--data/odcctools/make.sh4
11 files changed, 81 insertions, 5 deletions
diff --git a/data/gnupg/_metadata/description b/data/gnupg/_metadata/description
index c55bd894d..687f6a23c 100644
--- a/data/gnupg/_metadata/description
+++ b/data/gnupg/_metadata/description
@@ -1 +1 @@
-older encryption compatible with OpenPGP
+GNU privacy guard - a free PGP replacement
diff --git a/data/gnupg/_metadata/name b/data/gnupg/_metadata/name
index 718afb785..fb453f25a 100644
--- a/data/gnupg/_metadata/name
+++ b/data/gnupg/_metadata/name
@@ -1 +1 @@
-GnuPG 2
+GnuPG
diff --git a/data/gnupg2/_metadata/description b/data/gnupg2/_metadata/description
index 72bfbf994..6d2be28f4 100644
--- a/data/gnupg2/_metadata/description
+++ b/data/gnupg2/_metadata/description
@@ -1 +1 @@
-newer encryption compatible with OpenPGP
+GNU privacy guard - a free PGP replacement (dummy transitional package)
diff --git a/data/ld64/_metadata/ldid.dep b/data/ld64/_metadata/ldid.dep
new file mode 120000
index 000000000..3dd0689cb
--- /dev/null
+++ b/data/ld64/_metadata/ldid.dep
@@ -0,0 +1 @@
+../../ldid \ No newline at end of file
diff --git a/data/ld64/make.sh b/data/ld64/make.sh
index 831f083f4..35f143104 100644
--- a/data/ld64/make.sh
+++ b/data/ld64/make.sh
@@ -1,4 +1,10 @@
pkg:setup
pkg:make
pkg:install
+pkg: mv /usr/bin/ld64 /usr/bin/ld64_
pkg: ln -s ld64 /usr/bin/ld
+pkg: "${PKG_TARG}-gcc" %/wrapper.c -o /usr/bin/ld64
+if [[ -f "${PKG_BASE}/arch/${PKG_ARCH}/${PKG_CFTARG}/entitlement.xml" ]]; then
+ pkg: mkdir -p /usr/share/ldid
+ cp "${PKG_BASE}/arch/${PKG_ARCH}/${PKG_CFTARG}/entitlement.xml" "${PKG_DEST}/usr/share/ldid/entitlements.xml"
+fi
diff --git a/data/ld64/wrapper.c b/data/ld64/wrapper.c
new file mode 100644
index 000000000..e6721a25d
--- /dev/null
+++ b/data/ld64/wrapper.c
@@ -0,0 +1,64 @@
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#define LDID "/usr/bin/ldid"
+#define ENTS "/usr/share/ldid/entitlements.xml"
+
+int main (int argc, char **argv) {
+ int argcont;
+ char *output;
+ for (argcont = 0; argcont < argc - 1; argcont++) {
+ if (!strcmp(argv[argcont], "-o")) {
+ output = argv[argcont + 1];
+ }
+ }
+ if (access(output, F_OK) == 0 && remove(output) == -1) {
+ fprintf(stderr, "Unable to remove existing file: %s\n", strerror(errno));
+ exit(-1);
+ }
+ extern char** environ;
+ pid_t parent = getpid();
+ pid_t pid = fork();
+ int status;
+ if (pid > 0) {
+ waitpid(pid, &status, 0);
+ } else if (pid == 0) {
+ execve("/usr/bin/ld64_", argv, environ);
+ } else {
+ fprintf(stderr, "Unable to fork: %s\n", strerror(errno));
+ exit(-1);
+ }
+ if (WEXITSTATUS(status) == 0 && access(output, R_OK|W_OK) == 0) {
+ if (access(LDID, R_OK|X_OK) != 0) {
+ fprintf(stderr, "Unable to execute ldid: %s\n", strerror(errno));
+ return status;
+ }
+ char *entitlements = getenv("ENTITLEMENTS");
+ if (entitlements == (char*)-1 || entitlements == NULL) {
+ entitlements = ENTS;
+ }
+ if (access(entitlements, R_OK) != 0) {
+ fprintf(stderr, "Entitlements at \"%s\" are not accessible: %s\n", entitlements, strerror(errno));
+ return status;
+ }
+ parent = getpid();
+ pid = fork();
+ if (pid > 0) {
+ waitpid(pid, &status, 0);
+ } else if (pid == 0) {
+ char entstr[strlen(entitlements)+3];
+ entstr[0] = '-';
+ entstr[1] = 'S';
+ strcpy(entstr+2, entitlements);
+ execl(LDID, LDID, entstr, output, NULL);
+ } else {
+ fprintf(stderr, "Unable to fork: %s\n", strerror(errno));
+ }
+ } else {
+ fprintf(stderr, "Not signing file\n");
+ }
+ return WEXITSTATUS(status);
+}
diff --git a/data/ldid/_metadata/version b/data/ldid/_metadata/version
index 227cea215..646ccf7c7 100644
--- a/data/ldid/_metadata/version
+++ b/data/ldid/_metadata/version
@@ -1 +1 @@
-2.0.0
+1:2.0.0
diff --git a/data/odcctools/_metadata/_ld64.dep b/data/odcctools/_metadata/_ld64.dep
deleted file mode 120000
index 030d8a67e..000000000
--- a/data/odcctools/_metadata/_ld64.dep
+++ /dev/null
@@ -1 +0,0 @@
-../../_ld64 \ No newline at end of file
diff --git a/data/odcctools/_metadata/ld64.dep b/data/odcctools/_metadata/ld64.dep
new file mode 120000
index 000000000..1d5307075
--- /dev/null
+++ b/data/odcctools/_metadata/ld64.dep
@@ -0,0 +1 @@
+../../ld64 \ No newline at end of file
diff --git a/data/odcctools/_metadata/llvm-clang.dep b/data/odcctools/_metadata/llvm-clang.dep
new file mode 120000
index 000000000..e86cbdeb0
--- /dev/null
+++ b/data/odcctools/_metadata/llvm-clang.dep
@@ -0,0 +1 @@
+../../llvm-clang/ \ No newline at end of file
diff --git a/data/odcctools/make.sh b/data/odcctools/make.sh
index 18a41caab..c62939346 100644
--- a/data/odcctools/make.sh
+++ b/data/odcctools/make.sh
@@ -3,6 +3,10 @@ pkg: export RC_ProjectSourceVersion="$(cat ${PKG_DATA}/_metadata/version)"
pkg:make DSTROOT="${PKG_DEST}" SDKROOT="${PKG_ROOT}"
pkg:install DSTROOT="${PKG_DEST}" SDKROOT="${PKG_ROOT}"
pkg: rm -f /usr/lib/system/libmacho.dylib /usr/bin/{nm,otool,size}
+pkg: mv -f /usr/bin/ar{,-classic}
+pkg: ln -s llvm-ar /usr/bin/ar
+pkg: mv -f /usr/bin/ranlib{,-classic}
+pkg: ln -s llvm-ranlib /usr/bin/ranlib
pkg: mv -f /usr/bin/nm{-classic,}
pkg: mv -f /usr/bin/otool{-classic,}
pkg: mv -f /usr/bin/size{-classic,}