[libdmapsharing] Start automating some fixes for Vala API generation idiosyncrasies with respect to multiple namespac
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Start automating some fixes for Vala API generation idiosyncrasies with respect to multiple namespac
- Date: Thu, 16 Dec 2010 03:50:08 +0000 (UTC)
commit e588e9bf7decc746838f6dd97ef200ddeb2c7aa5
Author: W. Michael Petullo <mike flyn org>
Date: Wed Dec 15 21:48:35 2010 -0600
Start automating some fixes for Vala API generation idiosyncrasies with respect to multiple namespaces
Signed-off-by: W. Michael Petullo <mike flyn org>
vala/Makefile.am | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/vala/Makefile.am b/vala/Makefile.am
index a73497f..2273ab1 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -23,8 +23,20 @@ libdmapsharing- API_VERSION@-dmap.vapi: libdmapsharing- API_VERSION@-dmap/libdma
libdmapsharing- API_VERSION@-dpap.vapi: libdmapsharing- API_VERSION@-dpap/libdmapsharing- API_VERSION@.gi libdmapsharing- API_VERSION@-dpap/libdmapsharing- API_VERSION@.metadata
$(VAPIGEN) --pkg=libsoup-2.4 --pkg=glib-2.0 --library libdmapsharing- API_VERSION@-dpap libdmapsharing- API_VERSION@-dpap/libdmapsharing- API_VERSION@.gi
+# NOTE: Sed is used to fix a problem I don't know how to handle in
+# vapigen. I have several namespaces (DMAP, DAAP, ...) in libdmapsharing. In
+# order to support this, I generate four Vala API files and then concatenate
+# them. But, each has its own definition of DMAP.Db, DAAP.DMAPDb, etc. The
+# use of sed fixes this:
libdmapsharing- API_VERSION@.vapi: libdmapsharing- API_VERSION@-daap.vapi libdmapsharing- API_VERSION@-dacp.vapi libdmapsharing- API_VERSION@-dmap.vapi libdmapsharing- API_VERSION@-dpap.vapi
cat libdmapsharing- API_VERSION@-daap.vapi libdmapsharing- API_VERSION@-dacp.vapi libdmapsharing- API_VERSION@-dmap.vapi libdmapsharing- API_VERSION@-dpap.vapi > libdmapsharing- API_VERSION@.vapi
+ cat libdmapsharing- API_VERSION@.vapi | \
+ sed 's/DPAP\.DMAPDb/DMAP.Db/g' | \
+ sed 's/DAAP\.DMAPDb/DMAP.Db/g' | \
+ sed 's/DPAP\.DMAPRecordFactory/DMAP.RecordFactory/g' | \
+ sed 's/DAAP\.DMAPRecordFactory/DMAP.RecordFactory/g' | \
+ cat > libdmapsharing- API_VERSION@.vapi.tmp
+ mv libdmapsharing- API_VERSION@.vapi.tmp libdmapsharing- API_VERSION@.vapi
rm -f libdmapsharing- API_VERSION@-daap.vapi libdmapsharing- API_VERSION@-dacp.vapi libdmapsharing- API_VERSION@-dmap.vapi libdmapsharing- API_VERSION@-dpap.vapi
all: libdmapsharing- API_VERSION@.vapi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]