| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 | // -*- mode:doc; -*-// vim: set syntax=asciidoc:[[patch-policy]]Patching a package------------------While integrating a new package or updating an existing one, it may benecessary to patch the source of the software to get it cross-built withinOpenADK.  OpenADK offers an infrastructure to automatically handle this duringthe builds.  Patches are provided within OpenADK, in the package directory;these typically aim to fix cross-compilation, libc support, portability issuesor other things.Normally the patches are autogenerated via:------------ $ make package=<package> update-patches------------Otherwise they are manually generated via:------------ $ diff -Nur <pkgname>-<pkgversion>.orig <pkgname>-<pkgversion> > package/<pkgname>/patches/xxx-description.patch ------------The string +xxx+ should be substituted by a number starting with 001. Thepatches will be applied in numeric order.  You should either use the automaticpatch generation or the manual patch creation for a package. Mixed usage is notsupported.Format and licensing of the package patches~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Patches are released under the same license as the software that ismodified.A message explaining what the patch does, and why it is needed, shouldbe added in the header commentary of the patch.At the end, the patch should look like:---------------add C++ support test--- configure.ac.orig+++ configure.ac@@ -40,2 +40,12 @@AC_PROG_MAKE_SET++AC_CACHE_CHECK([whether the C++ compiler works],+               [rw_cv_prog_cxx_works],+               [AC_LANG_PUSH([C++])+                AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],+                               [rw_cv_prog_cxx_works=yes],+                               [rw_cv_prog_cxx_works=no])+                AC_LANG_POP([C++])])++AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])---------------Integrating patches found on the Web~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~When integrating a patch of which you are not the author, you have toadd a few things in the header of the patch itself.Depending on whether the patch has been obtained from the projectrepository itself, or from somewhere on the web, add one of thefollowing tags:---------------Backported from: <some commit id>---------------or---------------Fetch from: <some url>---------------It is also sensible to add a few words about any changes to the patchthat may have been necessary.Upstreaming patches~~~~~~~~~~~~~~~~~~~OpenADK tries to avoid any patches to the source code. If a patch couldnot be avoided, it should be tried to make the patch of a good quality toget it upstream. OpenADK tries to report any found issues and try to sendin any upstream compatible patches.
 |