patch-2.6.1

Patch jest programem, który bierze na wejściu plik zawierający listing różnic wyprodukowanych przez diff i stosuje te różnice na jednym lub wielu oryginalnych plikach produkując wersję zawierającą poprawki.

Wersja stabilna 2.6.1 ma pewne niedociągnięcia, więc polecam ściągnięcie wersji przynajmniej 2.6.1.136-31a7 z ftp://alpha.gnu.org/gnu/patch/, która zawiera już odpowiednie poprawki.


soft@wega:~/patch% ./drf_patch-2.6.1_conf 
cc: Sun C 5.10 SunOS_sparc 2009/06/03
usage: cc [ options] files.  Use 'cc -flags' for details
MANPATH=/usr/local/share/man:/usr/local/man:/usr/share/man
PATH=/usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin
CFLAGS=-fast
CPPFLAGS=-I/usr/local/include
CXXFLAGS=-fast
LDFLAGS=-L/usr/local/lib -R/usr/local/lib
=============================================
gmake clean [y|n] ?
n

Konfiguracja:


=============================================
configure [y|n] ?
y
...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands
=============================================

Kompilacja:


gmake [y|n] ?
y
gmake  all-recursive
gmake[1]: Entering directory `/home/soft/patch/patch-2.6.1.136-31a7'
Making all in lib
gmake[2]: Entering directory `/home/soft/patch/patch-2.6.1.136-31a7/lib'
  GEN    arg-nonnull.h
  GEN    c++defs.h
  GEN    configmake.h
...
gmake[2]: Leaving directory `/home/soft/patch/patch-2.6.1.136-31a7'
gmake[1]: Leaving directory `/home/soft/patch/patch-2.6.1.136-31a7'
Compilation successful
=============================================

Testowanie:


gmake check [y|n] ?
y
  GEN    public-submodule-commit
gmake  check-recursive
gmake[1]: Entering directory `/home/soft/patch/patch-2.6.1.136-31a7'
Making check in lib
gmake[2]: Entering directory `/home/soft/patch/patch-2.6.1.136-31a7/lib'
gmake  check-recursive
...
======================================================
All 31 tests behaved as expected (2 expected failures)
======================================================
...

gmake install po przełączeniu na roota.


# gpatch --version
GNU patch 2.6.1.136-31a7
Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 1988 Larry Wall

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.