Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/bnc/files/, net-irc/bnc/
Date: Sun, 28 Aug 2016 21:08:42
Message-Id: 1472418254.dce2e1a26622ec605dcec77c478e12611b96f35d.mjo@gentoo
1 commit: dce2e1a26622ec605dcec77c478e12611b96f35d
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 28 21:02:21 2016 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 28 21:04:14 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dce2e1a2
7
8 net-irc/bnc: new EAPI=6 revision respecting LDFLAGS.
9
10 Update the ebuild to EAPI=6, and update an existing patch. We already
11 had a patch that made the build system support CFLAGS, so rather than
12 add another patch, binki's patch from Bugzilla was incorporated into
13 the existing one. The result respects CFLAGS, CPPFLAGS, and LDFLAGS.
14
15 Gentoo-Bug: 338181
16
17 Package-Manager: portage-2.2.28
18
19 net-irc/bnc/bnc-2.9.4-r1.ebuild | 47 ++++++++++++++
20 net-irc/bnc/files/respect-cflags-ldflags.patch | 90 ++++++++++++++++++++++++++
21 2 files changed, 137 insertions(+)
22
23 diff --git a/net-irc/bnc/bnc-2.9.4-r1.ebuild b/net-irc/bnc/bnc-2.9.4-r1.ebuild
24 new file mode 100644
25 index 00000000..c9616ca
26 --- /dev/null
27 +++ b/net-irc/bnc/bnc-2.9.4-r1.ebuild
28 @@ -0,0 +1,47 @@
29 +# Copyright 1999-2016 Gentoo Foundation
30 +# Distributed under the terms of the GNU General Public License v2
31 +# $Id$
32 +
33 +EAPI=6
34 +
35 +MY_P="${P/-/}"
36 +DESCRIPTION="BNC (BouNCe) is used as a gateway to an IRC Server"
37 +HOMEPAGE="http://gotbnc.com/"
38 +SRC_URI="http://gotbnc.com/files/${MY_P}.tar.gz"
39 +
40 +LICENSE="GPL-2"
41 +SLOT="0"
42 +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
43 +IUSE="ssl"
44 +
45 +DEPEND="ssl? ( dev-libs/openssl:0 )"
46 +RDEPEND="${DEPEND}"
47 +
48 +S="${WORKDIR}/${MY_P}"
49 +
50 +PATCHES=(
51 + "${FILESDIR}/respect-cflags-ldflags.patch"
52 + "${FILESDIR}/${PN}-2.9.3-64bit.patch"
53 +)
54 +
55 +src_prepare() {
56 + default
57 + sed -i -e 's:./mkpasswd:/usr/bin/bncmkpasswd:' bncsetup \
58 + || die 'failed to rename mkpasswd in bncsetup'
59 +}
60 +
61 +src_configure() {
62 + econf $(use_with ssl)
63 +}
64 +
65 +src_install() {
66 + default
67 + mv "${D}"/usr/bin/{,bnc}mkpasswd \
68 + || die 'failed to rename the mkpasswd executable'
69 + dodoc example.conf motd
70 +}
71 +
72 +pkg_postinst() {
73 + einfo 'You can find an example motd/conf file here:'
74 + einfo " /usr/share/doc/${PF}"
75 +}
76
77 diff --git a/net-irc/bnc/files/respect-cflags-ldflags.patch b/net-irc/bnc/files/respect-cflags-ldflags.patch
78 new file mode 100644
79 index 00000000..ce3c30e
80 --- /dev/null
81 +++ b/net-irc/bnc/files/respect-cflags-ldflags.patch
82 @@ -0,0 +1,90 @@
83 +From e5663f7b7bd506b7af2ee7ab2e68722ade1f2a03 Mon Sep 17 00:00:00 2001
84 +From: Michael Orlitzky <michael@××××××××.com>
85 +Date: Sun, 28 Aug 2016 16:06:09 -0400
86 +Subject: [PATCH 1/1] autotools: fix --with-ssl option and respect
87 + {C,CPP,LD}FLAGS.
88 +
89 +Patch the build system to support LDFLAGS. This is a new revision of
90 +an existing Gentoo patch that made the build system support CFLAGS,
91 +and incorporates binki's patch from our bugzilla to add CPPFLAGS
92 +support.
93 +
94 +The --with-ssl option is also fixed in configure.in (it was
95 +missing a dash).
96 +
97 +Gentoo-Bug: 338181
98 +---
99 + Makefile.in | 32 +++++++++++++++++++++-----------
100 + configure.in | 2 +-
101 + 2 files changed, 22 insertions(+), 12 deletions(-)
102 +
103 +diff --git a/Makefile.in b/Makefile.in
104 +index b7c9733..f28a355 100644
105 +--- a/Makefile.in
106 ++++ b/Makefile.in
107 +@@ -1,28 +1,38 @@
108 + LIBS=@LIBS@
109 +-CFLAGS=-O3 -Wall -include config.h
110 ++CFLAGS=@CFLAGS@ -Wall
111 ++CPPFLAGS = -include config.h @CPPFLAGS@
112 + CC=@CC@
113 +
114 +-ALL: bnc mkpasswd
115 ++DESTDIR =
116 ++prefix = @prefix@
117 ++exec_prefix = @exec_prefix@
118 ++bindir = @bindir@
119 ++
120 ++all ALL: bnc mkpasswd
121 ++
122 ++install: bnc mkpasswd
123 ++ install -m 755 -d $(DESTDIR)$(bindir)
124 ++ install -m 755 bnc mkpasswd bncchk bncsetup $(DESTDIR)$(bindir)
125 +
126 + mkpasswd:mkpasswd.c
127 +- ${CC} ${CFLAGS} -o mkpasswd mkpasswd.c ${LIBS}
128 ++ ${CC} ${CFLAGS} -o mkpasswd mkpasswd.c ${LIBS} ${LDFLAGS}
129 + bnc: bnc.o conf.o server.o cmds.o ctcp.o send.o sbuf.o Makefile
130 +- ${CC} -o bnc bnc.o conf.o server.o cmds.o ctcp.o sbuf.o send.o ${LIBS}
131 ++ ${CC} -o bnc bnc.o conf.o server.o cmds.o ctcp.o sbuf.o send.o ${LIBS} ${LDFLAGS}
132 +
133 + bnc.o: config.h struct.h bnc.c Makefile
134 +- ${CC} ${CFLAGS} -c bnc.c
135 ++ ${CC} ${CPPFLAGS} ${CFLAGS} -c bnc.c
136 + conf.o: config.h struct.h conf.c Makefile
137 +- ${CC} ${CFLAGS} -c conf.c
138 ++ ${CC} ${CPPFLAGS} ${CFLAGS} -c conf.c
139 + cmds.o: config.h struct.h cmds.c Makefile
140 +- ${CC} ${CFLAGS} -c cmds.c
141 ++ ${CC} ${CPPFLAGS} ${CFLAGS} -c cmds.c
142 + ctcp.o: config.h ctcp.c Makefile
143 +- ${CC} ${CFLAGS} -c ctcp.c
144 ++ ${CC} ${CPPFLAGS} ${CFLAGS} -c ctcp.c
145 + server.o: config.h struct.h server.c Makefile
146 +- ${CC} ${CFLAGS} -c server.c
147 ++ ${CC} ${CPPFLAGS} ${CFLAGS} -c server.c
148 + send.o: send.c send.h Makefile
149 +- ${CC} ${CFLAGS} -c send.c
150 ++ ${CC} ${CPPFLAGS} ${CFLAGS} -c send.c
151 + sbuf.o: sbuf.c
152 +- ${CC} ${CFLAGS} -c sbuf.c
153 ++ ${CC} ${CPPFLAGS} ${CFLAGS} -c sbuf.c
154 +
155 + clean:
156 + rm -rf *.o *~ core bnc mkpasswd
157 +diff --git a/configure.in b/configure.in
158 +index be17af3..3552eb1 100644
159 +--- a/configure.in
160 ++++ b/configure.in
161 +@@ -35,7 +35,7 @@ AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt",)
162 + dnl Check for SSL support.
163 + AC_MSG_CHECKING(whether to enable SSL support)
164 + AC_ARG_WITH(ssl,
165 +-[ -with-ssl Enable SSL support],
166 ++[ --with-ssl Enable SSL support],
167 + [ case "$withval" in
168 + yes)
169 + AC_MSG_RESULT(yes)
170 +--
171 +2.7.3
172 +