summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/libmissing/Libc-1272.200.26.tar.gzbin0 -> 2020282 bytes
-rw-r--r--data/libmissing/_metadata/description1
l---------data/libmissing/_metadata/license1
l---------data/libmissing/_metadata/maintainer1
-rw-r--r--data/libmissing/_metadata/priority1
-rw-r--r--data/libmissing/_metadata/role1
-rw-r--r--data/libmissing/_metadata/section1
-rw-r--r--data/libmissing/_metadata/tags1
-rw-r--r--data/libmissing/_metadata/version1
-rw-r--r--data/libmissing/make.sh5
-rw-r--r--data/libmissing/missing.h4
-rw-r--r--data/libmissing/toolchain.diff93
12 files changed, 110 insertions, 0 deletions
diff --git a/data/libmissing/Libc-1272.200.26.tar.gz b/data/libmissing/Libc-1272.200.26.tar.gz
new file mode 100644
index 000000000..7b57e39c9
--- /dev/null
+++ b/data/libmissing/Libc-1272.200.26.tar.gz
Binary files differ
diff --git a/data/libmissing/_metadata/description b/data/libmissing/_metadata/description
new file mode 100644
index 000000000..d990a1ff3
--- /dev/null
+++ b/data/libmissing/_metadata/description
@@ -0,0 +1 @@
+Missing functions
diff --git a/data/libmissing/_metadata/license b/data/libmissing/_metadata/license
new file mode 120000
index 000000000..9e5e5e89d
--- /dev/null
+++ b/data/libmissing/_metadata/license
@@ -0,0 +1 @@
+../../../licenses/apsl-2.0 \ No newline at end of file
diff --git a/data/libmissing/_metadata/maintainer b/data/libmissing/_metadata/maintainer
new file mode 120000
index 000000000..573d7ebef
--- /dev/null
+++ b/data/libmissing/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/sbingner \ No newline at end of file
diff --git a/data/libmissing/_metadata/priority b/data/libmissing/_metadata/priority
new file mode 100644
index 000000000..fad9e164a
--- /dev/null
+++ b/data/libmissing/_metadata/priority
@@ -0,0 +1 @@
+required
diff --git a/data/libmissing/_metadata/role b/data/libmissing/_metadata/role
new file mode 100644
index 000000000..52b4d7301
--- /dev/null
+++ b/data/libmissing/_metadata/role
@@ -0,0 +1 @@
+hacker
diff --git a/data/libmissing/_metadata/section b/data/libmissing/_metadata/section
new file mode 100644
index 000000000..e0eb96881
--- /dev/null
+++ b/data/libmissing/_metadata/section
@@ -0,0 +1 @@
+Development
diff --git a/data/libmissing/_metadata/tags b/data/libmissing/_metadata/tags
new file mode 100644
index 000000000..a8928cec8
--- /dev/null
+++ b/data/libmissing/_metadata/tags
@@ -0,0 +1 @@
+purpose::library
diff --git a/data/libmissing/_metadata/version b/data/libmissing/_metadata/version
new file mode 100644
index 000000000..49d59571f
--- /dev/null
+++ b/data/libmissing/_metadata/version
@@ -0,0 +1 @@
+0.1
diff --git a/data/libmissing/make.sh b/data/libmissing/make.sh
new file mode 100644
index 000000000..6523c3c6f
--- /dev/null
+++ b/data/libmissing/make.sh
@@ -0,0 +1,5 @@
+pkg:setup
+"${PKG_TARG}-gcc" -dynamiclib -O2 -Ifbsdcompat -Idarwin -install_name /usr/lib/libmissing.dylib -o libmissing.dylib stdlib/FreeBSD/system.c
+pkg: mkdir -p /usr/lib /usr/include
+pkg: cp libmissing.dylib /usr/lib/
+pkg: cp %/missing.h /usr/include/
diff --git a/data/libmissing/missing.h b/data/libmissing/missing.h
new file mode 100644
index 000000000..648e49f67
--- /dev/null
+++ b/data/libmissing/missing.h
@@ -0,0 +1,4 @@
+#ifndef _MISSING_H
+#define _MISSING_H
+int system(char *command);
+#endif
diff --git a/data/libmissing/toolchain.diff b/data/libmissing/toolchain.diff
new file mode 100644
index 000000000..880d491e7
--- /dev/null
+++ b/data/libmissing/toolchain.diff
@@ -0,0 +1,93 @@
+diff -ur Libc-1272.200.26/stdlib/FreeBSD/system.c Libc-1272.200.26+iPhone/stdlib/FreeBSD/system.c
+--- Libc-1272.200.26/stdlib/FreeBSD/system.c 2018-03-22 07:37:55.000000000 -1000
++++ Libc-1272.200.26+iPhone/stdlib/FreeBSD/system.c 2019-05-01 23:27:20.000000000 -1000
+@@ -57,20 +57,14 @@
+ #if __DARWIN_UNIX03
+ #include <pthread.h>
+
+-#if !(TARGET_OS_IPHONE && (TARGET_OS_SIMULATOR || !TARGET_OS_IOS))
+ static pthread_mutex_t __systemfn_mutex = PTHREAD_MUTEX_INITIALIZER;
+-#endif
+ extern int __unix_conforming;
+ #endif /* __DARWIN_UNIX03 */
+
+ int
+-__system(command)
++system(command)
+ const char *command;
+ {
+-#if TARGET_OS_IPHONE && (TARGET_OS_SIMULATOR || !TARGET_OS_IOS)
+- // Don't abort() on iOS for now
+- LIBC_ABORT("system() is not supported on this platform.");
+-#else
+ pid_t pid, savedpid;
+ int pstat, err;
+ struct sigaction ign, intact, quitact;
+@@ -88,14 +82,10 @@
+ #endif /* __DARWIN_UNIX03 */
+
+ if (!command) { /* just checking... */
+-#if TARGET_OS_IPHONE
+- return(0);
+-#else
+ if (access(_PATH_BSHELL, F_OK) == -1) /* if no sh or no access */
+ return(0);
+ else
+ return(1);
+-#endif
+ }
+
+ if ((err = posix_spawnattr_init(&attr)) != 0) {
+@@ -114,19 +104,19 @@
+ ign.sa_handler = SIG_IGN;
+ (void)sigemptyset(&ign.sa_mask);
+ ign.sa_flags = 0;
+- (void)_sigaction(SIGINT, &ign, &intact);
++ (void)sigaction(SIGINT, &ign, &intact);
+ if (intact.sa_handler != SIG_IGN) {
+ sigaddset(&defaultsig, SIGINT);
+ flags |= POSIX_SPAWN_SETSIGDEF;
+ }
+- (void)_sigaction(SIGQUIT, &ign, &quitact);
++ (void)sigaction(SIGQUIT, &ign, &quitact);
+ if (quitact.sa_handler != SIG_IGN) {
+ sigaddset(&defaultsig, SIGQUIT);
+ flags |= POSIX_SPAWN_SETSIGDEF;
+ }
+ (void)sigemptyset(&newsigblock);
+ (void)sigaddset(&newsigblock, SIGCHLD);
+- (void)_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock);
++ (void)sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock);
+ (void)posix_spawnattr_setsigmask(&attr, &oldsigblock);
+ if (flags & POSIX_SPAWN_SETSIGDEF) {
+ (void)posix_spawnattr_setsigdefault(&attr, &defaultsig);
+@@ -138,7 +128,7 @@
+ if (err == 0) {
+ savedpid = pid;
+ do {
+- pid = _wait4(savedpid, &pstat, 0, (struct rusage *)0);
++ pid = wait4(savedpid, &pstat, 0, (struct rusage *)0);
+ } while (pid == -1 && errno == EINTR);
+ if (pid == -1) pstat = -1;
+ } else if (err == ENOMEM || err == EAGAIN) { /* as if fork failed */
+@@ -147,17 +137,14 @@
+ pstat = W_EXITCODE(127, 0); /* couldn't exec shell */
+ }
+
+- (void)_sigaction(SIGINT, &intact, NULL);
+- (void)_sigaction(SIGQUIT, &quitact, NULL);
+- (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL);
++ (void)sigaction(SIGINT, &intact, NULL);
++ (void)sigaction(SIGQUIT, &quitact, NULL);
++ (void)sigprocmask(SIG_SETMASK, &oldsigblock, NULL);
+ #if __DARWIN_UNIX03
+ pthread_mutex_unlock(&__systemfn_mutex);
+ #endif /* __DARWIN_UNIX03 */
+ return(pstat);
+-#endif /* TARGET_OS_IPHONE && (TARGET_OS_SIMULATOR || !TARGET_OS_IOS) */
+ }
+
+-__weak_reference(__system, system);
+-__weak_reference(__system, _system);
+
+ #pragma clang diagnostic pop