summaryrefslogtreecommitdiff
path: root/databases/gnats
diff options
context:
space:
mode:
authorrecht <recht@pkgsrc.org>2005-08-27 22:24:02 +0000
committerrecht <recht@pkgsrc.org>2005-08-27 22:24:02 +0000
commita043abe05fd581acae79ec555f86a76989be8380 (patch)
tree5885fd217824bc7c38a6ddce0cab39143d79b8b7 /databases/gnats
parent99b96f73447baf9fe565d4c215581bbafab0b9e1 (diff)
downloadpkgsrc-a043abe05fd581acae79ec555f86a76989be8380.tar.gz
Update to gnats 4.1.0.
Make a overhaul of the package and bring it closer to pkgsrc standards. Addresses PR 26174 by Hauke Fath. changes: This is GNATS 4.1.0, a release that incorporates multiple bug fixes and enhancements that have been committed to CVS since the release of GNATS 4.0. Notable enhancements include: - Upgrade to autoconf 2.59 generated configure scripts. - New PR numbers are reported to the client upon new submissions - Rewrite of install-sid. Now, rather than editing send-pr, which can be installed on a read-only partition, install-sid creates or edits user or site configuration files ~/.send-pr.conf or /etc/gnats/send-pr.conf. - Removal of libiberty, old manpages, and old build framework cruft - Performance enhancements to indexing code - Various cleanups and bugfixes. See the ChangeLog files for details.
Diffstat (limited to 'databases/gnats')
-rw-r--r--databases/gnats/MESSAGE7
-rw-r--r--databases/gnats/Makefile57
-rw-r--r--databases/gnats/PLIST41
-rw-r--r--databases/gnats/distinfo15
-rw-r--r--databases/gnats/patches/patch-aa116
-rw-r--r--databases/gnats/patches/patch-ab22
-rw-r--r--databases/gnats/patches/patch-ac13
-rw-r--r--databases/gnats/patches/patch-ad23
-rw-r--r--databases/gnats/patches/patch-ae23
9 files changed, 257 insertions, 60 deletions
diff --git a/databases/gnats/MESSAGE b/databases/gnats/MESSAGE
index a608b23182c..7358a092d31 100644
--- a/databases/gnats/MESSAGE
+++ b/databases/gnats/MESSAGE
@@ -1,11 +1,12 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.6 2004/11/10 21:34:46 soren Exp $
+$NetBSD: MESSAGE,v 1.7 2005/08/27 22:24:02 recht Exp $
See http://www.gnu.org/software/gnats/ for the official web page
-and don't forget to run ${PREFIX}/libexec/gnats/mkcat as gnats.
+and don't forget to run ${PREFIX}/libexec/gnats/mkdb default
+as user ${GNATS_USER} to create the default database.
Add the following line to /etc/inetd.conf to activate GNATS:
- support stream tcp nowait gnats ${PREFIX}/libexec/gnats/gnatsd gnatsd
+ ${GNATS_SERVICE} stream tcp nowait ${GNATS_USER} ${PREFIX}/libexec/gnats/gnatsd gnatsd
Add something like this into the crontab to process incoming bug reports:
*/5 * * * * ${PREFIX}/libexec/gnats/queue-pr -r
diff --git a/databases/gnats/Makefile b/databases/gnats/Makefile
index 2fa3092f88b..775e7bc4f43 100644
--- a/databases/gnats/Makefile
+++ b/databases/gnats/Makefile
@@ -1,8 +1,6 @@
-# $NetBSD: Makefile,v 1.19 2005/08/23 11:48:47 rillig Exp $
-#
+# $NetBSD: Makefile,v 1.20 2005/08/27 22:24:02 recht Exp $
-DISTNAME= gnats-4.0.1
-PKGREVISION= 1
+DISTNAME= gnats-4.1.0
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_GNU:=gnats/}
@@ -11,28 +9,59 @@ HOMEPAGE= http://www.gnu.org/software/gnats/
COMMENT= GNATS bug tracking system
USE_PKGLOCALEDIR= yes
+USE_PKGINSTALL= yes
USE_TOOLS+= gm4 gmake
USE_BISON= yes
USE_MAKEINFO= yes
TEXINFO_REQD= 4.6
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+= --with-gnats-service=service-name=${GNATS_SERVICE}
+CONFIGURE_ARGS+= --with-gnats-user=${GNATS_USER}
+CONFIGURE_ARGS+= --with-gnatsd-user-access-file=${GNATS_USER_FILE:Q}
+CONFIGURE_ARGS+= --with-gnatsd-host-access-file=${GNATS_HOST_FILE:Q}
+CONFIGURE_ARGS+= --with-gnats-dblist-file=${GNATS_DB_FILE:Q}
+CONFIGURE_ARGS+= --with-gnats-default-db=${GNATS_DBHOME:Q}
+CONFIGURE_ARGS+= --with-lispdir=${PREFIX}/share/gnats
INFO_FILES= gnats.info gnats-faq.info
-CONFIGURE_ARGS= --with-lispdir=${PREFIX}/share/emacs/site-lisp
+PKG_SYSCONFSUBDIR= gnats
-GNATS_HOME= ${PREFIX}/share/gnats/gnats-db
-PKG_USERS= gnats:daemon::GNATS\ database\ owner:${GNATS_HOME}:${SH}
+GNATS_USER?= gnats
+GNATS_GROUP?= daemon
+GNATS_SERVICE?= support
+GNATS_HOME?= ${VARBASE}/db/gnats
+PKG_USERS= ${GNATS_USER}:${GNATS_GROUP}::GNATS\ database\ owner:${GNATS_HOME}:${SH}
-REQD_DIRS= ${PREFIX}/share/gnats
+GNATS_USER_FILE?= ${PKG_SYSCONFDIR}/gnatsd.user_access
+GNATS_HOST_FILE?= ${PKG_SYSCONFDIR}/gnatsd.host_access
+GNATS_DB_FILE?= ${PKG_SYSCONFDIR}/databases
+GNATS_DBHOME?= ${GNATS_HOME}/gnatsdb
+
+REQD_DIRS+= ${PREFIX}/share/gnats
REQD_DIRS+= ${PREFIX}/libexec/gnats
-OWN_DIRS_PERMS= ${GNATS_HOME} gnats daemon 755
-OWN_DIRS_PERMS+= ${GNATS_HOME}/gnats-queue gnats daemon 755
-OWN_DIRS_PERMS+= ${GNATS_HOME}/pending gnats daemon 755
-OWN_DIRS_PERMS+= ${GNATS_HOME}/gnats-adm gnats daemon 755
-OWN_DIRS_PERMS+= ${GNATS_HOME}/gnats-adm/locks gnats daemon 755
+REQD_DIRS+= ${EGDIR}
+OWN_DIRS_PERMS+= ${GNATS_HOME} gnats daemon 755
+
+EGDIR= ${PREFIX}/share/examples/gnats
+CONF_FILES_PERMS+= ${EGDIR}/gnatsd.user_access ${GNATS_USER_FILE} \
+ ${GNATS_USER} ${GNATS_GROUP} 0600
+CONF_FILES_PERMS+= ${EGDIR}/gnatsd.host_access ${GNATS_HOST_FILE} \
+ ${GNATS_USER} ${GNATS_GROUP} 0600
+CONF_FILES_PERMS+= ${EGDIR}/databases ${GNATS_DB_FILE} \
+ ${GNATS_USER} ${GNATS_GROUP} 0600
+CONF_FILES+= ${EGDIR}/send-pr.conf ${PKG_SYSCONFDIR}/send-pr.conf
+
+MESSAGE_SUBST+= PREFIX=${PREFIX}
+MESSAGE_SUBST+= GNATS_USER=${GNATS_USER}
+MESSAGE_SUBST+= GNATS_SERVICE=${GNATS_SERVICE}
-MESSAGE_SUBST+= PREFIX="${PREFIX}"
+SUBST_CLASSES+= gnats
+SUBST_STAGE.gnats= pre-configure
+SUBST_FILES.gnats= gnats/Makefile.in gnats/mkdb.sh send-pr/Makefile.in
+SUBST_SED.gnats= -e "s,%%EGDIR%%,${EGDIR},g"
+SUBST_SED.gnats+= -e "s,%%GNATS_DEFAULTS%%,${PREFIX}/share/gnats/defaults,g"
.include "../../mk/bsd.pkg.mk"
diff --git a/databases/gnats/PLIST b/databases/gnats/PLIST
index 20226b473e0..fc615be53a4 100644
--- a/databases/gnats/PLIST
+++ b/databases/gnats/PLIST
@@ -1,27 +1,9 @@
-@comment $NetBSD: PLIST,v 1.8 2004/11/14 10:59:58 soren Exp $
+@comment $NetBSD: PLIST,v 1.9 2005/08/27 22:24:02 recht Exp $
bin/edit-pr
bin/getclose
bin/install-sid
bin/query-pr
bin/send-pr
-etc/gnats/databases
-etc/gnats/defaults/addresses
-etc/gnats/defaults/categories
-etc/gnats/defaults/classes
-etc/gnats/defaults/dbconfig
-etc/gnats/defaults/gnatsd.user_access
-etc/gnats/defaults/responsible
-etc/gnats/defaults/states
-etc/gnats/defaults/submitters
-etc/gnats/gnatsd.host_access
-info/gnats.info
-info/gnats.info-1
-info/gnats.info-2
-info/gnats.info-3
-info/gnats.info-4
-info/gnats.info-5
-info/gnats.info-6
-info/gnats-faq.info
libexec/gnats/at-pr
libexec/gnats/check-db
libexec/gnats/delete-pr
@@ -47,11 +29,28 @@ man/man7/gnats.7
man/man8/delete-pr.8
man/man8/file-pr.8
man/man8/gen-index.8
+man/man8/getclose.8
man/man8/gnatsd.8
+man/man8/install-sid.8
man/man8/mkcat.8
man/man8/mkdb.8
man/man8/pr-edit.8
man/man8/queue-pr.8
man/man8/rmcat.8
-@dirrm etc/gnats/defaults
-@dirrm etc/gnats
+share/examples/gnats/databases
+share/examples/gnats/gnatsd.host_access
+share/examples/gnats/gnatsd.user_access
+share/examples/gnats/send-pr.conf
+share/gnats/defaults/addresses
+share/gnats/defaults/categories
+share/gnats/defaults/classes
+share/gnats/defaults/dbconfig
+share/gnats/defaults/gnatsd.user_access
+share/gnats/defaults/responsible
+share/gnats/defaults/states
+share/gnats/defaults/submitters
+share/gnats/gnats.el
+@dirrm share/gnats/defaults
+@dirrm share/gnats
+@dirrm share/examples/gnats
+@dirrm libexec/gnats
diff --git a/databases/gnats/distinfo b/databases/gnats/distinfo
index 32e3bf8f8f8..887f327c33d 100644
--- a/databases/gnats/distinfo
+++ b/databases/gnats/distinfo
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.6 2005/02/23 16:33:05 agc Exp $
+$NetBSD: distinfo,v 1.7 2005/08/27 22:24:02 recht Exp $
-SHA1 (gnats-4.0.1.tar.gz) = 4139af3842ade6cdfe8b14eff50e49aff3d70c40
-RMD160 (gnats-4.0.1.tar.gz) = 9823920d3dc8fe9d70e47a3bc1c475776592b831
-Size (gnats-4.0.1.tar.gz) = 1477650 bytes
-SHA1 (patch-aa) = e7a000501277041a61475b5ad0df587e7a9d018d
-SHA1 (patch-ab) = 8f1b4c35629e70ed1a7c6e6ea0b9bb610cfd7d70
+SHA1 (gnats-4.1.0.tar.gz) = 7f8ce7fbb7594698c5ba71421cad3cbc7e079003
+RMD160 (gnats-4.1.0.tar.gz) = b16bfa3ffa4f1c7dc351d1c5639061c358c64afd
+Size (gnats-4.1.0.tar.gz) = 1221364 bytes
+SHA1 (patch-aa) = 6a97819d475bb669921c04f4ab6f3c975f284137
+SHA1 (patch-ab) = 605e0caaed659405fff46af6c610d52c9dca948e
+SHA1 (patch-ac) = f6fdd1c2353961d47bd0e58866b56ac6f0d6173a
+SHA1 (patch-ad) = ffacd88288036eb74eccd6687292c5a456e2f027
+SHA1 (patch-ae) = ff99ebd3f6d2d1aa75b32ead56db0082eeb69753
diff --git a/databases/gnats/patches/patch-aa b/databases/gnats/patches/patch-aa
index 2a10afcdc1d..fb05095b345 100644
--- a/databases/gnats/patches/patch-aa
+++ b/databases/gnats/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.2 2004/11/10 21:34:46 soren Exp $
+$NetBSD: patch-aa,v 1.3 2005/08/27 22:24:02 recht Exp $
---- gnats/Makefile.in.orig 2003-07-27 01:23:17.000000000 +0200
-+++ gnats/Makefile.in 2003-10-16 15:46:10.000000000 +0200
-@@ -91,7 +91,7 @@
+--- gnats/Makefile.in.orig 2005-02-24 21:35:55.000000000 +0100
++++ gnats/Makefile.in
+@@ -93,7 +93,7 @@ M4 = @M4@
INSTALL = $(srcdir)/../install-sh -c
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -11,12 +11,104 @@ $NetBSD: patch-aa,v 1.2 2004/11/10 21:34:46 soren Exp $
INSTALL_DATA = @INSTALL_DATA@
SUB_INSTALL = `echo $(INSTALL) | sed 's,^\([^/]\),../\1,'`
-@@ -386,7 +386,7 @@
- $(INSTALL_SCRIPT) edit-pr $(bindir)/edit-pr
- $(INSTALL_SCRIPT) $(srcdir)/diff-prs $(libexecdir)/gnats/diff-prs
- $(INSTALL_SCRIPT) mail-agent $(libexecdir)/gnats/mail-agent
-- $(INSTALL_PROGRAM) file-pr $(libexecdir)/gnats/file-pr
-+ $(INSTALL_SCRIPT) file-pr $(libexecdir)/gnats/file-pr
- $(INSTALL_PROGRAM) pr-age $(libexecdir)/gnats/pr-age
- $(INSTALL_PROGRAM) pr-edit $(libexecdir)/gnats/pr-edit
+@@ -250,7 +250,7 @@ diff-prs: diff-prs.sh Makefile
+
+ mkcat: mkcat.sh Makefile
+ @echo Creating mkcat...
+- @cat $(srcdir)/mkcat.sh > $@-t
++ @sed -e 's,xBINDIRx,$(bindir),g' $(srcdir)/mkcat.sh > $@-t
+ @mv $@-t $@
+ @chmod a+x $@
+
+@@ -265,7 +265,7 @@ mkdb: mkdb.sh Makefile
+
+ rmcat: rmcat.sh Makefile
+ @echo Creating rmcat...
+- @cat $(srcdir)/rmcat.sh > $@-t
++ @sed -e 's,xBINDIRx,$(bindir),g' $(srcdir)/rmcat.sh > $@-t
+ @mv $@-t $@
+ @chmod a+x $@
+
+@@ -369,7 +369,7 @@ install-tools-arch-dep: install-tools-bi
+
+ install-tools-arch-indep: all-tools
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)/gnats
+- $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(sysconfdir)/gnats/defaults
++ $(SHELL) $(srcdir)/../mkinstalldirs %%GNATS_DEFAULTS%%
+ @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
+ echo "chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats" ; \
+ chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats ; \
+@@ -379,9 +379,9 @@ install-tools-arch-indep: all-tools
+ $(INSTALL_DATA) $(srcdir)/gnats.el $(DESTDIR)$(lispdir)/gnats.el
+ for i in categories submitters responsible gnatsd.user_access addresses states classes dbconfig ; do \
+ if [ -f "$$i" ] ; then \
+- $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir)/gnats/defaults/$$i ; \
++ $(INSTALL_DATA) $$i %%GNATS_DEFAULTS%%/$$i ; \
+ else \
+- $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/gnats/defaults/$$i ; \
++ $(INSTALL_DATA) $(srcdir)/$$i %%GNATS_DEFAULTS%%/$$i ; \
+ fi ; \
+ done
+
+@@ -391,7 +391,7 @@ install-tools-bin: all-tools
+ $(INSTALL_SCRIPT) edit-pr $(DESTDIR)$(bindir)/edit-pr
+ $(INSTALL_SCRIPT) diff-prs $(DESTDIR)$(libexecdir)/gnats/diff-prs
+ $(INSTALL_SCRIPT) mail-agent $(DESTDIR)$(libexecdir)/gnats/mail-agent
+- $(INSTALL_PROGRAM) file-pr $(DESTDIR)$(libexecdir)/gnats/file-pr
++ $(INSTALL_SCRIPT) file-pr $(DESTDIR)$(libexecdir)/gnats/file-pr
+ $(INSTALL_PROGRAM) pr-age $(DESTDIR)$(libexecdir)/gnats/pr-age
+ $(INSTALL_PROGRAM) pr-edit $(DESTDIR)$(libexecdir)/gnats/pr-edit
@if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
+@@ -409,29 +409,42 @@ install-gnats: install-gnats-bin install
+ install-gnats-arch-dep: install-gnats-bin $(EXTRA_INSTALL)
+
+ install-gnats-arch-indep: all-gnats install-tools-arch-indep
+- @if [ -f $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ]; then \
+- echo "Not putting gnats-databases file in $(DESTDIR)$(GLOBAL_DB_LIST_FILE), it's already there." ; \
++ @if [ -f %%EGDIR%%/databases ]; then \
++ echo "Not putting gnats-databases file in %%EGDIR%%/databases, it's already there." ; \
+ true ; \
+ else \
+ if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
+ $(INSTALL_DATA) -o $(GNATS_USER) gnats-databases \
+- $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ; \
++ %%EGDIR%%/databases ; \
+ else \
+- $(INSTALL_DATA) gnats-databases $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ; \
+- echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GLOBAL_DB_LIST_FILE)" ; \
++ $(INSTALL_DATA) gnats-databases %%EGDIR%%/databases ; \
++ echo "*** Warning: Must chown $(GNATS_USER) %%EGDIR%%/databases" ; \
+ fi \
+ fi
+- @if [ -f $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ]; then \
+- echo "Not putting gnats.host_access file in $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE), it's already there." ; \
++ @if [ -f %%EGDIR%%/gnatsd.host_access ]; then \
++ echo "Not putting gnats.host_access file in %%EGDIR%%/gnatsd.host_access, it's already there." ; \
+ true ; \
+ else \
+ if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
+ $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/gnatsd.host_access \
+- $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ; \
++ %%EGDIR%%/gnatsd.host_access ; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/gnatsd.host_access \
+- $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ; \
+- echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE)" ; \
++ %%EGDIR%%/gnatsd.host_access ; \
++ echo "*** Warning: Must chown $(GNATS_USER) %%EGDIR%%/gnatsd.host_access" ; \
++ fi \
++ fi
++ @if [ -f %%EGDIR%%/gnatsd.user_access ]; then \
++ echo "Not putting gnats.user_access file in %%EGDIR%%/gnatsd.user_access, it's already there." ; \
++ true ; \
++ else \
++ if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
++ $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/gnatsd.user_access \
++ %%EGDIR%%/gnatsd.user_access ; \
++ else \
++ $(INSTALL_DATA) $(srcdir)/gnatsd.user_access \
++ %%EGDIR%%/gnatsd.user_access ; \
++ echo "*** Warning: Must chown $(GNATS_USER) %%EGDIR%%/gnatsd.user_access" ; \
+ fi \
+ fi
+ @echo "*** If you're a first-time user, you'll want to create a new database";
diff --git a/databases/gnats/patches/patch-ab b/databases/gnats/patches/patch-ab
index 15f21c1efbc..1abe8527bb1 100644
--- a/databases/gnats/patches/patch-ab
+++ b/databases/gnats/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.3 2004/11/10 21:34:46 soren Exp $
+$NetBSD: patch-ab,v 1.4 2005/08/27 22:24:02 recht Exp $
---- send-pr/Makefile.in.orig 2003-10-16 15:36:52.000000000 +0200
-+++ send-pr/Makefile.in 2003-10-16 15:37:04.000000000 +0200
-@@ -59,7 +59,7 @@
+--- send-pr/Makefile.in.orig 2005-02-24 19:49:23.000000000 +0100
++++ send-pr/Makefile.in
+@@ -55,7 +55,7 @@ RANLIB = ranlib
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@@ -11,3 +11,17 @@ $NetBSD: patch-ab,v 1.3 2004/11/10 21:34:46 soren Exp $
CFLAGS = -g
LDFLAGS = -g
+@@ -121,11 +121,11 @@ install-norm-arch-dep: all
+ $(INSTALL_DATA) send-pr.1 $(DESTDIR)$(man1dir)/send-pr.1
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(man8dir)/
+ $(INSTALL_DATA) install-sid.8 $(DESTDIR)$(man8dir)/install-sid.8
+- $(INSTALL_DATA) $(srcdir)/send-pr.conf $(DESTDIR)$(sysconfdir)/gnats/
++ $(INSTALL_DATA) $(srcdir)/send-pr.conf %%EGDIR%%
+
+ uninstall:
+ -rm -f $(DESTDIR)$(bindir)/send-pr $(DESTDIR)$(bindir)/install-sid
+- -rm -f $(DESTDIR)$(sysconfdir)/gnats/send-pr.conf
++ -rm -f %%EGDIR%%/send-pr.conf
+ -rmdir $(DESTDIR)$(datadir)/gnats
+ -rm -f $(DESTDIR)$(man1dir)/send-pr.1
+ -rm -f $(DESTDIR)$(man1dir)/install-sid.8
diff --git a/databases/gnats/patches/patch-ac b/databases/gnats/patches/patch-ac
new file mode 100644
index 00000000000..8a0c0c4685a
--- /dev/null
+++ b/databases/gnats/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.4 2005/08/27 22:24:02 recht Exp $
+
+--- gnats/mkdb.sh.orig 2002-10-27 20:45:37.000000000 +0100
++++ gnats/mkdb.sh
+@@ -24,7 +24,7 @@
+
+ GNATS_USER=xGNATS_USERx
+ DATABASES=xGLOBAL_DB_LIST_FILEx
+-DATADIR=xSYSCONFDIRx/gnats/defaults
++DATADIR=%%GNATS_DEFAULTS%%
+ LIBEXECDIR=xLIBEXECDIRx
+
+ domkdir() {
diff --git a/databases/gnats/patches/patch-ad b/databases/gnats/patches/patch-ad
new file mode 100644
index 00000000000..817b9fa9ea0
--- /dev/null
+++ b/databases/gnats/patches/patch-ad
@@ -0,0 +1,23 @@
+$NetBSD: patch-ad,v 1.3 2005/08/27 22:24:02 recht Exp $
+
+--- gnats/mkcat.sh.orig 2001-07-30 20:42:04.000000000 +0200
++++ gnats/mkcat.sh
+@@ -36,7 +36,8 @@ while [ $# -gt 0 ]; do
+ done
+
+
+-GNATS_DB_DIR="`query-pr --print-directory-for-database`"
++QUERY_PR="xBINDIRx/query-pr"
++GNATS_DB_DIR="`$QUERY_PR --print-directory-for-database`"
+
+ # verify gnats root
+ if [ ! -d ${GNATS_DB_DIR} ] ; then
+@@ -44,7 +45,7 @@ if [ ! -d ${GNATS_DB_DIR} ] ; then
+ exit 1
+ fi
+
+-query-pr --list-categories | awk -F: '{print $1}' | while read i
++$QUERY_PR --list-categories | awk -F: '{print $1}' | while read i
+ do
+ if test -d "$GNATS_DB_DIR/$i"; then
+ true
diff --git a/databases/gnats/patches/patch-ae b/databases/gnats/patches/patch-ae
new file mode 100644
index 00000000000..4d3f05c7bc5
--- /dev/null
+++ b/databases/gnats/patches/patch-ae
@@ -0,0 +1,23 @@
+$NetBSD: patch-ae,v 1.3 2005/08/27 22:24:02 recht Exp $
+
+--- gnats/rmcat.sh.orig 2001-07-30 20:42:04.000000000 +0200
++++ gnats/rmcat.sh
+@@ -25,7 +25,8 @@ if [ $# -eq 0 ]; then
+ exit 1
+ fi
+
+-GNATS_DB_DIR="`query-pr --print-directory-for-database`"
++QUERY_PR="xBINDIRx/query-pr"
++GNATS_DB_DIR="`$QUERY_PR --print-directory-for-database`"
+
+ if [ ! -d "$GNATS_DB_DIR" ]
+ then
+@@ -34,7 +35,7 @@ then
+ fi
+
+ for i in "$@"; do
+- if query-pr --list-categories | grep "^${i}:" >/dev/null 2>&1; then
++ if $QUERY_PR --list-categories | grep "^${i}:" >/dev/null 2>&1; then
+ echo "$prog: category \`$i' is still in the categories file, please remove it."
+ continue
+ fi