pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/gtk2 Move "configuration" files from PKG_SYSCONFDI...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7775295c45d1
branches:  trunk
changeset: 466709:7775295c45d1
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Thu Jan 22 12:38:46 2004 +0000

description:
Move "configuration" files from PKG_SYSCONFDIR to PREFIX/libdata.  Those
files are not intended to be configured by the end user, but should be
automatically regenerated when (de)installing extra GTK modules.
Bump PKGREVISION to 3 because of this change.

While doing this, implement a framework so that other packages installing
GTK modules can rebuild those databases easily at (de)install time.

diffstat:

 x11/gtk2/Makefile             |  12 +++---------
 x11/gtk2/PLIST                |   8 ++++----
 x11/gtk2/distinfo             |   5 ++---
 x11/gtk2/files/immodules.tmpl |  15 +++++++++++++++
 x11/gtk2/files/loaders.tmpl   |  15 +++++++++++++++
 x11/gtk2/modules.mk           |  39 +++++++++++++++++++++++++++++++++++++++
 x11/gtk2/patches/patch-af     |  28 ----------------------------
 x11/gtk2/patches/patch-ah     |  32 +-------------------------------
 8 files changed, 79 insertions(+), 75 deletions(-)

diffs (254 lines):

diff -r 04a8329b7f4b -r 7775295c45d1 x11/gtk2/Makefile
--- a/x11/gtk2/Makefile Thu Jan 22 12:31:41 2004 +0000
+++ b/x11/gtk2/Makefile Thu Jan 22 12:38:46 2004 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.38 2004/01/07 02:21:17 jlam Exp $
+# $NetBSD: Makefile,v 1.39 2004/01/22 12:38:46 jmmv Exp $
 #
 
 DISTNAME=              gtk+-2.2.4
 PKGNAME=               ${DISTNAME:S/gtk/gtk2/}
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            x11
 MASTER_SITES=          ftp://ftp.gtk.org/pub/gtk/v2.2/ \
                        ftp://ftp.cs.umn.edu/pub/gimp/gtk/v2.2/ \
@@ -23,7 +23,7 @@
 
 GNU_CONFIGURE=          yes
 CONFIGURE_ARGS+=       --with-xinput=xfree
-CONFIGURE_ARGS+=       --sysconfdir="${PKG_SYSCONFBASEDIR}"
+CONFIGURE_ARGS+=       --sysconfdir=${PREFIX}/libdata
 CONFIGURE_ARGS+=       --enable-gtk-doc=no
 CONFIGURE_ARGS+=       --with-html-dir=${PREFIX}/share/doc/html
 CONFIGURE_ENV+=                ac_cv_header_X11_extensions_Xinerama_h=no
@@ -40,12 +40,6 @@
 
 BUILD_DIRS=            ${WRKSRC} ${WRKSRC}/demos/gtk-demo
 
-PKG_SYSCONFSUBDIR=     gtk-2.0
-EGDIR=                 ${PREFIX}/share/examples/gtk2
-CONF_FILES=            ${EGDIR}/gdk-pixbuf.loaders \
-                       ${PKG_SYSCONFDIR}/gdk-pixbuf.loaders
-CONF_FILES+=           ${EGDIR}/gtk.immodules ${PKG_SYSCONFDIR}/gtk.immodules
-
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/gtk-2.0/engines
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/gtk-2.0/modules
diff -r 04a8329b7f4b -r 7775295c45d1 x11/gtk2/PLIST
--- a/x11/gtk2/PLIST    Thu Jan 22 12:31:41 2004 +0000
+++ b/x11/gtk2/PLIST    Thu Jan 22 12:38:46 2004 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.20 2003/09/08 15:07:22 adam Exp $
+@comment $NetBSD: PLIST,v 1.21 2004/01/22 12:38:46 jmmv Exp $
 bin/gdk-pixbuf-csource
 bin/gdk-pixbuf-query-loaders
 bin/gtk-demo
