Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Sep 2011 08:05:47 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Andy Zammy <andyzammy@googlemail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Dynamic Window Manager install with patch(es)
Message-ID:  <4E7ADE4B.6010601@infracaninophile.co.uk>
In-Reply-To: <CANuHMWMXwZ1-tkLpYtATWGcesHiT9fzT9jgFjTwXfaLntQwLsw@mail.gmail.com>
References:  <CANuHMWMXwZ1-tkLpYtATWGcesHiT9fzT9jgFjTwXfaLntQwLsw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig511AA70946B9A53B8496B2DF
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 22/09/2011 00:51, Andy Zammy wrote:
> According to the instructions listed here: http://dwm.suckless.org/patc=
hes/ I
> figured I'm to use the "tarball method" as that's how ports fetches dwm=
=2E I
> tried applying the method to /usr/ports/x11-wm/dwm/work/dwm-5.9 but it
> didn't work (malformed patch).

This is pretty much the correct approach.  Although to do it in the best
ports fashion, you'ld save the patch file to
${PORTSDIR}/x11-wm/dwm/files/patch-something-or-other and then the ports
would patch the sources for you automatically any time you rebuilt the
port.  Don't worry about that for the time being though.  Just getting
the patch to apply by hand is a good first step.

It's quite normal for ports to apply patches this way -- the dwm port
already has patches for Makefile and config.mk.  If your patch attempts
to patch those same files it could fail.  However the error message
would be 'patch failed to apply' which is obviously not what you're getti=
ng.

The big question is why the patch you already have appears to be
malformed.  How did you obtain it?  Can you repeat the process paying
attention to any error messages and so forth and see if that works better=
?

> I've used ubuntu for about a year but for all intents and purposes I'm =
still
> a beginner with UNIX-like, and I've never used patch or diff before. Bu=
t, I
> remembered that these are ports and wonder if these patches would work =
on
> FreeBSD source? Would I have to apply the patch to the tarball while it=
's in
> distfiles before it gets 'ported' to freebsd? Or am I talking crazy?

No -- modifying the tarball is possible, but as the effect is exactly
the same as what you tried above and as it will then fail the checksum
tests, well, it's not worth the bother.

patch and diff at this level work in exactly the same way on just about
any unix (eg FreeBSD) or unix-alike (Linux including Ubuntu) and
probably a few weird OSes you've never heard of.  Like I said, applying
patches is a common action the ports will do for you.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


--------------enig511AA70946B9A53B8496B2DF
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk563lMACgkQ8Mjk52CukIzmIQCfUigNTjopBD4Oe1Fc2LQO5sWx
+TkAnRn0wwpnTI6npUulsWydyoIJVcA/
=PYau
-----END PGP SIGNATURE-----

--------------enig511AA70946B9A53B8496B2DF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E7ADE4B.6010601>