diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-process/top-apple | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-process/top-apple')
-rw-r--r-- | sys-process/top-apple/Manifest | 2 | ||||
-rw-r--r-- | sys-process/top-apple/files/top-apple-73-darwin9.patch | 40 | ||||
-rw-r--r-- | sys-process/top-apple/metadata.xml | 5 | ||||
-rw-r--r-- | sys-process/top-apple/top-apple-73.ebuild | 44 |
4 files changed, 91 insertions, 0 deletions
diff --git a/sys-process/top-apple/Manifest b/sys-process/top-apple/Manifest new file mode 100644 index 000000000000..dcac48f47e47 --- /dev/null +++ b/sys-process/top-apple/Manifest @@ -0,0 +1,2 @@ +DIST libutil-11-top-73.h 5641 SHA256 b7f92a89bb8907a00709cd564d673806f46af4875c3016e6e27191ca5f73adc6 +DIST top-73.tar.gz 69253 SHA256 69668602b008a04b808e37cfbbca4335e60a1c69cac0f51891a573687d0d7227 diff --git a/sys-process/top-apple/files/top-apple-73-darwin9.patch b/sys-process/top-apple/files/top-apple-73-darwin9.patch new file mode 100644 index 000000000000..63d37c58f30b --- /dev/null +++ b/sys-process/top-apple/files/top-apple-73-darwin9.patch @@ -0,0 +1,40 @@ +--- libtop.c.orig 2012-05-03 14:35:48.000000000 +0200 ++++ libtop.c 2012-05-03 14:41:36.000000000 +0200 +@@ -23,6 +23,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <limits.h> ++#include <inttypes.h> + #include <sys/types.h> + #include <mach/bootstrap.h> + #include <mach/host_priv.h> +@@ -1458,6 +1459,7 @@ + libtop_pinfo_update_kernmem_info(task_t task, libtop_pinfo_t* pinfo) { + kern_return_t kr; + ++#ifdef TASK_KERNELMEMORY_INFO_COUNT + mach_msg_type_number_t count = TASK_KERNELMEMORY_INFO_COUNT; + + pinfo->psamp.p_palloc = pinfo->psamp.palloc; +@@ -1466,6 +1468,9 @@ + pinfo->psamp.p_sfree = pinfo->psamp.sfree; + + kr = task_info(task, TASK_KERNELMEMORY_INFO, (task_info_t)&pinfo->psamp.palloc, &count); ++#else ++ memset(&pinfo->psamp.palloc, 0, sizeof(pinfo->psamp.palloc)); ++#endif + return kr; + } + +@@ -1630,9 +1635,11 @@ + } + + switch (info.share_mode) { ++#ifdef SM_LARGE_PAGE + case SM_LARGE_PAGE: + // Treat SM_LARGE_PAGE the same as SM_PRIVATE + // since they are not shareable and are wired. ++#endif + case SM_PRIVATE: + rprvt += info.private_pages_resident * pagesize; + rprvt += info.shared_pages_resident * pagesize; diff --git a/sys-process/top-apple/metadata.xml b/sys-process/top-apple/metadata.xml new file mode 100644 index 000000000000..f737f232e3bf --- /dev/null +++ b/sys-process/top-apple/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>prefix</herd> +</pkgmetadata> diff --git a/sys-process/top-apple/top-apple-73.ebuild b/sys-process/top-apple/top-apple-73.ebuild new file mode 100644 index 000000000000..4cdbfd54da7b --- /dev/null +++ b/sys-process/top-apple/top-apple-73.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit toolchain-funcs eutils + +DESCRIPTION="Apple's top from Mac OS X Lion 10.7" +HOMEPAGE="http://www.opensource.apple.com/" +SRC_URI=" + http://www.opensource.apple.com/tarballs/top/top-${PV}.tar.gz + http://www.opensource.apple.com/source/libutil/libutil-11/libutil.h?txt -> libutil-11-top-${PV}.h" + +LICENSE="APSL-2 BSD" +SLOT="0" +KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" +IUSE="" + +S=${WORKDIR}/top-${PV} + +src_prepare() { + # libutil.h header is missing at least on Leopard (10.5), the dylib just + # exists + [[ ! -e ${ROOT}/usr/include/libutil.h ]] && \ + cp "${DISTDIR}"/libutil-11-top-${PV}.h "${S}"/libutil.h || die + epatch "${FILESDIR}"/${P}-darwin9.patch +} + +src_compile() { + local libs="-lutil -lpanel -lncurses -framework CoreFoundation -framework IOKit" + echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS} -o top -I." *.c ${libs} + $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o top -I. *.c ${libs} || die +} + +src_install() { + dobin top +} + +pkg_postinst() { + ewarn "To use top, you need to perform the following commands:" + ewarn " % sudo chown root ${EPREFIX}/usr/bin/top" + ewarn " % sudo chmod u+s ${EPREFIX}/usr/bin/top" +} |