Subject: pkg/18998: Make graphics/imlib honor PKG_SYSCONFDIR
To: None <gnats-bugs@gnats.netbsd.org>
From: Julio Merino <jmmv@menta.net>
List: netbsd-bugs
Date: 11/09/2002 23:18:10
>Number: 18998
>Category: pkg
>Synopsis: Make graphics/imlib honor PKG_SYSCONFDIR
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 09 14:14:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Julio Merino
>Release: NetBSD 1.6K
>Organization:
HispaBSD
>Environment:
System: NetBSD darkstar.local 1.6K NetBSD 1.6K (DARKSTAR) #130: Thu Nov 7 23:22:44 CET 2002 jmmv@darkstar.local:/var/build/kernel/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
graphics/imlib installs several files inside ${PREFIX}/etc, while
they should be managed with PKG_SYSCONFDIR stuff.
I've modified the package to also use PKG_SYSCONFSUBDIR to get a
cleaner etc configuration directory.
>How-To-Repeat:
>Fix:
Apply this patch:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/imlib/Makefile,v
retrieving revision 1.71
diff -u -u -r1.71 Makefile
--- Makefile 2002/10/30 03:09:33 1.71
+++ Makefile 2002/11/09 22:10:03
@@ -2,7 +2,7 @@
#
DISTNAME= imlib-1.9.14
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/imlib/1.9/}
@@ -24,7 +24,19 @@
CPPFLAGS+= -DENABLE_NLS
CONFIGURE_ENV+= ac_cv_path_CONVERT_PROG="${LOCALBASE}/bin/convert"
CONFIGURE_ENV+= X_LDFLAGS="${X_LDFLAGS}"
+CONFIGURE_ARGS+= --sysconfdir="${PKG_SYSCONFDIR}"
+PKG_SYSCONFSUBDIR= imlib
+
+EGDIR= ${PREFIX}/share/examples/imlib
+CONF_FILES= ${EGDIR}/imrc ${PKG_SYSCONFDIR}/imrc
+CONF_FILES+= ${EGDIR}/im_palette.pal \
+ ${PKG_SYSCONFDIR}/im_palette.pal
+CONF_FILES+= ${EGDIR}/im_palette-small.pal \
+ ${PKG_SYSCONFDIR}/im_palette-small.pal
+CONF_FILES+= ${EGDIR}/im_palette-tiny.pal \
+ ${PKG_SYSCONFDIR}/im_palette-tiny.pal
+
# The following ensures that `imlib-config --libs' includes the correct
# linker flags for linking the X11 libs.
#
@@ -46,4 +58,5 @@
.include "../../graphics/tiff/buildlink2.mk"
.include "../../x11/gtk/buildlink2.mk"
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/imlib/PLIST,v
retrieving revision 1.4
diff -u -u -r1.4 PLIST
--- PLIST 2002/03/29 18:01:13 1.4
+++ PLIST 2002/11/09 22:10:08
@@ -1,10 +1,6 @@
@comment $NetBSD: PLIST,v 1.4 2002/03/29 18:01:13 wiz Exp $
bin/imlib_config
bin/imlib-config
-etc/imrc
-etc/im_palette.pal
-etc/im_palette-small.pal
-etc/im_palette-tiny.pal
include/gdk_imlib.h
include/gdk_imlib_private.h
include/gdk_imlib_types.h
@@ -59,6 +55,11 @@
share/doc/imlib/curve2.gif
share/doc/imlib/imlib.gif
share/doc/imlib/index.html
+share/examples/imlib/imrc
+share/examples/imlib/im_palette.pal
+share/examples/imlib/im_palette-small.pal
+share/examples/imlib/im_palette-tiny.pal
+@dirrm share/examples/imlib
@dirrm share/doc/imlib
@exec test %D = ${LOCALBASE} || ln -fs %D/share/aclocal/imlib.m4 ${LOCALBASE}/share/aclocal/imlib.m4
@unexec test %D = ${LOCALBASE} || ${RM} ${LOCALBASE}/share/aclocal/imlib.m4
Index: buildlink2.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/imlib/buildlink2.mk,v
retrieving revision 1.2
diff -u -u -r1.2 buildlink2.mk
--- buildlink2.mk 2002/08/25 18:39:11 1.2
+++ buildlink2.mk 2002/11/09 22:10:08
@@ -4,7 +4,7 @@
IMLIB_BUILDLINK2_MK= # defined
BUILDLINK_PACKAGES+= imlib
-BUILDLINK_DEPENDS.imlib?= imlib>=1.9.11nb1
+BUILDLINK_DEPENDS.imlib?= imlib>=1.9.11nb2
BUILDLINK_PKGSRCDIR.imlib?= ../../graphics/imlib
EVAL_PREFIX+= BUILDLINK_PREFIX.imlib=imlib
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/imlib/distinfo,v
retrieving revision 1.12
diff -u -u -r1.12 distinfo
--- distinfo 2002/10/30 03:09:33 1.12
+++ distinfo 2002/11/09 22:10:08
@@ -6,3 +6,4 @@
SHA1 (patch-ab) = df9f9f7c85f0794748a4ca6f58836f8dd230c805
SHA1 (patch-ae) = 3ed6fff2e73f04ec83c27dc6e3f2db2fa446abbb
SHA1 (patch-ag) = 0ed464cb26492f3eebb8812efdb49ee83ef4ae6b
+SHA1 (patch-ah) = 703f83ad25e0a8af8427ccd4d8492f7fa83f26a3
And now import this new patch as patch-ah:
$NetBSD$
--- config/Makefile.in.orig Mon Mar 25 17:50:27 2002
+++ config/Makefile.in
@@ -23,7 +23,8 @@ bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
-sysconfdir = @sysconfdir@
+realsysconfdir = @sysconfdir@
+sysconfdir = @datadir@/examples/@PACKAGE@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
@@ -219,7 +220,7 @@ maintainer-clean-generic clean mostlycle
imrc: imrc.in
- sed -e 's,\@sysconfdir\@,$(sysconfdir),g' \
+ sed -e 's,\@sysconfdir\@,$(realsysconfdir),g' \
< $(srcdir)/imrc.in > imrc.tmp \
&& mv imrc.tmp imrc
>Release-Note:
>Audit-Trail:
>Unformatted: