commit:     0648a1f24579885addb7c0d296a2b8fad2897255
Author:     Cheyenne Wills <cwills <AT> witznd <DOT> net>
AuthorDate: Sat Nov 23 23:10:24 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec  1 11:45:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0648a1f2

dev-lang/icon: add 9.5.24b

Closes: https://bugs.gentoo.org/940325
Signed-off-by: Cheyenne Wills <cwills <AT> witznd.net>
Closes: https://github.com/gentoo/gentoo/pull/39439
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/icon/Manifest            |   1 +
 dev-lang/icon/icon-9.5.24b.ebuild | 123 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 124 insertions(+)

diff --git a/dev-lang/icon/Manifest b/dev-lang/icon/Manifest
index 9799717162b1..7d6e6f0c2a14 100644
--- a/dev-lang/icon/Manifest
+++ b/dev-lang/icon/Manifest
@@ -1 +1,2 @@
 DIST icon-9.5.22e.tar.gz 3088775 BLAKE2B 
0f0019f4f4bc0ed695bcb99d927c57e1fe041047d2b2e74590d23b4cb032aa4d459f916e3571a294e6d98d68be16bc55828337320173abfb5220fc4470d54903
 SHA512 
2a718999e7fc3f1cc2ad745215a06fecb5865f890ff83e8e61c8408df0bec2dea0c3123ab1edc0c3a9ec3cd415ca0fd116c5ff93c8ce0797a5f2abf5ff79003c
+DIST icon-9.5.24b.tar.gz 3086266 BLAKE2B 
0daed4d04a58b74c6614f5e34e41340e3c2ca70ac8f8678be322b7eda874d177c9795d033e68dbbebe626774c00d805754c750f0762f006cd282e702914977e9
 SHA512 
0c92dd6f86dc2555accf8f28a485a7f3a38e4f39f41e8edcf936233303608b4eda7bfb608b33a4dde4bd38c22f084385a597f61cf1445b069478654435436584

diff --git a/dev-lang/icon/icon-9.5.24b.ebuild 
b/dev-lang/icon/icon-9.5.24b.ebuild
new file mode 100644
index 000000000000..0d4a86ec4c9d
--- /dev/null
+++ b/dev-lang/icon/icon-9.5.24b.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Very high level language"
+HOMEPAGE="https://www.cs.arizona.edu/icon/";
+
+SRC_URI="https://github.com/gtownsend/icon/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/icon-${PV}"
+
+LICENSE="public-domain HPND"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos"
+
+IUSE="X"
+
+RDEPEND="
+       X? (
+               x11-libs/libX11
+               x11-libs/libXpm
+       )"
+DEPEND="
+       ${RDEPEND}
+       X? ( x11-libs/libXt )"
+
+src_prepare() {
+       default
+       # Add CFLAGS and LDFLAGS to Makefiles as needed
+       sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' 
ipl/cfuncs/Makefile || die
+       sed -i -e 's/^CFLAGS = \(.*\)/CFLAGS = $(CFLAGS) \1/g' 
ipl/packs/loadfunc/Makefile || die
+       sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' 
ipl/packs/loadfunc/Makefile || die
+       sed -i -e 's/-o $LIBNAME $CFLAGS/& $LDFLAGS/g' ipl/cfuncs/mklib.sh || 
die
+       sed -i -e 's/$LIBNAME -fPIC/$LIBNAME -fPIC $LDFLAGS/g' 
ipl/cfuncs/mklib.sh || die
+       sed -i -e 's/$(RLINK)/& $(LDFLAGS)/g' src/runtime/Makefile || die
+
+       # executables in src/common are only used to prep the build
+       sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/common/Makefile || die
+       # executables in src/rtt are only used to perform the build
+       sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/rtt/Makefile || die
+
+       # do not prestrip files
+       find "src" -name 'Makefile' -exec sed -i -e '/strip/d' '{}' \; || die
+}
+
+src_configure() {
+       # select the right compile target.  Note there are many platforms
+       # available
+       local mytarget;
+       if [[ ${CHOST} == *-darwin* ]]; then
+               mytarget="macintosh"
+       else
+               mytarget="linux"
+       fi
+
+       # Fails if more then one make job process.
+       # This is an upstream requirement.
+       emake -j1 $(usex X X-Configure Configure) name=${mytarget}
+
+       # sanitise the Makedefs file generated by 'make Configure'
+       sed -i \
+               -e 's:-L/usr/X11R6/lib64::g' \
+               -e 's:-L/usr/X11R6/lib::g' \
+               -e 's:-I/usr/X11R6/include::g' \
+               -e 's:-I/usr/X11R6/include::g' \
+               -e '/^CFLAGS/d' \
+               Makedefs || die "sed of Makedefs failed"
+
+       if use elibc_musl; then
+               append-flags "-D_MUSL"
+       fi
+       append-flags $(test-flags -fno-strict-aliasing -fwrapv)
+}
+
+src_compile() {
+       # Fails if more then one make job process.
+       # This is an upstream requirement.
+       emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_test() {
+       emake Samples
+       emake Test
+}
+
+src_install() {
+       # Needed for make Install
+       dodir /usr/$(get_libdir)
+
+       emake Install dest="${D}/usr/$(get_libdir)/icon"
+       dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont
+       dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx
+       dosym ../$(get_libdir)/icon/bin/icon  /usr/bin/icon
+       if use X; then
+               dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib
+       fi
+
+       cd "${S}/man/man1" || die
+       doman "${PN}"t.1
+       doman "${PN}".1
+
+       cd "${S}/doc" || die
+       local DOCS=( *.txt ../README )
+
+       local HTML_DOCS=( *.{htm,gif,jpg,css} )
+       einstalldocs
+
+       # Clean up items from make Install that get installed elsewhere
+       rm -r "${ED}"/usr/$(get_libdir)/${PN}/man || die
+       rm -r "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die
+
+       cd "${S}" || die
+
+       # Install Icon Programming Library files
+
+       # Remove files only needed for building the library before copying
+       rm -v ipl/{BuildBin,BuildExe,CheckAll,Makefile,cfuncs/*.o} || die
+
+       insinto /usr/$(get_libdir)/icon
+       doins -r ipl
+}

Reply via email to