diff options
author | Jay Freeman <saurik@saurik.com> | 2009-04-08 21:39:43 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2009-04-08 21:39:43 +0000 |
commit | 6774b86da56c1713247148e83d44630675828dee (patch) | |
tree | ada228fb01a2f87a185ed496f449c6fb5239e968 /data/ncurses/_metadata | |
parent | 922ac76bdc9e96b5f3d03b53b85478cc285d06f6 (diff) |
Upgraded ncurses (and with it screen and top); dropped Essential: (*phew*) and moved to pututxline().
git-svn-id: http://svn.telesphoreo.org/trunk@565 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/ncurses/_metadata')
-rw-r--r-- | data/ncurses/_metadata/preinst.c | 16 | ||||
-rw-r--r-- | data/ncurses/_metadata/prerm.c | 26 | ||||
-rw-r--r-- | data/ncurses/_metadata/version | 2 |
3 files changed, 43 insertions, 1 deletions
diff --git a/data/ncurses/_metadata/preinst.c b/data/ncurses/_metadata/preinst.c new file mode 100644 index 000000000..2c33ad71d --- /dev/null +++ b/data/ncurses/_metadata/preinst.c @@ -0,0 +1,16 @@ +#include <string.h> +#include <unistd.h> + +int main(int argc, char *argv[]) { + if (argc < 2 || ( + strcmp(argv[1], "install") != 0 && ( + strcmp(argv[1], "upgrade") != 0 || + strncmp(argv[2], "5.6-", 4) != 0 + ))) return 0; + + unlink("/usr/lib/_ncurses"); + if (symlink("/usr/lib/", "/usr/lib/_ncurses") != 0) + return 1; + + return 0; +} diff --git a/data/ncurses/_metadata/prerm.c b/data/ncurses/_metadata/prerm.c new file mode 100644 index 000000000..1bcb72a4c --- /dev/null +++ b/data/ncurses/_metadata/prerm.c @@ -0,0 +1,26 @@ +#include <string.h> +#include <unistd.h> + +int main(int argc, char *argv[]) { + if (argc < 2 || ( + strcmp(argv[1], "remove") != 0 + )) return 0; + + if (unlink("/usr/lib/_ncurses") == -1) + return 1; + + if (mkdir("/usr/lib/_ncurses", 0755) == -1) { + symlink("/usr/lib/", "/usr/lib/_ncurses"); + return 2; + } + + rename("/usr/lib/libcurses.dylib", "/usr/lib/_ncurses/libcurses.dylib"); + rename("/usr/lib/libncurses.dylib", "/usr/lib/_ncurses/libncurses.dylib"); + + if (access("/usr/lib/libcurses.dylib", F_OK) != 0) + symlink("libncurses.5.4.dylib", "/usr/lib/libcurses.dylib"); + if (access("/usr/lib/libncurses.dylib", F_OK) != 0) + symlink("libncurses.5.4.dylib", "/usr/lib/libncurses.dylib"); + + return 0; +} diff --git a/data/ncurses/_metadata/version b/data/ncurses/_metadata/version index 2df33d769..760606e1f 100644 --- a/data/ncurses/_metadata/version +++ b/data/ncurses/_metadata/version @@ -1 +1 @@ -5.6 +5.7 |