Gentoo Archives: gentoo-commits

From: Amy Liffey <amynka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-scheme/scm/, dev-scheme/scm/files/
Date: Sat, 23 Jun 2018 19:51:44
Message-Id: 1529783363.64d14f3a3d8c7558194dc648a2a1ba624f669dac.amynka@gentoo
1 commit: 64d14f3a3d8c7558194dc648a2a1ba624f669dac
2 Author: Ben Kohler <bkohler <AT> gmail <DOT> com>
3 AuthorDate: Sat Jun 23 17:59:39 2018 +0000
4 Commit: Amy Liffey <amynka <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 23 19:49:23 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64d14f3a
7
8 dev-scheme/scm: fix bug 596630, partial LDFLAGS fix, EAPI=7
9
10 LDFLAGS are now respected on the main build but
11 not plugins yet. Ebuild is also bumped to EAPI=7 and several unused
12 eclass inherits are removed.
13 Closes: https://bugs.gentoo.org/596630
14
15 Package-Manager: Portage-2.3.40, Repoman-2.3.9
16
17 .../scm/files/scm-5.5.6-respect-ldflags.patch | 12 ++
18 dev-scheme/scm/scm-5.5.6-r4.ebuild | 169 +++++++++++++++++++++
19 2 files changed, 181 insertions(+)
20
21 diff --git a/dev-scheme/scm/files/scm-5.5.6-respect-ldflags.patch b/dev-scheme/scm/files/scm-5.5.6-respect-ldflags.patch
22 new file mode 100644
23 index 00000000000..a78e7ddb5d7
24 --- /dev/null
25 +++ b/dev-scheme/scm/files/scm-5.5.6-respect-ldflags.patch
26 @@ -0,0 +1,12 @@
27 +diff -ur b/Makefile a/Makefile
28 +--- b/Makefile 2018-06-21 14:02:53.439716620 -0500
29 ++++ a/Makefile 2018-06-21 14:03:33.900568504 -0500
30 +@@ -111,7 +111,7 @@
31 +
32 + # SCMLIT -- try making this first!
33 + scmlit: $(ofiles) scmmain.o require.scm Makefile
34 +- $(LD) -o scmlit $(ofiles) scmmain.o $(LIBS)
35 ++ $(LD) $(LDFLAGS) -o scmlit $(ofiles) scmmain.o $(LIBS)
36 + $(MAKE) checklit
37 + scmflags.h: scmflags
38 + scmflags:
39 \ No newline at end of file
40
41 diff --git a/dev-scheme/scm/scm-5.5.6-r4.ebuild b/dev-scheme/scm/scm-5.5.6-r4.ebuild
42 new file mode 100644
43 index 00000000000..2d3d39bbaeb
44 --- /dev/null
45 +++ b/dev-scheme/scm/scm-5.5.6-r4.ebuild
46 @@ -0,0 +1,169 @@
47 +# Copyright 1999-2018 Gentoo Foundation
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +EAPI=7
51 +
52 +#version magic thanks to masterdriverz and UberLord using bash array instead of tr
53 +trarr="0abcdefghi"
54 +MY_PV="$(ver_cut 1)${trarr:$(ver_cut 2):1}$(ver_cut 3)"
55 +
56 +MY_P=${PN}-${MY_PV}
57 +S=${WORKDIR}/${PN}
58 +DESCRIPTION="SCM is a Scheme implementation from the author of slib"
59 +SRC_URI="http://groups.csail.mit.edu/mac/ftpdir/scm/${MY_P}.zip"
60 +HOMEPAGE="http://swiss.csail.mit.edu/~jaffer/SCM"
61 +
62 +SLOT="0"
63 +LICENSE="LGPL-3"
64 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
65 +IUSE="arrays bignums cautious dynamic-linking engineering-notation gsubr inexact ioext libscm macro ncurses posix readline regex sockets unix"
66 +
67 +BDEPEND="app-arch/unzip"
68 +DEPEND=">=dev-scheme/slib-3.1.5
69 + dev-util/cproto
70 + ncurses? ( sys-libs/ncurses:0= )
71 + readline? ( sys-libs/libtermcap-compat )"
72 +RDEPEND="${DEPEND}"
73 +
74 +PATCHES=( "${FILESDIR}/${P}-multiplefixes.patch"
75 + "${FILESDIR}/${P}-respect-ldflags.patch" )
76 +
77 +src_compile() {
78 + # SLIB is required to build SCM.
79 + local slibpath="${EPREFIX}/usr/share/slib/"
80 + if [ -n "$SCHEME_LIBRARY_PATH" ]; then
81 + einfo "using SLIB $SCHEME_LIBRARY_PATH"
82 + elif [ -d ${slibpath} ]; then
83 + export SCHEME_LIBRARY_PATH=${slibpath}
84 + fi
85 +
86 + einfo "Making scmlit"
87 + emake -j1 scmlit clean
88 +
89 + einfo "Building scm"
90 + local features=""
91 + use arrays && features+="arrays"
92 + use bignums && features+=" bignums"
93 + use cautious && features+=" cautious"
94 + use engineering-notation && features+=" engineering-notation"
95 + use inexact && features+=" inexact"
96 + use macro && features+=" macro"
97 +
98 + ( use readline ||
99 + use ncurses ||
100 + use regex ||
101 + use posix ||
102 + use ioext ||
103 + use gsubr ||
104 + use sockets ||
105 + use unix ||
106 + use dynamic-linking ) && features+=" dynamic-linking"
107 +
108 + ./build \
109 + --compiler-options="${CFLAGS}" \
110 + --linker-options="${LDFLAGS} -L${EPREFIX}/$(get_libdir)" \
111 + -s "${EPREFIX}"/usr/$(get_libdir)/scm \
112 + -F ${features:="none"} \
113 + -h system \
114 + -o scm || die
115 +
116 + einfo "Building DLLs"
117 + if use readline; then
118 + ./build \
119 + --compiler-options="${CFLAGS}" \
120 + --linker-options="${LDFLAGS}" \
121 + -h system \
122 + -F edit-line \
123 + -t dll || die
124 + fi
125 + if use ncurses ; then
126 + ./build \
127 + --compiler-options="${CFLAGS}" \
128 + --linker-options="${LDFLAGS}" \
129 + -F curses \
130 + -h system \
131 + -t dll || die
132 + fi
133 + if use regex ; then
134 + ./build \
135 + --compiler-options="${CFLAGS}" \
136 + --linker-options="${LDFLAGS}" \
137 + -c rgx.c \
138 + -h system \
139 + -t dll || die
140 + fi
141 + if use gsubr ; then
142 + ./build \
143 + --compiler-options="${CFLAGS}" \
144 + --linker-options="${LDFLAGS}" \
145 + -c gsubr.c \
146 + -h system \
147 + -t dll || die
148 + fi
149 + if use ioext ; then
150 + ./build \
151 + --compiler-options="${CFLAGS}" \
152 + --linker-options="${LDFLAGS}" \
153 + -c ioext.c \
154 + -h system \
155 + -t dll || die
156 + fi
157 + if use posix; then
158 + ./build \
159 + --compiler-options="${CFLAGS}" \
160 + --linker-options="${LDFLAGS}" \
161 + -c posix.c \
162 + -h system \
163 + -t dll || die
164 + fi
165 + if use sockets ; then
166 + ./build \
167 + --compiler-options="${CFLAGS}" \
168 + --linker-options="${LDFLAGS}" \
169 + -c socket.c \
170 + -h system \
171 + -t dll || die
172 + fi
173 + if use unix ; then
174 + ./build \
175 + --compiler-options="${CFLAGS}" \
176 + --linker-options="${LDFLAGS}" \
177 + -c unix.c \
178 + -h system \
179 + -t dll || die
180 + fi
181 +
182 + if use libscm ; then
183 + emake libscm.a
184 + fi
185 +}
186 +
187 +src_test() {
188 + emake check
189 +}
190 +
191 +src_install() {
192 + emake DESTDIR="${D}" man1dir="${EPREFIX}"/usr/share/man/man1/ \
193 + install
194 +
195 + if use libscm; then
196 + emake DESTDIR="${D}" libdir="${EPREFIX}"/usr/$(get_libdir)/ \
197 + installlib
198 + fi
199 +
200 + doinfo scm.info
201 + doinfo hobbit.info
202 +}
203 +
204 +regen_catalog() {
205 + einfo "Regenerating catalog..."
206 + scm -e "(require 'new-catalog)"
207 +}
208 +
209 +pkg_postinst() {
210 + [ "${ROOT}" == "/" ] && regen_catalog
211 +}
212 +
213 +pkg_config() {
214 + regen_catalog
215 +}
216 \ No newline at end of file