summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald van Dijk <truedfx@gentoo.org>2008-10-06 20:24:46 +0000
committerHarald van Dijk <truedfx@gentoo.org>2008-10-06 20:24:46 +0000
commitb3ce770b4342f0874256dcdd203a86a1ef6f4c88 (patch)
tree00ac17080a962620b6a08f97e58ba1682d8a4890 /dev-lang/icon
parentamd64/x86 stable, bug #239378 (diff)
downloadgentoo-2-b3ce770b4342f0874256dcdd203a86a1ef6f4c88.tar.gz
gentoo-2-b3ce770b4342f0874256dcdd203a86a1ef6f4c88.tar.bz2
gentoo-2-b3ce770b4342f0874256dcdd203a86a1ef6f4c88.zip
Use CC/CFLAGS/LDFLAGS variables (#240234 by Diego Pettenò)
(Portage version: 2.2_rc11/cvs/Linux 2.6.26-gentoo-r1 x86_64)
Diffstat (limited to 'dev-lang/icon')
-rw-r--r--dev-lang/icon/ChangeLog8
-rw-r--r--dev-lang/icon/files/icon-9.4.3-flags.patch40
-rw-r--r--dev-lang/icon/icon-9.4.3-r4.ebuild107
3 files changed, 154 insertions, 1 deletions
diff --git a/dev-lang/icon/ChangeLog b/dev-lang/icon/ChangeLog
index 88dd3e8f46dd..5ad13baa6635 100644
--- a/dev-lang/icon/ChangeLog
+++ b/dev-lang/icon/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-lang/icon
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/icon/ChangeLog,v 1.36 2008/08/27 18:12:37 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/icon/ChangeLog,v 1.37 2008/10/06 20:24:45 truedfx Exp $
+
+*icon-9.4.3-r4 (06 Oct 2008)
+
+ 06 Oct 2008; Harald van Dijk <truedfx@gentoo.org>
+ +files/icon-9.4.3-flags.patch, +icon-9.4.3-r4.ebuild:
+ Use CC/CFLAGS/LDFLAGS variables (#240234 by Diego Pettenò)
27 Aug 2008; Raúl Porcel <armin76@gentoo.org> icon-9.4.3-r3.ebuild:
alpha/ia64/sparc/x86 stable
diff --git a/dev-lang/icon/files/icon-9.4.3-flags.patch b/dev-lang/icon/files/icon-9.4.3-flags.patch
new file mode 100644
index 000000000000..d929e776ca69
--- /dev/null
+++ b/dev-lang/icon/files/icon-9.4.3-flags.patch
@@ -0,0 +1,40 @@
+--- icon.v943src/src/common/Makefile
++++ icon.v943src/src/common/Makefile
+@@ -8,7 +8,7 @@
+ common: doincl $(OBJS) gpxmaybe
+
+ doincl: doincl.c ../h/arch.h
+- $(CC) $(CFLAGS) -o doincl doincl.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o doincl doincl.c
+ -./doincl -o ../../bin/rt.h ../h/rt.h
+
+ patchstr: patchstr.c
+@@ -29,7 +29,7 @@
+ ../h/typedefs.h ../h/mproto.h ../h/cpuconf.h
+
+ ../h/arch.h: infer.c
+- $(CC) $(CFLAGS) -o infer infer.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o infer infer.c
+ ./infer >../h/arch.h
+
+ identify.o: ../h/version.h
+@@ -46,7 +46,7 @@
+
+ # for rswitch, $(CFLAGS) is deliberately omitted (-O may cause problems)
+ rswitch.o: ../h/define.h ../h/arch.h $(RSW)
+- $(CC) -c $(RSW)
++ $(CC) $(CFLAGS) -O0 -c $(RSW)
+
+
+ # The following section is needed if changes are made to the Icon grammar,
+--- icon.v943src/src/runtime/Makefile
++++ icon.v943src/src/runtime/Makefile
+@@ -39,7 +39,7 @@
+
+ iconx: $(OBJS)
+ cd ../common; $(MAKE)
+- $(CC) $(RLINK) -o iconx $(OBJS) $(XL) $(RLIBS) $(TL)
++ $(CC) $(LDFLAGS) $(RLINK) -o iconx $(OBJS) $(XL) $(RLIBS) $(TL)
+ cp iconx ../../bin
+ strip $(SFLAGS) ../../bin/iconx$(EXE)
+
diff --git a/dev-lang/icon/icon-9.4.3-r4.ebuild b/dev-lang/icon/icon-9.4.3-r4.ebuild
new file mode 100644
index 000000000000..ea7e64168c86
--- /dev/null
+++ b/dev-lang/icon/icon-9.4.3-r4.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/icon/icon-9.4.3-r4.ebuild,v 1.1 2008/10/06 20:24:45 truedfx Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV=${PV//./}
+SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon.v${MY_PV}src.tgz"
+HOMEPAGE="http://www.cs.arizona.edu/icon/"
+DESCRIPTION="very high level language"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="X iplsrc"
+
+S="${WORKDIR}/icon.v${MY_PV}src"
+
+DEPEND="X? ( x11-proto/xextproto
+ x11-proto/xproto
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXt )
+ sys-devel/gcc"
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}"/${P}-flags.patch
+
+ # Patch the tests so that they do not fail
+ # The following files in tests/standard are patched..
+ # io.icn - change /etc/motd to /etc/gentoo-release
+ # io.std - change /etc/motd to /etc/gentoo-release
+ # kwds.std - add two lines for the two new added keywords
+ # nargs.std - a couple of functions picked up additional parameters
+ epatch "${FILESDIR}/tests-${MY_PV}.patch"
+
+ # do not prestrip files
+ find "${S}"/src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
+}
+
+src_compile() {
+ # select the right compile target. Note there are many platforms
+ # available
+ local mytarget;
+ if [[ ${CHOST} == *-darwin* ]]; then
+ mytarget="macintosh"
+ else
+ mytarget="linux"
+ fi
+
+ if use X; then
+ emake X-Configure name=${mytarget} -j1 || die
+ else
+ emake Configure name=${mytarget} -j1 || die
+ fi
+
+ echo "#define MultiThread 1" >> src/h/define.h
+ echo "#define EventMon 1" >> src/h/define.h
+ echo "#define Eve 1" >> src/h/define.h
+
+ append-flags $(test-flags -fwrapv)
+
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "Make Failed"
+}
+
+src_test() {
+ make Samples || die "Samples failed"
+ make Test || die "Test failed"
+}
+
+src_install() {
+ dodir /usr
+ dodir /usr/bin
+ dodir /usr/$(get_libdir)
+
+ make Install dest="${D}/usr/$(get_libdir)/icon" || die "Make install failed"
+ dosym /usr/$(get_libdir)/icon/bin/icont /usr/bin/icont
+ dosym /usr/$(get_libdir)/icon/bin/iconx /usr/bin/iconx
+ dosym /usr/$(get_libdir)/icon/bin/icon /usr/bin/icon
+ dosym /usr/$(get_libdir)/icon/bin/vib /usr/bin/vib
+
+ cd "${S}/man/man1"
+ doman icont.1
+ doman icon.1
+ rm -rf "${D}"/usr/$(get_libdir)/icon/man
+
+ cd "${S}/doc"
+ dodoc *.txt *.sed ../README
+ # dohtml ignores all anything except .html files, no use here
+ mkdir -p "${D}"/usr/share/doc/${PF}/html
+ cp -dpR *.htm *.gif *.jpg *.css "${D}"/usr/share/doc/${PF}/html
+ rm -rf "${D}"/usr/$(get_libdir)/icon/{doc,README}
+
+ # optional Icon Programming Library
+ if use iplsrc; then
+ cd "${S}"
+ dodir /usr/$(get_libdir)/icon/ipl
+ rm ipl/BuildBin
+ rm ipl/BuildExe
+ rm ipl/CheckAll
+ rm ipl/Makefile
+ insinto /usr/$(get_libdir)/icon
+ doins -r ipl
+ fi
+}