summaryrefslogtreecommitdiff
path: root/sys-devel/icecream/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-devel/icecream/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-devel/icecream/files')
-rw-r--r--sys-devel/icecream/files/0.9.6-crosscompile.patch12
-rw-r--r--sys-devel/icecream/files/0.9.6-symlinks.patch19
-rw-r--r--sys-devel/icecream/files/0.9.7-automake.patch32
-rw-r--r--sys-devel/icecream/files/0.9.7-glibc2.16.patch16
-rw-r--r--sys-devel/icecream/files/icecream43
-rw-r--r--sys-devel/icecream/files/icecream-1.0.0-libcap-ng.patch8
-rw-r--r--sys-devel/icecream/files/icecream-conf.d-verbosity.patch18
-rw-r--r--sys-devel/icecream/files/icecream-config69
-rw-r--r--sys-devel/icecream/files/icecream-create-env82
-rw-r--r--sys-devel/icecream/files/icecream-gentoo-multilib.patch59
-rw-r--r--sys-devel/icecream/files/icecream-r244
11 files changed, 402 insertions, 0 deletions
diff --git a/sys-devel/icecream/files/0.9.6-crosscompile.patch b/sys-devel/icecream/files/0.9.6-crosscompile.patch
new file mode 100644
index 000000000000..990072bbb8fd
--- /dev/null
+++ b/sys-devel/icecream/files/0.9.6-crosscompile.patch
@@ -0,0 +1,12 @@
+diff -urN icecc-0.9.6.old//client/icecc-create-env icecc-0.9.6//client/icecc-create-env
+--- icecc-0.9.6.old//client/icecc-create-env 2010-09-18 12:10:08.143391700 +0200
++++ icecc-0.9.6//client/icecc-create-env 2010-09-18 12:10:46.574391700 +0200
+@@ -97,7 +97,7 @@
+
+ add_file $added_gcc /usr/bin/gcc
+ add_file $added_gxx /usr/bin/g++
+-add_file /usr/bin/as
++add_file `$added_gcc -print-prog-name=as` /usr/bin/as
+
+ if test "$is_darwin" = 1; then
+ # add dynamic linker
diff --git a/sys-devel/icecream/files/0.9.6-symlinks.patch b/sys-devel/icecream/files/0.9.6-symlinks.patch
new file mode 100644
index 000000000000..279ee0cc0f99
--- /dev/null
+++ b/sys-devel/icecream/files/0.9.6-symlinks.patch
@@ -0,0 +1,19 @@
+diff -urN icecc-0.9.6//client/Makefile.am icecc-0.9.6.new//client/Makefile.am
+--- icecc-0.9.6//client/Makefile.am 2010-09-11 13:43:53.922000148 +0200
++++ icecc-0.9.6.new//client/Makefile.am 2010-09-11 13:44:39.950000148 +0200
+@@ -7,15 +7,3 @@
+ noinst_HEADERS = client.h md5.h util.h
+
+ EXTRA_DIST = icecc-create-env
+-
+-install-exec-local:
+- $(mkinstalldirs) $(DESTDIR)$(bindir)
+- for link in g++ gcc c++ cc icerun; do \
+- rm -f $(DESTDIR)$(bindir)/$$link ;\
+- $(LN_S) icecc $(DESTDIR)$(bindir)/$$link ;\
+- done
+-
+-uninstall-local:
+- for link in g++ gcc c++ cc; do \
+- rm $(DESTDIR)$(bindir)/$$link ;\
+- done
diff --git a/sys-devel/icecream/files/0.9.7-automake.patch b/sys-devel/icecream/files/0.9.7-automake.patch
new file mode 100644
index 000000000000..6905a2a34158
--- /dev/null
+++ b/sys-devel/icecream/files/0.9.7-automake.patch
@@ -0,0 +1,32 @@
+Backport upstream patch to fix automake-1.12 issues
+
+https://bugs.gentoo.org/show_bug.cgi?id=397715
+https://bugs.gentoo.org/show_bug.cgi?id=399259
+--- client/Makefile.am
++++ client/Makefile.am
+@@ -1,10 +1,11 @@
+ INCLUDES = -I$(srcdir)/../services
+
+ bin_PROGRAMS = icecc
+-pkglib_SCRIPTS = icecc-create-env
++pkglibexec_SCRIPTS = icecc-create-env
+ icecc_SOURCES = main.cpp arg.cpp cpp.cpp local.cpp remote.cpp util.cpp md5.c safeguard.cpp
+ icecc_LDADD = ../services/libicecc.la $(LIBRSYNC)
+ noinst_HEADERS = client.h md5.h util.h
++AM_CPPFLAGS = -DPLIBDIR=\"$(pkglibexecdir)\"
+
+ EXTRA_DIST = icecc-create-env
+
+--- configure.in
++++ configure.in
+@@ -246,10 +246,6 @@
+ KDE_EXPAND_MAKEVAR(mybindir, bindir)
+ AC_DEFINE_UNQUOTED(BINDIR, "$mybindir", [Where to look for icecc])
+
+-myopkglibdir='${libdir}/'"$PACKAGE"
+-KDE_EXPAND_MAKEVAR(mypkglibdir, myopkglibdir)
+-AC_DEFINE_UNQUOTED(PLIBDIR, "$mypkglibdir", [Where to look for icecc-create-env])
+-
+ myorundir='${localstatedir}/run'
+ KDE_EXPAND_MAKEVAR(myrundir, myorundir)
+ AC_DEFINE_UNQUOTED(RUNDIR, "$myrundir", [Where to place pid files])
diff --git a/sys-devel/icecream/files/0.9.7-glibc2.16.patch b/sys-devel/icecream/files/0.9.7-glibc2.16.patch
new file mode 100644
index 000000000000..7ccbd735a46f
--- /dev/null
+++ b/sys-devel/icecream/files/0.9.7-glibc2.16.patch
@@ -0,0 +1,16 @@
+Fix building with glibc-2.16
+
+https://bugs.gentoo.org/show_bug.cgi?id=425248
+
+Patch written by Kacper Kowalik <xarthisius@gentoo.org>
+--- a/daemon/workit.cpp
++++ b/daemon/workit.cpp
+@@ -26,6 +26,7 @@
+ #include "exitcode.h"
+ #include "logging.h"
+ #include <sys/select.h>
++#include <sys/resource.h>
+ #include <algorithm>
+
+ #ifdef __FreeBSD__
+
diff --git a/sys-devel/icecream/files/icecream b/sys-devel/icecream/files/icecream
new file mode 100644
index 000000000000..db24c4046c7b
--- /dev/null
+++ b/sys-devel/icecream/files/icecream
@@ -0,0 +1,43 @@
+#!/sbin/openrc-run
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ local basedir=${ICECREAM_BASEDIR:-"/var/cache/icecream"}
+ local netname=${ICECREAM_NETNAME:+"-n ${ICECREAM_NETNAME}"}
+ local logfile=${ICECREAM_LOG_FILE:+"-l ${ICECREAM_LOG_FILE}"}
+ local nice=${ICECREAM_NICE_LEVEL:+"--nice ${ICECREAM_NICE_LEVEL}"}
+ local scheduler=${ICECREAM_SCHEDULER_HOST:+"-s ${ICECREAM_SCHEDULER_HOST}"}
+ local maxjobs=${ICECREAM_MAX_JOBS:+"-m ${ICECREAM_MAX_JOBS}"}
+ local verbosity=${ICECREAM_VERBOSITY:-"-v"}
+
+ if [[ "${ICECREAM_RUN_SCHEDULER}" == "yes" ]]; then
+ local slogfile=${ICECREAM_SCHEDULER_LOG_FILE:-"/var/log/icecc_scheduler"}
+ touch ${slogfile} && chown icecream:icecream ${slogfile}
+ slogfile=${slogfile:+"-l ${slogfile}"}
+ ebegin "Starting Distributed Compiler Scheduler"
+ start-stop-daemon -u icecream --start --quiet --exec /usr/sbin/scheduler -- -d ${slogfile} ${netname} ${verbosity}
+ eend ${?}
+ fi
+
+ [[ ! -d ${basedir} ]] && mkdir -p ${basedir} && chown icecream:icecream ${basedir}
+ ebegin "Starting Distributed Compiler Daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/iceccd -- -d ${logfile} ${nice} ${scheduler} ${netname} -u icecream -b "${basedir}" ${maxjobs} ${verbosity}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping Distributed Compiler Daemon"
+ start-stop-daemon --stop --quiet --name iceccd
+ eend ${?}
+
+ if [[ "${ICECREAM_RUN_SCHEDULER}" == "yes" ]]; then
+ ebegin "Stopping Distributed Compiler Scheduler"
+ start-stop-daemon --stop --quiet --name scheduler
+ eend ${?}
+ fi
+}
diff --git a/sys-devel/icecream/files/icecream-1.0.0-libcap-ng.patch b/sys-devel/icecream/files/icecream-1.0.0-libcap-ng.patch
new file mode 100644
index 000000000000..3dc0e3713b0a
--- /dev/null
+++ b/sys-devel/icecream/files/icecream-1.0.0-libcap-ng.patch
@@ -0,0 +1,8 @@
+--- a/services/icecc.pc.in
++++ b/services/icecc.pc.in
+@@ -11,4 +11,5 @@ Version: @VERSION@
+ Requires:
+ Conflicts:
+ Libs: -L${libdir} -licecc
++Libs.private: @CAPNG_LDADD@
+ Cflags: -I${includedir}
diff --git a/sys-devel/icecream/files/icecream-conf.d-verbosity.patch b/sys-devel/icecream/files/icecream-conf.d-verbosity.patch
new file mode 100644
index 000000000000..1ee93c5741a2
--- /dev/null
+++ b/sys-devel/icecream/files/icecream-conf.d-verbosity.patch
@@ -0,0 +1,18 @@
+--- a/suse/sysconfig.icecream
++++ b/suse/sysconfig.icecream
+@@ -39,6 +39,15 @@
+ #
+ ## Type: string
+ ## Path: Applications/icecream
++## Default: -v
++#
++# icecream's level of verbosity ([-v[v[v]]])
++#
++ICECREAM_VERBOSITY="-v"
++
++#
++## Type: string
++## Path: Applications/icecream
+ ## Defaut: ""
+ #
+ # Identification for the network the scheduler and daemon run on.
diff --git a/sys-devel/icecream/files/icecream-config b/sys-devel/icecream/files/icecream-config
new file mode 100644
index 000000000000..6ed24c743772
--- /dev/null
+++ b/sys-devel/icecream/files/icecream-config
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# icecream-config - helper script for icecream and its ebuild
+#
+# Copyright 2003-2010 Superlucidity Services, LLC
+# This program licensed under the GNU GPL version 2.
+#
+# This script developed by Zachary T Welch at Superlucidity Services, LLC
+# it was cloned from the distcc-config script to make ccache-config
+# and then modified by Marcus Furlong to configure icecream too.
+#
+# Additional features to come; this provides a starting point
+
+# this should be getopt'd someday (override with ICEC_QUIET=1)
+ICECC_VERBOSE=1
+
+icecc_echo() {
+ [ -z "${ICECC_QUIET}" -a -n "${ICECC_VERBOSE}" ] && echo "$*"
+}
+
+###
+# the following functions manage the icecream symlinks
+# they allow the user or other scripts (namely gcc-config) to
+# automatically update icecream's links when upgrading toolchains
+#
+icecc_remove_link() {
+ local t="/usr/lib/icecc/bin/${1}"
+ if [ -L ${t} ]; then
+ icecc_echo "Removing ${t}..."
+ rm -f "${t}"
+ fi
+}
+icecc_install_link() {
+ # Search the PATH for the specified compiler
+ # then create shadow link in /usr/lib/icecc/bin to icecc
+
+ if [ -n "$(type -p ${1})" ]; then
+ # first be sure any old link is removed
+ ICECC_QUIET=1 icecc_remove_link "${1}"
+
+ # then create the new link
+ local t="/usr/lib/icecc/bin/${1}"
+ icecc_echo "Creating icecream shadow link: ${t}..."
+ ln -s /usr/bin/icecc "${t}"
+ fi
+}
+icecc_links() {
+ local a
+ for a in gcc cc c++ g++ ; do
+ [ -n "${2}" ] && a="${2}-${a}"
+ eval "icecc_${1}_link" "${a}"
+ done
+}
+
+###
+# main routine
+
+case "${1}" in
+ --install-links )
+ icecc_links install "${2}"
+ ;;
+ --remove-links )
+ icecc_links remove "${2}"
+ ;;
+ * )
+ echo "usage: ${0} {--install-links|--remove-links} [ CHOST ]"
+ ;;
+esac
+
diff --git a/sys-devel/icecream/files/icecream-create-env b/sys-devel/icecream/files/icecream-create-env
new file mode 100644
index 000000000000..dafdc13b4331
--- /dev/null
+++ b/sys-devel/icecream/files/icecream-create-env
@@ -0,0 +1,82 @@
+#!/bin/sh
+#
+# icecream-create-env - helper script to create icecc environments(mostly for cross-compiling)
+#
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# Please note, this script has been designed to work with Gentoo's crossdev, it may or may
+# not work with cross-toolchains that were build differently.
+#
+#
+# Usage: "./icecream-create-env" creates a native environment(similar to icecc --build-native)
+# "./icecream-create-env prefix" creates a cross-compile environment using the cross-toolchain created by crossdev
+# Example:
+# "emerge crossdev && crossdev -t sparc-unknown-linux-gnu && icecream-create-env sparc-unknown-linux"
+
+if [ `id -u` -ne 0 ]
+then
+ echo "Only the superuser can execute this script."
+ exit 1
+fi
+
+# param 1 = CHOST
+prefix="${1}"
+
+if [ -z "${prefix}" ]
+then
+ prefix="`gcc -dumpmachine`"
+fi
+
+gccbin=`which ${prefix}-gcc 2>/dev/null`
+if [ ! -e "${gccbin}" ]
+then
+ echo "Can't find ${prefix}-gcc!"
+ exit 1
+fi
+
+gxxbin=`which ${prefix}-g++ 2>/dev/null`
+if [ ! -e "${gxxbin}" ]
+then
+ echo "Can't find ${prefix}-g++!"
+ exit 2
+fi
+
+version="`${prefix}-gcc -dumpversion`"
+
+tmpdir=`mktemp -d`
+tmpfile=`mktemp`
+
+target=`gcc -dumpmachine`
+if [ "x${target}" = "x${prefix}" ]
+then
+ /usr/libexec/icecc/icecc-create-env \
+ /usr/${prefix}/gcc-bin/${version}/gcc \
+ /usr/${prefix}/gcc-bin/${version}/g++ \
+ | tee ${tmpfile}
+else
+ /usr/libexec/icecc/icecc-create-env \
+ /usr/${target}/${prefix}/gcc-bin/${version}/${prefix}-gcc \
+ /usr/${target}/${prefix}/gcc-bin/${version}/${prefix}-g++ \
+ | tee ${tmpfile}
+fi
+
+# figure out the name of the archive
+icecc_envname=`grep "creating" ${tmpfile} | awk '{print $2}'`
+
+echo "Testing icecc environment..."
+tar -x -z -f ${icecc_envname} -C ${tmpdir}
+touch ${tmpdir}/empty.c
+chroot ${tmpdir}/ /usr/bin/gcc -c /empty.c
+tested=${?}
+rm ${tmpdir}/empty.c
+
+if [ "${tested}" -ne 0 ]
+then
+ echo ""
+ echo "Creating icecc environment failed. Please see error message(s) above! The temporary directory is: ${tmpdir}/"
+else
+ echo ""
+ echo "Icecc environment has been created. It has been saved as ${icecc_envname}!"
+fi
+
diff --git a/sys-devel/icecream/files/icecream-gentoo-multilib.patch b/sys-devel/icecream/files/icecream-gentoo-multilib.patch
new file mode 100644
index 000000000000..94c6a41b3af6
--- /dev/null
+++ b/sys-devel/icecream/files/icecream-gentoo-multilib.patch
@@ -0,0 +1,59 @@
+Index: services/job.h
+===================================================================
+--- services/job.h (revision 843731)
++++ services/job.h (working copy)
+@@ -57,6 +57,10 @@
+
+ unsigned int argumentFlags() const;
+
++ const ArgumentsList getFlags() {
++ return m_flags;
++ }
++
+ void setFlags( const ArgumentsList &flags ) {
+ m_flags = flags;
+ }
+Index: client/main.cpp
+===================================================================
+--- client/main.cpp (revision 843731)
++++ client/main.cpp (working copy)
+@@ -218,6 +218,39 @@
+
+ local |= analyse_argv( argv, job );
+
++ /* honour Gentoo's ${CFLAGS_${ABI}} environment variable */
++ if (getenv("ABI") != NULL) {
++ char* envar = (char*) malloc(sizeof(char) *
++ (strlen("CFLAGS_") + strlen(getenv("ABI")) + 1));
++
++ if (!envar)
++ return 1;
++
++ /* We use CFLAGS_${ABI} for gcc, g++, g77, etc as they are
++ * the same no matter which compiler we are using.
++ */
++ sprintf(envar, "CFLAGS_%s", getenv("ABI"));
++
++ if (getenv(envar)) {
++ ArgumentsList args = job.getFlags();
++
++ char* pch = strtok(getenv(envar)," \t");
++ while (pch != NULL) {
++ #if CLIENT_DEBUG
++ log_info() << "adding CFLAG '" << pch << "' as specified in environment variable ${CFLAGS_${ABI}}" << endl;
++ #endif
++ args.append(pch, Arg_Remote);
++ pch = strtok(NULL, " \t");
++ }
++
++ job.setFlags(args);
++
++ free(pch);
++ }
++
++ free(envar);
++ }
++
+ /* if ICECC is set to no, then run job locally */
+ char* icecc = getenv("ICECC");
+ if ( icecc && !strcasecmp(icecc, "no") )
diff --git a/sys-devel/icecream/files/icecream-r2 b/sys-devel/icecream/files/icecream-r2
new file mode 100644
index 000000000000..21cfddeda8c3
--- /dev/null
+++ b/sys-devel/icecream/files/icecream-r2
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ local basedir=${ICECREAM_BASEDIR:-"/var/cache/icecream"}
+ local netname=${ICECREAM_NETNAME:+"-n ${ICECREAM_NETNAME}"}
+ local logfile=${ICECREAM_LOG_FILE:+"-l ${ICECREAM_LOG_FILE}"}
+ local nice=${ICECREAM_NICE_LEVEL:+"--nice ${ICECREAM_NICE_LEVEL}"}
+ local scheduler=${ICECREAM_SCHEDULER_HOST:+"-s ${ICECREAM_SCHEDULER_HOST}"}
+ local maxjobs=${ICECREAM_MAX_JOBS:+"-m ${ICECREAM_MAX_JOBS}"}
+ local verbosity=${ICECREAM_VERBOSITY:-"-v"}
+
+ [[ ! -d /var/log/icecream/ ]] && mkdir -p /var/log/icecream/ && chown icecream:icecream /var/log/icecream/
+ if [[ "${ICECREAM_RUN_SCHEDULER}" == "yes" ]]; then
+ local slogfile=${ICECREAM_SCHEDULER_LOG_FILE:-"/var/log/icecc_scheduler"}
+ touch ${slogfile} && chown icecream:icecream ${slogfile}
+ slogfile=${slogfile:+"-l ${slogfile}"}
+ ebegin "Starting Distributed Compiler Scheduler"
+ start-stop-daemon -u icecream --start --quiet --exec /usr/sbin/icecc-scheduler -- -d ${slogfile} ${netname} ${verbosity}
+ eend ${?}
+ fi
+
+ [[ ! -d ${basedir} ]] && mkdir -p ${basedir} && chown icecream:icecream ${basedir}
+ ebegin "Starting Distributed Compiler Daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/iceccd -- -d ${logfile} ${nice} ${scheduler} ${netname} -u icecream -b "${basedir}" ${maxjobs} ${verbosity}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping Distributed Compiler Daemon"
+ start-stop-daemon --stop --quiet --name iceccd
+ eend ${?}
+
+ if [[ "${ICECREAM_RUN_SCHEDULER}" == "yes" ]]; then
+ ebegin "Stopping Distributed Compiler Scheduler"
+ start-stop-daemon --stop --quiet --name icecc-scheduler
+ eend ${?}
+ fi
+}