summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2011-03-28 14:05:51 +0000
committerMichael Haubenwallner <haubi@gentoo.org>2011-03-28 14:05:51 +0000
commitb55c93b4328ae3ab1e8c1fc3c17e7d9988e5649a (patch)
tree30fe26b8eedaddf395b2bff0ac74bec760d7cdd2 /sys-apps/baselayout-prefix
parentFix whitespaces (diff)
downloadgentoo-2-b55c93b4328ae3ab1e8c1fc3c17e7d9988e5649a.tar.gz
gentoo-2-b55c93b4328ae3ab1e8c1fc3c17e7d9988e5649a.tar.bz2
gentoo-2-b55c93b4328ae3ab1e8c1fc3c17e7d9988e5649a.zip
AIX port of source: use sys-devel/gnulib for getopt.
AIX lacks <sys/termios.h>. As <termios.h> is standard, use <termios.h> on any platform.
Diffstat (limited to 'sys-apps/baselayout-prefix')
-rw-r--r--sys-apps/baselayout-prefix/ChangeLog9
-rw-r--r--sys-apps/baselayout-prefix/Manifest6
-rw-r--r--sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r9.ebuild14
-rw-r--r--sys-apps/baselayout-prefix/files/baselayout-1.12.5-aix.patch107
-rw-r--r--sys-apps/baselayout-prefix/files/baselayout-1.12.5-termios_h.patch30
5 files changed, 161 insertions, 5 deletions
diff --git a/sys-apps/baselayout-prefix/ChangeLog b/sys-apps/baselayout-prefix/ChangeLog
index 536e32de6971..ffd592448d70 100644
--- a/sys-apps/baselayout-prefix/ChangeLog
+++ b/sys-apps/baselayout-prefix/ChangeLog
@@ -1,6 +1,13 @@
# 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.2 2011/03/24 19:09:03 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog,v 1.3 2011/03/28 14:05:51 haubi Exp $
+
+ 28 Mar 2011; Michael Haubenwallner <haubi@gentoo.org>
+ baselayout-prefix-1.12.5-r9.ebuild, +files/baselayout-1.12.5-aix.patch,
+ +files/baselayout-1.12.5-termios_h.patch:
+ AIX port of source: use sys-devel/gnulib for getopt.
+ AIX lacks <sys/termios.h>. As <termios.h> is standard, use <termios.h> on any
+ platform.
24 Mar 2011; Fabian Groffen <grobian@gentoo.org>
baselayout-prefix-1.12.5-r9.ebuild:
diff --git a/sys-apps/baselayout-prefix/Manifest b/sys-apps/baselayout-prefix/Manifest
index b132d6562f6a..008ded8853ca 100644
--- a/sys-apps/baselayout-prefix/Manifest
+++ b/sys-apps/baselayout-prefix/Manifest
@@ -1,3 +1,4 @@
+AUX baselayout-1.12.5-aix.patch 2454 RMD160 36bbfffe2c004a92b2a9820cf0ae9eaf4ff7dbcb SHA1 b73c19e404b09b4cd7c5cd9ddf9551f7cfffc0e2 SHA256 362fe8a6d27a549b67caf954f8d097e01f1b5d1541d4c40f1befc2a33d6d7ef6
AUX baselayout-1.12.5-prefix-chaining-bash.patch 862 RMD160 f514ef370a4858f63c23cfbef9bdbb59c074e50d SHA1 70b02ea0148dd43df2012de2413aef505051b87c SHA256 0fe5200752a3c6437e17f833b307e8dbebaa6c3786adf9814f060445f702550b
AUX baselayout-1.12.5-prefix-chaining-eprefix.patch 991 RMD160 74c0326b2800a9b6c9670550fab3ddfbf42bb9d0 SHA1 0593cc4963b9611159e0a791f8743702ab875883 SHA256 1d6b1f66f2bbf5417d36808ab8bce951a9ecdbcf4992ffb3fcd32af8a6e7b048
AUX baselayout-1.12.5-prefix-chaining-pkgconfig.patch 568 RMD160 ec1dc56f66f3cceb7afe1695f2e887299f430d97 SHA1 51fa2775a998a1519253213cb62d5db980d18cc4 SHA256 6c7cdea50afc178693b954bf295dfe1de7fa06108f662f5aa0d539c69ba1f28f
@@ -9,7 +10,8 @@ AUX baselayout-1.12.5-prefix-pidof.patch 329 RMD160 eca62253ec62c3c88b8e95a9fef7
AUX baselayout-1.12.5-prefix-sh.patch 8171 RMD160 c85d0c98d5cf7539571f13a40fa27cbe547d3439 SHA1 121d9ec49256f2bbeae18ccaa3cea22a9168db50 SHA256 aed4b37186ec24ea5189e5be20f1a05cf76f277054a6a5761195ef803b88acad
AUX baselayout-1.12.5-prefix-src.patch 3629 RMD160 cda870fae2abf559770d0ac7e5d00a4657906ba5 SHA1 27bec4c8f878b1d5c8a2c5cf8c646a818d01a175 SHA256 3f7565deda1f82e5906b350c178b8b414a2b37f8155439e0c6f2689c76ca2ba3
AUX baselayout-1.12.5-prefix.patch 14807 RMD160 5be4ca65ee754d1c95bb00c488ddd5a77240e9fe SHA1 24d4677f7ade70a712ef73fde33db5b82da39f45 SHA256 a79a3d2f35e03e75c858ef81ccada82b3de4b5bb96168386a1f652bac198ad6c
+AUX baselayout-1.12.5-termios_h.patch 893 RMD160 398140de16da1b2fb874ef00f1caaa6c828372f4 SHA1 b3debc214fe8edbf734611990901018e32ea289b SHA256 60b4251ebce7488b415686178a0eae207adf18240f80523dbc0b4bc70a53ae99
DIST baselayout-1.12.5.tar.bz2 220693 RMD160 85f03fe3b0ff0521ec4226a1b6788575052923b7 SHA1 39ef351ceec1238cbf27d7b9671f244ccf5cca33 SHA256 4ab5512f35c547549b0406221ed92c71a5a86a11044f1d9f0d87f7ec44d39817
-EBUILD baselayout-prefix-1.12.5-r9.ebuild 5545 RMD160 fbc498aa29d6fab8b171e6cc4d5d2bc4c61991b5 SHA1 a0741866534bf4c4200fb22649751e390936d944 SHA256 f25091246ce72cf18083cfb45dfdfe594ad0b1a41e4bba479a3138abbdcc3cfa
-MISC ChangeLog 4938 RMD160 23466c5f682308db197aeb5f0f54ee7b8ee4c36e SHA1 166f4315a3d9db5d295c45fe0cfe1010b82fd7f5 SHA256 3bdb448642a6a8d0c022d1103e7759f8984c08835d9d8440525865499df12a5a
+EBUILD baselayout-prefix-1.12.5-r9.ebuild 5926 RMD160 5d4adb5b30f7de35fa31d9aaf6470b04ff87ea3b SHA1 4b81479cb59b5d738d6b7677613e72d1050464b6 SHA256 fdfbac3b270db4091a444d466be21047a615a4ce284a0f9bca11836732ef2c78
+MISC ChangeLog 5260 RMD160 fc417bfcbd0b76565acbe55fa8272c88aa83c995 SHA1 0d861c9433a1622b820ae923792fd77fc4d759ce SHA256 c502b6ff55a1fafb667782adae56684cead0df00df5873223591d8212a64c24c
MISC metadata.xml 318 RMD160 d64b41bf7b5d0a12823b249c08ded6bbd5a7cbf5 SHA1 3598e969bff5d6802f19a3ed63017ec66383e58f SHA256 752beeb1c1ed6af782e2a2d9576720a8903af33d6b724426dbee987bc88fe6f7
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 c1a79725795e..acadfec50034 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,10 +1,10 @@
# 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.3 2011/03/24 19:09:03 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r9.ebuild,v 1.4 2011/03/28 14:05:51 haubi Exp $
EAPI=3
-inherit eutils toolchain-funcs multilib prefix
+inherit eutils toolchain-funcs multilib prefix flag-o-matic
DESCRIPTION="Minimal baselayout for Gentoo Prefix installs"
HOMEPAGE="http://www.gentoo.org/"
@@ -18,6 +18,7 @@ DEPEND=">=sys-apps/portage-2.2.01"
RDEPEND=">=sys-libs/readline-5.0-r1
>=app-shells/bash-3.1_p7
>=sys-apps/coreutils-5.2.1
+ ppc-aix? ( dev-libs/gnulib )
kernel_Darwin? ( sys-process/pidof-bsd )
kernel_FreeBSD? ( sys-process/pidof-bsd )"
@@ -45,6 +46,10 @@ src_prepare() {
epatch "${FILESDIR}"/${P/-prefix/}-prefix-sh.patch
# Next patch is to be applied on systems that don't have a pidof.
epatch "${FILESDIR}"/${P/-prefix/}-prefix-pidof.patch
+
+ epatch "${FILESDIR}"/${P/-prefix/}-termios_h.patch # required by aix.patch
+ epatch "${FILESDIR}"/${P/-prefix/}-aix.patch
+
# The consoletype application in this form will only work on Linux
[[ ${CHOST} == *-linux-* ]] || epatch "${FILESDIR}"/${P/-prefix/}-prefix-no-consoletype.patch
@@ -68,6 +73,11 @@ src_compile() {
[[ ${SYMLINK_LIB} == "yes" ]] && libdir=$(get_abi_LIBDIR "${DEFAULT_ABI}")
+ if [[ ${CHOST} == *-aix* ]]; then
+ append-flags -I"${EPREFIX}"/usr/$(get_libdir)/gnulib/include
+ append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/gnulib/lib
+ append-ldflags -lgnu # no LIBS makefile variable
+ fi
make -C "${S}"/src \
CC="$(tc-getCC)" \
LD="$(tc-getCC) ${LDFLAGS}" \
diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-aix.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-aix.patch
new file mode 100644
index 000000000000..87ad46b95e39
--- /dev/null
+++ b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-aix.patch
@@ -0,0 +1,107 @@
+W00T, AIX does have /proc filesystem - even with slightly different layout.
+
+--- src/start-stop-daemon.c.orig 2011-03-28 13:55:36 +0200
++++ src/start-stop-daemon.c 2011-03-28 14:50:47 +0200
+@@ -56,3 +56,5 @@
++#elif defined(_AIX)
++# define OSaix
+ #else
+ # error Unknown architecture - cannot build start-stop-daemon
+ #endif
+@@ -82,6 +104,10 @@
+ #include <sys/pstat.h>
+ #endif
+
++#if defined(OSaix)
++#include <sys/procfs.h>
++#endif
++
+ #include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -171,7 +201,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)
++#if defined(OSLinux) || defined(OShpux) || defined(OSaix)
+ static int pid_is_exec(pid_t pid, const struct stat *esb);
+ #endif
+
+@@ -748,7 +778,7 @@
+ static void
+ check(pid_t pid)
+ {
+-#if defined(OSLinux) || defined(OShpux)
++#if defined(OSLinux) || defined(OShpux) || defined(OSaix)
+ if (execname && !pid_is_exec(pid, &exec_stat))
+ return;
+ #elif defined(OSHURD) || defined(OSFreeBSD) || defined(OSNetBSD) || defined(OSDarwin)
+@@ -784,7 +814,7 @@
+ /* WTA: this needs to be an autoconf check for /proc/pid existance.
+ */
+
+-#if defined(OSLinux) || defined (OSsunos) || defined(OSfreebsd)
++#if defined(OSLinux) || defined (OSsunos) || defined(OSfreebsd) || defined(OSaix)
+ static void
+ do_procinit(void)
+ {
+@@ -1052,6 +1082,58 @@
+ }
+ #endif /* OShpux */
+
++#if defined(OSaix)
++/* max possible pid (signed long) in theory:
++ * 32bit: 2147483647 (10 digits)
++ * 64bit: 9223372036854775807 (19 digits)
++ */
++static int
++pid_is_exec(pid_t pid, const struct stat *esb)
++{
++ struct stat sb;
++ char buf[40];
++
++ sprintf(buf, "/proc/%ld/object/a.out", pid);
++ if (stat(buf, &sb) != 0)
++ return 0;
++ return (sb.st_dev == esb->st_dev && sb.st_ino == esb->st_ino);
++}
++
++
++static int
++pid_is_user(pid_t pid, uid_t uid)
++{
++ struct stat sb;
++ char buf[32];
++
++ sprintf(buf, "/proc/%ld", pid);
++ if (stat(buf, &sb) != 0)
++ return 0;
++ return (sb.st_uid == uid);
++}
++
++
++static int
++pid_is_cmd(pid_t pid, const char *name)
++{
++ char buf[40];
++ FILE *f;
++ struct psinfo psi;
++ int r;
++
++ sprintf(buf, "/proc/%ld/psinfo", pid);
++ f = fopen(buf, "r");
++ if (!f)
++ return 0;
++ r = fread(&psi, sizeof(psi), 1, f);
++ fclose(f);
++ if (r != 1) {
++ return 0;
++ }
++ return strcmp(name, psi.pr_fname) == 0;
++}
++#endif /* OSaix */
++
+
+ static void
+ do_findprocs(void)
diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-termios_h.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-termios_h.patch
new file mode 100644
index 000000000000..8c84bf6ce33a
--- /dev/null
+++ b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-termios_h.patch
@@ -0,0 +1,30 @@
+<termios.h> is standard as per SUSv2 already:
+http://pubs.opengroup.org/onlinepubs/007908799/xsh/termios.h.html
+AIX does not provide <sys/termios.h> at all, Linux, Solaris, HP-UX,
+Darwin and Interix have both, redirecting one to the other.
+
+--- src/start-stop-daemon.c.orig 2011-03-28 13:55:36 +0200
++++ src/start-stop-daemon.c 2011-03-28 14:50:47 +0200
+@@ -37,6 +37,9 @@
+ #define NONRETURNING \
+ __attribute__((noreturn))
+
++#define HAVE_TERMIOS_H
++#undef HAVE_SYS_TERMIOS_H
++
+ #if defined(linux) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+ # define OSLinux
+ #elif defined(__GNU__)
+@@ -97,7 +123,11 @@
+ #include <grp.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+-#include <sys/termios.h>
++#if defined(HAVE_TERMIOS_H)
++# include <termios.h>
++#elif defined(HAVE_SYS_TERMIOS_H)
++# include <sys/termios.h>
++#endif
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <assert.h>