diff options
-rw-r--r-- | devel/crossgo32/Makefile | 47 | ||||
-rw-r--r-- | devel/crossgo32/distinfo | 1 | ||||
-rw-r--r-- | devel/crossgo32/files/Makefile | 2 | ||||
-rw-r--r-- | devel/crossgo32/files/patch-ba | 29 | ||||
-rw-r--r-- | devel/crossgo32/pkg-descr | 66 | ||||
-rw-r--r-- | devel/crossgo32/pkg-plist | 19 |
6 files changed, 149 insertions, 15 deletions
diff --git a/devel/crossgo32/Makefile b/devel/crossgo32/Makefile index 82871c3231e0..4165c1947743 100644 --- a/devel/crossgo32/Makefile +++ b/devel/crossgo32/Makefile @@ -2,26 +2,57 @@ # Version required: 1.3 # Date created: 6 Mar 97 # Whom: Pedro Giffuni <pgiffuni@fps.biblos.unal.edu.co> +# Date updated: Sun Jun 22 16:11:40 EST 1997 +# Whom: Joel Sutton <sutton@aardvark.apana.org.au> # -# $Id: Makefile,v 1.2 1997/03/28 02:35:44 obrien Exp $ +# $Id$ # DISTNAME= crosstree-1.3 PKGNAME= crossgo32-1.3 CATEGORIES= devel -MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITES= ${MASTER_SITE_LOCAL} \ + ftp://ftp.cygnus.com/pub/embedded/crossgcc/ -MAINTAINER= pgiffuni@fps.biblos.unal.edu.co +MAINTAINER= sutton@aardvark.apana.org.au +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} dosrel-1.0${EXTRACT_SUFX} HAS_CONFIGURE= yes CONFIGURE_ARGS= --prefix=${PREFIX} --target=${TARGET} USE_GMAKE= yes TARGET= i386-go32 -MAN1= i386-go32-ar.1 i386-go32-nm.1 i386-go32-objdump.1 \ - i386-go32-ranlib.1 i386-go32-size.1 i386-go32-strings.1 \ - i386-go32-strip.1 i386-go32-objcopy.1 i386-go32-nlmconv.1 \ - i386-go32-g++.1 i386-go32-gcc.1 cccp.1 \ - i386-go32-c++filt.1 configure.1 i386-go32-as.1 i386-go32-ld.1 +MAN1= i386-go32-ar.1 i386-go32-nm.1 i386-go32-objdump.1\ + i386-go32-ranlib.1 i386-go32-size.1 i386-go32-strings.1\ + i386-go32-strip.1 i386-go32-objcopy.1 i386-go32-nlmconv.1\ + i386-go32-g++.1 i386-go32-gcc.1 cccp.1\ + i386-go32-c++filt.1 configure.1 i386-go32-as.1 i386-go32-ld.1 + +DOCDIR= ${PREFIX}/share/doc/crossgo32 +GO32DIR=${PREFIX}/share/crossgo32 + +post-extract: + ${MV} ${WRKDIR}/dosrel-1.0/ ${WRKSRC} + +post-patch: + ${CP} ${FILESDIR}/Makefile ${WRKSRC}/dosrel-1.0/ + +post-build: + @cd ${WRKSRC}/dosrel-1.0 ;\ + make coff2exe + +post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/dosrel-1.0/coff2exe \ + ${PREFIX}/bin/i386-go32-coff2exe +.if !defined(NOPORTDOCS) + @${ECHO_MSG} "===> Installing documentation into ${DOCDIR}" + ${MKDIR} ${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/FAQ-0.8 ${DOCDIR}/ + ${INSTALL_DATA} ${PKGDIR}/DESCR ${DOCDIR}/Readme.FreeBSD +.endif + @${ECHO_MSG} "===> Installing DJGPP exe files into ${GO32DIR}" + ${MKDIR} ${GO32DIR} + ${INSTALL_DATA} ${WRKSRC}/dosrel-1.0/go32.exe ${GO32DIR}/ + ${INSTALL_DATA} ${WRKSRC}/dosrel-1.0/emu387 ${GO32DIR}/ .include <bsd.port.mk> diff --git a/devel/crossgo32/distinfo b/devel/crossgo32/distinfo index 6be5ec81807a..8fbda60762a4 100644 --- a/devel/crossgo32/distinfo +++ b/devel/crossgo32/distinfo @@ -1 +1,2 @@ MD5 (crosstree-1.3.tar.gz) = 02a77d3892c93aa6cfeeebe39e949051 +MD5 (dosrel-1.0.tar.gz) = c0f25ef6cdb766aa0fab4dc0075fb94d diff --git a/devel/crossgo32/files/Makefile b/devel/crossgo32/files/Makefile new file mode 100644 index 000000000000..15fd8a284cb4 --- /dev/null +++ b/devel/crossgo32/files/Makefile @@ -0,0 +1,2 @@ +coff2exe: + gcc -o coff2exe coff2exe.c diff --git a/devel/crossgo32/files/patch-ba b/devel/crossgo32/files/patch-ba new file mode 100644 index 000000000000..bb5f259da29b --- /dev/null +++ b/devel/crossgo32/files/patch-ba @@ -0,0 +1,29 @@ +--- dosrel-1.0/coff2exe.c.orig Sun May 18 20:24:59 1997 ++++ dosrel-1.0/coff2exe.c Sun May 18 20:23:50 1997 +@@ -79,14 +79,14 @@ + while (left) + { + char buf[512]; +- int r = _read(stub_file, buf, 512); ++ int r = read(stub_file, buf, 512); + if (wrote == 0) + hsize = align_hsize(stub_length, (unsigned char *)buf); +- _write(ofile, buf, r); ++ write(ofile, buf, r); + left -= r; + wrote += r; + } +- _write(ofile, buf, 512-((int)wrote&511)); ++ write(ofile, buf, 512-((int)wrote&511)); + } + else + { +@@ -120,7 +120,7 @@ + if (argc > 2 && strcmp(argv[1], "-s") == 0) + { + struct stat s; +- stub_file = _open(argv[2], O_RDONLY); ++ stub_file = open(argv[2], O_RDONLY); + if (stub_file < 0) + { + perror(argv[2]); diff --git a/devel/crossgo32/pkg-descr b/devel/crossgo32/pkg-descr index dd3f0448587b..96e9214877b1 100644 --- a/devel/crossgo32/pkg-descr +++ b/devel/crossgo32/pkg-descr @@ -1,13 +1,65 @@ -This package permits the creation of 32-bit DOS executables. +Crossgo32 is a cross-compiler built from "gcc 2.7.2.2" which uses the +Cygnus embedded libraries to create smaller binaries. Unfortunately +there is no networking support at the moment. Binaries are created in +the COFF format and a utility is provided to convert these binaries +into DJGPPv1 exe files. + The package is composed of the following utilities: GNU`s misc. utilities binutils-2.7 The GNU's C Compiler gcc-2.7.2.2 + crosspatch Cygnus's embedded libraries newlib-1.7.1 +Cygnus's dos release utilities dosrel-1.0 + + +Compiling your code +=================== + +Compiling your code is just as easy (or should that be difficult?) as +gcc. All of the go32 compiler binaries have been installed with the +i386-go32 prefix. So, if you wanted to compile a file called "hello.c" +then you might use something like: + + i386-go32-gcc -o hello hello.c + +This will produce a COFF binary called "hello". You will now need to +convert that binary into a EXE file so that it can be run on a DOS +machine. It's as easy as typing: + + i386-go32-coff2exe hello + +This will produce "hello.exe". + +To run your programs you need to have a DPMI server running and the +go32.exe & emu387 files in your DOS path. Crossgo32 binaries will work +with a range of DPMI servers - I have personally had success with +Windows 95 - and there is a server available from the DJGPP web +site. The DOS files mentioned above should be in +/usr/local/share/crossgo32 (or similar on your system). Please check +the DJGPP FAQ for more information on this topic. + + +More Information +================ + +DJGPP web site - including DPMI server, source code and FAQ's etc... + http://www.delorie.com/djgpp/ + + +Related ports +============= + +This cross-compiler port was originally created by Pedro Giffuni using +the Cygnus cross-compiler FAQ and mailing list postings. You will find +other ports in the collection which use the same distribution. The +intention was to create a cross-compiler kit for all platforms +emulated on FreeBSD. + +If you are interested in network support and DJGPP v2 exe files, +amongst other DJGPP bits and pieces, check out the crossgo32-dgjpp2 +selection of ports. + -To run your programs you require an specific DPMI software available with -DJGPP. For more information about go32 take a look at - http://www.delorie.com/DJGPP. +Share and enjoy, -_________ -Pedro Giffuni S. -pgiffuni@fps.biblos.unal.edu.co +Joel... +sutton@aardvark.apana.org.au diff --git a/devel/crossgo32/pkg-plist b/devel/crossgo32/pkg-plist index 2380689fa63d..9ab318856bab 100644 --- a/devel/crossgo32/pkg-plist +++ b/devel/crossgo32/pkg-plist @@ -15,6 +15,7 @@ bin/i386-go32-c++ bin/protoize bin/unprotoize bin/i386-go32-gcc +bin/i386-go32-coff2exe i386-go32/bin/nm i386-go32/bin/strip i386-go32/bin/ar @@ -183,3 +184,21 @@ man/man1/i386-go32-gcc.1.gz man/man1/cccp.1.gz man/man1/i386-go32-ld.1.gz man/man1/i386-go32-as.1.gz +share/doc/crossgo32/FAQ-0.8 +share/doc/crossgo32/Readme.FreeBSD +share/crossgo32/go32.exe +share/crossgo32/emu387 +@dirrm i386-go32/lib/ldscripts +@dirrm i386-go32/lib +@dirrm i386-go32/include/sys +@dirrm i386-go32/include/machine +@dirrm i386-go32/include +@dirrm i386-go32/bin +@dirrm i386-go32/ +@dirrm lib/gcc-lib/i386-go32/2.7.2.2/include/objc +@dirrm lib/gcc-lib/i386-go32/2.7.2.2/include +@dirrm lib/gcc-lib/i386-go32/2.7.2.2 +@dirrm lib/gcc-lib/i386-go32 +@dirrm lib/gcc-lib/ +@dirrm share/doc/crossgo32 +@dirrm share/crossgo32 |