Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/icon/
Date: Sat, 15 Aug 2020 00:48:17
Message-Id: 1597452387.0050f8dfda95f7da8f70a46b1ac3218d1e3daef5.sam@gentoo
1 commit: 0050f8dfda95f7da8f70a46b1ac3218d1e3daef5
2 Author: Cheyenne Wills <cwills <AT> witznd <DOT> net>
3 AuthorDate: Thu Aug 6 05:07:17 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 15 00:46:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0050f8df
7
8 dev-lang/icon bump to 9.5.20h
9
10 Upstream has switched over from an "infrequent formal release to a
11 system of continual modifications that are immediately available
12 publicly through Github".
13
14 Going forward upstream will tag the repo and set the version number to
15 "9.5.yyx" where yy is the last two digits of the year and x is an
16 alphabetic sequence character within the year (e.g. 9.5.20h).
17
18 Create a new ebuild for icon-9.5.20h that supports the new upstream
19 source and follows upstream versioning.
20
21 Replace the use of the patches and use inline sed commands to modify the
22 Makefiles to follow Gentoo's CFLAGS/LDFLAGS policies.
23
24 The changes associated with #669330, #716212 and #732507 are included in
25 the upstream source.
26
27 Bug:https://bugs.gentoo.org/736096
28
29 Signed-off-by: Cheyenne Wills <cwills <AT> witznd.net>
30 Closes: https://github.com/gentoo/gentoo/pull/17026
31 Signed-off-by: Sam James <sam <AT> gentoo.org>
32
33 dev-lang/icon/Manifest | 1 +
34 dev-lang/icon/icon-9.5.20h.ebuild | 123 ++++++++++++++++++++++++++++++++++++++
35 2 files changed, 124 insertions(+)
36
37 diff --git a/dev-lang/icon/Manifest b/dev-lang/icon/Manifest
38 index 5d01276f401..ca1e99e8a18 100644
39 --- a/dev-lang/icon/Manifest
40 +++ b/dev-lang/icon/Manifest
41 @@ -1 +1,2 @@
42 +DIST icon-9.5.20h.tar.gz 3137602 BLAKE2B 093290f7df4d0c1686b57c1debabdae5ab607fab00849885fd97b68b872db9d360e9ffe61b7be2e503f5ffa70a387011128c65586b0d48e298577d0ca690a729 SHA512 c3dec5d9d6f2e01fb27b09897cf9e54103749e64e64feb6503e1d25a00bf7da498e40207d8d220af8aca134df6fb281484bd8c8444d256f04ddc39de6a23ca1f
43 DIST icon-v951src.tgz 3133040 BLAKE2B 790a66a8210c1b9c55514a560590f08d3e52d7c5115d60554183f1118b5705fc1754b8188dcc3b5b739318374d568b6eafc1e3c4266de5416709e7ce6056925b SHA512 032dc9cfa57af5af2eb84b2116d0537124b5efb87b7cf744ecace2ccf49e461d5be5f91df99d85e8a988520d144fe4ecf06a6e78f7fff997b78afa95355449ad
44
45 diff --git a/dev-lang/icon/icon-9.5.20h.ebuild b/dev-lang/icon/icon-9.5.20h.ebuild
46 new file mode 100644
47 index 00000000000..1c915dca803
48 --- /dev/null
49 +++ b/dev-lang/icon/icon-9.5.20h.ebuild
50 @@ -0,0 +1,123 @@
51 +# Copyright 1999-2020 Gentoo Authors
52 +# Distributed under the terms of the GNU General Public License v2
53 +
54 +EAPI=7
55 +
56 +inherit flag-o-matic toolchain-funcs
57 +
58 +DESCRIPTION="very high level language"
59 +HOMEPAGE="http://www.cs.arizona.edu/icon/"
60 +
61 +SRC_URI="https://github.com/gtownsend/icon/archive/v${PV}.tar.gz -> ${P}.tar.gz"
62 +
63 +LICENSE="public-domain HPND"
64 +SLOT="0"
65 +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
66 +IUSE="X iplsrc"
67 +
68 +S="${WORKDIR}/icon-${PV}"
69 +
70 +RDEPEND="
71 + X? ( x11-libs/libX11:= )"
72 +DEPEND="
73 + ${RDEPEND}
74 + X? (
75 + x11-libs/libXpm
76 + x11-libs/libXt
77 + )"
78 +
79 +src_prepare() {
80 + default
81 + # Add CFLAGS and LDFLAGS to Makefiles as needed
82 + sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' ipl/cfuncs/Makefile || die
83 + sed -i -e 's/^CFLAGS = \(.*\)/CFLAGS = $(CFLAGS) \1/g' ipl/packs/loadfunc/Makefile || die
84 + sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' ipl/packs/loadfunc/Makefile || die
85 + sed -i -e 's/-o $LIBNAME $CFLAGS/& $LDFLAGS/g' ipl/cfuncs/mklib.sh || die
86 + sed -i -e 's/$(RLINK)/& $(LDFLAGS)/g' src/runtime/Makefile || die
87 +
88 + # executables in src/common are only used to prep the build
89 + sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/common/Makefile || die
90 + # executables in src/rtt are only used to perform the build
91 + sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/rtt/Makefile || die
92 +
93 + # do not prestrip files
94 + find src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
95 +}
96 +
97 +src_configure() {
98 + # select the right compile target. Note there are many platforms
99 + # available
100 + local mytarget;
101 + if [[ ${CHOST} == *-darwin* ]]; then
102 + mytarget="macintosh"
103 + else
104 + mytarget="linux"
105 + fi
106 +
107 + # Fails if more then one make job process.
108 + # This is an upstream requirement.
109 + emake -j1 $(usex X X-Configure Configure) name=${mytarget}
110 +
111 + # sanitise the Makedefs file generated by Configure
112 + sed -i \
113 + -e 's:-L/usr/X11R6/lib64::g' \
114 + -e 's:-L/usr/X11R6/lib::g' \
115 + -e 's:-I/usr/X11R6/include::g' \
116 + -e 's:-I/usr/X11R6/include::g' \
117 + -e '/^CFLAGS/d' \
118 + Makedefs || die "sed of Makedefs failed"
119 +
120 + if use elibc_musl; then
121 + append-flags "-D_MUSL"
122 + fi
123 + append-flags $(test-flags -fno-strict-aliasing -fwrapv)
124 +}
125 +
126 +src_compile() {
127 + # Fails if more then one make job process.
128 + # This is an upstream requirement.
129 + emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
130 +}
131 +
132 +src_test() {
133 + emake Samples
134 + emake Test
135 +}
136 +
137 +src_install() {
138 + # Needed for make Install
139 + dodir /usr/$(get_libdir)
140 +
141 + emake Install dest="${D}/usr/$(get_libdir)/icon"
142 + dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont
143 + dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx
144 + dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon
145 + if use X; then
146 + dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib
147 + fi
148 +
149 + cd "${S}/man/man1" || die
150 + doman "${PN}"t.1
151 + doman "${PN}".1
152 +
153 + cd "${S}/doc" || die
154 + DOCS=( *.txt ../README )
155 +
156 + HTML_DOCS=( *.{htm,gif,jpg,css} )
157 + einstalldocs
158 +
159 + # Clean up items from make Install that get installed elsewhere
160 + rm -rf "${ED}"/usr/$(get_libdir)/${PN}/man || die
161 + rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die
162 +
163 + # optional Icon Programming Library
164 + if use iplsrc; then
165 + cd "${S}" || die
166 +
167 + # Remove unneeded files before copy
168 + rm -fv ipl/{BuildBin,BuildExe,CheckAll,Makefile} || die
169 +
170 + insinto /usr/$(get_libdir)/icon
171 + doins -r ipl
172 + fi
173 +}