* [gentoo-commits] gentoo-x86 commit in eclass: ccc.eclass
@ 2008-09-10 8:20 Peter Volkov (pva)
0 siblings, 0 replies; 5+ messages in thread
From: Peter Volkov (pva) @ 2008-09-10 8:20 UTC (permalink / raw
To: gentoo-commits
pva 08/09/10 08:20:06
Modified: ccc.eclass
Log:
Make eclass-manpages ready, bug #210793, thank mren for report.
Revision Changes Path
1.19 eclass/ccc.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?r1=1.18&r2=1.19
Index: ccc.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ccc.eclass 11 Jul 2005 15:08:06 -0000 1.18
+++ ccc.eclass 10 Sep 2008 08:20:05 -0000 1.19
@@ -1,12 +1,16 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.18 2005/07/11 15:08:06 swegener Exp $
-#
-# Authors: Tavis Ormandy <taviso@gentoo.org>
-# Aron Griffis <agriffis@gentoo.org>
-#
-# functions to make ebuilds more ccc friendly.
-#
+# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.19 2008/09/10 08:20:05 pva Exp $
+
+# @ECLASS: ccc.eclass
+# @MAINTAINER:
+# ???
+#
+# Authors:
+# Tavis Ormandy <taviso@gentoo.org>
+# Aron Griffis <agriffis@gentoo.org>
+# @BLURB: functions to make ebuilds more ccc friendly.
+
# 16/6/2003 - Added otsify()
# 18/6/2003 - regex tweaks.
# 22/7/2003 - newdepend
@@ -17,84 +21,6 @@
# define this to make this eclass noisy.
#DEBUG_CCC_ECLASS=1
-#
-#### hide-restrict-arr ####
-# Scan for and replace __restrict_arr with a ccc
-# supported equivalent.
-#
-# you might see an error like this if you need this:
-#
-# cc: Error: regexec.c, line 209: In the definition of the function "regexec",
-# the promoted type of pmatch is incompatible with the type of the corresponding
-# parameter in a prior declaration. (promotmatch)
-# regmatch_t pmatch[];
-# ---------------^
-#
-#### replace-cc-hardcode ####
-# Look for common cc hardcodes in Makefiles.
-#
-#### replace-cxx-hardcode ####
-# Look for common cxx hardcodes in Makefiles.
-#
-#### is-ccc ####
-# Returns success if dec compiler is being used.
-#
-# example:
-#
-# is-ccc && hide-restrict-arr
-#
-#### is-cxx ####
-# Returns success if dec c++ compiler is being used.
-#
-#### replace-ccc-g ####
-# Try to replace -g with -g3
-#
-#### ccc-elf-check </path/to/binary> ####
-# Return success if binary was compiled with ccc
-#
-# example:
-# if ! is-ccc; then
-# ccc-elf-check /usr/lib/libglib.a && \
-# append-ldflags -lots
-# fi
-#
-# NOTE: i think the binary and shared library detection
-# is pretty safe, but the archive detection may not
-# be as reliable.
-#### create-so </usr/lib/library.a> <library.so> ####
-# Make the shared library (.so) specified from the archive (.a)
-# specified. LDFLAGS will be honoured. if you need a different
-# `soname` (DT_SONAME) from the shared lib filename, you will have
-# to do it manually ;)
-#
-# example:
-# is-ccc && \
-# create-so /usr/lib/libcoolstuff.a libcoolstuff.so.${PV}
-# dosym /usr/lib/libcoolstuff.so.${PV} /usr/lib/libcoolstuff.so
-#
-# NOTE: -lots will be used by default, this is ccc.eclass after all :)
-# NOTE: .${PV} is optional, of course.
-# NOTE: dolib.so will manage installation
-#### append-ldflags <flag> ####
-#### is-ldflag <flag> ####
-#### filter-ldflags <flag> ####
-# flag-o-matic doesnt provide LDFLAGS utilities.
-# Some replacements for ccc porting. These functions
-# mimic the flag-o-matic equivalents, look in there for
-# documentation.
-#
-#### otsify <archive> ####
-# Add the functions from libots to <archive>, this means
-# that if you use gcc to build an application that links with
-# <archive>, you wont need -lots.
-# Use this on libraries that you want maximum performance from,
-# but might not be using ccc when linking against it (eg zlib, openssl, etc)
-#
-# example:
-# is-ccc && otsify ${S}/libz.a
-#
-####
-#
ccc-fixup()
{
@@ -122,6 +48,19 @@
done
}
+# @FUNCTION: hide-restrict-arr
+# @DESCRIPTION:
+# Scan for and replace __restrict_arr with a ccc
+# supported equivalent.
+#
+# You might see an error like this if you need this:
+# @CODE
+# cc: Error: regexec.c, line 209: In the definition of the function "regexec",
+# the promoted type of pmatch is incompatible with the type of the corresponding
+# parameter in a prior declaration. (promotmatch)
+# regmatch_t pmatch[];
+# ---------------^
+# @CODE
hide-restrict-arr()
{
# __restrict_arr causes trouble with ccc, __restrict
@@ -135,6 +74,9 @@
xargs | ccc-fixup 's#\(\[__restrict\)_arr\]#\1\]#g'
}
+# @FUNCTION: replace-cc-hardcode
+# @DESCRIPTION:
+# Look for common cc hardcodes in Makefiles.
replace-cc-hardcode()
{
# lots of developers hardcode gcc into their
@@ -144,6 +86,9 @@
xargs | ccc-fixup "s#^\(CC.*=\).*g\?cc#\1${CC:-gcc}#g"
}
+# @FUNCTION: replace-cxx-hardcode
+# @DESCRIPTION:
+# Look for common cxx hardcodes in Makefiles.
replace-cxx-hardcode()
{
# lots of developers hardcode g++ into thier
@@ -152,18 +97,29 @@
xargs | ccc-fixup "s#^\(CXX.*=\).*[gc]\{1\}++#\1${CXX:-g++}#g"
}
+# @FUNCTION: is-ccc
+# @RETURN: Returns success if dec compiler is being used.
+# @DESCRIPTION:
+# example:
+#
+# is-ccc && hide-restrict-arr
is-ccc()
{
# return true if ccc is being used.
[ "${ARCH}:`basename ${CC:-gcc}`" == "alpha:ccc" ]
}
+# @FUNCTION: is-cxx
+# @RETURN: Returns success if dec c++ compiler is being used.
is-cxx()
{
# return true if cxx is being used
[ "${ARCH}:`basename ${CXX:-g++}`" == "alpha:cxx" ]
}
+# @FUNCTION: replace-ccc-g
+# @DESCRIPTION:
+# Try to replace -g with -g3
replace-ccc-g()
{
# -g will stop ccc/cxx performing optimisation
@@ -174,6 +130,20 @@
# FIXME: my eyes! it burns!
}
+# @FUNCTION: ccc-elf-check
+# @RETURN: Return success if binary was compiled with ccc
+# @DESCRIPTION:
+# example:
+# @CODE
+# if ! is-ccc; then
+# ccc-elf-check /usr/lib/libglib.a && \
+# append-ldflags -lots
+# fi
+# @CODE
+#
+# NOTE: i think the binary and shared library detection
+# is pretty safe, but the archive detection may not
+# be as reliable.
ccc-elf-check()
{
# check if argument is a ccc created executable.
@@ -203,6 +173,24 @@
return 1
}
+# @FUNCTION: create-so
+# @USAGE: < /usr/lib/library.a > < library.so >
+# @DESCRIPTION:
+# Make the shared library (.so) specified from the archive (.a)
+# specified. LDFLAGS will be honoured. if you need a different
+# `soname` (DT_SONAME) from the shared lib filename, you will have
+# to do it manually ;)
+#
+# example:
+# @CODE
+# is-ccc && \
+# create-so /usr/lib/libcoolstuff.a libcoolstuff.so.${PV}
+# dosym /usr/lib/libcoolstuff.so.${PV} /usr/lib/libcoolstuff.so
+# @CODE
+#
+# NOTE: -lots will be used by default, this is ccc.eclass after all :)
+# NOTE: .${PV} is optional, of course.
+# NOTE: dolib.so will manage installation
create-so()
{
# some applications check for .so, but ccc wont
@@ -221,6 +209,10 @@
dolib.so ${T}/${2##*/}
}
+# @FUNCTION: append-ldflags
+# @USAGE: < flag >
+# @DESCRIPTION:
+# Append <flag> to the current LDFLAGS
append-ldflags()
{
LDFLAGS="${LDFLAGS} ${1}"
@@ -239,6 +231,9 @@
# done
#}
+# @FUNCTION: is-ldflags
+# @USAGE: < flag >
+# @RETURN: Return code 0 if <flag> is in LDFLAGS, else return code 1
is-ldflags() {
local x
for x in ${LDFLAGS}
@@ -251,6 +246,13 @@
return 1
}
+# @FUNCTION: filter-ldflags
+# @USAGE: < flag >
+# @DESCRIPTION:
+# flag-o-matic doesnt provide LDFLAGS utilities.
+# Some replacements for ccc porting. These functions
+# mimic the flag-o-matic equivalents, look in there for
+# documentation.
filter-ldflags()
{
for x in ${1}
@@ -259,6 +261,18 @@
done
}
+# @FUNCTION: otsify
+# @USAGE: < archive >
+# @DESCRIPTION:
+# Add the functions from libots to <archive>, this means
+# that if you use gcc to build an application that links with
+# <archive>, you wont need -lots.
+# Use this on libraries that you want maximum performance from,
+# but might not be using ccc when linking against it (eg zlib, openssl, etc)
+#
+# example:
+#
+# is-ccc && otsify ${S}/libz.a
otsify()
{
[ "$DEBUG_CCC_ECLASS" ] && local ar_args="v"
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ccc.eclass
@ 2009-02-08 17:12 Mike Frysinger (vapier)
0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger (vapier) @ 2009-02-08 17:12 UTC (permalink / raw
To: gentoo-commits
vapier 09/02/08 17:12:02
Modified: ccc.eclass
Log:
remove ldflag related funcs that exist in flag-o-matic
Revision Changes Path
1.20 eclass/ccc.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?r1=1.19&r2=1.20
Index: ccc.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ccc.eclass 10 Sep 2008 08:20:05 -0000 1.19
+++ ccc.eclass 8 Feb 2009 17:12:02 -0000 1.20
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.19 2008/09/10 08:20:05 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.20 2009/02/08 17:12:02 vapier Exp $
# @ECLASS: ccc.eclass
# @MAINTAINER:
@@ -209,58 +209,6 @@
dolib.so ${T}/${2##*/}
}
-# @FUNCTION: append-ldflags
-# @USAGE: < flag >
-# @DESCRIPTION:
-# Append <flag> to the current LDFLAGS
-append-ldflags()
-{
- LDFLAGS="${LDFLAGS} ${1}"
-}
-
-# flag-o-matic clone
-#
-#is-ldflags()
-#{
-# for x in ${LDFLAGS}
-# do
-# if [ "${x}" = "${1}" ]; then
-# echo true
-# break
-# fi
-# done
-#}
-
-# @FUNCTION: is-ldflags
-# @USAGE: < flag >
-# @RETURN: Return code 0 if <flag> is in LDFLAGS, else return code 1
-is-ldflags() {
- local x
- for x in ${LDFLAGS}
- do
- if [ "${x}" == "${1}" ]; then
- tty --quiet < /dev/stdout || echo "true"
- return 0
- fi
- done
- return 1
-}
-
-# @FUNCTION: filter-ldflags
-# @USAGE: < flag >
-# @DESCRIPTION:
-# flag-o-matic doesnt provide LDFLAGS utilities.
-# Some replacements for ccc porting. These functions
-# mimic the flag-o-matic equivalents, look in there for
-# documentation.
-filter-ldflags()
-{
- for x in ${1}
- do
- LDFLAGS="${LDFLAGS/${x}}"
- done
-}
-
# @FUNCTION: otsify
# @USAGE: < archive >
# @DESCRIPTION:
@@ -310,5 +258,3 @@
return 1
fi
}
-
-
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ccc.eclass
@ 2009-02-08 17:16 Mike Frysinger (vapier)
0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger (vapier) @ 2009-02-08 17:16 UTC (permalink / raw
To: gentoo-commits
vapier 09/02/08 17:16:02
Modified: ccc.eclass
Log:
mark alpha as maintainer
Revision Changes Path
1.21 eclass/ccc.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?r1=1.20&r2=1.21
Index: ccc.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ccc.eclass 8 Feb 2009 17:12:02 -0000 1.20
+++ ccc.eclass 8 Feb 2009 17:16:02 -0000 1.21
@@ -1,27 +1,21 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.20 2009/02/08 17:12:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.21 2009/02/08 17:16:02 vapier Exp $
# @ECLASS: ccc.eclass
-# @MAINTAINER:
-# ???
-#
+# @MAINTAINER:
+# alpha@gentoo.org
+# @BLURB: functions to make ebuilds more ccc friendly.
+#
# Authors:
# Tavis Ormandy <taviso@gentoo.org>
# Aron Griffis <agriffis@gentoo.org>
-# @BLURB: functions to make ebuilds more ccc friendly.
-
-# 16/6/2003 - Added otsify()
-# 18/6/2003 - regex tweaks.
-# 22/7/2003 - newdepend
inherit flag-o-matic
-
# define this to make this eclass noisy.
#DEBUG_CCC_ECLASS=1
-
ccc-fixup()
{
# helper function to fixup files
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ccc.eclass
@ 2010-01-11 18:01 Raul Porcel (armin76)
0 siblings, 0 replies; 5+ messages in thread
From: Raul Porcel (armin76) @ 2010-01-11 18:01 UTC (permalink / raw
To: gentoo-commits
armin76 10/01/11 18:01:02
Modified: ccc.eclass
Log:
Deprecate ccc eclass
Revision Changes Path
1.22 eclass/ccc.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.22&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.22&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?r1=1.21&r2=1.22
Index: ccc.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ccc.eclass 8 Feb 2009 17:16:02 -0000 1.21
+++ ccc.eclass 11 Jan 2010 18:01:02 -0000 1.22
@@ -1,254 +1,8 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.21 2009/02/08 17:16:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.22 2010/01/11 18:01:02 armin76 Exp $
-# @ECLASS: ccc.eclass
-# @MAINTAINER:
-# alpha@gentoo.org
-# @BLURB: functions to make ebuilds more ccc friendly.
-#
-# Authors:
-# Tavis Ormandy <taviso@gentoo.org>
-# Aron Griffis <agriffis@gentoo.org>
+# @DEAD
+# To be removed on 2010/02/01
+ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
-inherit flag-o-matic
-
-# define this to make this eclass noisy.
-#DEBUG_CCC_ECLASS=1
-
-ccc-fixup()
-{
- # helper function to fixup files
- # and show differences when debugging
- #
- # store the backup suffix.
- local files list suffix=ccc-fixup-${$}
-
- while read files
- do
- sed --in-place=.${suffix} ${1} ${files} || return 1
- list="${list} ${files}"
- done
-
- [ ! "$DEBUG_CCC_ECLASS" ] && return 0
- # if theres a backup, diff it.
- for i in ${list}
- do
- einfo "Checking for changes to `basename ${i}` ..."
- if [ -e "${i}.${suffix}" ]; then
- diff -u ${i}.${suffix} ${i}
-# sleep 1
- fi
- done
-}
-
-# @FUNCTION: hide-restrict-arr
-# @DESCRIPTION:
-# Scan for and replace __restrict_arr with a ccc
-# supported equivalent.
-#
-# You might see an error like this if you need this:
-# @CODE
-# cc: Error: regexec.c, line 209: In the definition of the function "regexec",
-# the promoted type of pmatch is incompatible with the type of the corresponding
-# parameter in a prior declaration. (promotmatch)
-# regmatch_t pmatch[];
-# ---------------^
-# @CODE
-hide-restrict-arr()
-{
- # __restrict_arr causes trouble with ccc, __restrict
- # is a supported equivalent.
- #
- # example:
- # regmatch_t __pmatch[__restrict_arr]
- #
-
- find ${WORKDIR} -iname '*.h' | \
- xargs | ccc-fixup 's#\(\[__restrict\)_arr\]#\1\]#g'
-}
-
-# @FUNCTION: replace-cc-hardcode
-# @DESCRIPTION:
-# Look for common cc hardcodes in Makefiles.
-replace-cc-hardcode()
-{
- # lots of developers hardcode gcc into their
- # Makefiles. Try and fix these.
- #
- find ${WORKDIR} -iname Makefile | \
- xargs | ccc-fixup "s#^\(CC.*=\).*g\?cc#\1${CC:-gcc}#g"
-}
-
-# @FUNCTION: replace-cxx-hardcode
-# @DESCRIPTION:
-# Look for common cxx hardcodes in Makefiles.
-replace-cxx-hardcode()
-{
- # lots of developers hardcode g++ into thier
- # Makefiles. Try and fix these.
- find ${WORKDIR} -iname Makefile | \
- xargs | ccc-fixup "s#^\(CXX.*=\).*[gc]\{1\}++#\1${CXX:-g++}#g"
-}
-
-# @FUNCTION: is-ccc
-# @RETURN: Returns success if dec compiler is being used.
-# @DESCRIPTION:
-# example:
-#
-# is-ccc && hide-restrict-arr
-is-ccc()
-{
- # return true if ccc is being used.
- [ "${ARCH}:`basename ${CC:-gcc}`" == "alpha:ccc" ]
-}
-
-# @FUNCTION: is-cxx
-# @RETURN: Returns success if dec c++ compiler is being used.
-is-cxx()
-{
- # return true if cxx is being used
- [ "${ARCH}:`basename ${CXX:-g++}`" == "alpha:cxx" ]
-}
-
-# @FUNCTION: replace-ccc-g
-# @DESCRIPTION:
-# Try to replace -g with -g3
-replace-ccc-g()
-{
- # -g will stop ccc/cxx performing optimisation
- # replacing it with -g3 will let them co-exist.
- find ${WORKDIR} -iname Makefile | \
- xargs | ccc-fixup \
- "s#\(^\CX\{,2\}FLAGS[[:space:]]*=.*[\'\"\x20\t]*\)-g\([\'\"\x20\t]\|$\)#\1-g3\2#g"
- # FIXME: my eyes! it burns!
-}
-
-# @FUNCTION: ccc-elf-check
-# @RETURN: Return success if binary was compiled with ccc
-# @DESCRIPTION:
-# example:
-# @CODE
-# if ! is-ccc; then
-# ccc-elf-check /usr/lib/libglib.a && \
-# append-ldflags -lots
-# fi
-# @CODE
-#
-# NOTE: i think the binary and shared library detection
-# is pretty safe, but the archive detection may not
-# be as reliable.
-ccc-elf-check()
-{
- # check if argument is a ccc created executable.
- # this is useful for libraries compiled with ccc,
- # which might require -lots/-lcpml if a linking binary
- # isnt being compiled with ccc.
- local myBINARY=${1:-a.out}
- if [[ ! "${myBINARY}" == *.a ]]; then
- # find the offset and size of the elf .note section.
- # example contents: 000132d2 00000dc8
- # ^- offset ^- size
- local elf_note_offset=`objdump -h ${myBINARY} | \
- grep -E '^\ [0-9]{2,}\ .note\ ' | \
- awk '{print $6,$3}' | \
- line`
- # check if that got anything.
- [ ! "${elf_note_offset}" ] && return 1
- # dump contents of section, and check for compaq signature.
- hexdump -s 0x${elf_note_offset% *} -n $((0x${elf_note_offset#* })) -e '"%_p"' ${myBINARY} | \
- grep -E 'Compaq Computer Corp.' &>/dev/null && return 0
- # no compaq message, return 1
- else
- # just grep it for the Compaq sig.
- hexdump -e '"%_p"' ${myBINARY} | \
- grep -E 'Compaq Computer Corp.' &>/dev/null && return 0
- fi
- return 1
-}
-
-# @FUNCTION: create-so
-# @USAGE: < /usr/lib/library.a > < library.so >
-# @DESCRIPTION:
-# Make the shared library (.so) specified from the archive (.a)
-# specified. LDFLAGS will be honoured. if you need a different
-# `soname` (DT_SONAME) from the shared lib filename, you will have
-# to do it manually ;)
-#
-# example:
-# @CODE
-# is-ccc && \
-# create-so /usr/lib/libcoolstuff.a libcoolstuff.so.${PV}
-# dosym /usr/lib/libcoolstuff.so.${PV} /usr/lib/libcoolstuff.so
-# @CODE
-#
-# NOTE: -lots will be used by default, this is ccc.eclass after all :)
-# NOTE: .${PV} is optional, of course.
-# NOTE: dolib.so will manage installation
-create-so()
-{
- # some applications check for .so, but ccc wont
- # create one by default
- if [[ "${2}" == *.so ]]; then
- # no version suffix.
- ${LD:-ld} -shared -o ${T}/${2##*/} -soname ${2##*/} \
- -whole-archive ${1} -no-whole-archive -lots ${LDFLAGS}
- else
- # version suffix
- local so_version=${2##*.so}
- ${LD:-ld} -shared -o ${T}/${2##*/} -soname `basename ${2/${so_version}}` \
- -whole-archive ${1} -no-whole-archive -lots ${LDFLAGS}
- fi
- # hand installation over to dolib.so
- dolib.so ${T}/${2##*/}
-}
-
-# @FUNCTION: otsify
-# @USAGE: < archive >
-# @DESCRIPTION:
-# Add the functions from libots to <archive>, this means
-# that if you use gcc to build an application that links with
-# <archive>, you wont need -lots.
-# Use this on libraries that you want maximum performance from,
-# but might not be using ccc when linking against it (eg zlib, openssl, etc)
-#
-# example:
-#
-# is-ccc && otsify ${S}/libz.a
-otsify()
-{
- [ "$DEBUG_CCC_ECLASS" ] && local ar_args="v"
-
- # confirm argument exists, and is an archive (eg *.a)
- # if it is, extract libots members into tempdir, then
- # append them to argument, regenerate index and then return.
-
- if [ "${1##*.}" == "a" ] && [ -f "${1}" ]; then
- einfo "otsifying `basename ${1}` ..."
-
- mkdir ${T}/ccc-otsify-${$}
- cd ${T}/ccc-otsify-${$}
-
- einfo " extracting archive members from libots ..."
- ar ${ar_args}x /usr/lib/libots.a || {
- eerror " unable to extract libots members."
- return 1
- }
-
- einfo " appending libots members to `basename ${1}` ..."
- ar ${ar_args}q ${1} ${T}/ccc-otsify-${$}/*.o || {
- eerror " failed to append libots members to ${1}."
- return 1
- }
-
- einfo " regenerating `basename ${1}` archive index ..."
- ranlib ${1} || ewarn " ranlib returned an error, probably not important."
- einfo "otsification completed succesfully."
- cd ${OLDPWD:-.}
- return 0
- else
- ewarn "called otsify() with bad argument ..."
- cd ${OLDPWD:-.}
- return 1
- fi
-}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ccc.eclass
@ 2010-01-11 20:26 Raul Porcel (armin76)
0 siblings, 0 replies; 5+ messages in thread
From: Raul Porcel (armin76) @ 2010-01-11 20:26 UTC (permalink / raw
To: gentoo-commits
armin76 10/01/11 20:26:53
Modified: ccc.eclass
Log:
Eclasses should be removed after two years of being deprecated
Revision Changes Path
1.23 eclass/ccc.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ccc.eclass?r1=1.22&r2=1.23
Index: ccc.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ccc.eclass 11 Jan 2010 18:01:02 -0000 1.22
+++ ccc.eclass 11 Jan 2010 20:26:53 -0000 1.23
@@ -1,8 +1,8 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.22 2010/01/11 18:01:02 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ccc.eclass,v 1.23 2010/01/11 20:26:53 armin76 Exp $
# @DEAD
-# To be removed on 2010/02/01
+# To be removed on 2012/01/11
ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass"
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-11 20:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 18:01 [gentoo-commits] gentoo-x86 commit in eclass: ccc.eclass Raul Porcel (armin76)
-- strict thread matches above, loose matches on Subject: below --
2010-01-11 20:26 Raul Porcel (armin76)
2009-02-08 17:16 Mike Frysinger (vapier)
2009-02-08 17:12 Mike Frysinger (vapier)
2008-09-10 8:20 Peter Volkov (pva)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox