[Lsb-messages] /var/www/bzr/lsb/devel/build_env r2147: Add direct support for post-generation patching of headers.
Jeff Licquia
licquia at linuxfoundation.org
Thu Aug 29 00:35:48 UTC 2013
------------------------------------------------------------
revno: 2147
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: build_env
timestamp: Wed 2013-08-28 20:35:48 -0400
message:
Add direct support for post-generation patching of headers.
Instead of maintaining hand edits for certain headers that need them,
keep these modifications in patch files and apply those patches after
regenerating each header. We store the patch name in the HACKS file.
added:
headers/Intrinsic-hack.patch
headers/ShellP-hack.patch
headers/cups-hack.patch
modified:
headers/HACKS
headers/Makefile
-------------- next part --------------
=== modified file 'headers/HACKS'
--- a/headers/HACKS 2013-08-27 01:35:40 +0000
+++ b/headers/HACKS 2013-08-29 00:35:48 +0000
@@ -1,3 +1,3 @@
-cups/cups.h
-X11/Intrinsic.h
-X11/ShellP.h
+cups/cups.h cups-hack.patch
+X11/Intrinsic.h Intrinsic-hack.patch
+X11/ShellP.h ShellP-hack.patch
=== added file 'headers/Intrinsic-hack.patch'
--- a/headers/Intrinsic-hack.patch 1970-01-01 00:00:00 +0000
+++ b/headers/Intrinsic-hack.patch 2013-08-29 00:35:48 +0000
@@ -0,0 +1,29 @@
+--- X11/Intrinsic.h.db 2013-08-28 20:12:12.988759027 -0400
++++ X11/Intrinsic.h 2013-08-28 20:24:36.024786000 -0400
+@@ -116,10 +116,12 @@
+ #if __LSB_VERSION__ >= 12
+ typedef struct _WidgetClassRec *WidgetClass;
+
++/* HACK: move these down
+ #include <X11/Shell.h>
+ #include <X11/Composite.h>
+ #include <X11/Object.h>
+ #include <X11/Core.h>
++*/
+ #endif /* __LSB_VERSION__ >= 1.2 */
+
+
+@@ -127,6 +129,13 @@
+ #if __LSB_VERSION__ >= 12
+ typedef struct _TranslationData *XtTranslations;
+
++/* HACK: relocated from just above */
++#include <X11/Shell.h>
++#include <X11/Composite.h>
++#include <X11/Object.h>
++#include <X11/Core.h>
++/* End of HACK */
++
+ #include <X11/IntrinsicP.h>
+ #include <X11/TranslateI.h>
+ #endif /* __LSB_VERSION__ >= 1.2 */
=== modified file 'headers/Makefile'
--- a/headers/Makefile 2013-08-23 18:35:56 +0000
+++ b/headers/Makefile 2013-08-29 00:35:48 +0000
@@ -45,11 +45,13 @@
%.h:
./mkheader $(HEADER_DEBUG) -a All -h $@ | $(INDENT) -kr | ./collapse_ifdefs.pl >$@
+ grep $(subst -defs,,$@) HACKS | cut -f2 -d' ' | (while read p; do patch -p0 < $$p; done)
# Use 'header.h-defs' to unconditionally regenerate header.h and all header.h.defs
%.h-defs:
make $(foreach arch,$(LSB_SUPPORTED_ARCHS),$(foreach ver,$(LSB_VERSIONS),$(arch)_$(ver)/$(subst h-defs,h.defs,$@)))
./mkheader $(HEADER_DEBUG) -a All -h $(subst -defs,,$@) | $(INDENT) -kr | ./collapse_ifdefs.pl > $(subst -defs,,$@)
+ grep $(subst -defs,,$@) HACKS | cut -f2 -d' ' | (while read p; do patch -p0 < $$p; done)
install: install-core install-desktop
=== added file 'headers/ShellP-hack.patch'
--- a/headers/ShellP-hack.patch 1970-01-01 00:00:00 +0000
+++ b/headers/ShellP-hack.patch 2013-08-29 00:35:48 +0000
@@ -0,0 +1,20 @@
+--- X11/ShellP.h.db 2013-08-28 20:12:29.503089015 -0400
++++ X11/ShellP.h 2013-08-28 20:26:50.767066000 -0400
+@@ -12,7 +12,7 @@
+ #include <X11/CompositeP.h>
+ #include <X11/TranslateI.h>
+ #include <X11/CoreP.h>
+-#include <X11/VendorP.h>
++/* #include <X11/VendorP.h> XXX hand-edit: move down */
+ #include <lsb/Composite.h>
+
+ #ifdef __cplusplus
+@@ -150,6 +150,8 @@
+ Widget transient_for;
+ } TransientShellPart;
+
++#include <X11/VendorP.h> /* XXX hand-edit */
++
+ typedef struct {
+ CorePart core;
+ CompositePart composite;
=== added file 'headers/cups-hack.patch'
--- a/headers/cups-hack.patch 1970-01-01 00:00:00 +0000
+++ b/headers/cups-hack.patch 2013-08-29 00:35:48 +0000
@@ -0,0 +1,19 @@
+--- cups/cups.h.db 2013-08-28 20:11:52.283345356 -0400
++++ cups/cups.h 2013-08-28 20:21:02.699271000 -0400
+@@ -302,7 +302,7 @@
+ int digest_tries;
+ } http_t;
+
+-#include <cups/ipp.h>
++/*#include <cups/ipp.h> XXX hand-edit: move down */
+ #endif /* __LSB_VERSION__ < 4.0 */
+
+ #if __LSB_VERSION__ >= 40
+@@ -310,6 +310,7 @@
+
+ #endif /* __LSB_VERSION__ >= 4.0 */
+
++#include <cups/ipp.h> /* XXX hand-edit: move from above */
+
+ /* Function prototypes */
+
More information about the lsb-messages
mailing list