diff options
author | 2007-08-11 12:54:57 +0000 | |
---|---|---|
committer | 2007-08-11 12:54:57 +0000 | |
commit | 769a86b392bfe9cc7f3199effc278537db96d7cb (patch) | |
tree | fda21ce4023bbfb5569b78f01ade044e541ac65f /gnustep-apps | |
parent | Cleanup and updates to match the latest eclass (bug #188331) (diff) | |
download | gnustep-769a86b392bfe9cc7f3199effc278537db96d7cb.tar.gz gnustep-769a86b392bfe9cc7f3199effc278537db96d7cb.tar.bz2 gnustep-769a86b392bfe9cc7f3199effc278537db96d7cb.zip |
Syncing solaris and truefx's size_t patch from prefix-overlay
svn path=/overlay/; revision=225
Diffstat (limited to 'gnustep-apps')
4 files changed, 169 insertions, 1 deletions
diff --git a/gnustep-apps/terminal/Manifest b/gnustep-apps/terminal/Manifest index 4c1ad7c..807896b 100644 --- a/gnustep-apps/terminal/Manifest +++ b/gnustep-apps/terminal/Manifest @@ -1,2 +1,4 @@ +AUX terminal-0.9.5_pre20060324-size_t.patch 724 RMD160 6fecfd58e5d109e35bd96ac31f21f0b026df982d SHA1 fd54041589b3c9b565a20c152e71ba2343be8b72 SHA256 4134baf8a415dd9b46274f6be7ab0663c1ee150be3dc0b56d876228f19cc6ab5 +AUX terminal-0.9.5_pre20060324-solaris.patch 2270 RMD160 a1183a07a9f9b55586b32cec1ef6686ad86c8dee SHA1 f439e3687c477a0c6d0a77a79777d6de4fb1f786 SHA256 7c5687b7ca3231bbfd91daf6a29233e203fbaab72558d8a46c9b6e17653b57d8 DIST terminal-0.9.5_pre20060324.tar.bz2 64141 RMD160 c38df5e80b705c349370165db7ff49398894e167 SHA1 1f3e550314c8648004391dafa99d14b2e330ad2d SHA256 7a893eaefcfa80b89fbf083899d7b6ebc85ce6e3559d62b946a7b8ca685680e4 -EBUILD terminal-0.9.5_pre20060324.ebuild 384 RMD160 4e70cd7bca34fa510b48d9d8d4c29b0f9014ed03 SHA1 2bbea7fcdb94c3c1ce7224cd3b32525bc2550d9f SHA256 aa8425d7a1d4bdda0c1da61daac3d3ef6428a49146eafe5dd02d153ca7b83bb4 +EBUILD terminal-0.9.5_pre20060324.ebuild 579 RMD160 6c60e04738b26b26cada57d776856aa03cbb1eba SHA1 e4d9f295775527a9b337f5e2a38423fef99e5b7e SHA256 9b31ed6cfe1a67574ac92a79a38f5a9184b784ba7c7e33eaaaafd3cdf3b4f904 diff --git a/gnustep-apps/terminal/files/terminal-0.9.5_pre20060324-size_t.patch b/gnustep-apps/terminal/files/terminal-0.9.5_pre20060324-size_t.patch new file mode 100644 index 0000000..aededf2 --- /dev/null +++ b/gnustep-apps/terminal/files/terminal-0.9.5_pre20060324-size_t.patch @@ -0,0 +1,38 @@ +--- Terminal/TerminalParser_Linux.h ++++ Terminal/TerminalParser_Linux.h +@@ -31,7 +31,7 @@ + int utf_count; + + unsigned char input_buf[16]; +- int input_buf_len; ++ size_t input_buf_len; + + #define TITLE_BUF_SIZE 255 + char title_buf[TITLE_BUF_SIZE+1]; +--- Terminal/TerminalParser_Linux.m ++++ Terminal/TerminalParser_Linux.m +@@ -1118,9 +1118,9 @@ + screen_char_t ch; + + char *inp; +- int in_size; ++ size_t in_size; + char *outp; +- int out_size; ++ size_t out_size; + int char_width; + + int ret; +@@ -1211,10 +1211,10 @@ + if (iconv_input_state) + { + unsigned int *inp; +- int insize; ++ size_t insize; + char *outp; + char buf[16+1]; +- int outsize; ++ size_t outsize; + int ret; + + for (i=0;i<l;i++) diff --git a/gnustep-apps/terminal/files/terminal-0.9.5_pre20060324-solaris.patch b/gnustep-apps/terminal/files/terminal-0.9.5_pre20060324-solaris.patch new file mode 100644 index 0000000..6782058 --- /dev/null +++ b/gnustep-apps/terminal/files/terminal-0.9.5_pre20060324-solaris.patch @@ -0,0 +1,120 @@ +--- GNUmakefile ++++ GNUmakefile +@@ -44,7 +44,10 @@ + \ + Label.m + +-Terminal_LDFLAGS = -lutil ++ifeq ($(findstring gnu, $(GNUSTEP_TARGET_OS)), gnu) ++ # for forkpty on Linux ++ Terminal_LDFLAGS = -lutil ++endif + + Terminal_LOCALIZED_RESOURCE_FILES = Localizable.strings + Terminal_LANGUAGES = English Swedish German French Spanish Hungarian Turkish \ +--- TerminalView.m ++++ TerminalView.m +@@ -38,9 +38,11 @@ + #include <fcntl.h> + #ifndef freebsd + #ifndef __NetBSD__ ++#if !defined(solaris2) + # include <pty.h> + #endif + #endif ++#endif + + #include <Foundation/NSBundle.h> + #include <Foundation/NSDebug.h> +@@ -1692,6 +1692,91 @@ + master_fd=-1; + } + ++#if defined(solaris2) ++#include <stdlib.h> ++#include <unistd.h> ++#include <fcntl.h> ++#include <sys/ioctl.h> ++#include <sys/stream.h> ++#include <sys/stropts.h> ++#include <sys/syscall.h> ++#include <stdio.h> ++#include <errno.h> ++ ++#define forkpty my_forkpty ++ ++/** ++ * fork_pty() remplacement for Solaris, it ignores the last two ++ * arguments for the moment. ++ * http://bugs.mysql.com/bug.php?id=22429 ++ */ ++static int my_forkpty (int *amaster, ++ char *name, ++ void *unused1, ++ void *unused2) ++{ ++ int master, slave; ++ char *slave_name; ++ pid_t pid; ++ ++ master = open("/dev/ptmx", O_RDWR); ++ if (master < 0) ++ return -1; ++ ++ if (grantpt(master) < 0) { ++ close (master); ++ return -1; ++ } ++ ++ if (unlockpt(master) < 0) { ++ close (master); ++ return -1; ++ } ++ ++ slave_name = ptsname(master); ++ if (slave_name == NULL) { ++ close (master); ++ return -1; ++ } ++ ++ slave = open(slave_name, O_RDWR); ++ if (slave < 0) { ++ close (master); ++ return -1; ++ } ++ ++ if (ioctl(slave, I_PUSH, "ptem") < 0 || ++ ioctl(slave, I_PUSH, "ldterm") < 0) ++ { ++ close (slave); ++ close (master); ++ return -1; ++ } ++ ++ if (amaster) ++ *amaster = master; ++ ++ if (name) ++ strcpy (name, slave_name); ++ ++ pid = fork(); ++ switch (pid) { ++ case -1: /* Error */ ++ return -1; ++ case 0: /* Child */ ++ close(master); ++ dup2(slave, STDIN_FILENO); ++ dup2(slave, STDOUT_FILENO); ++ dup2(slave, STDERR_FILENO); ++ return 0; ++ default: /* Parent */ ++ close (slave); ++ return pid; ++ } ++ ++ return -1; ++} ++#endif + + -(void) runProgram: (NSString *)path + withArguments: (NSArray *)args diff --git a/gnustep-apps/terminal/terminal-0.9.5_pre20060324.ebuild b/gnustep-apps/terminal/terminal-0.9.5_pre20060324.ebuild index 5e2a978..d8bec76 100644 --- a/gnustep-apps/terminal/terminal-0.9.5_pre20060324.ebuild +++ b/gnustep-apps/terminal/terminal-0.9.5_pre20060324.ebuild @@ -13,3 +13,11 @@ SRC_URI="http://overlays.gentoo.org/svn/proj/gnustep/downloads/${P}.tar.bz2" LICENSE="GPL-2" KEYWORDS="~amd64 ~ppc ~x86" SLOT="0" + +src_unpack() { + unpack ${A} + cd "${S}" + # on Solaris -lutil doesn't exist, which hence doesn't provide forkpty + epatch "${FILESDIR}"/${P}-solaris.patch + epatch "${FILESDIR}"/${P}-size_t.patch +} |