Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/rxtx/files/, dev-java/rxtx/
Date: Wed, 17 Feb 2016 21:21:56
Message-Id: 1455744103.2be6be83cae43e372d0ca7a555035ac3ec73e917.chewi@gentoo
1 commit: 2be6be83cae43e372d0ca7a555035ac3ec73e917
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 17 21:20:57 2016 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 17 21:21:43 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2be6be83
7
8 dev-java/rxtx: Fix USE=lfd issue (#550908), EAPI bump, cleanups
9
10 * lockdaemon.c should include limits.h
11 * app-arch/zip can be implied using JAVA_PKG_IUSE
12 * dev-java/ant-core isn't actually needed
13 * sys-apps/xinetd is an RDEPEND, not DEPEND
14 * Use the correct -source and -target flags
15 * Remove useless elibtoolize
16 * Remove useless sed
17 * Add missing dies
18 * dohtml is bad
19
20 Package-Manager: portage-2.2.27
21
22 dev-java/rxtx/files/rxtx-2.2_pre2-limits.patch | 10 +++
23 dev-java/rxtx/rxtx-2.2_pre2-r1.ebuild | 102 +++++++++++++++++++++++++
24 2 files changed, 112 insertions(+)
25
26 diff --git a/dev-java/rxtx/files/rxtx-2.2_pre2-limits.patch b/dev-java/rxtx/files/rxtx-2.2_pre2-limits.patch
27 new file mode 100644
28 index 0000000..1e4ff4a
29 --- /dev/null
30 +++ b/dev-java/rxtx/files/rxtx-2.2_pre2-limits.patch
31 @@ -0,0 +1,10 @@
32 +--- src/lfd/lockdaemon.c.orig 2007-04-26 06:26:07.000000000 +0100
33 ++++ src/lfd/lockdaemon.c 2016-02-17 20:41:09.137509089 +0000
34 +@@ -69,6 +69,7 @@
35 + #include <errno.h>
36 + #include <signal.h>
37 + #include <pwd.h>
38 ++#include <limits.h>
39 +
40 + #define FHS
41 + #define LOCKFILEPREFIX "LCK.."
42
43 diff --git a/dev-java/rxtx/rxtx-2.2_pre2-r1.ebuild b/dev-java/rxtx/rxtx-2.2_pre2-r1.ebuild
44 new file mode 100644
45 index 0000000..8cd2fc0
46 --- /dev/null
47 +++ b/dev-java/rxtx/rxtx-2.2_pre2-r1.ebuild
48 @@ -0,0 +1,102 @@
49 +# Copyright 1999-2016 Gentoo Foundation
50 +# Distributed under the terms of the GNU General Public License v2
51 +# $Id$
52 +
53 +EAPI=5
54 +
55 +JAVA_PKG_IUSE="doc source"
56 +
57 +inherit toolchain-funcs versionator autotools java-pkg-2
58 +
59 +MY_PV="$(delete_version_separator 2)"
60 +MY_P="${PN}-${MY_PV}"
61 +
62 +DESCRIPTION="Native lib providing serial and parallel communication for Java"
63 +HOMEPAGE="http://rxtx.qbang.org/"
64 +SRC_URI="ftp://ftp.qbang.org/pub/rxtx/${MY_P}.zip"
65 +LICENSE="LGPL-2.1+"
66 +SLOT="2"
67 +KEYWORDS="~amd64 ~x86"
68 +IUSE="lfd"
69 +
70 +RDEPEND=">=virtual/jre-1.6
71 + lfd? ( sys-apps/xinetd )"
72 +
73 +DEPEND=">=virtual/jdk-1.6
74 + app-arch/unzip"
75 +
76 +S="${WORKDIR}/${MY_P}"
77 +
78 +src_prepare() {
79 + sed -i -e "s:\(\$(JAVADOC)\):\1 -d api:g" Makefile.am || die
80 + sed -i \
81 + -e "s:UTS_RELEASE::g" \
82 + -e "s:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g" \
83 + -e "s:-source ... -target ...:$(java-pkg_javac-args):g" \
84 + configure.in || die
85 +
86 + epatch \
87 + "${FILESDIR}/${PN}-2.1-7r2-lfd.diff" \
88 + "${FILESDIR}/${PN}-2.1-7r2-nouts.diff" \
89 + "${FILESDIR}/${P}-add-ttyACM.patch" \
90 + "${FILESDIR}/${P}-limits.patch"
91 +
92 + rm acinclude.m4 || die
93 + eautoreconf
94 +}
95 +
96 +src_configure() {
97 + econf \
98 + $(use_enable lfd lockfile_server)
99 +}
100 +
101 +src_compile() {
102 + emake
103 +
104 + if use lfd ; then
105 + # see INSTALL in src/ldf
106 + $(tc-getCC) ${LDFLAGS} ${CFLAGS} src/lfd/lockdaemon.c -o src/lfd/in.lfd || die
107 + fi
108 +
109 + if use doc ; then
110 + emake docs
111 + fi
112 +
113 + # Fix for src zip creation
114 + if use source ; then
115 + mkdir -p src_with_pkg/gnu || die
116 + ln -s ../../src src_with_pkg/gnu/io || die
117 + fi
118 +}
119 +
120 +src_install() {
121 + java-pkg_dojar RXTXcomm.jar
122 + java-pkg_doso ${CHOST}/.libs/*.so
123 +
124 + dodoc AUTHORS ChangeLog INSTALL PORTING TODO SerialPortInstructions.txt
125 + docinto html
126 + dodoc RMISecurityManager.html
127 +
128 + if use lfd ; then
129 + insinto /etc/xinetd.d
130 + newins "${FILESDIR}/lockfiled.xinetd" lfd
131 + dosbin src/lfd/in.lfd
132 + dodoc src/lfd/LockFileServer.rfc
133 + fi
134 +
135 + use doc && java-pkg_dojavadoc api
136 + use source && java-pkg_dosrc src_with_pkg/gnu
137 +}
138 +
139 +pkg_postinst() {
140 + if use lfd ; then
141 + elog "Don't forget to enable the LockFileServer"
142 + elog "daemon (lfd) in /etc/xinetd.d/lfd"
143 + else
144 + elog "RXTX uses UUCP style device-locks. You should"
145 + elog "add every user who needs to access serial ports"
146 + elog "to the 'uucp' group:"
147 + elog
148 + elog " usermod -aG uucp <user>"
149 + fi
150 +}