Mail Archives: djgpp/1998/04/12/04:48:34
On Thu, 9 Apr 1998, Ross Smith wrote:
> Is there a port and if not, does anyone have any suggestions how to best
> port sharutils using djgpp? It will be my first port.
To the best of my knowledge, shar-utils were not ported to DJGPP.
If you are not sure what does porting a package involve, I suggest
looking into a couple of source distributions inside v2gnu directory.
Typically, there are several issues to be resolved:
1) Source code changes. These are necessary to make Unix-born
software work correctly on MS-DOS/MS-Windows. Some things to
look for include:
- using binary I/O for non-text files;
- support for DOS file names with drive letters and backslashes,
as well as forward slashes;
- assumptions that `read' and `fread' return the same number of
bytes as what `stat' returns for the file size.
2) The configuration procedure. On Unix, this involves running a
shell script called `configure'. This will run on MSDOS as
well, using the excellent port of Bash, but the script will need
some small modifications to run correctly. Several source
distributions of DJGPP ports in v2gnu include examples for
modified scripts which work. See v2gnu/fil316s.zip for one such
example. This approach requires to install most of the
auxiliary packages from v2gnu, since the `configure' script runs
many utilities from those packages.
Alternatively, you could throw together a Sed script to replace
the `configure' script. This requires much less utilities to be
installed, but you will need a good knowledge of Sed to craft
the Sed script. See v2gnu/pat25s.zip, for one example of this
approach.
3) Last, but not least, there are some packaging hassles. You need
to make sure the package will build on platforms which support
long file names (such as Windows 9X) and those which don't (such
as DOS and Windows 3.X). So you need to create a zip file where
the long names are preserved, and tweak some of the names such
that they will work correctly after truncation to 8+3 limits.
For example, file names like Makefile.in.in need to be changed
into something like Makefile.in-in, and foobar.info-1 needs to
be changed into foobar.i1.
- Raw text -