summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Tilley <lv@gentoo.org>2004-05-23 09:14:24 +0000
committerTravis Tilley <lv@gentoo.org>2004-05-23 09:14:24 +0000
commit1661a5a2867aaf1b31945f5c0297172ff74de691 (patch)
tree3ed62ac7b296bacb99200cd3a2c75b8b744bed59 /sys-libs/libstdc++-v3
parentRemoved unnecessary patches. (diff)
downloadhistorical-1661a5a2867aaf1b31945f5c0297172ff74de691.tar.gz
historical-1661a5a2867aaf1b31945f5c0297172ff74de691.tar.bz2
historical-1661a5a2867aaf1b31945f5c0297172ff74de691.zip
initial commit. this is a libstdc++ compatibility package for gcc 3.4-only systems so that binary c++ packages can still be installed and used
Diffstat (limited to 'sys-libs/libstdc++-v3')
-rw-r--r--sys-libs/libstdc++-v3/ChangeLog10
-rw-r--r--sys-libs/libstdc++-v3/Manifest5
-rw-r--r--sys-libs/libstdc++-v3/files/digest-libstdc++-v3-3.3.31
-rw-r--r--sys-libs/libstdc++-v3/files/libstdc++_amd64_multilib_hack.patch11
-rw-r--r--sys-libs/libstdc++-v3/libstdc++-v3-3.3.3.ebuild210
-rw-r--r--sys-libs/libstdc++-v3/metadata.xml8
6 files changed, 245 insertions, 0 deletions
diff --git a/sys-libs/libstdc++-v3/ChangeLog b/sys-libs/libstdc++-v3/ChangeLog
new file mode 100644
index 000000000000..7a707338ad94
--- /dev/null
+++ b/sys-libs/libstdc++-v3/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-libs/libstdc++-v3
+# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libstdc++-v3/ChangeLog,v 1.1 2004/05/23 09:14:24 lv Exp $
+
+*libstdc++-v3-3.3.3 (23 May 2004)
+
+ 23 May 2004; Travis Tilley <lv@gentoo.org> +Changelog,
+ +files/libstdc++_amd64_multilib_hack.patch, +libstdc++-v3-3.3.3.ebuild:
+ initial commit
+
diff --git a/sys-libs/libstdc++-v3/Manifest b/sys-libs/libstdc++-v3/Manifest
new file mode 100644
index 000000000000..95be4691c019
--- /dev/null
+++ b/sys-libs/libstdc++-v3/Manifest
@@ -0,0 +1,5 @@
+MD5 d350de0f970974e14e11ef9ea2396680 ChangeLog 404
+MD5 921a6959ea093c61e485262694c797af libstdc++-v3-3.3.3.ebuild 5665
+MD5 b6c1db1060c4e856b248a22adec1ff53 metadata.xml 220
+MD5 14f4d6619c938dbb907e2420c0eeefd9 files/digest-libstdc++-v3-3.3.3 64
+MD5 b2a96584f4cee72362695ba44c911c40 files/libstdc++_amd64_multilib_hack.patch 350
diff --git a/sys-libs/libstdc++-v3/files/digest-libstdc++-v3-3.3.3 b/sys-libs/libstdc++-v3/files/digest-libstdc++-v3-3.3.3
new file mode 100644
index 000000000000..e87695155cb0
--- /dev/null
+++ b/sys-libs/libstdc++-v3/files/digest-libstdc++-v3-3.3.3
@@ -0,0 +1 @@
+MD5 3c6cfd9fcd180481063b4058cf6faff2 gcc-3.3.3.tar.bz2 23279245
diff --git a/sys-libs/libstdc++-v3/files/libstdc++_amd64_multilib_hack.patch b/sys-libs/libstdc++-v3/files/libstdc++_amd64_multilib_hack.patch
new file mode 100644
index 000000000000..6ba6694db8a9
--- /dev/null
+++ b/sys-libs/libstdc++-v3/files/libstdc++_amd64_multilib_hack.patch
@@ -0,0 +1,11 @@
+--- gcc/config/i386/t-linux64.orig 2003-06-28 00:19:59.000000000 +0000
++++ gcc/config/i386/t-linux64 2003-06-28 00:20:07.000000000 +0000
+@@ -6,7 +6,7 @@
+
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64 ../lib
++MULTILIB_OSDIRNAMES = ../lib ../lib32
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
diff --git a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.3.ebuild b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.3.ebuild
new file mode 100644
index 000000000000..4af3e59302a6
--- /dev/null
+++ b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.3.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libstdc++-v3/libstdc++-v3-3.3.3.ebuild,v 1.1 2004/05/23 09:14:24 lv Exp $
+
+IUSE="nls"
+
+inherit eutils flag-o-matic libtool
+
+# Compile problems with these (bug #6641 among others)...
+#filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr"
+
+# Recently there has been a lot of stability problem in Gentoo-land. Many
+# things can be the cause to this, but I believe that it is due to gcc3
+# still having issues with optimizations, or with it not filtering bad
+# combinations (protecting the user maybe from himeself) yet.
+#
+# This can clearly be seen in large builds like glibc, where too aggressive
+# CFLAGS cause the tests to fail miserbly.
+#
+# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
+# knows what he is talking about:
+#
+# People really shouldn't force code-specific options on... It's a
+# bad idea. The -march options aren't just to look pretty. They enable
+# options that are sensible (and include sse,mmx,3dnow when apropriate).
+#
+# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
+# you do not like it, comment it, but do not bugreport if you run into
+# problems.
+#
+# <azarah@gentoo.org> (13 Oct 2002)
+do_filter_flags() {
+ strip-flags
+
+ # In general gcc does not like optimization, and add -O2 where
+ # it is safe. This is especially true for gcc 3.3 + 3.4
+ replace-flags -O? -O2
+
+ if use amd64
+ then
+ setting="`get-flag march`"
+ [ ! -z "${setting}" ] && filter-flags -march="${setting}"
+ fi
+}
+
+S=${WORKDIR}/gcc-${PV}
+
+# Theoretical cross compiler support
+[ ! -n "${CCHOST}" ] && export CCHOST="${CHOST}"
+
+LOC="/usr"
+MY_PV="`echo ${PV} | awk -F. '{ gsub(/_pre.*|_alpha.*/, ""); print $1 "." $2 }'`"
+MY_PV_FULL="`echo ${PV} | awk '{ gsub(/_pre.*|_alpha.*/, ""); print $0 }'`"
+
+LIBPATH="${LOC}/lib/gcc-lib/${CCHOST}/${MY_PV_FULL}"
+BINPATH="${LOC}/${CCHOST}/gcc-bin/${MY_PV}"
+DATAPATH="${LOC}/share/gcc-data/${CCHOST}/${MY_PV}"
+# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
+# We will handle /usr/include/g++-v3/ with gcc-config ...
+STDCXX_INCDIR="${LIBPATH}/include/g++-v${MY_PV/\.*/}"
+
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2"
+
+DESCRIPTION="Compatibility package for running binaries linked against a pre gcc 3.4 libstdc++"
+HOMEPAGE="http://gcc.gnu.org/libstdc++/"
+
+LICENSE="GPL-2 LGPL-2.1"
+
+KEYWORDS="~amd64"
+
+if [ "${CHOST}" == "${CCHOST}" ]
+then
+ SLOT="3.3.3"
+else
+ SLOT="${CCHOST}-3.3.3"
+fi
+
+DEPEND="virtual/glibc
+ !nptl? ( >=sys-libs/glibc-2.3.2-r3 )
+ >=sys-devel/binutils-2.14.90.0.6-r1
+ >=sys-devel/bison-1.875
+ >=sys-devel/gcc-config-1.3.1
+ >=sys-devel/gcc-3.4*
+ !build? ( >=sys-libs/ncurses-5.2-r2
+ nls? ( sys-devel/gettext ) )"
+
+RDEPEND="virtual/glibc
+ !nptl? ( >=sys-libs/glibc-2.3.2-r3 )
+ >=sys-devel/gcc-config-1.3.1
+ >=sys-libs/zlib-1.1.4
+ >=sys-apps/texinfo-4.2-r4
+ !build? ( >=sys-libs/ncurses-5.2-r2 )"
+
+PDEPEND="sys-devel/gcc-config"
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ # Fixup libtool to correctly generate .la files with portage
+ elibtoolize --portage --shallow
+
+ use amd64 && epatch ${FILESDIR}/libstdc++_amd64_multilib_hack.patch
+
+ # Misdesign in libstdc++ (Redhat)
+ cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
+
+ cd ${S}; ./contrib/gcc_update --touch &> /dev/null
+}
+
+src_compile() {
+
+ local myconf=
+
+ if ! use nls || use build
+ then
+ myconf="${myconf} --disable-nls"
+ else
+ myconf="${myconf} --enable-nls --without-included-gettext"
+ fi
+
+ use amd64 && myconf="${myconf} --disable-multilib"
+
+ do_filter_flags
+ einfo "CFLAGS=\"${CFLAGS}\""
+ einfo "CXXFLAGS=\"${CXXFLAGS}\""
+
+ # Build in a separate build tree
+ mkdir -p ${WORKDIR}/build
+ cd ${WORKDIR}/build
+
+ einfo "Configuring libstdc++..."
+ addwrite "/dev/zero"
+ ${S}/configure --prefix=${LOC} \
+ --bindir=${BINPATH} \
+ --includedir=${LIBPATH}/include \
+ --datadir=${DATAPATH} \
+ --mandir=${DATAPATH}/man \
+ --infodir=${DATAPATH}/info \
+ --enable-shared \
+ --host=${CHOST} \
+ --target=${CCHOST} \
+ --with-system-zlib \
+ --enable-languages=c++ \
+ --enable-threads=posix \
+ --enable-long-long \
+ --disable-checking \
+ --enable-cstdio=stdio \
+ --enable-__cxa_atexit \
+ --with-gxx-include-dir=${STDCXX_INCDIR} \
+ --with-local-prefix=${LOC}/local \
+ ${myconf} || die
+
+ touch ${S}/gcc/c-gperf.h
+
+ # Setup -j in MAKEOPTS
+ get_number_of_jobs
+
+ einfo "Compiling libstdc++..."
+ S="${WORKDIR}/build" \
+ emake all-target-libstdc++-v3 \
+ LIBPATH="${LIBPATH}" \
+ BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
+}
+
+src_install() {
+ local x=
+
+ # Do allow symlinks in ${LOC}/lib/gcc-lib/${CHOST}/${PV}/include as
+ # this can break the build.
+ for x in ${WORKDIR}/build/gcc/include/*
+ do
+ if [ -L ${x} ]
+ then
+ rm -f ${x}
+ continue
+ fi
+ done
+ # Remove generated headers, as they can cause things to break
+ # (ncurses, openssl, etc).
+ for x in `find ${WORKDIR}/build/gcc/include/ -name '*.h'`
+ do
+ if grep -q 'It has been auto-edited by fixincludes from' ${x}
+ then
+ rm -f ${x}
+ fi
+ done
+
+ einfo "Installing libstdc++..."
+ # Do the 'make install' from the build directory
+ cd ${WORKDIR}/build
+ S="${WORKDIR}/build" \
+ make prefix=${LOC} \
+ bindir=${BINPATH} \
+ includedir=${LIBPATH}/include \
+ datadir=${DATAPATH} \
+ mandir=${DATAPATH}/man \
+ infodir=${DATAPATH}/info \
+ DESTDIR="${D}" \
+ LIBPATH="${LIBPATH}" \
+ install-target-libstdc++-v3 || die
+
+ # we dont want the headers...
+ rm -rf ${D}/${LOC}/lib/gcc-lib
+ # or locales...
+ rm -rf ${D}/${LOC}/share
+ # or anything other than the .so files, really.
+ find ${D} | grep -e c++.la$ -e c++.a$ | xargs rm -f
+}
+
diff --git a/sys-libs/libstdc++-v3/metadata.xml b/sys-libs/libstdc++-v3/metadata.xml
new file mode 100644
index 000000000000..bef59db9d9fa
--- /dev/null
+++ b/sys-libs/libstdc++-v3/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>toolchain</herd>
+<maintainer>
+ <email>lv@gentoo.org</email>
+</maintainer>
+</pkgmetadata>