diff options
author | Tim Harder <radhermit@gentoo.org> | 2011-12-11 23:42:14 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2011-12-11 23:42:14 +0000 |
commit | 5807899b23c4869995a13ce2e28fec6d667a401e (patch) | |
tree | 5b23807c7d91081cd6b4dd6ffa0d4af70b346b8f /dev-lang | |
parent | Old. (diff) | |
download | gentoo-2-5807899b23c4869995a13ce2e28fec6d667a401e.tar.gz gentoo-2-5807899b23c4869995a13ce2e28fec6d667a401e.tar.bz2 gentoo-2-5807899b23c4869995a13ce2e28fec6d667a401e.zip |
Version bump (bug #363677 by Michal Janke). Add the ide USE flag to replace the fpc-ide package.
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/fpc/ChangeLog | 9 | ||||
-rw-r--r-- | dev-lang/fpc/fpc-2.4.4.ebuild | 152 | ||||
-rw-r--r-- | dev-lang/fpc/metadata.xml | 5 |
3 files changed, 164 insertions, 2 deletions
diff --git a/dev-lang/fpc/ChangeLog b/dev-lang/fpc/ChangeLog index 4b7f1f0f3ba7..9f33a15bf15b 100644 --- a/dev-lang/fpc/ChangeLog +++ b/dev-lang/fpc/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-lang/fpc # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/fpc/ChangeLog,v 1.54 2011/02/12 18:43:24 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/fpc/ChangeLog,v 1.55 2011/12/11 23:42:14 radhermit Exp $ + +*fpc-2.4.4 (11 Dec 2011) + + 11 Dec 2011; Tim Harder <radhermit@gentoo.org> +fpc-2.4.4.ebuild, + metadata.xml: + Version bump (bug #363677 by Michal Janke). Add the ide USE flag to replace + the fpc-ide package. 12 Feb 2011; Raúl Porcel <armin76@gentoo.org> fpc-2.4.0.ebuild: sparc stable wrt #345663 diff --git a/dev-lang/fpc/fpc-2.4.4.ebuild b/dev-lang/fpc/fpc-2.4.4.ebuild new file mode 100644 index 000000000000..8b2c443ebcca --- /dev/null +++ b/dev-lang/fpc/fpc-2.4.4.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/fpc/fpc-2.4.4.ebuild,v 1.1 2011/12/11 23:42:14 radhermit Exp $ + +EAPI=4 + +HOMEPAGE="http://www.freepascal.org/" +DESCRIPTION="Free Pascal Compiler" +SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz + amd64? ( mirror://sourceforge/freepascal/${P}.x86_64-linux.tar ) + ppc? ( mirror://sourceforge/freepascal/${P}.powerpc-linux.tar ) + sparc? ( mirror://sourceforge/freepascal/${PN}-2.2.4.sparc-linux.tar ) + x86? ( mirror://sourceforge/freepascal/${P}.i386-linux.tar ) + doc? ( mirror://sourceforge/freepascal/Documentation/${PV}/doc-html.tar.gz -> ${P}-doc-html.tar.gz + http://dev.gentoo.org/~radhermit/distfiles/${P}-fpctoc.htx.bz2 )" + +SLOT="0" +LICENSE="GPL-2 LGPL-2.1 LGPL-2.1-FPC" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="doc ide source" + +RDEPEND="ide? ( !dev-lang/fpc-ide )" + +RESTRICT="strip" #269221 + +S="${WORKDIR}/fpcbuild-${PV}/fpcsrc" + +src_unpack() { + case ${ARCH} in + amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;; + ppc) FPC_ARCH="powerpc" PV_BIN=${PV} ;; + sparc) FPC_ARCH="sparc" PV_BIN=2.2.4 ;; + x86) FPC_ARCH="i386" PV_BIN=${PV} ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + unpack ${A} + + tar -xf binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!" + tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!" +} + +src_prepare() { + find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die + + # Use default configuration (minus stripping) unless specifically requested otherwise + if ! test ${PPC_CONFIG_PATH+set}; then + local FPCVER="${PV}" + export PPC_CONFIG_PATH="${WORKDIR}" + sed -e 's/^FPBIN=/#&/' /usr/lib/fpc/${FPCVER}/samplecfg | + sh -s /usr/lib/fpc/${FPCVER} "${PPC_CONFIG_PATH}" || die + sed -i -e '/^-Xs/d' "${PPC_CONFIG_PATH}"/fpc.cfg || die + fi +} + +set_pp() { + case ${ARCH} in + x86) FPC_ARCH="386" ;; + ppc) FPC_ARCH="ppc" ;; + amd64) FPC_ARCH="x64" ;; + sparc) FPC_ARCH="sparc" ;; + *) die "This ebuild doesn't support ${ARCH}." ;; + esac + + case ${1} in + bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;; + new) pp="${S}"/compiler/ppc${FPC_ARCH} ;; + *) die "set_pp: unknown argument: ${1}" ;; + esac +} + +src_compile() { + local pp + + # Using the bootstrap compiler. + set_pp bootstrap + + emake -j1 PP="${pp}" compiler_cycle + + # Save new compiler from cleaning... + cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die + + # ...rebuild with current version... + emake -j1 PP="${S}"/ppc${FPC_ARCH}.new compiler_cycle + + # ..and clean up afterwards + rm "${S}"/ppc${FPC_ARCH}.new || die + + # Using the new compiler. + set_pp new + + emake -j1 PP="${pp}" rtl_clean + + emake -j1 PP="${pp}" rtl packages_all utils + + if use ide ; then + cd "${S}"/ide || die + emake -j1 PP="${pp}" + fi +} + +src_install() { + local pp + set_pp new + + set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/fpcmake" \ + INSTALL_PREFIX="${D}"usr \ + INSTALL_DOCDIR="${D}"usr/share/doc/${PF} \ + INSTALL_MANDIR="${D}"usr/share/man \ + INSTALL_SOURCEDIR="${D}"usr/lib/fpc/${PV}/source + + emake -j1 "$@" compiler_install rtl_install packages_install utils_install + + dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH} + + cd "${S}"/../install/doc || die + emake -j1 "$@" installdoc + + cd "${S}"/../install/man || die + emake -j1 "$@" installman + + if use doc ; then + cd "${S}"/../../doc || die + dodoc -r * + newdoc "${WORKDIR}"/${P}-fpctoc.htx fpctoc.htx + docompress -x /usr/share/doc/${PF}/fpctoc.htx + fi + + if use ide ; then + cd "${S}"/ide + emake -j1 "$@" install + fi + + if use source ; then + cd "${S}" || die + shift + emake -j1 PP="${D}"usr/bin/ppc${FPC_ARCH} "$@" sourceinstall + find "${D}"usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \; + fi + + "${D}"usr/lib/fpc/${PV}/samplecfg "${D}"usr/lib/fpc/${PV} "${D}"etc || die + sed -i -e "s:${D}:/:g" "${D}"etc/fpc.cfg || die "sed fpc.cfg failed" + + rm -r "${D}"usr/lib/fpc/lexyacc || die +} + +pkg_postinst() { + if use ide ; then + einfo "To read the documentation in the fpc IDE, enable the doc USE flag" + einfo "and add /usr/share/doc/${PF}/fpctoc.htx to the Help Files list." + fi +} diff --git a/dev-lang/fpc/metadata.xml b/dev-lang/fpc/metadata.xml index f376edc581d2..f7d72d730c47 100644 --- a/dev-lang/fpc/metadata.xml +++ b/dev-lang/fpc/metadata.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>lang-misc</herd> + <herd>lang-misc</herd> + <use> + <flag name="ide">Build and install the Free Pascal Compiler IDE</flag> + </use> </pkgmetadata> |