summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/lsof/_metadata/description1
l---------data/lsof/_metadata/license1
l---------data/lsof/_metadata/maintainer1
l---------data/lsof/_metadata/ncurses.dep1
-rw-r--r--data/lsof/_metadata/priority1
-rw-r--r--data/lsof/_metadata/section1
-rw-r--r--data/lsof/_metadata/version1
-rw-r--r--data/lsof/ar.diff12
-rw-r--r--data/lsof/lsof-33.tar.gzbin0 -> 606673 bytes
-rw-r--r--data/lsof/make.sh6
-rw-r--r--data/lsof/port.diff266
11 files changed, 291 insertions, 0 deletions
diff --git a/data/lsof/_metadata/description b/data/lsof/_metadata/description
new file mode 100644
index 000000000..2e9dbea1f
--- /dev/null
+++ b/data/lsof/_metadata/description
@@ -0,0 +1 @@
+shows what files programs have open
diff --git a/data/lsof/_metadata/license b/data/lsof/_metadata/license
new file mode 120000
index 000000000..9e5e5e89d
--- /dev/null
+++ b/data/lsof/_metadata/license
@@ -0,0 +1 @@
+../../../licenses/apsl-2.0 \ No newline at end of file
diff --git a/data/lsof/_metadata/maintainer b/data/lsof/_metadata/maintainer
new file mode 120000
index 000000000..0fa66e077
--- /dev/null
+++ b/data/lsof/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/saurik \ No newline at end of file
diff --git a/data/lsof/_metadata/ncurses.dep b/data/lsof/_metadata/ncurses.dep
new file mode 120000
index 000000000..a395fad08
--- /dev/null
+++ b/data/lsof/_metadata/ncurses.dep
@@ -0,0 +1 @@
+../../ncurses \ No newline at end of file
diff --git a/data/lsof/_metadata/priority b/data/lsof/_metadata/priority
new file mode 100644
index 000000000..a6a7b9cd7
--- /dev/null
+++ b/data/lsof/_metadata/priority
@@ -0,0 +1 @@
+standard
diff --git a/data/lsof/_metadata/section b/data/lsof/_metadata/section
new file mode 100644
index 000000000..eb7a34ddd
--- /dev/null
+++ b/data/lsof/_metadata/section
@@ -0,0 +1 @@
+Administration
diff --git a/data/lsof/_metadata/version b/data/lsof/_metadata/version
new file mode 100644
index 000000000..bb95160cb
--- /dev/null
+++ b/data/lsof/_metadata/version
@@ -0,0 +1 @@
+33
diff --git a/data/lsof/ar.diff b/data/lsof/ar.diff
new file mode 100644
index 000000000..92cb644af
--- /dev/null
+++ b/data/lsof/ar.diff
@@ -0,0 +1,12 @@
+diff -r -u lsof-33/lsof/Configure lsof-33+iPhone/lsof/Configure
+--- lsof-33/lsof/Configure 2007-05-26 01:18:17.000000000 +0000
++++ lsof-33+iPhone/lsof/Configure 2008-04-18 09:29:18.000000000 +0000
+@@ -4835,7 +4835,7 @@
+ if test "X$LSOF_LIB_NO" = "X" # {
+ then
+ echo "" >> $LSOF_MKFC
+- echo "CFGL= $LSOF_FCFGL -L./$LSOF_LIB -llsof $LSOF_CFGL" >> $LSOF_MKFC
++ echo "CFGL= $LSOF_FCFGL -L./$LSOF_LIB lib/*.o $LSOF_CFGL" >> $LSOF_MKFC
+ fi # }
+ echo "" >> $LSOF_MKFC
+ if test "X$LSOF_DEBUG" = "X" # {
diff --git a/data/lsof/lsof-33.tar.gz b/data/lsof/lsof-33.tar.gz
new file mode 100644
index 000000000..1cbdd6e54
--- /dev/null
+++ b/data/lsof/lsof-33.tar.gz
Binary files differ
diff --git a/data/lsof/make.sh b/data/lsof/make.sh
new file mode 100644
index 000000000..027aeb140
--- /dev/null
+++ b/data/lsof/make.sh
@@ -0,0 +1,6 @@
+pkg:setup
+cd lsof
+yes n | ./Configure darwin
+make CC="${PKG_TARG}-gcc" 2>&1 AR="${PKG_TARG}-ar cr \${LIB} \${OBJ}"
+pkg: mkdir -p /usr/bin
+pkg: cp -a lsof /usr/bin
diff --git a/data/lsof/port.diff b/data/lsof/port.diff
new file mode 100644
index 000000000..bddf31262
--- /dev/null
+++ b/data/lsof/port.diff
@@ -0,0 +1,266 @@
+diff -ru lsof-33/lsof/Configure lsof-33+iPhone/lsof/Configure
+--- lsof-33/lsof/Configure 2007-05-26 01:18:17.000000000 +0000
++++ lsof-33+iPhone/lsof/Configure 2008-04-18 09:22:40.000000000 +0000
+@@ -892,12 +892,7 @@
+
+ if test "X$DARWIN_BASE" = "X" # {
+ then
+- if test -r ${LSOF_INCLUDE}/../local/include/libproc.h -a $LSOF_VERS -ge 800 # {
+- then
+ DARWIN_BASE="libproc"
+- else
+- DARWIN_BASE="/dev/kmem"
+- fi # }
+ fi # }
+ if test "X$DARWIN_BASE" = "Xlibproc" # {
+ then
+@@ -934,62 +929,6 @@
+
+ # Make sure Darwin XNU kernel headers are present.
+
+- LSOF_TMP5=""
+- for i in $LSOF_TMP1 # {
+- do
+- LSOF_TMP6=0
+- for j in $LSOF_TMP2 $LSOF_TMP3 $LSOF_TMP4 $LSOF_INCLUDE # {
+- do
+- if test "X${j}" != "X" -a -r ${j}/${i} # {
+- then
+- LSOF_TMP6=1
+- break
+- fi # }
+- done # }
+- if test $LSOF_TMP6 -ne 1 # {
+- then
+- if test "X$LSOF_TMP5" = "X" # {
+- then
+- LSOF_TMP5=$i
+- else
+- LSOF_TMP5="$LSOF_TMP5 $i"
+- fi # }
+- fi # }
+- done # }
+- if test "X$LSOF_TMP5" != "X" # {
+- then
+-
+- # If any Darwin XNU kernel header files are missing, call the
+- # get-hdr-loc.sh script to find the path.
+-
+- LSOF_TMP6=`pwd`/dialects/darwin/get-hdr-loc.sh
+- if test ! -x $LSOF_TMP6 # {
+- then
+- echo "FATAL: can't execute: $LSOF_TMP6"
+- rm -f $LSOF_HLP
+- exit 1
+- fi # }
+- DARWIN_XNUDIR=`$LSOF_TMP6 $LSOF_TMP5`
+- if test $? -ne 0 # {
+- then
+- echo "FATAL: $LSOF_TMP6 returns: $DARWIN_XNUDIR"
+- rm -f $LSOF_HLP
+- exit 1
+- fi # }
+- LSOF_TMP2="${DARWIN_XNUDIR}/bsd"
+- LSOF_TMP3="${DARWIN_XNUDIR}/osfmk"
+- LSOF_TMP4=""
+- fi # }
+-
+- # Add header file paths.
+-
+- for i in $LSOF_TMP2 $LSOF_TMP3 $LSOF_TMP4 $LSOF_INCLUDE # {
+- do
+- if test -d $i -a "X$i" != "X/usr/include" # {
+- then
+- LSOF_DINC="$LSOF_DINC -I${i}"
+- fi # }
+- done # }
+ if test "X$DARWIN_BASE" = "X/dev/kmem" # {
+ then
+
+diff -ru lsof-33/lsof/dialects/darwin/kmem/dfile.c lsof-33+iPhone/lsof/dialects/darwin/kmem/dfile.c
+--- lsof-33/lsof/dialects/darwin/kmem/dfile.c 2007-05-24 22:35:11.000000000 +0000
++++ lsof-33+iPhone/lsof/dialects/darwin/kmem/dfile.c 2008-04-18 08:46:17.000000000 +0000
+@@ -44,6 +44,7 @@
+ */
+
+ #if DARWINV>=800
++#include <sys/file_internal.h>
+ #define file fileglob
+ #define f_flag fg_flag
+ #define f_type fg_type
+diff -ru lsof-33/lsof/dialects/darwin/kmem/dlsof.h lsof-33+iPhone/lsof/dialects/darwin/kmem/dlsof.h
+--- lsof-33/lsof/dialects/darwin/kmem/dlsof.h 2007-05-24 22:35:11.000000000 +0000
++++ lsof-33+iPhone/lsof/dialects/darwin/kmem/dlsof.h 2008-04-18 09:04:15.000000000 +0000
+@@ -38,6 +38,11 @@
+ #if !defined(DARWIN_LSOF_H)
+ #define DARWIN_LSOF_H 1
+
++#define KERNEL
++#define KERNEL_PRIVATE
++#include <sys/select.h>
++#undef KERNEL_PRIVATE
++#undef KERNEL
+ #include <stdlib.h>
+ #include <dirent.h>
+ #include <nlist.h>
+@@ -52,7 +57,13 @@
+ #include <sys/mount.h>
+ #define m_stat mnt_stat
+ #else /* DARWINV>=800 */
++#include <machine/locks.h>
++#define KERNEL
++#include <sys/mount.h>
++#undef KERNEL
++#define PRIVATE
+ #include <sys/mount_internal.h>
++#undef PRIVATE
+ #define m_stat mnt_vfsstat
+ #endif /* DARWINV>=800 */
+
+@@ -60,7 +71,9 @@
+ #include <sys/uio.h>
+ #include <sys/vnode.h>
+ #else /* DARWINV>=800 */
++#define KERNEL
+ #include <sys/vnode.h>
++#undef KERNEL
+ #define _SYS_SYSTM_H_
+ struct nameidata { int dummy; }; /* to satisfy function prototypes */
+ #include <sys/vnode_internal.h>
+@@ -70,20 +83,32 @@
+ #define KERNEL_PRIVATE
+ #include <sys/socketvar.h>
+ #undef KERNEL_PRIVATE
++#define PRIVATE
+ #include <sys/protosw.h>
++#undef PRIVATE
+ #include <sys/socket.h>
+ #include <sys/un.h>
++#define KERNEL
++#define PRIVATE
+ #include <sys/unpcb.h>
++#undef PRIVATE
++#undef KERNEL
+
+ # if defined(AF_NDRV)
++#define PRIVATE
+ #include <net/if_var.h>
++#undef PRIVATE
+ #define KERNEL
++#define PRIVATE
+ #include <sys/kern_event.h>
++#undef PRIVATE
+ #undef KERNEL
+ #include <net/ndrv.h>
+ # if DARWINV>=530
+ #define KERNEL 1
++#define PRIVATE
+ #include <net/ndrv_var.h>
++#undef PRIVATE
+ #undef KERNEL
+ # endif /* DARWINV>=530 */
+ # endif /* defined(AF_NDRV) */
+@@ -91,16 +116,24 @@
+ # if defined(AF_SYSTEM)
+ #include <sys/queue.h>
+ #define KERNEL
++#define PRIVATE
+ #include <sys/kern_event.h>
++#undef PRIVATE
+ #undef KERNEL
+ # endif /* defined(AF_SYSTEM) */
+
++#define PRIVATE
+ #include <netinet/in.h>
++#undef PRIVATE
+ #include <netinet/in_systm.h>
+ #include <netinet/ip.h>
++#define PRIVATE
+ #include <net/route.h>
++#undef PRIVATE
+ #include <netinet6/ipsec.h>
++#define KERNEL_PRIVATE
+ #include <netinet/in_pcb.h>
++#undef KERNEL_PRIVATE
+ #include <netinet/ip_var.h>
+ #include <netinet/tcp.h>
+ #include <netinet/tcpip.h>
+@@ -109,7 +142,9 @@
+ #include <netinet/tcp_var.h>
+ #include <arpa/inet.h>
+ #include <net/raw_cb.h>
++#define PRIVATE
+ #include <sys/domain.h>
++#undef PRIVATE
+ #define pmap RPC_pmap
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_prot.h>
+@@ -168,7 +203,7 @@
+ # if DARWINV<800
+ #include <sys/sysctl.h>
+ # else /* DARWINV>=800 */
+-#include "/usr/include/sys/sysctl.h"
++#include "sys/sysctl.h"
+ # endif /* DARWINV<800 */
+
+ # if DARWINV<800
+@@ -177,8 +212,10 @@
+ #include <sys/file.h>
+ #undef KERNEL
+ # else /* DARWINV>=800 */
++#define KERNEL
+ #include <sys/fcntl.h>
+ #include <sys/file_internal.h>
++#undef KERNEL
+ # endif /* DARWINV<800 */
+
+ # if defined(HASKQUEUE)
+diff -ru lsof-33/lsof/dialects/darwin/kmem/machine.h lsof-33+iPhone/lsof/dialects/darwin/kmem/machine.h
+--- lsof-33/lsof/dialects/darwin/kmem/machine.h 2007-05-24 22:35:11.000000000 +0000
++++ lsof-33+iPhone/lsof/dialects/darwin/kmem/machine.h 2008-04-18 07:27:27.000000000 +0000
+@@ -43,7 +43,7 @@
+ #include <sys/param.h>
+
+ # if DARWINV>=800
+-#include "/usr/include/string.h"
++#include "string.h"
+ # endif /* DARWINV>=800 */
+
+
+diff -ru lsof-33/lsof/dialects/darwin/libproc/machine.h lsof-33+iPhone/lsof/dialects/darwin/libproc/machine.h
+--- lsof-33/lsof/dialects/darwin/libproc/machine.h 2006-03-23 21:28:26.000000000 +0000
++++ lsof-33+iPhone/lsof/dialects/darwin/libproc/machine.h 2008-04-18 09:23:12.000000000 +0000
+@@ -46,7 +46,7 @@
+ #include <sys/types.h>
+ #include <sys/param.h>
+
+-#include "/usr/include/string.h"
++#include "string.h"
+
+
+ /*
+diff -ru lsof-33/lsof/lsof.h lsof-33+iPhone/lsof/lsof.h
+--- lsof-33/lsof/lsof.h 2007-05-24 22:35:11.000000000 +0000
++++ lsof-33+iPhone/lsof/lsof.h 2008-04-18 09:05:04.000000000 +0000
+@@ -46,6 +46,11 @@
+
+ #include "lsof_fields.h"
+
++#define KERNEL
++#include <mach/port.h>
++#undef KERNEL
++#define _MACH_PORT_T
++
+ #include <ctype.h>
+ #include <errno.h>
+
+@@ -53,7 +58,9 @@
+ #include <locale.h>
+ # endif /* defined(HASSETLOCALE) */
+
++#define PRIVATE
+ #include <netdb.h>
++#undef PRIVATE
+ #include <pwd.h>
+ #include <stdio.h>
+