2 // vim: set syntax=asciidoc:
9 While integrating a new package or updating an existing one, it may be
10 necessary to patch the source of the software to get it cross-built within
11 OpenADK. OpenADK offers an infrastructure to automatically handle this during
12 the builds. Patches are provided within OpenADK, in the package directory;
13 these typically aim to fix cross-compilation, libc support, portability issues
16 Normally the patches are autogenerated via:
18 $ make package=<package> update-patches
21 Otherwise they are manually generated via:
23 $ diff -Nur <pkgname>-<pkgversion>.orig <pkgname>-<pkgversion> > package/<pkgname>/patches/xxx-description.patch
26 The string +xxx+ should be substituted by a number starting with 001. The
27 patches will be applied in numeric order. You should either use the automatic
28 patch generation or the manual patch creation for a package. Mixed usage is not
31 Format and licensing of the package patches
32 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34 Patches are released under the same license as the software that is
37 A message explaining what the patch does, and why it is needed, should
38 be added in the header commentary of the patch.
39 At the end, the patch should look like:
50 +AC_CACHE_CHECK([whether the C++ compiler works],
51 + [rw_cv_prog_cxx_works],
52 + [AC_LANG_PUSH([C++])
53 + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
54 + [rw_cv_prog_cxx_works=yes],
55 + [rw_cv_prog_cxx_works=no])
56 + AC_LANG_POP([C++])])
58 +AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
61 Integrating patches found on the Web
62 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64 When integrating a patch of which you are not the author, you have to
65 add a few things in the header of the patch itself.
67 Depending on whether the patch has been obtained from the project
68 repository itself, or from somewhere on the web, add one of the
72 Backported from: <some commit id>
78 Fetched from: <some url>
81 It is also sensible to add a few words about any changes to the patch
82 that may have been necessary.
87 OpenADK tries to avoid any patches to the source code. If a patch could
88 not be avoided, it should be tried to make the patch of a good quality to
89 get it upstream. OpenADK tries to report any found issues and try to send
90 in any upstream compatible patches.