summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2002-10-26 09:16:03 +0000
committerMartin Schlemmer <azarah@gentoo.org>2002-10-26 09:16:03 +0000
commit6b2f56890e959ef0562c29e5fee2de3246923d9b (patch)
tree603785b0d0da4f4ee92ba6bc9f01fa74c7f92bba /eclass
parentInitial ebuild (diff)
downloadhistorical-6b2f56890e959ef0562c29e5fee2de3246923d9b.tar.gz
historical-6b2f56890e959ef0562c29e5fee2de3246923d9b.tar.bz2
historical-6b2f56890e959ef0562c29e5fee2de3246923d9b.zip
initial version
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eutils.eclass53
1 files changed, 53 insertions, 0 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
new file mode 100644
index 000000000000..471bad69e135
--- /dev/null
+++ b/eclass/eutils.eclass
@@ -0,0 +1,53 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# Author: Martin Schlemmer <azarah@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.1 2002/10/26 09:16:03 azarah Exp $
+# This eclass is for general purpose functions that most ebuilds
+# have to implement themselfs.
+#
+# NB: If you add anything, please comment it!
+
+ECLASS=eutils
+INHERITED="$INHERITED $ECLASS"
+
+newdepend sys-devel/patch
+
+DESCRIPTION="Based on the ${ECLASS} eclass"
+
+# This function generate linker scripts in /usr/lib for dynamic
+# libs in /lib. This is to fix linking problems when you have
+# the .so in /lib, and the .a in /usr/lib. What happens is that
+# in some cases when linking dynamic, the .a in /usr/lib is used
+# instead of the .so in /lib due to gcc/libtool tweaking ld's
+# library search path. This cause many builds to fail.
+# See bug #4411 for more info.
+#
+# To use, simply call:
+#
+# gen_usr_ldscript libfoo.so
+#
+# Note that you should in general use the unversioned name of
+# the library, as ldconfig should usually update it correctly
+# to point to the latest version of the library present.
+#
+# <azarah@gentoo.org> (26 Oct 2002)
+#
+gen_usr_ldscript() {
+
+ # Just make sure it exists
+ dodir /usr/lib
+
+ cat > ${D}/usr/lib/$1 <<"END_LDSCRIPT"
+/* GNU ld script
+ Because Gentoo have critical dynamic libraries
+ in /lib, and the static versions in /usr/lib, we
+ need to have a "fake" dynamic lib in /usr/lib,
+ otherwise we run into linking problems.
+ See bug #4411 on http://bugs.gentoo.org/ for
+ more info. */
+GROUP ( /lib/libxxx )
+END_LDSCRIPT
+
+ dosed "s:libxxx:$1:" /usr/lib/$1
+}
+