summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Pawlik <nelchael@gentoo.org>2009-05-24 22:32:51 +0000
committerKrzysztof Pawlik <nelchael@gentoo.org>2009-05-24 22:32:51 +0000
commitd2a5b0d345e40c450ac786537811a23a5c01cbb4 (patch)
treeddd752ad7469208724ccd0fe9691fa5349189cde /dev-libs/protobuf
parentInitial commit. This package provides files for building the LXDE application... (diff)
downloadgentoo-2-d2a5b0d345e40c450ac786537811a23a5c01cbb4.tar.gz
gentoo-2-d2a5b0d345e40c450ac786537811a23a5c01cbb4.tar.bz2
gentoo-2-d2a5b0d345e40c450ac786537811a23a5c01cbb4.zip
Add emacs USE flag, see bug #271007.
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/protobuf')
-rw-r--r--dev-libs/protobuf/ChangeLog7
-rw-r--r--dev-libs/protobuf/files/70protobuf-gentoo.el3
-rw-r--r--dev-libs/protobuf/files/protobuf-2.1.0-fix-emacs-byte-compile.patch15
-rw-r--r--dev-libs/protobuf/protobuf-2.1.0.ebuild32
4 files changed, 50 insertions, 7 deletions
diff --git a/dev-libs/protobuf/ChangeLog b/dev-libs/protobuf/ChangeLog
index ff13d6ee46b3..cf9cc16b0553 100644
--- a/dev-libs/protobuf/ChangeLog
+++ b/dev-libs/protobuf/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-libs/protobuf
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/ChangeLog,v 1.6 2009/05/18 19:28:15 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/ChangeLog,v 1.7 2009/05/24 22:32:50 nelchael Exp $
+
+ 24 May 2009; Krzysiek Pawlik <nelchael@gentoo.org>
+ +files/70protobuf-gentoo.el, protobuf-2.1.0.ebuild,
+ +files/protobuf-2.1.0-fix-emacs-byte-compile.patch:
+ Add emacs USE flag, see bug #271007.
18 May 2009; Krzysiek Pawlik <nelchael@gentoo.org>
-protobuf-2.0.0_beta.ebuild, -protobuf-2.0.1.ebuild,
diff --git a/dev-libs/protobuf/files/70protobuf-gentoo.el b/dev-libs/protobuf/files/70protobuf-gentoo.el
new file mode 100644
index 000000000000..51370527f6f2
--- /dev/null
+++ b/dev-libs/protobuf/files/70protobuf-gentoo.el
@@ -0,0 +1,3 @@
+(add-to-list 'load-path "@SITELISP@")
+(add-to-list 'auto-mode-alist '("\\.proto\\'" . protobuf-mode))
+(autoload 'protobuf-mode "protobuf-mode" "Google protobuf mode." t)
diff --git a/dev-libs/protobuf/files/protobuf-2.1.0-fix-emacs-byte-compile.patch b/dev-libs/protobuf/files/protobuf-2.1.0-fix-emacs-byte-compile.patch
new file mode 100644
index 000000000000..8a2381a47083
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-2.1.0-fix-emacs-byte-compile.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/271007
+Fix error with byte-compilation in Emacs.
+
+--- protobuf-2.1.0-orig/editors/protobuf-mode.el 2009-05-13 22:36:40.000000000 +0200
++++ protobuf-2.1.0/editors/protobuf-mode.el 2009-05-24 13:37:04.000000000 +0200
+@@ -71,7 +71,8 @@
+
+ ;; This mode does not inherit properties from other modes. So, we do not use
+ ;; the usual `c-add-language' function.
+-(put 'protobuf-mode 'c-mode-prefix "protobuf-")
++(eval-and-compile
++ (put 'protobuf-mode 'c-mode-prefix "protobuf-"))
+
+ ;; The following code uses of the `c-lang-defconst' macro define syntactic
+ ;; features of protocol buffer language. Refer to the documentation in the
diff --git a/dev-libs/protobuf/protobuf-2.1.0.ebuild b/dev-libs/protobuf/protobuf-2.1.0.ebuild
index f38718a4c429..a821620fbb5f 100644
--- a/dev-libs/protobuf/protobuf-2.1.0.ebuild
+++ b/dev-libs/protobuf/protobuf-2.1.0.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/protobuf-2.1.0.ebuild,v 1.2 2009/05/18 19:28:15 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/protobuf-2.1.0.ebuild,v 1.3 2009/05/24 22:32:50 nelchael Exp $
EAPI="2"
JAVA_PKG_IUSE="source"
-inherit eutils distutils python java-pkg-opt-2
+inherit eutils distutils python java-pkg-opt-2 elisp-common
DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding structured data"
HOMEPAGE="http://code.google.com/p/protobuf/"
@@ -15,14 +15,17 @@ SRC_URI="http://protobuf.googlecode.com/files/${PF}.tar.bz2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="examples java python vim-syntax"
+IUSE="emacs examples java python vim-syntax"
DEPEND="${DEPEND} java? ( >=virtual/jdk-1.5 )
- python? ( dev-python/setuptools )"
-RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.5 )"
+ python? ( dev-python/setuptools )
+ emacs? ( virtual/emacs )"
+RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.5 )
+ emacs? ( virtual/emacs )"
src_prepare() {
- epatch "${FILESDIR}/protobuf-2.0.3-decoder_test_64bit_fix.patch"
+ epatch "${FILESDIR}/${PN}-2.0.3-decoder_test_64bit_fix.patch"
+ epatch "${FILESDIR}/${PN}-2.1.0-fix-emacs-byte-compile.patch"
}
src_compile() {
@@ -40,6 +43,10 @@ src_compile() {
popd
jar cf "${PN}.jar" -C java/build . || die "jar failed"
fi
+
+ if use emacs; then
+ elisp-compile "${S}/editors/protobuf-mode.el" || die "elisp-compile failed!"
+ fi
}
src_install() {
@@ -55,6 +62,11 @@ src_install() {
doins editors/proto.vim
fi
+ if use emacs; then
+ elisp-install ${PN} editors/protobuf-mode.el* || die "elisp-install failed!"
+ elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
+ fi
+
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins -r examples/* || die "doins examples failed"
@@ -74,3 +86,11 @@ src_test() {
cd ..
fi
}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}