Portage is a package management system used by Gentoo Linux
# ChangeLog for dev-embedded/tigcc
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/tigcc/ChangeLog,v 1.18 2008/01/05 09:13:28 calchan Exp $
05 Jan 2008; Denis Dupeyron
Fixed bug #204379. Many QA cleanups.
21 Feb 2007; Denis Dupeyron
files/digest-tigcc-0.95-r2, files/digest-tigcc-0.95_p3,
files/digest-tigcc-0.96_beta2, Manifest:
Transition to Manifest2.
13 Nov 2006; Sven Wegener
Fix mirror:// SRC_URI.
*tigcc-0.96_beta7 (04 Nov 2006)
04 Nov 2006; Daniel Black
+tigcc-0.96_beta7.ebuild, -tigcc-0.96_beta8.ebuild:
wrong version name on file - should have been tigcc-0.96_beta7 before.
Thanks helch
*tigcc-0.96_beta8 (04 Nov 2006)
04 Nov 2006; Daniel Black
+tigcc-0.96_beta8.ebuild:
version bump as per bug #82335 thanks to Christian Helbling for the ebuild
19 Mar 2006; Mark Loeser
Add DEPEND on app-arch/unzip
16 Dec 2005; Diego Pettenò
tigcc-0.96_beta2.ebuild:
Remove --with-gnu-ld option, bug #108386.
16 Sep 2005; Ciaran McCreesh
Converted to UTF-8, fixed encoding screwups
07 Aug 2005; Michael Hanselmann
Stable on ppc.
21 Apr 2005; Simon Stelling
stable on amd64
*tigcc-0.96_beta2 (28 Feb 2005)
28 Feb 2005; Daniel Black
Version bump as per bug #82335. Many thanks to Robert Führicht
17 Feb 2005; Robin H. Johnson
tigcc-0.95_p3.ebuild:
Bug #69831: Ensure unzip is in DEPEND.
*tigcc-0.95_p3 (04 Dec 2004)
04 Dec 2004; Daniel Black
-tigcc-0.95_beta19-r1.ebuild, +tigcc-0.95_p3.ebuild:
version bump as per bug #73169. Thanks Robert Führicht
*tigcc-0.95-r2 (01 Nov 2004)
01 Nov 2004; Daniel Black
version bump
18 Oct 2004; David Holm
Added to ~ppc.
29 Sep 2004; Simon Stelling
tigcc-0.95_beta19-r1.ebuild:
added ~amd64
*tigcc-0.95_beta19-r1 (25 Sep 2004)
25 Sep 2004; Daniel Black
+tigcc-0.95_beta19-r1.ebuild, +files/a68k-fix.patch:
Initial import as per bug #51162. Ebuild by Robert Führicht
AUX a68k-fix.patch 625 RMD160 8849731255aaa0746587d0d36de98a2841a914bf SHA1 6d10fd21e79d7ee792fa613b8c2b429627dce142 SHA256 8c2f78daafa407fac7c3fc82bb4b4658d2f053741cdb974c0dcdc36ed3f83034
DIST binutils-2.14.tar.bz2 10921504 RMD160 e629a1256b5f75552e3360a315d28ad37f11a604 SHA1 66b4f057bf687126d7cc11d0a68ed89182541ae7 SHA256 e20bdd49a0fb317959b410c1fe81269a620ec21207045d8a37cadea621be4b59
DIST binutils-2.15.tar.bz2 11515075 RMD160 62b50a0033e5b491b587b77df304eb28bc52a6ba SHA1 9ac6e47be8cd78385d3d5e09c6bb420e357c4c07 SHA256 ec064e693aad821f0fb942d6da59f7f6b5d1d99e3cc100514af837deb3940d24
DIST binutils-2.16.1.tar.bz2 12549917 RMD160 638861a6b709ac380f1bc13d55c6b48d0532b3d0 SHA1 5c80fd5657da47efc16a63fdd93ef7395319fbbf SHA256 351a6846ee179a37ed87a487971547159a7f4f92a1dec598c727f184a0de61ae
DIST flashosa.zip 2437 RMD160 9424861be569e6af751271c3143c927f412277ab SHA1 4d8e5504f4c13c697a45727caec45eafb6958107 SHA256 ae0be66d99aea7f7d84364347c220ed1bc8cae5f898a6e8b1a9458b445fdfea4
DIST gcc-4.1-20060728.tar.bz2 37038705 RMD160 6bd10730f466963440c4fb54df36b34636d9f204 SHA1 5e26d5931fbe4d42b7492272d23f65391b748d93 SHA256 2600728a9448522c80ff64f99eff93a4499f0a7aa460c55bb08e76875084417b
DIST gcc-core-3.3.3.tar.bz2 11553433 RMD160 639593cb0668c227f3f90a1854903fc91e35de8d SHA1 9a686d16e4825422ba74cc5c5869aeea1a254451 SHA256 a4bf992ca719711a77d09b84fc496bbe6fcecb8feac996c2e6e102d3cbbe15eb
DIST libfargo.zip 14766 RMD160 08c28c71ead68edcc0e5702bfabce7c9bd225549 SHA1 97a2e70477e53ff237ed538d3ad632c45ca9372b SHA256 c37bacb744c94519b1dea0b0b855baa4379b009ec7200437521895f8a9ea90eb
DIST tigcc-0.95-r2.tar.bz2 3207132 RMD160 ca70ef50ad56f9981e7c2adef6d113711cc8f5ff SHA1 010c1d867d45df58dc0f243aa56517bfc8433770 SHA256 1e4260976fa7ddde5d66e3b71e05875c804109007957df6fa8ab7e23a6af623c
DIST tigcc-0.95_p3.tar.bz2 3206165 RMD160 4745a88a0184e11828f8a50a5feae99fcc276e5e SHA1 8e4b48ac9207ca84b697bfb82f6ff382a6df27bc SHA256 b68f5f68c336f28dcd96383c46490a1bdd9ac678e38626d3d445e388639372d3
DIST tigcc-0.96_beta2.tar.bz2 3295616 RMD160 a096646f55447b7e3a52de3bb737976142726096 SHA1 457bcc325fb6ea674f1c16333f3b033f7a70b903 SHA256 50092699cbe3bb20c6f91db0f642a5dace1e633bbbb9ff26c1f76fe51aca0689
DIST tigcc-0.96_beta7.tar.bz2 2828952 RMD160 11c431a08c0fc8630aab4dcc6f5315b5b38f5f6d SHA1 c302a5c95767d80abbeffc89448f8b16e4a84bbd SHA256 da3d75515f1a0091203b3c1f47f8fa342302e45e0bbe62849391ce0935521b0b
EBUILD tigcc-0.95-r2.ebuild 6494 RMD160 8c74aee43af8afe1885b27b86508d361b1780177 SHA1 53a885e4a7e97d005ba9a84737a1ce582503288b SHA256 73f78ca6b332c52e5cb3f5d08b93d4c4129aef47558da83c3e68b0212fc4ec5e
EBUILD tigcc-0.95_p3.ebuild 6494 RMD160 a783991f750b1764165ee0fab2b115a55f5d4607 SHA1 fa3a8c010e37902f7d934ccfc591bbaef39a2d9f SHA256 c583b842215a6d9195f8e0e904802982cc5a96a5563b5fde89ec9e073b89fb91
EBUILD tigcc-0.96_beta2.ebuild 6307 RMD160 debae289305d8aa6deabcddc7314a1ad1691ef7a SHA1 a22f9f12c71246d853c2051c820eac290246ecd2 SHA256 3b1f76a98955668391ef3795a8f57532fe743c3949c89e81a335bf96f1818d2f
EBUILD tigcc-0.96_beta7.ebuild 6913 RMD160 7b83a8bde342e4f4e63466b440b361bf96f08c35 SHA1 b8075b0d33426d47d0a50ff587cdf3d01b41b297 SHA256 c4a0aba30ee392ff7146dd9c0dca65d9252334c9a990e15ec9a0d78fd06adafb
MISC ChangeLog 2750 RMD160 9d9ba36c68c50df25e6151cf57a86c99a7030cab SHA1 fbcaa1b760aad08624316957d6d9c7914c5cffd0 SHA256 fa615ded4eb350afb95c6a751e2f6b91bcc8661c72647472e6e04e1261604449
MISC metadata.xml 165 RMD160 3965c22a153ed350bcbd52de07c08ad47dd03cd7 SHA1 54b9da7fdc6d8376c990288c72938be9855ef8b6 SHA256 fb7ede94a0633f77d601e3e81580eac1624a3bca14401a49d94082579507ba0a
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/tigcc/tigcc-0.95-r2.ebuild,v 1.7 2007/07/15 03:57:21 mr_bones_ Exp $
inherit eutils
BASE_GCC="3.3.3"
BASE_BINUTILS="2.14"
GCC_VER=${BASE_GCC:0:3}
BIN_VER=${BASE_BINUTILS:0:4}
S=${WORKDIR}
DESCRIPTION="Cross compiler for Texas Instruments TI-89, TI-92(+) and V200 calculators"
HOMEPAGE="http://tigcc.ticalc.org"
# mirror://gentoo/${PF}.tar.bz2 comes from http://www.angelfire.com/linux/ifs/${PF}.tar.bz2
# which isn't that reliable
#All kernel mirrors in gentoo didn't have 2.14
# mirror://kernel/linux/devel/binutils/binutils-${BASE_BINUTILS}.tar.bz2
SRC_URI="mirror://gentoo/${PF}.tar.bz2
mirror://gnu/gcc/releases/gcc-${BASE_GCC}/gcc-core-${BASE_GCC}.tar.bz2
http://cdn.mirror.garr.it/mirrors/gnuftp/binutils/binutils-${BASE_BINUTILS}.tar.bz2
http://members.chello.at/gerhard.kofler/kevin/ti89prog/libfargo.zip
http://members.chello.at/gerhard.kofler/kevin/ti89prog/flashosa.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
#KEYWORDS="~x86 ~ppc ~sparc ~amd64"
IUSE=""
RDEPEND="virtual/libc
>=sys-devel/binutils-2.14.90.0.6-r1
>=sys-devel/bison-1.875"
DEPEND="${RDEPEND}
app-arch/unzip"
src_unpack() {
unpack ${A}
# start by patching binutils and gcc
cd ${WORKDIR}/binutils-${BASE_BINUTILS}
epatch ${S}/sources/gcc/gas-${BIN_VER}-tigcc-*.diff
cd ${WORKDIR}/gcc-${BASE_GCC}
epatch ${S}/sources/gcc/gcc-${BASE_GCC}-tigcc-*.diff
# a68k didn't compile, this should fix it.
cd ${S}
epatch ${FILESDIR}/a68k-fix.patch
# fixes a bug in tprbuilder, needed for 0.95_beta8-r1
# epatch ${FILESDIR}/tprbuilder-fix.patch
# make build directories for binutils and gcc
mkdir -p ${WORKDIR}/build/binutils
mkdir ${WORKDIR}/build/gcc
}
src_compile() {
# build binutils
cd ${WORKDIR}/build/binutils
CFLAGS="$CFLAGS" ${WORKDIR}/binutils-${BASE_BINUTILS}/configure \
--disable-serial-configure --target=m68k-coff --disable-shared \
--enable-static --disable-multilib --disable-nls \
|| die
emake || die
# build gcc
cd ${WORKDIR}/build/gcc
# --with-headers=${S}/tigcclib/include/c \
CFLAGS="$CFLAGS" ${WORKDIR}/gcc-${BASE_GCC}/configure --target=m68k-coff \
--with-gnu-as --with-as=${WORKDIR}/build/binutils/gas/as-new --with-gnu-ld \
--disable-nls --disable-multilib --disable-shared --enable-static \
--disable-threads \
|| die
# GCC compilations _is intended_ to fail on a certain point, don't worry about that.
emake
# build a68k assembler
cd ${S}/sources/a68k/src
emake -e || die
# build ld-tigcc linker
cd ${S}/sources/ld-tigcc
emake -e || die
# build tigcc front-end
cd ${S}/sources/tigcc/src
emake -e || die
# build tprbuilder (TIGCC project builder)
cd ${S}/sources/tprbuilder/src
emake -e || die
# build patcher (object file patcher)
cd ${S}/sources/patcher/src
emake -e || die
# build parser
cd ${S}/sources/parser/src
emake -e || die
# build tict tool suite
cd ${S}/tt
CFLAGS="$CFLAGS" ./makelinux.sh || die
# patch the script that launches the documentation browser to point to the correct location
sed "s:\$TIGCC/doc:/usr/share/doc/${P}:g" ${S}/tigcclib/doc/converter/tigccdoc > ${S}/tigcclib/doc/converter/tigccdoc.new
}
src_install() {
#ENV_FILE=${D}/etc/env.d/gcc/ti-linux-gnu-${GCC_VER}
ENV_FILE=${D}/etc/env.d/99tigcc
# install documentation
cd ${S}/tigcclib/doc/converter
into /usr
dodir /usr/bin
newbin tigccdoc.new tigccdoc
dodir /usr/share/doc/${PF}
cd ${S}
dodoc AUTHORS BUGS CHANGELOG COPYING DIRECTORIES HOWTO INSTALL README README.linux README.osX
cd ${S}/tigcclib/doc
dohtml -r html/*.html
cp html/qt-assistant.adp ${D}/usr/share/doc/${PF}/html
cd ${S}/sources/a68k
docinto a68k
dodoc docs/*.txt
cd ${S}/sources/tigcc
docinto tigcc
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/sources/tprbuilder
docinto tprbuilder
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/sources/patcher
docinto patcher
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/sources/parser
docinto parser
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/tt
docinto tools
dodoc history.txt linux_readme.txt readme.txt tooldocs.txt
exeinto /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}
# install gcc
cd ${WORKDIR}/build/gcc
doexe gcc/cc1
newexe gcc/xgcc gcc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/gcc /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-gcc
# install gas
# exeinto /usr/ti-linux-gnu/bin <-- a symlink will be created so that gas resides in /usr/ti-linux-gnu/bin too
cd ${WORKDIR}/build/binutils
newexe gas/as-new as
# install a68k
cd ${S}/sources/a68k/src
newexe A68k a68k
# install ld-tigcc
cd ${S}/sources/ld-tigcc
doexe ld-tigcc
doexe ar-tigcc
# install tigcc
cd ${S}/sources/tigcc/src
doexe tigcc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/tigcc /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-tigcc
# install tprbuilder
cd ${S}/sources/tprbuilder/src
doexe tprbuilder
# install patcher
cd ${S}/sources/patcher/src
doexe patcher
# install parser
cd ${S}/sources/parser/src
doexe parser
# install tict tool suite
cd ${S}/tt
doexe linuxbin/*
# install header files
dodir /usr/include/tigcc
cp -R ${S}/tigcclib/include/* ${D}/usr/include/tigcc
dosym /usr/include/tigcc/asm/os.h /usr/include/tigcc/asm/OS.h
insinto /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}
# install library
cd ${S}/tigcclib
doins lib/*
cd ${WORKDIR}
doins flashosa/flashos.a
doins fargo.a
dodir /usr/share/tigcc
# copy example programs
cp -r ${S}/examples ${D}/usr/share/tigcc
# create TIGCC env variable
dodir /etc/env.d/gcc
# echo -e "TIGCC=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}\"" >> ${ENV_FILE}
# echo -e "CC=\"tigcc\"" >> ${ENV_FILE}
echo -e "TIGCC=\"/usr/ti-linux-gnu\"" >> ${ENV_FILE}
echo -e "PATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
echo -e "ROOTPATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
echo -e "LDPATH=\"/usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}\"" >> ${ENV_FILE}
# a cross-compiling gcc with hard-coded names has been built.
# therefore, we must place some symlinks.
dosym /usr/include/tigcc /usr/ti-linux-gnu/include
dosym /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER} /usr/ti-linux-gnu/lib
dosym /usr/share/doc/${PF} /usr/ti-linux-gnu/doc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER} /usr/ti-linux-gnu/bin
}
pkg-postinst() {
env-update && source /etc/profile
}
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/tigcc/tigcc-0.95_p3.ebuild,v 1.4 2007/07/15 03:57:21 mr_bones_ Exp $
inherit eutils
BASE_GCC="3.3.3"
BASE_BINUTILS="2.14"
GCC_VER=${BASE_GCC:0:3}
BIN_VER=${BASE_BINUTILS:0:4}
S=${WORKDIR}
DESCRIPTION="Cross compiler for Texas Instruments TI-89, TI-92(+) and V200 calculators"
HOMEPAGE="http://tigcc.ticalc.org"
# mirror://gentoo/${P}.tar.bz2 comes from http://tigcc.ticalc.org/linux/tigcc_src.tar.bz2
# which isn't that reliable
#All kernel mirrors in gentoo didn't have 2.14
# mirror://kernel/linux/devel/binutils/binutils-${BASE_BINUTILS}.tar.bz2
SRC_URI="mirror://gentoo/${P}.tar.bz2
mirror://gnu/gcc/releases/gcc-${BASE_GCC}/gcc-core-${BASE_GCC}.tar.bz2
http://cdn.mirror.garr.it/mirrors/gnuftp/binutils/binutils-${BASE_BINUTILS}.tar.bz2
http://members.chello.at/gerhard.kofler/kevin/ti89prog/libfargo.zip
http://members.chello.at/gerhard.kofler/kevin/ti89prog/flashosa.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64 ~ppc"
#KEYWORDS="~x86 ~ppc ~sparc ~amd64"
IUSE=""
RDEPEND="virtual/libc
>=sys-devel/binutils-2.14.90.0.6-r1
>=sys-devel/bison-1.875"
DEPEND="${RDEPEND}
app-arch/unzip"
src_unpack() {
unpack ${A}
# start by patching binutils and gcc
cd ${WORKDIR}/binutils-${BASE_BINUTILS}
epatch ${S}/sources/gcc/gas-${BIN_VER}-tigcc-*.diff
cd ${WORKDIR}/gcc-${BASE_GCC}
epatch ${S}/sources/gcc/gcc-${BASE_GCC}-tigcc-*.diff
# a68k didn't compile, this should fix it.
cd ${S}
epatch ${FILESDIR}/a68k-fix.patch
# fixes a bug in tprbuilder, needed for 0.95_beta8-r1
# epatch ${FILESDIR}/tprbuilder-fix.patch
# make build directories for binutils and gcc
mkdir -p ${WORKDIR}/build/binutils
mkdir ${WORKDIR}/build/gcc
}
src_compile() {
# build binutils
cd ${WORKDIR}/build/binutils
CFLAGS="$CFLAGS" ${WORKDIR}/binutils-${BASE_BINUTILS}/configure \
--disable-serial-configure --target=m68k-coff --disable-shared \
--enable-static --disable-multilib --disable-nls \
|| die
emake || die
# build gcc
cd ${WORKDIR}/build/gcc
# --with-headers=${S}/tigcclib/include/c \
CFLAGS="$CFLAGS" ${WORKDIR}/gcc-${BASE_GCC}/configure --target=m68k-coff \
--with-gnu-as --with-as=${WORKDIR}/build/binutils/gas/as-new --with-gnu-ld \
--disable-nls --disable-multilib --disable-shared --enable-static \
--disable-threads \
|| die
# GCC compilations _is intended_ to fail on a certain point, don't worry about that.
emake
# build a68k assembler
cd ${S}/sources/a68k/src
emake -e || die
# build ld-tigcc linker
cd ${S}/sources/ld-tigcc
emake -e || die
# build tigcc front-end
cd ${S}/sources/tigcc/src
emake -e || die
# build tprbuilder (TIGCC project builder)
cd ${S}/sources/tprbuilder/src
emake -e || die
# build patcher (object file patcher)
cd ${S}/sources/patcher/src
emake -e || die
# build parser
cd ${S}/sources/parser/src
emake -e || die
# build tict tool suite
cd ${S}/tt
CFLAGS="$CFLAGS" ./makelinux.sh || die
# patch the script that launches the documentation browser to point to the correct location
sed "s:\$TIGCC/doc:/usr/share/doc/${P}:g" ${S}/tigcclib/doc/converter/tigccdoc > ${S}/tigcclib/doc/converter/tigccdoc.new
}
src_install() {
#ENV_FILE=${D}/etc/env.d/gcc/ti-linux-gnu-${GCC_VER}
ENV_FILE=${D}/etc/env.d/99tigcc
# install documentation
cd ${S}/tigcclib/doc/converter
into /usr
dodir /usr/bin
newbin tigccdoc.new tigccdoc
dodir /usr/share/doc/${PF}
cd ${S}
dodoc AUTHORS BUGS CHANGELOG COPYING DIRECTORIES HOWTO INSTALL README README.linux README.osX
cd ${S}/tigcclib/doc
dohtml -r html/*.html
cp html/qt-assistant.adp ${D}/usr/share/doc/${PF}/html
cd ${S}/sources/a68k
docinto a68k
dodoc docs/*.txt
cd ${S}/sources/tigcc
docinto tigcc
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/sources/tprbuilder
docinto tprbuilder
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/sources/patcher
docinto patcher
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/sources/parser
docinto parser
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/tt
docinto tools
dodoc history.txt linux_readme.txt readme.txt tooldocs.txt
exeinto /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}
# install gcc
cd ${WORKDIR}/build/gcc
doexe gcc/cc1
newexe gcc/xgcc gcc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/gcc /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-gcc
# install gas
# exeinto /usr/ti-linux-gnu/bin <-- a symlink will be created so that gas resides in /usr/ti-linux-gnu/bin too
cd ${WORKDIR}/build/binutils
newexe gas/as-new as
# install a68k
cd ${S}/sources/a68k/src
newexe A68k a68k
# install ld-tigcc
cd ${S}/sources/ld-tigcc
doexe ld-tigcc
doexe ar-tigcc
# install tigcc
cd ${S}/sources/tigcc/src
doexe tigcc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/tigcc /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-tigcc
# install tprbuilder
cd ${S}/sources/tprbuilder/src
doexe tprbuilder
# install patcher
cd ${S}/sources/patcher/src
doexe patcher
# install parser
cd ${S}/sources/parser/src
doexe parser
# install tict tool suite
cd ${S}/tt
doexe linuxbin/*
# install header files
dodir /usr/include/tigcc
cp -R ${S}/tigcclib/include/* ${D}/usr/include/tigcc
dosym /usr/include/tigcc/asm/os.h /usr/include/tigcc/asm/OS.h
insinto /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}
# install library
cd ${S}/tigcclib
doins lib/*
cd ${WORKDIR}
doins flashosa/flashos.a
doins fargo.a
dodir /usr/share/tigcc
# copy example programs
cp -r ${S}/examples ${D}/usr/share/tigcc
# create TIGCC env variable
dodir /etc/env.d/gcc
# echo -e "TIGCC=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}\"" >> ${ENV_FILE}
# echo -e "CC=\"tigcc\"" >> ${ENV_FILE}
echo -e "TIGCC=\"/usr/ti-linux-gnu\"" >> ${ENV_FILE}
echo -e "PATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
echo -e "ROOTPATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
echo -e "LDPATH=\"/usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}\"" >> ${ENV_FILE}
# a cross-compiling gcc with hard-coded names has been built.
# therefore, we must place some symlinks.
dosym /usr/include/tigcc /usr/ti-linux-gnu/include
dosym /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER} /usr/ti-linux-gnu/lib
dosym /usr/share/doc/${PF} /usr/ti-linux-gnu/doc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER} /usr/ti-linux-gnu/bin
}
pkg-postinst() {
env-update && source /etc/profile
}
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/tigcc/tigcc-0.96_beta2.ebuild,v 1.5 2006/03/19 22:14:05 halcy0n Exp $
inherit eutils
BASE_GCC="3.3.3"
BASE_BINUTILS="2.15"
GCC_VER=${BASE_GCC:0:3}
BIN_VER=${BASE_BINUTILS:0:4}
ENV_FILE=${D}/etc/env.d/99tigcc
S=${WORKDIR}
DESCRIPTION="Cross compiler for Texas Instruments TI-89, TI-92(+) and V200 calculators"
HOMEPAGE="http://tigcc.ticalc.org"
# mirror://gentoo/${P}.tar.bz2 comes from http://tigcc.ticalc.org/linux/tigcc_src.tar.bz2
# which isn't that reliable
SRC_URI="mirror://gentoo/${PF}.tar.bz2
mirror://gnu/gcc/releases/gcc-${BASE_GCC}/gcc-core-${BASE_GCC}.tar.bz2
mirror://kernel/linux/devel/binutils/binutils-${BASE_BINUTILS}.tar.bz2
http://members.chello.at/gerhard.kofler/kevin/ti89prog/libfargo.zip
http://members.chello.at/gerhard.kofler/kevin/ti89prog/flashosa.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~ppc ~sparc ~amd64"
IUSE="doc"
RDEPEND=">=sys-devel/binutils-2.14.90.0.6-r1
>=sys-devel/bison-1.875"
DEPEND="${RDEPEND}
app-arch/unzip"
src_unpack() {
unpack ${A}
# start by patching binutils and gcc
cd ${WORKDIR}/binutils-${BASE_BINUTILS}
epatch ${S}/sources/gcc/gas-${BIN_VER}-tigcc-*.diff
cd ${WORKDIR}/gcc-${BASE_GCC}
epatch ${S}/sources/gcc/gcc-${BASE_GCC}-tigcc-*.diff
# create build directories for binutils and gcc
mkdir -p ${WORKDIR}/build/binutils
mkdir ${WORKDIR}/build/gcc
# Workaround for non-existing directories
sed -ie '/SUBDIRS =/d' ${WORKDIR}/binutils-${BASE_BINUTILS}/gas/Makefile.in
}
src_compile() {
# build binutils
cd ${WORKDIR}/build/binutils
CFLAGS="$CFLAGS" ${WORKDIR}/binutils-${BASE_BINUTILS}/configure \
--disable-serial-configure --target=m68k-coff --disable-shared \
--enable-static --disable-multilib --disable-nls \
|| die "binutils configure"
emake || die "gas"
# build gcc
cd ${WORKDIR}/build/gcc
CFLAGS="$CFLAGS" ${WORKDIR}/gcc-${BASE_GCC}/configure --target=m68k-coff \
--with-gnu-as --with-as=${WORKDIR}/build/binutils/gas/as-new \
--disable-nls --disable-multilib --disable-shared --enable-static \
--disable-threads \
|| die "gcc - configure"
# GCC compilations _is intended_ to fail on a certain point,
# don't worry about that.
emake
# build a68k assembler
cd ${S}/sources/a68k
emake -e || die "a68k"
# build ld-tigcc linker
cd ${S}/sources/ld-tigcc
emake -e || die "ld-tigcc"
# build tigcc front-end
cd ${S}/sources/tigcc/src
emake -e || die "tigcc"
# build tprbuilder (TIGCC project builder)
cd ${S}/sources/tprbuilder/src
emake -e || die "trpbuilder"
# build patcher (object file patcher)
cd ${S}/sources/patcher/src
emake -e || die "patcher"
# build parser
cd ${S}/sources/parser/src
emake -e || die "parser"
# build tict tool suite
cd ${S}/tt
CFLAGS="${CFLAGS}" ./makelinux.sh || die "tict tool suite"
}
src_install() {
into /usr
dodir /usr/bin
# install documentation
if use doc ; then
# patch the script that launches the documentation
# browser to point to the correct location
sed "s:\$TIGCC/doc:/usr/share/doc/${P}:g" \
${S}/tigcclib/doc/converter/tigccdoc \
> ${S}/tigcclib/doc/converter/tigccdoc.new
cd ${S}/tigcclib/doc/converter
newbin tigccdoc.new tigccdoc
cd ${S}/tigcclib/doc
dohtml -r html/*.html
cp html/qt-assistant.adp ${D}/usr/share/doc/${PF}/html
cd ${S}/sources/a68k
docinto a68k
dodoc docs/*.txt
fi
dodir /usr/share/doc/${PF}
cd ${S}
dodoc AUTHORS BUGS CHANGELOG COPYING DIRECTORIES HOWTO \
INSTALL README README.linux README.osX
cd ${S}/sources/tigcc
docinto tigcc
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/sources/tprbuilder
docinto tprbuilder
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/sources/patcher
docinto patcher
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/sources/parser
docinto parser
dodoc AUTHORS COPYING ChangeLog README
cd ${S}/tt
docinto tools
dodoc history.txt linux_readme.txt readme.txt tooldocs.txt
exeinto /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}
# install gcc
cd ${WORKDIR}/build/gcc
doexe gcc/cc1
newexe gcc/xgcc gcc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/gcc \
/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-gcc
# install gas
# exeinto /usr/ti-linux-gnu/bin <-- a symlink will be
# created so that gas resides in /usr/ti-linux-gnu/bin too
cd ${WORKDIR}/build/binutils
newexe gas/as-new as
# install a68k
cd ${S}/sources/a68k
newexe A68k a68k
# install ld-tigcc
cd ${S}/sources/ld-tigcc
doexe ld-tigcc
doexe ar-tigcc
# install tigcc
cd ${S}/sources/tigcc/src
doexe tigcc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/tigcc \
/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-tigcc
# install tprbuilder
cd ${S}/sources/tprbuilder/src
doexe tprbuilder
# install patcher
cd ${S}/sources/patcher/src
doexe patcher
# install parser
cd ${S}/sources/parser/src
doexe parser
# install tict tool suite
cd ${S}/tt
doexe linuxbin/*
# install header files
dodir /usr/include/tigcc
cp -R ${S}/tigcclib/include/* ${D}/usr/include/tigcc
dosym /usr/include/tigcc/asm/os.h /usr/include/tigcc/asm/OS.h
insinto /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}
# install library
cd ${S}/tigcclib
doins lib/*
cd ${WORKDIR}
doins flashos.a
doins fargo.a
dodir /usr/share/tigcc
# copy example programs
# cp -r ${S}/examples ${D}/usr/share/tigcc
# create TIGCC env variable
dodir /etc/env.d
# echo -e "TIGCC=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}\"" >> ${ENV_FILE}
# echo -e "CC=\"tigcc\"" >> ${ENV_FILE}
echo -e "TIGCC=\"/usr/ti-linux-gnu\"" >> ${ENV_FILE}
echo -e "PATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
echo -e "ROOTPATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
echo -e "LDPATH=\"/usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}\"" >> ${ENV_FILE}
# a cross-compiling gcc with hard-coded names has been built.
# therefore, we must place some symlinks.
dosym /usr/include/tigcc /usr/ti-linux-gnu/include
dosym /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER} /usr/ti-linux-gnu/lib
dosym /usr/share/doc/${PF} /usr/ti-linux-gnu/doc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER} /usr/ti-linux-gnu/bin
}
pkg-postinst() {
env-update && source /etc/profile
}
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/tigcc/tigcc-0.96_beta7.ebuild,v 1.5 2008/01/05 09:13:28 calchan Exp $
inherit eutils
BASE_BINUTILS="2.16.1"
GCC_VER="4.1.2"
GCC_SNAPSHOT="20060728"
BIN_VER=${BASE_BINUTILS:0:4}
ENV_FILE=${D}/etc/env.d/99tigcc
S="${WORKDIR}"
DESCRIPTION="Cross compiler for Texas Instruments TI-89, TI-92(+) and V200 calculators"
HOMEPAGE="http://tigcc.ticalc.org"
#original source can be found at:
#SRC_URI="http://tigcc.ticalc.org/linux/tigcc_src.tar.bz2"
#but in fact this file changes as soon as there comes a new beta
#when it hits portage of course it should be mirrored on a gentoo mirror:
#SRC_URI="mirror://gentoo/${PF}.tar.bz2"
SRC_URI="mirror://gentoo/tigcc-0.96_beta7.tar.bz2
ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-${GCC_SNAPSHOT}/gcc-4.1-${GCC_SNAPSHOT}.tar.bz2
mirror://kernel/linux/devel/binutils/binutils-${BASE_BINUTILS}.tar.bz2
http://members.chello.at/gerhard.kofler/kevin/ti89prog/libfargo.zip
http://members.chello.at/gerhard.kofler/kevin/ti89prog/flashosa.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="doc"
RDEPEND="virtual/libc
>=sys-devel/binutils-2.14.90.0.6-r1
>=sys-devel/bison-1.875"
DEPEND="${RDEPEND}
app-arch/unzip"
RESTRICT="strip"
src_unpack() {
unpack ${A}
# start by patching and cleaning out binutils and gcc directories.
cd "${WORKDIR}"/binutils-${BASE_BINUTILS}
epatch "${S}"/sources/gcc/gas-${BIN_VER}-tigcc-*.diff
rm -f .brik
rm -f md5.sum
rm -f -r INSTALL
rm -f -r maintainer-scripts
rm -f -r binutils
rm -f -r cpu
rm -f -r etc
rm -f -r gas/doc
rm -f -r gas/po
rm -f -r gprof
rm -f -r include/nlm
rm -f -r include/regs
rm -f -r ld
rm -f -r texinfo
cd "${WORKDIR}"/gcc-4.1-${GCC_SNAPSHOT}
epatch "${S}"/sources/gcc/gcc-4.1-tigcc-patch.diff
rm -f .brik
rm -f md5.sum
rm -f -r INSTALL
rm -f -r fixincludes
rm -f -r gcc/ginclude
rm -f -r gcc/po
rm -f -r gcc/doc
rm -f -r gcc/treelang
rm -f -r libcpp/po
rm -f -r maintainer-scripts
rm -f -r etc
rm -f -r gprof
rm -f -r include/nlm
rm -f -r include/regs
rm -f -r texinfo
# create build directories for binutils and gcc
mkdir -p "${WORKDIR}"/build/binutils
mkdir "${WORKDIR}"/build/gcc
# Workaround for non-existing directories
sed -ie '/SUBDIRS =/d' "${WORKDIR}"/binutils-${BASE_BINUTILS}/gas/Makefile.in
}
src_compile() {
# build binutils
cd "${WORKDIR}"/build/binutils
CFLAGS="${CFLAGS}" "${WORKDIR}"/binutils-${BASE_BINUTILS}/configure \
--disable-serial-configure --target=m68k-coff --disable-shared \
--enable-static --disable-multilib --disable-nls \
|| die
emake || die "gas"
# build gcc
cd "${WORKDIR}"/build/gcc
CFLAGS="${CFLAGS}" "${WORKDIR}"/gcc-4.1-${GCC_SNAPSHOT}/configure --target=m68k-coff \
--with-gnu-as --with-as="${WORKDIR}"/build/binutils/gas/as-new --with-gnu-ld \
--disable-nls --disable-multilib --disable-shared --enable-static \
--disable-threads --enable-languages=c --disable-win32-registry \
--disable-checking --disable-werror --disable-pch --disable-mudflap \
|| die
# GCC compilations _is intended_ to fail on a certain point,
# don't worry about that.
emake -j1
# Check if gcc has been built, die otherwise
( [ -e "${WORKDIR}"/build/gcc/gcc/xgcc ] && [ -e "${WORKDIR}"/build/gcc/gcc/cc1 ] ) || die "gcc"
# build a68k assembler
cd "${S}"/sources/a68k
emake -e || die "a68k"
# build ld-tigcc linker
cd "${S}"/sources/ld-tigcc
emake -e || die "ld-tigcc"
# build tigcc front-end
cd "${S}"/sources/tigcc/src
emake -e || die "tigcc"
# build tprbuilder (TIGCC project builder)
cd "${S}"/sources/tprbuilder/src
emake -e || die "tprbuilder"
# build patcher (object file patcher)
cd "${S}"/sources/patcher/src
emake -e || die "patcher"
}
src_install() {
# install documentation
dodir /usr/bin
if use doc ; then
# patch the script that launches the documentation
# browser to point to the correct location
sed "s:\${TIGCC}/doc:/usr/share/doc/${P}:g" \
"${S}"/tigcclib/doc/converter/tigccdoc \
> "${S}"/tigcclib/doc/converter/tigccdoc.new
cd "${S}"/tigcclib/doc/converter
newbin tigccdoc.new tigccdoc
cd "${S}"/tigcclib/doc
dohtml -r html/*
cp html/qt-assistant.adp "${D}"/usr/share/doc/${PF}/html
cd "${S}"/sources/a68k
fi
dodir /usr/share/doc/${PF}
cd "${S}"
dodoc AUTHORS BUGS CHANGELOG DIRECTORIES HOWTO \
INSTALL README README.linux README.osX
cd "${S}"/sources/tigcc
docinto tigcc
dodoc AUTHORS ChangeLog README
cd "${S}"/sources/tprbuilder
docinto tprbuilder
dodoc AUTHORS ChangeLog README
cd "${S}"/sources/patcher
docinto patcher
dodoc AUTHORS ChangeLog README
exeinto /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}
# install gcc
cd "${WORKDIR}"/build/gcc
doexe gcc/cc1
newexe gcc/xgcc gcc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/gcc \
/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-gcc
# install gas
# exeinto /usr/ti-linux-gnu/bin <-- a symlink will be
# created so that gas resides in /usr/ti-linux-gnu/bin too
cd "${WORKDIR}"/build/binutils
newexe gas/as-new as
# install a68k
cd "${S}"/sources/a68k
newexe A68k a68k
# install ld-tigcc
cd "${S}"/sources/ld-tigcc
doexe ld-tigcc
doexe ar-tigcc
# install tigcc
cd "${S}"/sources/tigcc/src
doexe tigcc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/tigcc \
/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-tigcc
# install tprbuilder
cd "${S}"/sources/tprbuilder/src
doexe tprbuilder
# install patcher
cd "${S}"/sources/patcher/src
doexe patcher
# install header files
dodir /usr/include/tigcc
cp -R "${S}"/tigcclib/include/* "${D}"/usr/include/tigcc
dosym /usr/include/tigcc/asm/os.h /usr/include/tigcc/asm/OS.h
insinto /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}
# install library
cd "${S}"/tigcclib
doins lib/*
cd "${WORKDIR}"
doins flashos.a
doins fargo.a
dodir /usr/share/tigcc
# copy example programs
# cp -r "${S}"/examples ${D}/usr/share/tigcc
# create TIGCC env variable
dodir /etc/env.d/gcc
# echo -e "TIGCC=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}\"" >> ${ENV_FILE}
# echo -e "CC=\"tigcc\"" >> ${ENV_FILE}
echo -e "TIGCC=\"/usr/ti-linux-gnu\"" >> ${ENV_FILE}
echo -e "PATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
echo -e "ROOTPATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
echo -e "LDPATH=\"/usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}\"" >> ${ENV_FILE}
# a cross-compiling gcc with hard-coded names has been built.
# therefore, we must place some symlinks.
dosym /usr/include/tigcc /usr/ti-linux-gnu/include
dosym /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER} /usr/ti-linux-gnu/lib
dosym /usr/share/doc/${PF} /usr/ti-linux-gnu/doc
dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER} /usr/ti-linux-gnu/bin
}
pkg-postinst() {
env-update && source /etc/profile
}