VOGONS


First post, by joprysko1

User metadata
Rank Newbie
Rank
Newbie

I'm attempting to use the current DOSBOX SVN and I want to have the NE2000 patch installed. I'm attempting to build it on a Raspberry Pi 3. I'm planning on running a BBS that requires a packet driver installed, as it has it's own TCP/IP stack. I had tried building both the HAL9000 MB6, and DOSBOX-X, but both appear to use libraries that will only run native on x86 processors. I'm relatively new at doing anything with C++, so the collective knowledge of Google can only get me so far. I have not been able to find the actual "how" of adding in the patch, plus I've had difficulty finding the NE2000 patch, as several sites show it, but have dead links to where it was.

I also apparently don't have permission to post in the DOSBOX Patch forum, so I figured this was the next best spot.

Thanks,

Joe

Reply 1 of 3, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Have a look at the first few lines of the patch. Uncompress it if necessary. You're looking for something that looks like (but not exactly like):

--- src/dosbox.cpp      (revision 3990)
+++ src/dosbox.cpp (working copy)

Your patch might start with a different file, but it will refer to a location in the DOSBox source filesystem structure.

Depending on how the patch file was generated, the patch may look as above or it may refer to two different filesystem trees. For example:

--- olddosbox/src/dosbox.cpp
+++ newdosbox/src/dosbox.cpp

To apply a patch which looks like your first file, navigate to your DOSBox source directory and run the following command, substituting the appropriate location and name of your patch file:

cat ../name.patch | patch -p0

If everything works well, the patch chunks should apply with no warnings or issues requiring your response.

The flag -pN strips N levels of path from all filesystem references in the patch file before applying. This allows the second form of patch to apply by stripping off olddosbox and newdosbox from any file names:

cat ../another.patch | patch -p1

Using -p1 works while -p0 would not (as patch would not find the two subdirectories it's expecting), nor would -p2 as patch would not find dosbox.cpp at the top level of your DOSBox source directory.

All hail the Great Capacitor Brand Finder

Reply 2 of 3, by joprysko1

User metadata
Rank Newbie
Rank
Newbie

In regards to the revision number, do I need to use the same revision number shown in the patch/diff file? This particular patch says (revision 3661). So does that mean I can only use svn 3661 with the patch?

Reply 3 of 3, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

No, you don't need to use the same revision. For each hunk, patch will attempt to find a matching context (lines to be patched along with preceeding and succeeding lines). Only if it can't find a match will it throw an error.

All hail the Great Capacitor Brand Finder