From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manolis Ragkousis Subject: [PATCH] gnu: procps: Make procps build on non Linux systems. Date: Thu, 28 Apr 2016 11:30:09 +0300 Message-ID: <56b93557-6c80-f1d6-5978-cad718674a14@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------8ADD8E997C5FF0B58054EFCA" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avhKz-0000Cd-VH for guix-devel@gnu.org; Thu, 28 Apr 2016 04:30:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avhKv-0002iM-Tw for guix-devel@gnu.org; Thu, 28 Apr 2016 04:30:17 -0400 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:37366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avhKv-0002i1-JZ for guix-devel@gnu.org; Thu, 28 Apr 2016 04:30:13 -0400 Received: by mail-wm0-x236.google.com with SMTP id a17so52237283wme.0 for ; Thu, 28 Apr 2016 01:30:13 -0700 (PDT) Received: from [192.168.2.110] (athedsl-80482.home.otenet.gr. [87.203.67.176]) by smtp.gmail.com with ESMTPSA id kj9sm8386204wjb.14.2016.04.28.01.30.10 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2016 01:30:10 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org This is a multi-part message in MIME format. --------------8ADD8E997C5FF0B58054EFCA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit With this patch procps can be built on the Hurd. Manolis --------------8ADD8E997C5FF0B58054EFCA Content-Type: text/x-patch; name="0001-gnu-procps-Make-procps-build-on-non-Linux-systems.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0001-gnu-procps-Make-procps-build-on-non-Linux-systems.patch" =46rom 00c2d2ec11a75e3d74704150488e73ee7c8c6fe8 Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis Date: Wed, 27 Apr 2016 23:33:56 +0300 Subject: [PATCH] gnu: procps: Make procps build on non Linux systems. * gnu/packages/patches/procps-non-linux.patch.patch: New patch. * gnu/packages/linux.scm (procps)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 4 +++- gnu/packages/patches/procps-non-linux.patch | 23 +++++++++++++++++++++++= 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/procps-non-linux.patch diff --git a/gnu/local.mk b/gnu/local.mk index 80017ea..036e649 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -673,6 +673,7 @@ dist_patch_DATA =3D \ gnu/packages/patches/polkit-drop-test.patch \ gnu/packages/patches/portaudio-audacity-compat.patch \ gnu/packages/patches/procmail-ambiguous-getline-debian.patch \ + gnu/packages/patches/procps-non-linux.patch \ gnu/packages/patches/pt-scotch-build-parallelism.patch \ gnu/packages/patches/pulseaudio-fix-mult-test.patch \ gnu/packages/patches/pulseaudio-longer-test-timeout.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index a26e641..f3c04cd 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -523,7 +523,9 @@ block devices, UUIDs, TTYs, and many other tools.") "procps-ng-" version ".tar.xz")) (sha256 (base32 - "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))= )) + "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))= + (patches + (list (search-patch "procps-non-linux.patch"))))) (build-system gnu-build-system) (arguments '(#:modules ((guix build utils) diff --git a/gnu/packages/patches/procps-non-linux.patch b/gnu/packages/p= atches/procps-non-linux.patch new file mode 100644 index 0000000..dd21c82 --- /dev/null +++ b/gnu/packages/patches/procps-non-linux.patch @@ -0,0 +1,23 @@ +--- a/lib/test_process.c ++++ b/lib/test_process.c +@@ -21,7 +21,9 @@ + #include + #include + #include ++#ifdef __linux__ + #include ++#endif + #include "c.h" +=20 + #define DEFAULT_SLEEPTIME 300 +@@ -78,8 +80,10 @@ + sigaction(SIGUSR1, &signal_action, NULL); + sigaction(SIGUSR2, &signal_action, NULL); +=20 ++#ifdef __linux__ + /* set process name */ + prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL); ++#endif +=20 + while (sleep_time > 0) { + sleep_time =3D sleep(sleep_time); \ No newline at end of file --=20 2.8.0 --------------8ADD8E997C5FF0B58054EFCA--