]> git.proxmox.com Git - libxdgmime-perl.git/commitdiff
add update instructions to README
authorStoiko Ivanov <s.ivanov@proxmox.com>
Sat, 5 Jun 2021 15:54:17 +0000 (15:54 +0000)
committerStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 11 Jun 2021 11:52:21 +0000 (11:52 +0000)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
README

diff --git a/README b/README
index 88b0552f14abedbe72b93c54f17b8cb6f2dcd291..051d502e76ad5f8b4d01b97f4950bd070faa9297 100644 (file)
--- a/README
+++ b/README
@@ -1,3 +1,34 @@
+Updating the bindings
+#####################
+
+* The upstream sources are added https://gitlab.freedesktop.org/xdg/xdgmime as
+  git-subtree in xdgmime-source use git-subtree to update them
+
+* All functions in upstream's xdgmime.h are also present as CPP defines (for
+  adding XDG_PREFIX to the function name, which confuses h2xs into creating
+  constant symbols for them. These constant symbols then create errors in the
+  automatically generated tests.
+
+* By running `make update-bindings` h2xs is called with the appropriate
+  parameters to create a fresh xs module from xdgmime.h. Only symbols matching
+  XDG_ are treated as constants (-M '^XDG'), thus avoiding the problematic
+  defines.
+  Rationale of relevant h2xs parameters:
+  * -P - avoids POD part in .pm - which only contains boilerplate and would need
+    adopting every time
+  * -F -DHAVE_MMAP - simply sets the define during compilation
+  * -M '^XDG_' - treat only defines starting with XDG as constants (see above)
+  * -t PV - set the default constant type to PV (a.k.a. string see man perlguts)
+    (fitting with the 3 XDG_ constants)
+
+* All functions needed in the perl-module need to be added to
+  Xdgmime/lib/Xdgmime.pl in the EXPORT_TAGS (and since pmg-api and others use
+  them without fully qualifying them with the module name also to the EXPORT)
+  array, and implemented in Xdgmime/Xdgemime.xs
+
+* C::Scan is not used anymore but can be installed via CPAN, should you need
+  an initial prototype for a new function
+
 0.) initial package generated with following commands:
 ######################################################