| 1 | # $Id: $ |
|---|
| 2 | |
|---|
| 3 | PortSystem 1.0 |
|---|
| 4 | name prc-tools |
|---|
| 5 | version 2.3 |
|---|
| 6 | categories palm devel |
|---|
| 7 | maintainers cssdev@mac.com |
|---|
| 8 | description C and C++ programming tools for Palm OS |
|---|
| 9 | long_description The prc-tools package is a collection of tools \ |
|---|
| 10 | supporting C and C++ programming for Palm OS. It consists \ |
|---|
| 11 | of: the GNU Compiler Collection, assembler, linker, and \ |
|---|
| 12 | symbolic debugger, modifications to these tools to support \ |
|---|
| 13 | functionality peculiar to the PalmOS, tools for dealing \ |
|---|
| 14 | with PalmOS .prc executables, and finally, conveniently \ |
|---|
| 15 | packaged documentation. |
|---|
| 16 | |
|---|
| 17 | platforms darwin |
|---|
| 18 | homepage http://prc-tools.sourceforge.net/ |
|---|
| 19 | master_sites sourceforge:${name} \ |
|---|
| 20 | gnu:binutils:binutils \ |
|---|
| 21 | gnu:gdb:gdb \ |
|---|
| 22 | gnu:gcc/gcc-2.95.3:gcc295 \ |
|---|
| 23 | gnu:gcc/gcc-3.3.1:gcc331 |
|---|
| 24 | |
|---|
| 25 | distfiles ${distname}${extract.suffix} \ |
|---|
| 26 | binutils-2.14.tar.gz:binutils \ |
|---|
| 27 | gdb-5.3.tar.gz:gdb \ |
|---|
| 28 | gcc-2.95.3.tar.gz:gcc295 \ |
|---|
| 29 | gcc-3.3.1.tar.gz:gcc331 |
|---|
| 30 | |
|---|
| 31 | checksums ${distname}${extract.suffix} md5 038a42a71a984fee6f906abc85a032ec \ |
|---|
| 32 | binutils-2.14.tar.gz md5 ba665d0ddcc88313384b79e293ecbbab \ |
|---|
| 33 | gdb-5.3.tar.gz md5 1e8566325f222edfbdd93e40c6ae921b \ |
|---|
| 34 | gcc-2.95.3.tar.gz md5 f3ad4f32c2296fad758ed051b5ac8e28 \ |
|---|
| 35 | gcc-3.3.1.tar.gz md5 46d58197212818b5f7c403267ff24e4e |
|---|
| 36 | |
|---|
| 37 | # Patching, configuring, and building PRC-Tools is not trivial. |
|---|
| 38 | # See http://prc-tools.sourceforge.net/install/BUILDING.html |
|---|
| 39 | |
|---|
| 40 | # Apply all included patches and create symbolic links. |
|---|
| 41 | post-extract { |
|---|
| 42 | ui_msg "Applying ${name} patches..." |
|---|
| 43 | system "cd ${workpath} && \ |
|---|
| 44 | cat ${worksrcpath}/*.palmos.diff | patch -p0" |
|---|
| 45 | ui_msg "Creating symbolic links for build..." |
|---|
| 46 | system "cd ${worksrcpath} && \ |
|---|
| 47 | ln -s ../binutils-2.14 binutils && \ |
|---|
| 48 | ln -s ../gdb-5.3 gdb && \ |
|---|
| 49 | ln -s ../gcc-2.95.3 gcc295 && \ |
|---|
| 50 | ln -s ../gcc-3.3.1 gcc" |
|---|
| 51 | ui_msg "Custom ${name} pre-build steps complete." |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | use_configure yes |
|---|
| 55 | configure.args \ |
|---|
| 56 | --disable-nls \ |
|---|
| 57 | --enable-targets=m68k-palmos,arm-palmos \ |
|---|
| 58 | --enable-languages=c,c++ \ |
|---|
| 59 | --with-palmdev-prefix=${prefix}/share/palmdev \ |
|---|
| 60 | --prefix=${prefix} \ |
|---|
| 61 | --mandir=${prefix}/share/man \ |
|---|
| 62 | --infodir=${prefix}/share/info |
|---|
| 63 | |
|---|
| 64 | destroot.destdir prefix=${destroot}${prefix} |
|---|
| 65 | |
|---|
| 66 | # Clean up junk left in place by the way that the install copies |
|---|
| 67 | # files within the destroot directory! |
|---|
| 68 | post-destroot { |
|---|
| 69 | file delete -force ${destroot}${prefix}/arm-palmos |
|---|
| 70 | file delete -force ${destroot}${prefix}/m68k-palmos |
|---|
| 71 | } |
|---|
| 72 | |
|---|
| 73 | # Cannot use gcc 4, so need to set the environment to use gcc 3.3. |
|---|
| 74 | # Extra configurations occur during the build phase, so the |
|---|
| 75 | # environment variables should be set during that phase too. |
|---|
| 76 | platform darwin 8 { |
|---|
| 77 | configure.env-append CC=gcc-3.3 CXX=g++-3.3 CPP=cpp-3.3 |
|---|
| 78 | build.cmd CC=gcc-3.3 CXX=g++-3.3 CPP=cpp-3.3 make |
|---|
| 79 | } |
|---|