Permalink
Browse files

added racket

  • Loading branch information...
1 parent dfbed12 commit 9d7d0335a8021e888a80d6311cea8e880ba1eaa1 Jean-Christophe Petkovich committed Oct 7, 2010
@@ -0,0 +1,4 @@
+AUX racket-5.0.1-hack_makefile_in_temp01.patch 1496 RMD160 2df57dd0df6c6322cf8beb06e57bd34f3214594e SHA1 cbf9dce59a4abe286edd01d20999c3523a750732 SHA256 e84c7dd9c2dbd8b934bf7fa6a5ce2fded5378d4f848b42681d0563d4d9d427cc
+AUX racket-5.0.1-libpng14.patch 603 RMD160 bc4aab23dcd4fffecaadefbeda138080ddeb4f8d SHA1 2cf4b73023b58e452439e676916ad94b67daddcf SHA256 542538613d34fdfc2339f963646a8e06c5f67bf7c0f4fc3a78c85deec511e9b7
+DIST racket-5.0.1-src-unix.tgz 17272590 RMD160 002d70134b7c7fe2121cc854c9a08a9b9b92a21a SHA1 3109294115184c96d260fef4458a866975a7c847 SHA256 763b5d6615b66c088d00b789e729cfdae75770d5f13d7e2d4508e5ddd7ff7fa1
+EBUILD racket-5.0.1.ebuild 3943 RMD160 1d3913bb518f34bfa29c5bebf4e6ad1738b8cb0b SHA1 27c4df2c55961559e33c723f0560a20dafead177 SHA256 0672cc99a217e93474c2a5812231eb1c46e162fb6d63e46825222d1213efd394
@@ -0,0 +1,37 @@
+diff -u -r a/Makefile.in b/Makefile.in
+--- a/Makefile.in 2010-03-17 20:22:06.000000000 +0200
++++ b/Makefile.in 2010-04-18 22:23:49.000000000 +0300
+@@ -60,9 +60,6 @@
+ $(MAKE) install-@MAIN_VARIANT@
+
+ plain-install:
+- if [ "$(DESTDIR)" != "" ]; then \
+- echo "cannot use plain-install with DESTDIR=$(DESTDIR)"; exit 1; \
+- fi
+ $(MAKE) plain-install-@MAIN_VARIANT@
+
+ install-common-first:
+diff -u -r a/gracket/Makefile.in b/gracket/Makefile.in
+--- a/gracket/Makefile.in 2010-03-17 20:22:01.000000000 +0200
++++ b/gracket/Makefile.in 2010-04-19 14:50:10.000000000 +0300
+@@ -280,8 +280,6 @@
+ $(MAKE) install-@WXVARIANT@-post-collects
+
+ install-common:
+- cd ..; rm -f "$(DESTDIR)$(bindir)/gracket@CGC_INSTALLED@"
+- cd ..; rm -f "$(DESTDIR)$(bindir)/gracket@MMM_INSTALLED@"
+ cd ..; echo 'CXX=@CXX@' >> $(BUILDINFO)
+ cd ..; echo 'CXXFLAGS=@CXXFLAGS@ @PREFLAGS@ @COMPFLAGS@' >> $(BUILDINFO)
+ cd ..; echo 'MROPTIONS=@MROPTIONS@' >> $(BUILDINFO)
+diff -u -r a/racket/Makefile.in b/racket/Makefile.in
+--- a/racket/Makefile.in 2010-03-17 20:22:06.000000000 +0200
++++ b/racket/Makefile.in 2010-04-19 14:49:49.000000000 +0300
+@@ -277,8 +277,6 @@
+ # have to go up and install things from there.
+
+ unix-install:
+- cd ..; rm -f "$(DESTDIR)$(bindir)/racket@CGC_INSTALLED@"
+- cd ..; rm -f "$(DESTDIR)$(bindir)/racket@MMM_INSTALLED@"
+ cd ..; cp racket/starter "$(DESTDIR)$(libpltdir)/starter"
+ cd ..; $(STRIP_DEBUG) "$(DESTDIR)$(libpltdir)/starter"
+ cd ..; echo 'CC=@CC@' > "$(BUILDINFO)"
@@ -0,0 +1,15 @@
+diff -u -r a/plt-4.2.5/src/wxcommon/wxJPEG.cxx b/plt-4.2.5/src/wxcommon/wxJPEG.cxx
+--- a/plt-4.2.5/src/wxcommon/wxJPEG.cxx 2010-03-17 20:22:03.000000000 +0200
++++ b/plt-4.2.5/src/wxcommon/wxJPEG.cxx 2010-05-11 18:16:06.000000000 +0300
+@@ -726,7 +726,11 @@
+ png_set_strip_16(png_ptr);
+
+ /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
++ #if PNG_LIBPNG_VER < 10400
+ png_set_gray_1_2_4_to_8(png_ptr);
++ #else
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
++ #endif
+ }
+
+ /* Set the background color to draw transparent and alpha images over.
@@ -0,0 +1,141 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="3"
+inherit eutils
+SRC_URI="http://download.racket-lang.org/installers/${PV}/${PN}/${P}-src-unix.tgz"
+DESCRIPTION="Programming environment based on Scheme."
+HOMEPAGE="http://www.racket-lang.org"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+#KEYWORDS="~amd64"
+IUSE="-backtrace cairo cgc doc opengl profile X slatex sgc -futures -places +foreign static -plain"
+# jit
+RDEPEND="X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXft
+ x11-libs/libXrender
+ media-libs/jpeg
+ media-libs/libpng
+ opengl? ( virtual/opengl )
+ cairo? ( x11-libs/cairo[X] ) )
+ slatex? ( virtual/latex-base )"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/plt-${PV}/src/build"
+ECONF_SOURCE="${S}/.."
+MY_PNUM="01"
+
+pkg_setup() {
+ if use cgc && use sgc ; then
+ die "You cannot use both cgc and sgc USE flags, you have to choose one of them"
+ fi
+ for my_flag in backtrace futures places
+ do
+ if use "${my_flag}" ; then
+ ewarn "${my_flag} USE flag is known that may make ${P} compilation"
+ ewarn "to fail. Please remove it, if the ebuild fails for you. "
+ fi
+ done
+ if use cairo || use opengl ; then
+ if ! use X ; then
+ ewarn "cairo and opengl USE flags support features that are disabled"
+ ewarn "by ${P} build system when you haven't enabled the X USE flag."
+ fi
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ mkdir -v "${S}" || die "failed to create build dir"
+}
+
+src_prepare() {
+ #( cd .. && rm -Rv wxcommon && rm -Rv foreign ) \
+ #|| die "failed to remove dir of bundled libraries"
+ #rm -Rv ../wxcommon/{jpeg,libpng,zlib} ../../collects \
+ #|| die "failed to remove dir of bundled libraries"
+ #rm -Rv ../wxcommon/{jpeg,libpng,zlib} ../wxxt \
+ rm -Rv ../wxcommon/{jpeg,libpng,zlib} \
+ || die "failed to remove dir of bundled libraries"
+ sed -i -e "s/docdir=\"\${datadir}\/racket\/doc\"/docdir=\"\${datadir}\/doc\/${PF}\"/" ../configure || die "sed failed"
+ pushd ..
+ epatch "${FILESDIR}/${P}-hack_makefile_in_temp${MY_PNUM}.patch"
+ epatch "${FILESDIR}/${P}-libpng14.patch"
+ popd
+ #sed -i -e 's/#! \/bin\/sh/#! \/bin\/sh -x/g' ../configure \
+ #|| die "sed failed"
+}
+
+src_configure() {
+ local myconf=""
+ if use static; then
+ myconf="--disable-shared"
+ else
+ myconf="--enable-shared"
+ fi
+ econf \
+ $(use_enable doc docs) \
+ $(use_enable X gracket) \
+ $(use_enable X xrender) \
+ $(use_enable X xft) \
+ $(use_enable opengl gl) \
+ $(use_enable cairo) \
+ $(use_enable profile gprof) \
+ $(use_enable backtrace) \
+ $(use_enable sgc) \
+ $(use_enable futures) \
+ $(use_enable places) \
+ $(use_enable foreign) \
+ --enable-jit \
+ --enable-libpng \
+ --enable-libjpeg \
+ --enable-pthread \
+ --enable-account \
+ --disable-sgcdebug \
+ --disable-compact \
+ --disable-smalloskit \
+ --disable-oskit \
+ --disable-wbuild \
+ --disable-perl \
+ $(use_with X x) \
+ ${myconf} \
+ || die "Configure script failed"
+}
+
+src_compile() {
+ emake || die "emake default target(3m) failed"
+ if use cgc || use sgc ; then
+ time emake cgc || die "emake cgc-install target failed"
+ fi
+}
+
+src_install() {
+ local pla1n=""
+ if use plain; then
+ pla1n="plain-"
+ fi
+ time emake DESTDIR="${D}" "${pla1n}"install || die "emake install failed"
+ if use cgc || use sgc ; then
+ time emake DESTDIR="${D}" "${pla1n}"install-cgc || die "emake cgc target failed"
+ fi
+ if use X; then
+ newicon ../../collects/icons/PLT-206.png drscheme.png
+ make_desktop_entry drscheme "DrScheme" drscheme "Development"
+ fi
+ # deal with slatex
+ if use slatex; then
+ if ! use plain; then
+ pushd "${D}"/usr/bin
+ { rename slatex plt-slatex slatex* && rename pdf-slatex plt-pdf-slatex pdf-slatex* ; } || die "Failed to rename slatex* to plt-slatex*"
+ popd
+ fi
+ insinto /usr/share/texmf/tex/latex/slatex/
+ newins ../../collects/slatex/slatex.sty plt-slatex.sty
+ else
+ if ! use plain; then
+ rm -Rfv "${D}"/usr/bin/*slatex* || die "Failed to delete slatex files"
+ fi
+ fi
+}

0 comments on commit 9d7d033

Please sign in to comment.