@@ -286,6 +286,8 @@
 lib/pkgconfig/gdk-x11-2.0.pc
 lib/pkgconfig/gtk+-2.0.pc
 lib/pkgconfig/gtk+-x11-2.0.pc
+libdata/gtk-2.0/gdk-pixbuf.loaders
+libdata/gtk-2.0/gtk.immodules
 man/man1/gdk-pixbuf-csource.1
 share/aclocal/gtk-2.0.m4
 share/doc/html/gdk-pixbuf/GdkPixbufLoader.html
@@ -681,8 +683,6 @@
 share/doc/html/gtk/stock_zoom_in_24.png
 share/doc/html/gtk/stock_zoom_out_24.png
 share/doc/html/gtk/up.png
-share/examples/gtk2/gdk-pixbuf.loaders
-share/examples/gtk2/gtk.immodules
 share/gtk-2.0/demo/alphatest.png
 share/gtk-2.0/demo/apple-red.png
 share/gtk-2.0/demo/appwindow.c
@@ -782,10 +782,10 @@
 @unexec ${RMDIR} %D/share/themes 2>/dev/null || ${TRUE}
 @dirrm share/gtk-2.0/demo
 @dirrm share/gtk-2.0
-@dirrm share/examples/gtk2
 @dirrm share/doc/html/gtk
 @dirrm share/doc/html/gdk-pixbuf
 @dirrm share/doc/html/gdk
+@dirrm libdata/gtk-2.0
 @exec ${MKDIR} %D/lib/gtk-2.0/modules 2>/dev/null || ${TRUE}
 @dirrm lib/gtk-2.0/modules
 @dirrm lib/gtk-2.0/include
diff -r 04a8329b7f4b -r 7775295c45d1 x11/gtk2/distinfo
--- a/x11/gtk2/distinfo Thu Jan 22 12:31:41 2004 +0000
+++ b/x11/gtk2/distinfo Thu Jan 22 12:38:46 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.20 2003/09/28 10:09:58 recht Exp $
+$NetBSD: distinfo,v 1.21 2004/01/22 12:38:47 jmmv Exp $
 
 SHA1 (gtk+-2.2.4.tar.bz2) = ef3d3d9c044f625d8dda25d62dfc0ac50a1024c6
 Size (gtk+-2.2.4.tar.bz2) = 7189272 bytes
@@ -7,8 +7,7 @@
 SHA1 (patch-ac) = 68b0d7da55de5209bed53f3daea1881a634a216f
 SHA1 (patch-ad) = f514ec4f261a148bde25a9618694df71d7586f6a
 SHA1 (patch-ae) = a678a466ccf60adb284f017b08bd1d59388c9669
-SHA1 (patch-af) = e1773a59cf269bf14e4d35759033f27faa6060aa
 SHA1 (patch-ag) = d01d38f2920730e0516edcb447be37960c122aca
-SHA1 (patch-ah) = 7be5f8c19031f894907d6fe0ec48f36816730af8
+SHA1 (patch-ah) = a39d8d976ae91529aa0db48579ef1d68a44a969c
 SHA1 (patch-ai) = 68a39f11d5b62a5c5adf8eaab5bd5e821f892b7f
 SHA1 (patch-aq) = 815a362bdc60f2b645b7b5e9381a1925d1a6df8e
