From 256d6ca369098dab3f3c7c13b5d4eb240d115441 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sun, 17 Feb 2019 22:32:39 +0100 Subject: [PATCH] distcc: bump version, disable x86_gcc2 (#3641) --- sys-devel/distcc/distcc-3.3.2.recipe | 83 +++++++++++++ .../distcc/patches/distcc-3.3.2.patchset | 115 ++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 sys-devel/distcc/distcc-3.3.2.recipe create mode 100644 sys-devel/distcc/patches/distcc-3.3.2.patchset diff --git a/sys-devel/distcc/distcc-3.3.2.recipe b/sys-devel/distcc/distcc-3.3.2.recipe new file mode 100644 index 000000000..0bcbed663 --- /dev/null +++ b/sys-devel/distcc/distcc-3.3.2.recipe @@ -0,0 +1,83 @@ +SUMMARY="Distribute compilation of C code across several machines on a network" +DESCRIPTION=" +distcc is a program to distribute builds of C, C++, Objective C or Objective \ +C++ code across several machines on a network. distcc should always generate \ +the same results as a local build, is simple to install and use, and is \ +usually much faster than a local compile. + +distcc does not require all machines to share a filesystem, have synchronized \ +clocks, or to have the same libraries or header files installed. They can even \ +have different processors or operating systems, if cross-compilers are \ +installed. +" +HOMEPAGE="http://distcc.org/" +COPYRIGHT="2002-2004 by Martin Pool + 2005 Google Inc." +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/distcc/distcc/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="dceb53b499a37abfc6ace80d2d5ec7dd02fbd560a1909fedb86e17cdd58e9048" +SOURCE_DIR="distcc-$portVersion" +SOURCE_FILENAME="distcc-v$portVersion.tar.gz" +PATCHES="distcc-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +GLOBAL_WRITABLE_FILES=" + settings/default/distcc keep-old + settings/distcc/hosts keep-old + settings/distcc/clients.allow keep-old + settings/distcc/commands.allow.sh keep-old + " + +PROVIDES=" + distcc = $portVersion + cmd:distcc$secondaryArchSuffix = $portVersion + cmd:distccd$secondaryArchSuffix = $portVersion + cmd:distccmon_text$secondaryArchSuffix = $portVersion + cmd:lsdistcc$secondaryArchSuffix = $portVersion + cmd:pump$secondaryArchSuffix =$portVersion + cmd:update_distcc_symlinks$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libpopt$secondaryArchSuffix + lib:libpython3.6m$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libpopt$secondaryArchSuffix + devel:libpython3.6m$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:g++$secondaryArchSuffix + cmd:gcc$secondaryArchSuffix + #cmd:gdb # for testing + cmd:libtoolize$secondaryArchSuffix + cmd:make + cmd:which + " + +BUILD() +{ + libtoolize --copy --force --install + ./autogen.sh + CFLAGS=-D_BSD_SOURCE runConfigure ./configure \ + --disable-Werror --without-libiberty \ + LDFLAGS=-L`python-config --prefix`/lib/python2.7/config + make $jobArgs +} + +INSTALL() +{ + make install +} + +TEST() +{ + make check RESTRICTED_PATH=/sources/distcc-3.1:/bin +} diff --git a/sys-devel/distcc/patches/distcc-3.3.2.patchset b/sys-devel/distcc/patches/distcc-3.3.2.patchset new file mode 100644 index 000000000..372dfd769 --- /dev/null +++ b/sys-devel/distcc/patches/distcc-3.3.2.patchset @@ -0,0 +1,115 @@ +From a2f4c49256d7e6e021f17daeea57e1046a5274c2 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 17 Feb 2019 07:12:36 +0100 +Subject: Convert existing patch to git patchset. + + +diff --git a/configure.ac b/configure.ac +index 8fd6a66..06759f1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -314,9 +314,12 @@ AC_CHECK_TYPES([in_port_t, in_addr_t], , , + # only looks in /etc/hosts), so we only look for -lsocket if we need + # it. + AC_SEARCH_LIBS(gethostent, [nsl]) +-AC_SEARCH_LIBS(setsockopt, [socket]) ++AC_SEARCH_LIBS(setsockopt, [socket network]) + AC_SEARCH_LIBS(hstrerror, [resolv]) + AC_SEARCH_LIBS(inet_aton, [resolv]) ++AC_SEARCH_LIBS(strsep, [bsd]) ++AC_SEARCH_LIBS(wait3, [bsd]) ++AC_SEARCH_LIBS(wait4, [bsd]) + + if test x"$with_included_popt" != x"yes" && test x"$with_included_popt" != xno + then +@@ -379,6 +382,7 @@ AC_CHECK_FUNCS([snprintf vsnprintf vasprintf asprintf getcwd getwd mkdtemp]) + AC_CHECK_FUNCS([getrusage strsignal gettimeofday]) + AC_CHECK_FUNCS([getaddrinfo getnameinfo inet_ntop inet_ntoa]) + AC_CHECK_FUNCS([strndup strsep mmap strlcpy]) ++AC_CHECK_FUNCS([nice]) + + AC_CHECK_FUNCS([getloadavg]) + AC_CHECK_FUNCS([getline]) +@@ -475,6 +479,8 @@ AC_CHECK_MEMBER([struct sockaddr_storage.ss_family], + AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [define if you have struct sockaddr_storage]),, + [#include ]) + ++AC_CHECK_MEMBERS([struct rusage.ru_minflt, struct rusage.ru_majflt]) ++ + AC_ARG_WITH(avahi, + AC_HELP_STRING([--without-avahi], [build without avahi])) + +diff --git a/src/daemon.c b/src/daemon.c +index 5765982..0c52d5d 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -197,15 +197,19 @@ int main(int argc, char *argv[]) + if ((ret = dcc_set_lifetime()) != 0) + dcc_exit(ret); + ++#ifdef HAVE_NICE + /* do this before giving away root */ + if (nice(opt_niceness) == -1) { + rs_log_warning("nice %d failed: %s", opt_niceness, + strerror(errno)); + /* continue anyhow */ + } ++#endif + ++#ifndef __HAIKU__ + if ((ret = dcc_discard_root()) != 0) + dcc_exit(ret); ++#endif + + /* Discard privileges before opening log so that if it's created, it has + * the right ownership. */ +diff --git a/src/exec.c b/src/exec.c +index 46b377e..4dd86f3 100644 +--- a/src/exec.c ++++ b/src/exec.c +@@ -491,13 +491,19 @@ int dcc_collect_child(const char *what, pid_t pid, + * critique_status(). */ + rs_trace("%s child %ld terminated with status %#x", + what, (long) ret_pid, *wait_status); ++#if defined HAVE_RUSAGE_RU_MINFLT && defined HAVE_RUSAGE_RU_MAJFLT + rs_log_info("%s times: user %lld.%06lds, system %lld.%06lds, " + "%ld minflt, %ld majflt", + what, + (long long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec, + (long long) ru.ru_stime.tv_sec, (long) ru.ru_stime.tv_usec, + ru.ru_minflt, ru.ru_majflt); +- ++#else ++ rs_log_info("%s times: user %ld.%06lds, system %ld.%06lds", ++ what, ++ ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec, ++ ru.ru_stime.tv_sec, (long) ru.ru_stime.tv_usec); ++#endif + return 0; + } + +-- +2.19.1 + + +From 07c7f34e7354ab07242ed430544a04aed8a7b7fd Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 17 Feb 2019 08:00:17 +0100 +Subject: strings.h fix + + +diff --git a/src/filename.c b/src/filename.c +index 9b23b38..f19157c 100644 +--- a/src/filename.c ++++ b/src/filename.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + + #include "distcc.h" +-- +2.19.1 +