The first step in porting a GNU package is to get the configure scripts
working. Generally, most configure scripts run without problems under Win
9x so it's a good idea to start off the port under a Windows environment.
To make the configure script run on DOS, you'll need to keep in mind some
of the limitations:
A good place to start would be to have a look at the sources of the "indent" package which is rather simple. If you want something more complex, you could try looking into textutils or Sh-utils.
The next step is to modify the sources. Generally, most packages will simply compile without any problems. But that doesn't mean they are bug-free. You'll need to test them out with respect to the functionality and make the necessary changes. Keep in mind the GNU coding standards. It would also be useful if you had a look at the autoconf manual. It's a bad practice to merely "#ifdef __MSDOS__" all the code. Some maintainers will simply refuse to accept these changes (assuming you want to add DJGPP support to build it out of the box). You'll have to use feature "#ifdef"S to do the necessary work and ask the maintainer to add a suitable configure time test. Macros that are specific to MSDOS should be put into system.h if the file exists within the sources.
Now, you're almost half done. Make sure it builds correctly from all directories and drives. Note that when you configure, any files created must also go into the right directory. The sources you are trying to configure might reside on a read-only device such as a CDROM, so you may not be able to write anything into the source directories. If this works, you're almost done. If you need more help, you could post to the DJGPP Workers list or the DJGPP list. But make sure you give enough details about the problem.
Also, most packages (which are of moderate size) will have test-suites which may need some modificationin order to run. If such a case exists, you can modify the sources directly without worrying about the red-only devices, etc. Sources distributed on CDROMs should then contain the modified test-suite. This completes it!
It would be a good idea to distribute the sources configured; so make sure you do it before you send them to DJ Delorie for uploading to the DJGPP mirrors.
Well, that was just a short note on porting GNU software! If you think there can be some additional stuff here, you can E-Mail me. Special thanks to Eli Zaretskii for most of the ideas on porting.
|webmaster donations bookstore||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jul 2003|