diff -r 04a8329b7f4b -r 7775295c45d1 x11/gtk2/files/immodules.tmpl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gtk2/files/immodules.tmpl     Thu Jan 22 12:38:46 2004 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: immodules.tmpl,v 1.1 2004/01/22 12:38:47 jmmv Exp $
+#
+# Rebuild the GTK2 immodules database.
+#
+
+GTK_IMMODULES_DB="@GTK_IMMODULES_DB@"
+GTK_QUERY_IMMODULES="@GTK_QUERY_IMMODULES@"
+
+case ${STAGE} in
+POST-INSTALL|POST-DEINSTALL)
+       ${GTK_QUERY_IMMODULES} > ${GTK_IMMODULES_DB}
+       ;;
+*)
+       ;;
+esac
diff -r 04a8329b7f4b -r 7775295c45d1 x11/gtk2/files/loaders.tmpl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gtk2/files/loaders.tmpl       Thu Jan 22 12:38:46 2004 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: loaders.tmpl,v 1.1 2004/01/22 12:38:47 jmmv Exp $
+#
+# Rebuild the GTK2 gdk-pixbuf database.
+#
+
+GDK_PIXBUF_LOADERS_DB="@GDK_PIXBUF_LOADERS_DB@"
+GDK_PIXBUF_QUERY_LOADERS="@GDK_PIXBUF_QUERY_LOADERS@"
+
+case ${STAGE} in
+POST-INSTALL|POST-DEINSTALL)
+       ${GDK_PIXBUF_QUERY_LOADERS} > ${GDK_PIXBUF_LOADERS_DB}
+       ;;
+*)
+       ;;
+esac
diff -r 04a8329b7f4b -r 7775295c45d1 x11/gtk2/modules.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gtk2/modules.mk       Thu Jan 22 12:38:46 2004 +0000
@@ -0,0 +1,39 @@
+# $NetBSD: modules.mk,v 1.1 2004/01/22 12:38:47 jmmv Exp $
+#
+# This Makefile fragment is intended to be included by packages that install
+# GTK2 modules.  It takes care of rebuilding the corresponding databases at
+# (de)installation time.
+#
+# The following variables can be defined:
+#    GTK2_IMMODULES - Set to YES if the package installs immodules.
+#    GTK2_LOADERS   - Set to YES if the package installs pixbuf loaders.
+#
+
+.if !defined(GTK2_MODULES_MK)
+GTK2_MODULES_MK=       # defined
+
+GTK_QUERY_IMMODULES=   ${BUILDLINK_PREFIX.gtk2}/bin/gtk2-query-immodules
+GDK_PIXBUF_QUERY_LOADERS=      ${BUILDLINK_PREFIX.gtk2}/bin/gdk-pixbuf-query-loaders
+
+.if defined(GTK2_IMMODULES) && !empty(GTK2_IMMODULES:M[Yy][Ee][Ss])
+FILES_SUBST+=          GTK_IMMODULES_DB="${GTK_IMMODULES_DB}"
+FILES_SUBST+=          GTK_QUERY_IMMODULES="${GTK_QUERY_IMMODULES}"
+GTK_IMMODULES_DB=      ${BUILDLINK_PREFIX.gtk2}/libdata/gtk-2.0/gtk.immodules
+INSTALL_EXTRA_TMPL+=   ../../x11/gtk2/files/immodules.tmpl
+DEINSTALL_EXTRA_TMPL+= ../../x11/gtk2/files/immodules.tmpl
+USE_PKGINSTALL=                YES
+.endif
+
+.if defined(GTK2_LOADERS) && !empty(GTK2_LOADERS:M[Yy][Ee][Ss])
+FILES_SUBST+=          GDK_PIXBUF_LOADERS_DB="${GDK_PIXBUF_LOADERS_DB}"
+FILES_SUBST+=          GDK_PIXBUF_QUERY_LOADERS="${GDK_PIXBUF_QUERY_LOADERS}"
+GDK_PIXBUF_LOADERS_DB= ${BUILDLINK_PREFIX.gtk2}/libdata/gtk-2.0/gdk-pixbuf.loaders
+INSTALL_EXTRA_TMPL+=   ../../x11/gtk2/files/loaders.tmpl
+DEINSTALL_EXTRA_TMPL+= ../../x11/gtk2/files/loaders.tmpl
+USE_PKGINSTALL=                YES
+.endif
+
+USE_BUILDLINK2=                YES
+.include "../../x11/gtk2/modules.mk"
+
+.endif                 # GTK2_MODULES_MK
diff -r 04a8329b7f4b -r 7775295c45d1 x11/gtk2/patches/patch-af
--- a/x11/gtk2/patches/patch-af Thu Jan 22 12:31:41 2004 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-$NetBSD: patch-af,v 1.8 2003/01/04 17:29:05 jmmv Exp $
-
---- modules/input/Makefile.in.orig     Sat Dec 21 02:35:03 2002
-+++ modules/input/Makefile.in
-@@ -23,7 +23,7 @@ bindir = @bindir@
- sbindir = @sbindir@
- libexecdir = @libexecdir@
- datadir = @datadir@
--sysconfdir = @sysconfdir@
-+sysconfdir = @datadir@/examples/gtk2
- sharedstatedir = @sharedstatedir@
- localstatedir = @localstatedir@
- libdir = @libdir@
-@@ -801,10 +801,10 @@ maintainer-clean-generic clean mostlycle
- # not work at all, so skip it.
- install-data-local:
-       @if $(RUN_QUERY_IMMODULES_TEST) ; then \
--        echo $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
--        $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
--        echo "$(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules" ; \
--        $(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules ; \
-+        echo $(mkinstalldirs) $(DESTDIR)$(sysconfdir) ; \
-+        $(mkinstalldirs) $(DESTDIR)$(sysconfdir) ; \
-+        echo "$(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk.immodules" ; \
-+        $(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk.immodules ; \
-       else \
-         echo "***" ; \
-         echo "*** Warning: gtk.immodules not built" ; \
diff -r 04a8329b7f4b -r 7775295c45d1 x11/gtk2/patches/patch-ah
--- a/x11/gtk2/patches/patch-ah Thu Jan 22 12:31:41 2004 +0000
+++ b/x11/gtk2/patches/patch-ah Thu Jan 22 12:38:46 2004 +0000
@@ -1,26 +1,7 @@
-$NetBSD: patch-ah,v 1.5 2003/01/04 17:29:05 jmmv Exp $
+$NetBSD: patch-ah,v 1.6 2004/01/22 12:38:47 jmmv Exp $
 
 --- gdk-pixbuf/Makefile.in.orig        Sat Dec 21 02:34:56 2002
 +++ gdk-pixbuf/Makefile.in
-@@ -23,7 +23,8 @@ bindir = @bindir@
- sbindir = @sbindir@
- libexecdir = @libexecdir@
- datadir = @datadir@
--sysconfdir = @sysconfdir@
-+sysconfdir = @datadir@/examples/gtk2
-+realsysconfdir = @sysconfdir@
- sharedstatedir = @sharedstatedir@
- localstatedir = @localstatedir@
- libdir = @libdir@
-@@ -370,7 +371,7 @@ INCLUDES = @STRIP_BEGIN@                   \
-       -I$(top_srcdir) -I$(top_builddir)       \
-       -I$(top_srcdir)/gdk-pixbuf              \
-       -I$(top_builddir)/gdk-pixbuf            \
--      -DGTK_SYSCONFDIR=\"$(sysconfdir)\"      \
-+      -DGTK_SYSCONFDIR=\"$(realsysconfdir)\"  \
-       -DGTK_VERSION=\"@GTK_VERSION@\"         \
-       -DGTK_BINARY_VERSION=\"@GTK_BINARY_VERSION@\"   \
-       -DG_DISABLE_DEPRECATED                  \
 @@ -383,7 +384,7 @@ INCLUDES = @STRIP_BEGIN@                   \
  
  
@@ -30,14 +11,3 @@
  
  noinst_PROGRAMS = test-gdk-pixbuf
  test_gdk_pixbuf_LDADD = $(LDADDS)
-@@ -1338,8 +1339,8 @@ $(srcdir)/gdk-pixbuf-marshal.c: @REBUILD
- # not work at all, so skip it
- install-data-local: install-ms-lib install-libtool-import-lib
-       @if $(RUN_QUERY_LOADER_TEST) ; then \
--        $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
--        $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders > $(DESTDIR)$(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders ; \
-+        $(mkinstalldirs) $(DESTDIR)$(sysconfdir) ; \
-+        $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders > $(DESTDIR)$(sysconfdir)/gdk-pixbuf.loaders ; \
-       else \
-         echo "***" ; \
-         echo "*** Warning: gdk-pixbuf.loaders not built" ; \



Home | Main Index | Thread Index | Old Index