12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- // -*- mode:doc; -*-
- // vim: set syntax=asciidoc:
- [[patch-policy]]
- Patching a package
- ------------------
- While integrating a new package or updating an existing one, it may be
- necessary to patch the source of the software to get it cross-built within
- OpenADK. OpenADK offers an infrastructure to automatically handle this during
- the builds. Patches are provided within OpenADK, in the package directory;
- these typically aim to fix cross-compilation, libc support, or other such
- issues.
- 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. The
- patches will be applied in numeric order. You should either use the automatic
- patch generation or the manual patch creation for a package. Mixed usage is not
- supported.
- Format and licensing of the package patches
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Patches are released under the same license as the software that is
- modified.
- A message explaining what the patch does, and why it is needed, should
- be 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 to
- add a few things in the header of the patch itself.
- Depending on whether the patch has been obtained from the project
- repository itself, or from somewhere on the web, add one of the
- following 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 patch
- that may have been necessary.
|