diff options
author | Daniel Black <dragonheart@gentoo.org> | 2004-09-25 00:57:10 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2004-09-25 00:57:10 +0000 |
commit | d589ffcec70f626a37f0edaebecf250a65f0a9d6 (patch) | |
tree | 8c74f7f8287285b17bb6a8f4f2a967da788a07b6 /dev-embedded/tigcc | |
parent | libgdbm tweaks (diff) | |
download | historical-d589ffcec70f626a37f0edaebecf250a65f0a9d6.tar.gz historical-d589ffcec70f626a37f0edaebecf250a65f0a9d6.tar.bz2 historical-d589ffcec70f626a37f0edaebecf250a65f0a9d6.zip |
Initial import as per bug #51162. Ebuild by Robert Führicht <the_master_of_disaster@gmx.at>
Diffstat (limited to 'dev-embedded/tigcc')
-rw-r--r-- | dev-embedded/tigcc/ChangeLog | 11 | ||||
-rw-r--r-- | dev-embedded/tigcc/Manifest | 15 | ||||
-rw-r--r-- | dev-embedded/tigcc/files/a68k-fix.patch | 11 | ||||
-rw-r--r-- | dev-embedded/tigcc/files/digest-tigcc-0.95_beta19-r1 | 5 | ||||
-rw-r--r-- | dev-embedded/tigcc/metadata.xml | 5 | ||||
-rw-r--r-- | dev-embedded/tigcc/tigcc-0.95_beta19-r1.ebuild | 234 |
6 files changed, 281 insertions, 0 deletions
diff --git a/dev-embedded/tigcc/ChangeLog b/dev-embedded/tigcc/ChangeLog new file mode 100644 index 000000000000..85a84e5e29a6 --- /dev/null +++ b/dev-embedded/tigcc/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-embedded/tigcc +# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-embedded/tigcc/ChangeLog,v 1.1 2004/09/25 00:57:10 dragonheart Exp $ + +*tigcc-0.95_beta19-r1 (25 Sep 2004) + + 25 Sep 2004; Daniel Black <dragonheart@gentoo.org> +metadata.xml, + +tigcc-0.95_beta19-r1.ebuild, +files/a68k-fix.patch: + Initial import as per bug #51162. Ebuild by Robert Führicht + <the_master_of_disaster@gmx.at> + diff --git a/dev-embedded/tigcc/Manifest b/dev-embedded/tigcc/Manifest new file mode 100644 index 000000000000..9ea894516284 --- /dev/null +++ b/dev-embedded/tigcc/Manifest @@ -0,0 +1,15 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 420df847a3db1c4969aff20243f656dd metadata.xml 165 +MD5 d7a3d53e145ff02c3f182cae092cc308 tigcc-0.95_beta19-r1.ebuild 6455 +MD5 71ddbf932ed733e73c361d4b158c2fe5 ChangeLog 471 +MD5 a10a653d920682c632466905a53be915 files/digest-tigcc-0.95_beta19-r1 322 +MD5 627b7e86641edb82ffa0702ff65de4c1 files/a68k-fix.patch 625 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.2.4 (GNU/Linux) + +iD8DBQFBVMKImdTrptrqvGERAr5cAKCGE2SF50GZI2NUzgA2bg6iztZGVQCfR6T5 +zOOwkmu4hn8y+4L5nFQIRmA= +=sf4k +-----END PGP SIGNATURE----- diff --git a/dev-embedded/tigcc/files/a68k-fix.patch b/dev-embedded/tigcc/files/a68k-fix.patch new file mode 100644 index 000000000000..3330866af56f --- /dev/null +++ b/dev-embedded/tigcc/files/a68k-fix.patch @@ -0,0 +1,11 @@ +--- sources/a68k/src/A68kdef.h.org 2004-05-19 15:21:48.555233864 +0200 ++++ sources/a68k/src/A68kdef.h 2004-05-19 15:22:12.527589512 +0200 +@@ -35,7 +35,7 @@ + #include <fcntl.h> */ + #else + /* extern char *malloc(); */ /* (2.71.F3d) should be declared in stdlib.h */ +-extern int open(), creat(), read(), write(), close(), unlink(); ++/* extern int open(), creat(), read(), write(), close(), unlink(); */ + #if defined(__MACH__) && defined(__APPLE__) /* Darwin / OS X */ + /* On Darwin, the implicit declaration below won't work, so we need to include + <unistd.h>. - v.2.71.F3j, Kevin Kofler (reported by Christian Walther) */ diff --git a/dev-embedded/tigcc/files/digest-tigcc-0.95_beta19-r1 b/dev-embedded/tigcc/files/digest-tigcc-0.95_beta19-r1 new file mode 100644 index 000000000000..6019b271a846 --- /dev/null +++ b/dev-embedded/tigcc/files/digest-tigcc-0.95_beta19-r1 @@ -0,0 +1,5 @@ +MD5 3a77e99f567d61f4989a58da701dce89 tigcc-0.95_beta19-r1.tar.bz2 3211497 +MD5 f878a455b14b3830aaf2da0a17f003c0 gcc-core-3.3.3.tar.bz2 11553433 +MD5 2da8def15d28af3ec6af0982709ae90a binutils-2.14.tar.bz2 10921504 +MD5 cdf21c9161d140468929473723b9c48f libfargo.zip 14658 +MD5 4c9eea1d6d2a6ab967e81b57a6021e84 flashosa.zip 2397 diff --git a/dev-embedded/tigcc/metadata.xml b/dev-embedded/tigcc/metadata.xml new file mode 100644 index 000000000000..92114080841c --- /dev/null +++ b/dev-embedded/tigcc/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>dev-embedded</herd> +</pkgmetadata> diff --git a/dev-embedded/tigcc/tigcc-0.95_beta19-r1.ebuild b/dev-embedded/tigcc/tigcc-0.95_beta19-r1.ebuild new file mode 100644 index 000000000000..16ed07336ac5 --- /dev/null +++ b/dev-embedded/tigcc/tigcc-0.95_beta19-r1.ebuild @@ -0,0 +1,234 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-embedded/tigcc/tigcc-0.95_beta19-r1.ebuild,v 1.1 2004/09/25 00:57:10 dragonheart 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="x86" +#KEYWORDS="~x86 ~ppc ~sparc ~amd64" +IUSE="" + +DEPEND="virtual/glibc + >=sys-devel/binutils-2.14.90.0.6-r1 + >=sys-devel/bison-1.875" + +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 +} |