mirror of
https://git.proxmox.com/git/libxdgmime-perl
synced 2025-08-02 22:20:43 +00:00
add update instructions to README
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
f05aec345d
commit
72cb96ca0a
31
README
31
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:
|
||||
######################################################
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user