summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2008-05-27 13:23:43 +0000
committerobache <obache@pkgsrc.org>2008-05-27 13:23:43 +0000
commit15083098800e1870c601d23f7151770472b31deb (patch)
tree66a10e77fe99f1df3fe07cb065660df4bca046fb
parenteac38da1f3b1381c5a4a5d412d38e82c25dda60c (diff)
downloadpkgsrc-15083098800e1870c601d23f7151770472b31deb.tar.gz
Fix and simplify workaround for broken db4 library detection.
Should fix PR 38354. While here, add DESTDIR support.
-rw-r--r--chat/jabberd2/Makefile18
-rw-r--r--chat/jabberd2/options.mk11
2 files changed, 14 insertions, 15 deletions
diff --git a/chat/jabberd2/Makefile b/chat/jabberd2/Makefile
index 9d577ea79e1..a52f484a6cf 100644
--- a/chat/jabberd2/Makefile
+++ b/chat/jabberd2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2008/05/25 21:23:25 wiz Exp $
+# $NetBSD: Makefile,v 1.47 2008/05/27 13:23:43 obache Exp $
#
DISTNAME= jabberd-2.1.23
@@ -11,14 +11,14 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://jabberd2.xiaoka.com/
COMMENT= Instant messaging server (version 2)
+PKG_DESTDIR_SUPPORT= user-destdir
+
CONFLICTS= jabberd-[0-9]*
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
-BUILDLINK_FNAME_TRANSFORM.db4+= -e "s,/db4/,/,g"
-
SUBST_CLASSES+= path
SUBST_STAGE.path= post-patch
SUBST_FILES.path= configure
@@ -102,17 +102,17 @@ pre-configure:
post-install:
${INSTALL_DATA_DIR} ${EGDIR}
${INSTALL_DATA} ${WRKSRC}/etc/templates/roster.xml.dist.in \
- ${EGDIR}/roster.xml
- ${INSTALL_SCRIPT} ${WRKSRC}/tools/pipe-auth.pl ${BINDIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/tools/migrate.pl ${BINDIR}
+ ${DESTDIR}${EGDIR}/roster.xml
+ ${INSTALL_SCRIPT} ${WRKSRC}/tools/pipe-auth.pl ${DESTDIR}${BINDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/tools/migrate.pl ${DESTDIR}${BINDIR}
.for f in ${DBFILES}
- ${INSTALL_DATA} ${WRKSRC}/tools/${f} ${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/tools/${f} ${DESTDIR}${EGDIR}
.endfor
.for f in ${FILES}
- ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${DESTDIR}${EGDIR}
.endfor
.for f in ${DOCFILES}
- ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${DOCDIR}
.endfor
.include "../../converters/libiconv/buildlink3.mk"
diff --git a/chat/jabberd2/options.mk b/chat/jabberd2/options.mk
index eeb18bbf313..4c3f41d37e7 100644
--- a/chat/jabberd2/options.mk
+++ b/chat/jabberd2/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.20 2008/04/12 22:42:58 jlam Exp $
+# $NetBSD: options.mk,v 1.21 2008/05/27 13:23:43 obache Exp $
#
PKG_OPTIONS_VAR= PKG_OPTIONS.jabberd2
@@ -17,15 +17,14 @@ PKG_SUGGESTED_OPTIONS= auth-sqlite storage-sqlite
PLIST_VARS+= db ldap mysql pam pgsql sqlite
.if !empty(PKG_OPTIONS:Mauth-db) || !empty(PKG_OPTIONS:Mstorage-db)
+. include "../../databases/db4/buildlink3.mk"
+# XXX: configure script is broken, always using -ldb even if detect db4.
SUBST_CLASSES+= fixdb
-SUBST_STAGE.fixdb= post-configure
+SUBST_STAGE.fixdb= pre-configure
SUBST_FILES.fixdb= storage/Makefile.in
-SUBST_SED.fixdb= -e "s|@DB_LIBS@||g"
-BUILDLINK_TRANSFORM+= rm:-ldb
-BDB_ACCEPTED= db4
+SUBST_SED.fixdb= -e "s|@DB_LIBS@|${BUILDLINK_LDADD.db4}|g"
PLIST.db= yes
CONFIGURE_ARGS+= --enable-db
-. include "../../mk/bdb.buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-db
.endif