[gnome-desktop] [build, gnomerr] Ship pnp.ids in the tarball and add configure option
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-desktop] [build, gnomerr] Ship pnp.ids in the tarball and add configure option
- Date: Tue, 28 Jul 2009 19:53:35 +0000 (UTC)
commit eaad3f4f30dd04b94346957bb22770cd9ffaf8ee
Author: Vincent Untz <vuntz gnome org>
Date: Tue Jul 28 21:51:01 2009 +0200
[build,gnomerr] Ship pnp.ids in the tarball and add configure option
The --with-pnp-ids-path option lets distributors decide to use a pnp.ids
file that is external to gnome-desktop. By default, we just use a file
that is shipped with the tarball (and that is updated during
autogen.sh).
autogen.sh | 4 ++++
configure.in | 12 ++++++++++++
libgnome-desktop/Makefile.am | 16 ++++++++++++++--
libgnome-desktop/display-name.c | 2 --
4 files changed, 30 insertions(+), 4 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index e95759a..344e600 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -21,9 +21,13 @@ which gnome-autogen.sh || {
if test "`which gvfs-copy`" != ""; then
gvfs-copy http://api.gnome.org/gnome-about/foundation-members gnome-about/foundation-members.list
+ gvfs-copy "http://git.fedorahosted.org/git/?p=hwdata.git;a=blob_plain;f=pnp.ids;hb=HEAD" libgnome-desktop/pnp.ids
fi
if test ! -f gnome-about/foundation-members.list; then
touch gnome-about/foundation-members.list
fi
+if test ! -f libgnome-desktop/pnp.ids; then
+ touch libgnome-desktop/pnp.ids
+fi
. gnome-autogen.sh
diff --git a/configure.in b/configure.in
index 0cbe00d..9ae247d 100644
--- a/configure.in
+++ b/configure.in
@@ -81,6 +81,18 @@ if test "$enable_deprecations" = "no"; then
AC_SUBST([DISABLE_DEPRECATED])
fi
+# Path to the pnp.ids file -- to know if we use one shipped with another
+# package, or an internal file
+
+AC_ARG_WITH(pnp-ids-path,
+ [AC_HELP_STRING([--with-pnp-ids-path],
+ [Specify the path to pnp.ids @<:@default=(internal)@:>@])],,
+ [with_pnp_ids_path="\${pnpdatadir}/pnp.ids"])
+
+AM_CONDITIONAL(USE_INTERNAL_PNP_IDS, test "x$with_pnp_ids_path" = "x\${pnpdatadir}/pnp.ids")
+PNP_IDS=$with_pnp_ids_path
+AC_SUBST(PNP_IDS)
+
dnl If you add a version number here, you *must* add an AC_SUBST line for
dnl it too, or it will never make it into the spec file!
diff --git a/libgnome-desktop/Makefile.am b/libgnome-desktop/Makefile.am
index 918378e..562ba72 100644
--- a/libgnome-desktop/Makefile.am
+++ b/libgnome-desktop/Makefile.am
@@ -2,7 +2,7 @@ SUBDIRS = libgnome libgnomeui
INCLUDES = \
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale\"" \
- -DDATADIR=\""$(pkgdatadir)"\" \
+ -DPNP_IDS=\""$(PNP_IDS)"\" \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED) \
$(XLIB_CFLAGS) \
@@ -47,8 +47,20 @@ test_ditem_LDADD = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gnome-desktop-2.0.pc
+pnpdatadir = $(datadir)/libgnome-desktop
+if USE_INTERNAL_PNP_IDS
+pnpdata_DATA = pnp.ids
+endif
+
+check:
+ test -s $(top_srcdir)/libgnome-desktop/pnp.ids
+
EXTRA_DIST = \
gnome-desktop-2.0.pc.in \
- gnome-desktop-2.0-uninstalled.pc.in
+ gnome-desktop-2.0-uninstalled.pc.in \
+ pnp.ids
+
+MAINTAINERCLEANFILES = \
+ pnp.ids
-include $(top_srcdir)/git.mk
diff --git a/libgnome-desktop/display-name.c b/libgnome-desktop/display-name.c
index ea6aa67..f75958b 100644
--- a/libgnome-desktop/display-name.c
+++ b/libgnome-desktop/display-name.c
@@ -189,8 +189,6 @@ static const struct Vendor vendors[] =
static GHashTable *pnp_ids = NULL;
-#define PNP_IDS "/usr/share/hwdata/pnp.ids"
-
static void
read_pnp_ids (void)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]