Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/clearsilver/files/, dev-libs/clearsilver/
Date: Thu, 01 Oct 2015 16:51:32
Message-Id: 1443718053.c73e7913519f74f7e13b6db378286fbb4930ab73.monsieurp@gentoo
1 commit: c73e7913519f74f7e13b6db378286fbb4930ab73
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 1 16:45:22 2015 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 1 16:47:33 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c73e7913
7
8 dev-libs/clearsilver: Add Java support. Fixes bug 251091.
9
10 Package-Manager: portage-2.2.18
11 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
12
13 dev-libs/clearsilver/clearsilver-0.10.5-r3.ebuild | 98 ++++++++++++++++++++++
14 .../clearsilver-0.10.5-disable-java-tests.patch | 11 +++
15 2 files changed, 109 insertions(+)
16
17 diff --git a/dev-libs/clearsilver/clearsilver-0.10.5-r3.ebuild b/dev-libs/clearsilver/clearsilver-0.10.5-r3.ebuild
18 new file mode 100644
19 index 0000000..2365d91
20 --- /dev/null
21 +++ b/dev-libs/clearsilver/clearsilver-0.10.5-r3.ebuild
22 @@ -0,0 +1,98 @@
23 +# Copyright 1999-2014 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Id$
26 +
27 +# Please note: apache, java, mono and ruby support disabled for now.
28 +# Fill a bug if you need it.
29 +#
30 +# dju@g.o, 4th July 2005
31 +
32 +EAPI=5
33 +GENTOO_DEPEND_ON_PERL="no"
34 +PYTHON_DEPEND="python? 2"
35 +
36 +inherit autotools eutils multilib perl-app python java-pkg-opt-2
37 +
38 +DESCRIPTION="Clearsilver is a fast, powerful, and language-neutral HTML template system"
39 +HOMEPAGE="http://www.clearsilver.net/"
40 +SRC_URI="http://www.clearsilver.net/downloads/${P}.tar.gz"
41 +
42 +LICENSE="Apache-1.1"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
45 +IUSE="perl python zlib perl java"
46 +
47 +DEPEND="perl? ( dev-lang/perl:= )
48 + zlib? ( sys-libs/zlib )
49 + java? ( >=virtual/jdk-1.6 )"
50 +
51 +RDEPEND="
52 + java? ( >=virtual/jre-1.6 )
53 + ${DEPEND}"
54 +
55 +DOCS=(README INSTALL)
56 +
57 +pkg_setup() {
58 + if use python; then
59 + DOCS+=(README.python)
60 + python_set_active_version 2
61 + python_pkg_setup
62 + fi
63 +
64 + if use java; then
65 + java-pkg-opt-2_pkg_setup
66 + fi
67 +}
68 +
69 +src_prepare() {
70 + epatch "${FILESDIR}"/${P}-perl_installdir.patch
71 +
72 + use zlib && epatch "${FILESDIR}"/${P}-libz.patch
73 +
74 + epatch "${FILESDIR}"/${P}-libdir.patch
75 + sed -i -e "s:GENTOO_LIBDIR:$(get_libdir):" configure.in
76 + eautoreconf
77 +
78 + # Fix for Gentoo/Freebsd
79 + [[ "${ARCH}" == FreeBSD ]] && touch ${S}/features.h ${S}/cgi/features.h
80 +
81 + if use java; then
82 + java-pkg-opt-2_src_prepare
83 + fi
84 +}
85 +
86 +src_configure() {
87 + econf \
88 + $(use_enable perl) \
89 + $(use_with perl perl /usr/bin/perl) \
90 + $(use_enable python) \
91 + $(use_with python python /usr/bin/python) \
92 + $(use_enable zlib compression) \
93 + $(use_enable java) \
94 + $(use_with java java $(java-config -O)) \
95 + "--disable-apache" \
96 + "--disable-ruby" \
97 + "--disable-csharp"
98 +
99 + # Java tests fail. Maybe investigate why?
100 + if use java; then
101 + epatch "${FILESDIR}"/${P}-disable-java-tests.patch
102 + fi
103 +}
104 +
105 +src_compile() {
106 + default
107 +}
108 +
109 +src_install () {
110 + default
111 +
112 + if use perl; then
113 + perl_delete_localpod || die "perl_delete_localpod failed"
114 + fi
115 +
116 + if use java; then
117 + java-pkg_doso "java-jni/lib${PN}-jni.so"
118 + java-pkg_dojar "java-jni/${PN}.jar"
119 + fi
120 +}
121
122 diff --git a/dev-libs/clearsilver/files/clearsilver-0.10.5-disable-java-tests.patch b/dev-libs/clearsilver/files/clearsilver-0.10.5-disable-java-tests.patch
123 new file mode 100644
124 index 0000000..de9c391
125 --- /dev/null
126 +++ b/dev-libs/clearsilver/files/clearsilver-0.10.5-disable-java-tests.patch
127 @@ -0,0 +1,11 @@
128 +--- java-jni/Makefile.orig 2015-10-01 16:20:55.775486000 +0000
129 ++++ java-jni/Makefile 2015-10-01 16:21:59.027486000 +0000
130 +@@ -26,7 +26,7 @@
131 +
132 + TARGETS = org_clearsilver_HDF.h org_clearsilver_CS.h $(NEO_UTIL_SO)
133 +
134 +-all: $(TARGETS) test
135 ++all: $(TARGETS)
136 +
137 + $(NEO_UTIL_JAVA_JAR): $(NEO_UTIL_JAVA_SRC)
138 + $(MKDIR) org/clearsilver