summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Shapovalov <george@gentoo.org>2006-01-17 13:09:04 +0000
committerGeorge Shapovalov <george@gentoo.org>2006-01-17 13:09:04 +0000
commitc87ba347d8717c33dc6f5a7c8cc0b5d1c619c6f7 (patch)
tree2ed7cbf40c91654d5b6f7ad13da583326023addc /dev-lang/gpc/gpc-20051104.ebuild
parentVersion bump. Dropped ~mips keyword since there is no recent version of dev-u... (diff)
downloadgentoo-2-c87ba347d8717c33dc6f5a7c8cc0b5d1c619c6f7.tar.gz
gentoo-2-c87ba347d8717c33dc6f5a7c8cc0b5d1c619c6f7.tar.bz2
gentoo-2-c87ba347d8717c33dc6f5a7c8cc0b5d1c619c6f7.zip
new version, dependency on gcc is no longer necessary (slightly different build, #119138)
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'dev-lang/gpc/gpc-20051104.ebuild')
-rw-r--r--dev-lang/gpc/gpc-20051104.ebuild149
1 files changed, 149 insertions, 0 deletions
diff --git a/dev-lang/gpc/gpc-20051104.ebuild b/dev-lang/gpc/gpc-20051104.ebuild
new file mode 100644
index 000000000000..2f929d1597e8
--- /dev/null
+++ b/dev-lang/gpc/gpc-20051104.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/gpc/gpc-20051104.ebuild,v 1.1 2006/01/17 13:09:04 george Exp $
+
+inherit eutils flag-o-matic versionator
+
+strip-flags
+filter-flags "-pipe"
+
+#due to cache requirements we cannot dynamically match gcc version
+#so sticking to a particular (and working) one
+GCCVER="3.4.5"
+
+DESCRIPTION="Gnu Pascal Compiler"
+HOMEPAGE="http://gnu-pascal.de"
+SRC_URI="http://www.math.uni.wroc.pl/~hebisch/${PN}/${P}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${GCCVER}/gcc-core-${GCCVER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+DEPEND="virtual/libc"
+
+S="${WORKDIR}/gcc-${GCCVER}"
+
+# GCC version strings
+GCCMAJOR=$(get_version_component_range 1 "${GCCVER}")
+GCCMINOR=$(get_version_component_range 2 "${GCCVER}")
+GCCBRANCH=$(get_version_component_range 1-2 "${GCCVER}")
+GCCRELEASE=$(get_version_component_range 1-3 "${GCCVER}")
+
+# possible future crosscompilation support
+export CTARGET=${CTARGET:-${CHOST}}
+
+PREFIX="/usr"
+LIBPATH="${PREFIX}/lib/${PN}/${CTARGET}/${GCCBRANCH}"
+LIBEXECPATH="${PREFIX}/libexec/${PN}/${CTARGET}/${GCCBRANCH}"
+INCLUDEPATH="${LIBPATH}/include"
+DATAPATH="${PREFIX}/share"
+
+BUILDDIR="${WORKDIR}/build"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${WORKDIR}/${P}/p"
+
+ #comment out read to let ebuild continue
+ sed -i -e "s:read:#read:" config-lang.in || die "seding autoreplies failed"
+ #and remove that P var (it doesn't seem to do much except to break a build)
+ sed -i -e "s:\$(P)::" Make-lang.in || die "seding Make-lan.in failed"
+
+ cd "${WORKDIR}"
+ mv ${P}/p "${S}/gcc/"
+
+ # Build in a separate build tree
+ mkdir -p ${BUILDDIR}
+}
+
+src_compile() {
+ local myconf
+
+ if use nls; then
+ myconf="${myconf} --enable-nls --without-included-gettext"
+ else
+ myconf="${myconf} --disable-nls"
+ fi
+
+ # reasonably sane globals (from toolchain)
+ myconf="${myconf} \
+ --with-system-zlib \
+ --disable-checking \
+ --disable-werror \
+ --disable-libunwind-exceptions"
+
+ cd ${BUILDDIR}
+
+ einfo "Configuring GCC for GPC build..."
+# addwrite "/dev/zero"
+ ${S}/configure \
+ --prefix=${PREFIX} \
+ --libdir="${LIBPATH}" \
+ --libexecdir="${LIBEXECPATH}" \
+ --datadir=${DATAPATH} \
+ --mandir=${DATAPATH}/man \
+ --infodir=${DATAPATH}/info \
+ --program-prefix="" \
+ --enable-shared \
+ --host=${CHOST} \
+ --target=${CTARGET} \
+ --enable-languages="c,pascal" \
+ --enable-threads=posix \
+ --enable-long-long \
+ --enable-cstdio=stdio \
+ --enable-clocale=generic \
+ --enable-__cxa_atexit \
+ --enable-version-specific-runtime-libs \
+ --with-local-prefix=${PREFIX}/local \
+ ${myconf} || die "configure failed"
+
+ touch ${S}/gcc/c-gperf.h
+
+ einfo "Building GPC..."
+ # Fix for our libtool-portage.patc
+ emake -j1 LIBPATH="${LIBPATH}" bootstrap || die "make failed"
+}
+
+src_install () {
+ # Do not allow symlinks in ${PREFIX}/lib/gcc-lib/${CHOST}/${PV}/include as
+ # this can break the build.
+ for x in cd ${BUILDDIR}/gcc/include/*; do
+ if [ -L ${x} ]; then
+ rm -f ${x}
+ fi
+ done
+
+ einfo "Installing GPC..."
+ cd ${BUILDDIR}/gcc
+ make DESTDIR=${D} \
+ pascal.install-with-gcc || die
+
+ # gcc insists on installing libs in its own place
+ mv "${D}${LIBPATH}/gcc/${CTARGET}/${GCCRELEASE}"/* "${D}${LIBPATH}"
+ if [ "${ARCH}" == "amd64" ]; then
+ # ATTN! this may in fact be related to multilib, rather than amd64
+ mv "${D}${LIBPATH}/gcc/${CTARGET}"/lib64/libgcc_s* "${D}${LIBPATH}"
+ mv "${D}${LIBPATH}/gcc/${CTARGET}"/lib/libgcc_s* "${D}${LIBPATH}"/32/
+ fi
+ mv "${D}${LIBEXECPATH}/gcc/${CTARGET}/${GCCRELEASE}"/* "${D}${LIBEXECPATH}"
+
+ rm -rf "${D}${LIBPATH}/gcc"
+ rm -rf "${D}${LIBEXECPATH}/gcc"
+ rm -rf "${D}${LIBEXECPATH}"/install-tools/
+
+ # Install documentation.
+ dodir /usr/share/doc/${PF}
+ mv ${D}${PREFIX}/doc/gpc/* ${D}/usr/share/doc/${PF}
+ prepalldocs
+
+ # final cleanups
+ rmdir ${D}${PREFIX}/include ${D}/${PREFIX}/share/man/man7
+ rm -rf ${D}${PREFIX}/doc
+
+ # create an env.d entry
+ dodir /etc/env.d
+ echo "PATH=${LIBEXECPATH}" > ${D}etc/env.d/56gpc
+}