diff options
author | 2007-08-06 15:16:01 +0000 | |
---|---|---|
committer | 2007-08-06 15:16:01 +0000 | |
commit | fc23255a7c54a189a54b0fee6b5dcc9305aaa2b6 (patch) | |
tree | baf5131b4a86615b63b9215f6c6c4ee65e019d8b | |
parent | marked ~x86-solaris (diff) | |
download | prefix-fc23255a7c54a189a54b0fee6b5dcc9305aaa2b6.tar.gz prefix-fc23255a7c54a189a54b0fee6b5dcc9305aaa2b6.tar.bz2 prefix-fc23255a7c54a189a54b0fee6b5dcc9305aaa2b6.zip |
marked ~x86-solaris, and added patch to make it compile on Solaris
(Portage 2.2.00.7571-prefix/SVN/SunOS 5.10 i386)
svn path=/prefix-overlay/; revision=200
-rw-r--r-- | gnustep-apps/terminal/Manifest | 3 | ||||
-rw-r--r-- | gnustep-apps/terminal/files/terminal-0.9.5_pre20060324-solaris.patch | 120 | ||||
-rw-r--r-- | gnustep-apps/terminal/terminal-0.9.5_pre20060324.ebuild | 9 |
3 files changed, 130 insertions, 2 deletions
diff --git a/gnustep-apps/terminal/Manifest b/gnustep-apps/terminal/Manifest index 841fa9b..7382e24 100644 --- a/gnustep-apps/terminal/Manifest +++ b/gnustep-apps/terminal/Manifest @@ -1,2 +1,3 @@ +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 495 RMD160 72d97d9a3c5ec01f39c743b5c8ea4d10b2f9a8ff SHA1 4be9bd9c978aea77a6cb7c7871867f5e2248a69e SHA256 2a365ad26d39b92328c6fd5d29da9dd7780a0b9e59a04a6f1da69cc8d31972ee +EBUILD terminal-0.9.5_pre20060324.ebuild 575 RMD160 1ae4b57c3773ece1e253e687d9038179d7e74c0d SHA1 5f37e206ed6b1f5971c20c8642a601a705ebaeb0 SHA256 39c308f63653f300f341ca40f2818ca6e86e8527f5f02fc78eb64b99fc3d6b87 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 4f917b6..1d6ce78 100644 --- a/gnustep-apps/terminal/terminal-0.9.5_pre20060324.ebuild +++ b/gnustep-apps/terminal/terminal-0.9.5_pre20060324.ebuild @@ -13,5 +13,12 @@ HOMEPAGE="http://www.nongnu.org/terminal/" SRC_URI="http://overlays.gentoo.org/svn/proj/gnustep/downloads/${P}.tar.bz2" LICENSE="GPL-2" -KEYWORDS="~amd64 ~x86" +KEYWORDS="~amd64 ~x86 ~x86-solaris" 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 +} |