summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2006-12-10 11:40:16 +0000
committerHans de Graaff <graaff@gentoo.org>2006-12-10 11:40:16 +0000
commitd95eae29b9402460602fe4ee88c7acb06823f669 (patch)
treeafb6029d1c37e13b909d8b8787734f744d980d61 /app-editors/xemacs
parentUse sed -i; clean up a little. (diff)
downloadgentoo-2-d95eae29b9402460602fe4ee88c7acb06823f669.tar.gz
gentoo-2-d95eae29b9402460602fe4ee88c7acb06823f669.tar.bz2
gentoo-2-d95eae29b9402460602fe4ee88c7acb06823f669.zip
Fix database detection and USE flags. Now gdbm and berkdb can be used individually or together. Fixes #97786, #102540, #143580.
(Portage version: 2.1.1-r2)
Diffstat (limited to 'app-editors/xemacs')
-rw-r--r--app-editors/xemacs/ChangeLog9
-rw-r--r--app-editors/xemacs/files/digest-xemacs-21.4.19-r26
-rw-r--r--app-editors/xemacs/files/xemacs-21.4.19-db.patch84
-rw-r--r--app-editors/xemacs/xemacs-21.4.19-r2.ebuild206
4 files changed, 304 insertions, 1 deletions
diff --git a/app-editors/xemacs/ChangeLog b/app-editors/xemacs/ChangeLog
index d0a8e0e439a1..891fc9f6db7e 100644
--- a/app-editors/xemacs/ChangeLog
+++ b/app-editors/xemacs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-editors/xemacs
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/xemacs/ChangeLog,v 1.69 2006/12/09 15:52:18 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/xemacs/ChangeLog,v 1.70 2006/12/10 11:40:16 graaff Exp $
+
+*xemacs-21.4.19-r2 (10 Dec 2006)
+
+ 10 Dec 2006; Hans de Graaff <graaff@gentoo.org>
+ +files/xemacs-21.4.19-db.patch, +xemacs-21.4.19-r2.ebuild:
+ Fix database detection and USE flags. Now gdbm and berkdb can be used
+ individually or together. Fixes #97786, #102540, #143580.
09 Dec 2006; Hans de Graaff <graaff@gentoo.org> xemacs-21.4.19-r1.ebuild:
Rewrite UI configuration options; fixes #23852.
diff --git a/app-editors/xemacs/files/digest-xemacs-21.4.19-r2 b/app-editors/xemacs/files/digest-xemacs-21.4.19-r2
new file mode 100644
index 000000000000..f2cd097270f6
--- /dev/null
+++ b/app-editors/xemacs/files/digest-xemacs-21.4.19-r2
@@ -0,0 +1,6 @@
+MD5 95c531ec2639990a09e92c59a855784e NeXT_XEmacs.tar.gz 39571
+RMD160 3c2cedf75e4ece412031b20a15614a78367393f4 NeXT_XEmacs.tar.gz 39571
+SHA256 35a0d988fd4ee801572639a99798571aa9fad140ddbed1455565ae9d5e0086c7 NeXT_XEmacs.tar.gz 39571
+MD5 3f753e2cc22a428c7d775339f29c7e46 xemacs-21.4.19.tar.gz 11122888
+RMD160 5e2fdd5073934efa6c42fd44cb6d9f6588754314 xemacs-21.4.19.tar.gz 11122888
+SHA256 222600b14465963dd827e2bf5a0a9a5133eabf6333e679d20f6afd5fe5bd122d xemacs-21.4.19.tar.gz 11122888
diff --git a/app-editors/xemacs/files/xemacs-21.4.19-db.patch b/app-editors/xemacs/files/xemacs-21.4.19-db.patch
new file mode 100644
index 000000000000..cf87d60e628a
--- /dev/null
+++ b/app-editors/xemacs/files/xemacs-21.4.19-db.patch
@@ -0,0 +1,84 @@
+This patch fixes several database-related problems.
+
+dbm_open has been moved into gdbm_compat, so we check for that and include it.
+
+ndbm.h is located in /usr/include/gdbm on Gentoo, so we only check
+there, given that we don't support normal dbm installations, and we
+patch database.c as well. Not portable beyond Gentoo, but will work
+for us.
+
+The checks for Berkeley DB only took into account up to version
+3. Added checks to deal with several versions 4 as well.
+
+--- xemacs-21.4.19/configure.in 2005-12-24 01:48:14.000000000 +0100
++++ xemacs-21.4.19-db/configure.in 2006-06-11 22:43:52.000000000 +0200
+@@ -4502,7 +4502,7 @@
+
+ dnl Check for ndbm.h, required for either kind of DBM support.
+ if test "$with_database_gdbm $with_database_dbm" != "no no"; then
+- AC_CHECK_HEADER(ndbm.h, [:], [
++ AC_CHECK_HEADER(gdbm/ndbm.h, [:], [
+ test "$with_database_gdbm" = "yes" -o \
+ "$with_database_dbm" = "yes" && \
+ XE_DIE("Required DBM support cannot be provided.")
+@@ -4513,10 +4513,13 @@
+ if test "$with_database_gdbm" != "no"; then
+ AC_CHECK_LIB(gdbm, dbm_open, [
+ with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm], [
++ AC_CHECK_LIB(gdbm_compat, dbm_open, [
++ with_database_gdbm=yes with_database_dbm=no libdbm="-lgdbm_compat -lgdbm"], [
+ if test "$with_database_gdbm" = "yes"; then
+ XE_DIE("Required GNU DBM support cannot be provided.")
+ fi
+- with_database_gdbm=no])
++ with_database_gdbm=no], -lgdbm)
++ ])
+ fi
+
+ dnl Check for DBM support in libc and libdbm.
+@@ -4614,11 +4617,30 @@
+ #if DB_VERSION_MAJOR > 2
+ yes
+ #endif
+-], [AC_MSG_RESULT(3); dbfunc=db_create],[
+- AC_MSG_RESULT(2); dbfunc=db_open])],[
+- AC_MSG_RESULT(1); dbfunc=dbopen])
++], [AC_EGREP_CPP(yes,
++[#include <$db_h_file>
++#if DB_VERSION_MAJOR > 3
++yes
++#endif
++], [AC_MSG_RESULT(4); dbfunc=db_create; dbver=4],[
++ AC_MSG_RESULT(3); dbfunc=db_create; dbver=3])],[
++ AC_MSG_RESULT(2); dbfunc=db_open; dbver=2])],[
++ AC_MSG_RESULT(1); dbfunc=dbopen; dbver=1])
+ AC_CHECK_FUNC($dbfunc, with_database_berkdb=yes need_libdb=no, [
+- AC_CHECK_LIB(db, $dbfunc, with_database_berkdb=yes need_libdb=yes)])
++ AC_CHECK_LIB(db, db_create_4002, with_database_berkdb=yes need_libdb=yes)])
++ fi
++
++ dnl Berk db 4.1 decorates public functions with version information
++ if test "$have_database_berkdb" != "yes" -a "$dbver" = "4"; then
++ rm -f $tempcname
++ echo "#include <$db_h_file>" > $tempcname
++ echo "configure___ dbfunc=db_create" >> $tempcname
++ define(TAB, [ ])dnl
++ eval `$CPP -Isrc $tempcname \
++ | sed -n -e "s/[[ TAB]]*=[[ TAB\"]]*/='/" -e "s/[[ TAB\"]]*\$/'/" -e "s/^configure___//p"`
++ rm -f $tempcname
++ AC_MSG_WARN("db_create is really $dbfunc")
++ AC_CHECK_LIB(db, $dbfunc, have_database_berkdb=yes need_libdb=yes)
+ fi
+
+ if test "$with_database_berkdb" = "yes"; then
+--- xemacs-21.4.19/src/database.c 2005-12-24 01:52:35.000000000 +0100
++++ xemacs-21.4.19-db/src/database.c 2006-06-13 21:00:01.000000000 +0200
+@@ -82,7 +82,7 @@
+ #endif /* HAVE_BERKELEY_DB */
+
+ #ifdef HAVE_DBM
+-#include <ndbm.h>
++#include <gdbm/ndbm.h>
+ Lisp_Object Qdbm;
+ #endif /* HAVE_DBM */
+
diff --git a/app-editors/xemacs/xemacs-21.4.19-r2.ebuild b/app-editors/xemacs/xemacs-21.4.19-r2.ebuild
new file mode 100644
index 000000000000..81ce31a3514a
--- /dev/null
+++ b/app-editors/xemacs/xemacs-21.4.19-r2.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/xemacs/xemacs-21.4.19-r2.ebuild,v 1.1 2006/12/10 11:40:16 graaff Exp $
+
+export WANT_AUTOCONF="2.1"
+inherit autotools eutils
+
+DESCRIPTION="highly customizable open source text editor and application development system"
+HOMEPAGE="http://www.xemacs.org/"
+SRC_URI="http://ftp.xemacs.org/xemacs-21.4/${P}.tar.gz
+ http://www.malfunction.de/afterstep/files/NeXT_XEmacs.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="eolconv gif gpm pop postgres ldap xface nas dnd X jpeg tiff png mule motif freewnn canna athena neXt Xaw3d gdbm berkdb"
+
+X_DEPEND="x11-libs/libXt x11-libs/libXmu x11-libs/libXext x11-misc/xbitmaps"
+
+DEPEND="virtual/libc
+ !virtual/xemacs
+ berkdb? ( sys-libs/db )
+ gdbm? ( >=sys-libs/gdbm-1.8.3 )
+ >=sys-libs/zlib-1.1.4
+ >=dev-libs/openssl-0.9.6
+ >=media-libs/audiofile-0.2.3
+ gpm? ( >=sys-libs/gpm-1.19.6 )
+ postgres? ( >=dev-db/postgresql-7.2 )
+ ldap? ( net-nds/openldap )
+ nas? ( media-libs/nas )
+ dnd? ( x11-libs/dnd )
+ motif? ( >=x11-libs/openmotif-2.1.30 )
+ athena? ( || ( ( $X_DEPEND x11-libs/libXaw ) virtual/x11 ) )
+ Xaw3d? ( x11-libs/Xaw3d )
+ neXt? ( x11-libs/neXtaw )
+ xface? ( media-libs/compface )
+ tiff? ( media-libs/tiff )
+ png? ( =media-libs/libpng-1.2* )
+ jpeg? ( media-libs/jpeg )
+ canna? ( app-i18n/canna )
+ !amd64? ( freewnn? ( app-i18n/freewnn ) )
+ >=sys-libs/ncurses-5.2
+ X? ( || ( ( $X_DEPEND ) virtual/x11 ) )"
+
+PDEPEND="app-xemacs/xemacs-base
+ mule? ( app-xemacs/mule-base )"
+
+PROVIDE="virtual/xemacs virtual/editor"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ use neXt && unpack NeXT_XEmacs.tar.gz
+
+ cd "${S}"
+ epatch ${FILESDIR}/xemacs-21.4.19-texi.patch
+
+ # see bug 58350, 102540 and 143580
+ epatch "${FILESDIR}"/xemacs-21.4.19-db.patch
+
+ # Run autoconf. XEmacs tries to be smart by providing a stub
+ # configure.ac file for autoconf 2.59 but this throws our
+ # autotools eclass so it must be removed first.
+ rm "${S}"/configure.ac
+ eautoconf
+
+ use neXt && cp "${WORKDIR}"/NeXT.XEmacs/xemacs-icons/* "${S}"/etc/toolbar/
+}
+
+src_compile() {
+ local myconf=""
+
+ if use X; then
+
+ myconf="${myconf} --with-widgets=athena"
+ myconf="${myconf} --with-dialogs=athena"
+ myconf="${myconf} --with-menubars=lucid"
+ myconf="${myconf} --with-scrollbars=lucid"
+ if use motif ; then
+ myconf="--with-widgets=motif"
+ myconf="${myconf} --with-dialogs=motif"
+ myconf="${myconf} --with-scrollbars=motif"
+ myconf="${myconf} --with-menubars=lucid"
+ fi
+ if use athena ; then
+ myconf="--with-scrollbars=athena"
+ fi
+
+ if use Xaw3d; then
+ myconf="${myconf} --with-athena=3d"
+ elif use neXt; then
+ myconf="${myconf} --with-athena=next"
+ else
+ myconf="${myconf} --with-athena=xaw"
+ fi
+
+ use dnd && myconf="${myconf} --with-dragndrop --with-offix"
+
+ use tiff && myconf="${myconf} --with-tiff" ||
+ myconf="${myconf} --without-tiff"
+ use png && myconf="${myconf} --with-png" ||
+ myconf="${myconf} --without-png"
+ use jpeg && myconf="${myconf} --with-jpeg" ||
+ myconf="${myconf} --without-jpeg"
+ use xface && myconf="${myconf} --with-xface" ||
+ myconf="${myconf} --without-xface"
+
+ else
+ myconf="${myconf}
+ --without-x
+ --without-xpm
+ --without-dragndrop
+ --with-gif=no"
+ fi
+
+ if use mule ; then
+ myconf="${myconf} --with-mule"
+ use motif && myconf="${myconf} --with-xim=motif" ||
+ myconf="${myconf} --with-xim=xlib"
+ use canna && myconf="${myconf} --with-canna" ||
+ myconf="${myconf} --without-canna"
+ use freewnn && myconf="${myconf} --with-wnn" ||
+ myconf="${myconf} --without-wnn"
+ fi
+
+ local soundconf="native"
+
+ use nas && soundconf="${soundconf},nas"
+
+ myconf="${myconf} --with-sound=${soundconf}"
+
+ if use gdbm || use berkdb ; then
+ use gdbm && mydb="gdbm"
+
+ use berkdb && mydb="${mydb},berkdb"
+
+ myconf="${myconf} --with-database=${mydb}"
+ else
+ myconf="${myconf} --without-database"
+ fi
+
+ # fixes #21264
+ use alpha && myconf="${myconf} --with-system-malloc"
+
+ use ppc64 && myconf="${myconf} --with-system-malloc"
+
+ # Don't use econf because it uses options which this configure
+ # script does not understand (like --host).
+ ./configure ${myconf} ${EXTRA_ECONF} \
+ $(use_with gif ) \
+ $(use_with gpm ) \
+ $(use_with postgres postgresql ) \
+ $(use_with ldap ) \
+ $(use_with eolconv file-coding ) \
+ $(use_with pop ) \
+ --prefix=/usr \
+ --with-ncurses \
+ --with-msw=no \
+ --mail-locking=flock \
+ --with-site-lisp=yes \
+ --with-site-modules=yes \
+ || die
+
+ emake || die
+}
+
+src_install() {
+ make prefix="${D}"/usr \
+ mandir="${D}"/usr/share/man/man1 \
+ infodir="${D}"/usr/share/info \
+ install gzip-el || die
+
+ # Rename some applications installed in bin so that it is clear
+ # which application installed them and so that conflicting
+ # packages (emacs) can't clobber the actual applications.
+ # Addresses bug #62991.
+ for i in b2m ctags etags rcs-checkin ; do
+ mv "${D}"/usr/bin/${i} "${D}"/usr/bin/${i}-xemacs || die "mv ${i} failed"
+ dosym /usr/bin/${i}-xemacs /usr/bin/${i}
+ done
+
+ # install base packages directories
+ dodir /usr/lib/xemacs/xemacs-packages/
+ dodir /usr/lib/xemacs/site-packages/
+ dodir /usr/lib/xemacs/site-modules/
+ dodir /usr/lib/xemacs/site-lisp/
+
+ if use mule;
+ then
+ dodir /usr/lib/xemacs/mule-packages
+ fi
+
+ # remove extraneous info files
+ cd "${D}"/usr/share/info
+ rm -f dir info.info texinfo* termcap* standards*
+
+ cd "${S}"
+ dodoc BUGS CHANGES-* ChangeLog GETTING* INSTALL PROBLEMS README*
+ dodoc "${FILESDIR}"/README.Gentoo
+
+ insinto /usr/share/pixmaps
+ newins "${S}"/etc/${PN}-icon.xpm ${PN}.xpm
+
+ insinto /usr/share/applications
+ doins "${FILESDIR}"/${PN}.desktop
+}
+