diff options
author | Friedrich Oslage <bluebird@gentoo.org> | 2008-08-07 18:42:43 +0000 |
---|---|---|
committer | Friedrich Oslage <bluebird@gentoo.org> | 2008-08-07 18:42:43 +0000 |
commit | dfa55c08c5ed299b2a462d3d60b0d33ae9127370 (patch) | |
tree | 725f6c7a0a333a73af53fefb395703504254820c /sys-devel/icecream/files/icecream-gentoo-multilib.patch | |
parent | Add the horde applications combined within this meta package. (diff) | |
download | historical-dfa55c08c5ed299b2a462d3d60b0d33ae9127370.tar.gz historical-dfa55c08c5ed299b2a462d3d60b0d33ae9127370.tar.bz2 historical-dfa55c08c5ed299b2a462d3d60b0d33ae9127370.zip |
Honour the ${CFLAGS_${ABI}} environment variable(bug #232931), cleanup icecream-create-env, remove old
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sys-devel/icecream/files/icecream-gentoo-multilib.patch')
-rw-r--r-- | sys-devel/icecream/files/icecream-gentoo-multilib.patch | 59 |
1 files changed, 59 insertions, 0 deletions
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") ) |