summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/baselayout-prefix')
-rw-r--r--sys-apps/baselayout-prefix/ChangeLog6
-rw-r--r--sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r9.ebuild3
-rw-r--r--sys-apps/baselayout-prefix/files/baselayout-1.12.5-solaris.patch108
3 files changed, 115 insertions, 2 deletions
diff --git a/sys-apps/baselayout-prefix/ChangeLog b/sys-apps/baselayout-prefix/ChangeLog
index df1ccc01db1d..817a55bdde06 100644
--- a/sys-apps/baselayout-prefix/ChangeLog
+++ b/sys-apps/baselayout-prefix/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/baselayout-prefix
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog,v 1.4 2011/03/28 15:09:22 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog,v 1.5 2011/03/28 15:38:17 grobian Exp $
+
+ 28 Mar 2011; Fabian Groffen <grobian@gentoo.org>
+ baselayout-prefix-1.12.5-r9.ebuild, +files/baselayout-1.12.5-solaris.patch:
+ Add patch to fix compilation on Solaris, bug #360917
28 Mar 2011; Fabian Groffen <grobian@gentoo.org>
baselayout-prefix-1.12.5-r9.ebuild,
diff --git a/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r9.ebuild b/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r9.ebuild
index 2b3d4ba856ef..2b65bac48025 100644
--- a/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r9.ebuild
+++ b/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r9.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r9.ebuild,v 1.5 2011/03/28 15:09:22 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r9.ebuild,v 1.6 2011/03/28 15:38:17 grobian Exp $
EAPI=3
@@ -50,6 +50,7 @@ src_prepare() {
epatch "${FILESDIR}"/${P/-prefix/}-termios_h.patch # required by aix.patch
epatch "${FILESDIR}"/${P/-prefix/}-aix.patch
epatch "${FILESDIR}"/${P/-prefix/}-darwin-kvm.patch
+ epatch "${FILESDIR}"/${P/-prefix/}-solaris.patch
# The consoletype application in this form will only work on Linux
[[ ${CHOST} == *-linux-* ]] || epatch "${FILESDIR}"/${P/-prefix/}-prefix-no-consoletype.patch
diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-solaris.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-solaris.patch
new file mode 100644
index 000000000000..c3ee513f90be
--- /dev/null
+++ b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-solaris.patch
@@ -0,0 +1,108 @@
+--- src/start-stop-daemon.c
++++ src/start-stop-daemon.c
+@@ -44,7 +44,7 @@
+ # define OSLinux
+ #elif defined(__GNU__)
+ # define OSHURD
+-#elif defined(__sparc__)
++#elif defined (__SVR4) && defined (__sun)
+ # define OSsunos
+ #elif defined(OPENBSD) || defined(__OpenBSD__)
+ # define OSOpenBSD
+@@ -94,6 +94,9 @@
+ #if defined(OSaix)
+ #include <sys/procfs.h>
+ #endif
++#if defined(OSsunos)
++#include <procfs.h>
++#endif
+
+ #include <errno.h>
+ #include <stdio.h>
+@@ -188,7 +191,7 @@
+ static void do_pidfile(const char *name);
+ static void do_stop(int signal_nr, int quietmode,
+ int *n_killed, int *n_notkilled, int retry_nr);
+-#if defined(OSLinux) || defined(OShpux) || defined(OSaix)
++#if defined(OSLinux) || defined(OShpux) || defined(OSaix) || defined(OSsunos)
+ static int pid_is_exec(pid_t pid, const struct stat *esb);
+ #endif
+
+@@ -765,7 +768,7 @@
+ static void
+ check(pid_t pid)
+ {
+-#if defined(OSLinux) || defined(OShpux) || defined(OSaix)
++#if defined(OSLinux) || defined(OShpux) || defined(OSaix) || defined(OSsunos)
+ if (execname && !pid_is_exec(pid, &exec_stat))
+ return;
+ #elif defined(OSHURD) || defined(OSFreeBSD) || defined(OSNetBSD) || defined(OSDarwin)
+@@ -801,7 +804,7 @@
+ /* WTA: this needs to be an autoconf check for /proc/pid existance.
+ */
+
+-#if defined(OSLinux) || defined (OSsunos) || defined(OSfreebsd) || defined(OSaix)
++#if defined(OSLinux) || defined (OSsunos) || defined(OSfreebsd) || defined(OSaix) || defined(OSsunos)
+ static void
+ do_procinit(void)
+ {
+@@ -1069,7 +1072,7 @@
+ }
+ #endif /* OShpux */
+
+-#if defined(OSaix)
++#if defined(OSaix) || defined(OSsunos)
+ /* max possible pid (signed long) in theory:
+ * 32bit: 2147483647 (10 digits)
+ * 64bit: 9223372036854775807 (19 digits)
+@@ -1119,7 +1122,7 @@
+ }
+ return strcmp(name, psi.pr_fname) == 0;
+ }
+-#endif /* OSaix */
++#endif /* OSaix || OSsunos */
+
+
+ static void
+--- src/core/misc.h
++++ src/core/misc.h
+@@ -284,5 +284,9 @@
+ void file_unmap(char *buf, size_t bufsize);
+ size_t buf_get_line(char *buf, size_t buflen, size_t cur);
+
++#if defined (__SVR4) && defined (__sun)
++char* strsep(char** str, const char* delims);
++#endif
++
+ #endif /* _MISC_H */
+
+--- src/core/misc.c
++++ src/core/misc.c
+@@ -647,3 +647,27 @@
+ return count - cur;
+ }
+
++#if defined (__SVR4) && defined (__sun)
++char* strsep(char** str, const char* delims)
++{
++ char* token;
++
++ if (*str == NULL) {
++ /* No more tokens */
++ return NULL;
++ }
++
++ token=*str;
++ while (**str != '\0') {
++ if (strchr(delims, **str) != NULL) {
++ **str = '\0';
++ (*str)++;
++ return token;
++ }
++ (*str)++;
++ }
++ /* There is no other token */
++ *str = NULL;
++ return token;
++}
++#endif