ebuild for latest version of smlnj I could improve it if I could figure out howto: Copy a file from the distfile dir to the working dir Download file to an alternate name in distfiles
Created attachment 5224 [details] smlnj ebuild
Hi Vadim Thank you for your submission. I quickly glanced at the ebuild, and I need some more info in order to process it: 1. Please, *please* include the full file name of the ebuild into the text of your submissin. Specifically, what is the version? 2. The seding you do at the top is unnecessary - you may use ${PV} instead. In short: ${P}="${PN}-${PV}" ${PF}="${P}-${PR}" (and just in case ${PVR}="${PV}-${PR}") scan through /usr/lib/pythonx.x/site-packages/portage.py for more... George
The filename is smlnj-110.42.ebuild Sorry. forgot to include it. Yeah, ${PV} works too ... I didn't see it on the doc page. ./config/install.sh should be ./config/install.sh || die There's also some things I need to fix before I will be happy with the ebuild. Do you know where I can find answers to any of the questions in my first comment?
Created attachment 5639 [details] smlnj-110.42.ebuild
Hi Vadim. Sorry for the delay with the responce. The new ebuild looks clean now. As for your questions: >Copy a file from the distfile dir to the working dir cp ${DISTDIR}/whatever whereever you can use ${DISTDIR}/${A} if the file is in the SRC_URI >Download file to an alternate name in distfiles What is the goal you are trying to achieve? Could you please give some more details? So, should I await the update or process this one? Thanks for contribution! George
Wait for an update. Or you can put it into portage, but mark it as testing. When the smlnj installer runs, it tries to download some files from the site. I want to have the ebuild file to do it instead (would be much better), but I'm afraid the files for smlnj have rather ununique names. Things like 'runtime.tgz'... With the information you provided, I'll hack up a better ebuild shortly.
Created attachment 6373 [details] smlnj-110.42.ebuild New version ... now emerge downloads the necessary files instead of the smlnj script. smlnj still chokes when it tries to autoload any of its libraries (which is pretty bad), but I'm not sure of the solution yet. I'll have to dig around.
Created attachment 6727 [details] smlnj-110.42.ebuild smlnj-110.42.ebuild Now sets SMLNJ_HOME variable so that autoloading works. This is ready to go into portage. I only tested it on x86.
Created attachment 6784 [details] Some improvements over the last version Here are several issues I found with the last version of the ebuild specification, which issues I have addressed in the file I'm attaching: 1. In src_compile, if the SMLNJ_HOME environment variable is set (e.g. from a previous install), the SML/NJ install script fails, because the bootstrapping process gets confused and cannot find the source files to compile the SML libraries. Fixed by setting SMLNJ_HOME to empty string. 2. I need some extra packages that are not installed by default, namely ML-Burg and eXene. Fixed by adding the appropriate "request" lines to the end of the SML installer targets file. I could very easily change it to add those packages depending on USE flags. 3. The destination directory was set to /opt/smlnj, however the /opt tree is reserved for binary-only packages, which is not the case here. I have followed the directory structure that the SML/NJ RPM has, and have changed the destination directory to /usr/share/smlnj. Feel free to change it to whatever. 4. I have also added a postinst and prerm functions to create symbolic links from /usr/share/bin/sml to /usr/bin/sml, in order to be consistent with the RPM file layout. Well, take a look at it and let me know what you think. I'll probably add support for Sparc and PPC over the weekend.
Thanks for those additions. Your version is much better than mine :) I'm no expert on this.
Hi guys. Thanks for an update! Unfortunately the ebuild cannot bootstrap successfully. These are the last lines of the output: ./config/install.sh: The bin tree already exists. /var/tmp/portage/smlnj-110.42/work/bin/.run/run.x86-linux: Fatal error -- Uncaught exception SysErr with <unknown> raised at <sysconf.c> I will attach full output below. Also, the ebuild lacked all the headers and DEPEND statment (does it need any dependencies, btw? I just put virtual/glibc in depend). The modified version is attached below, please do any modifications starting off it. Thanks for the involvment! George
Created attachment 8646 [details] full output of ebuild smlnj-110.42.ebuild unpack compile install Also, in case smln is known to conflict with specific gcc/glibc version here is the output of my emerge info: Portage 2.0.46-r12 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r3) ================================================================= System uname: 2.4.20-gentoo-r1 i686 Pentium III (Coppermine) GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/home/portage" USE="x86 oss apm crypt libg++ mikmod mmx mpeg nls png zlib gtkhtml gdbm berkdb slang readline arts aalib nas bonobo svga java X sdl gpm tcpd libwww ssl perl esd imlib oggvorbis gnome gtk qt motif opengl gphoto2 cdr scanner -3dnow alsa tcltk guile ruby postgres encode tex qtmt sse pdflib pda avi cups dvd fbdev flash gif glide gpg imap jpeg jpilot kde mcrypt mozilla ncurses pam pcmcia plotutils python quicktime spell tetex truetype ungif wavelan xml xml2 xmms xv" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O3 -pipe -fforce-addr -fomit-frame-pointer -falign-functions=4 -fprefetch-loop-arrays -fexpensive-optimizations" CXXFLAGS="-march=pentium3 -O3 -pipe -fforce-addr -fomit-frame-pointer -falign-functions=4 -fprefetch-loop-arrays -fexpensive-optimizations" ACCEPT_KEYWORDS="~x86 x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache noauto digest distcc" gcc-3.2.2[-r0]
Created attachment 8647 [details] modified smlnj-110.42.ebuild
I just tried emerging, and it worked. I notice that you use masked versions of gcc and glibc, whereas I use the latest unmasked versions (gcc-3.2.1-r6 and glibc-2.3.1-r2). I'll try out gcc-3.2.2 in the next few days and see what happens. Here is my emerge info output: Portage 2.0.46-r12 (default-x86-1.4, gcc-3.2.1, glibc-2.2.5-r4,2.3.1-r2) ================================================================= System uname: 2.4.19-rthal5 i686 Intel(R) Xeon(TM) CPU 1.70GHz GENTOO_MIRRORS="http://www.ibiblio.org/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /opt/jakarta/tomcat/conf /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 oss 3dnow apm cups nls xv zlib gdbm berkdb slang bonobo svga java sdl gpm libwww perl gnome opengl cdr scanner mmx sse gphoto2 X fbcon kde qt qtmt arts gtk gtkhtml motif tcltk imlib ncurses readline lcms gif jpeg png tiff avi mpeg quicktime alsa esd mikmod nas xmms oggvorbis encode pam ssl crypt imap tcpd mozilla truetype spell xml xml2 pdflib plotutils tetex guile python libg++ samba" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-mcpu=i686 -O3 -pipe" CXXFLAGS="-mcpu=i686 -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j4" AUTOCLEAN="no" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
I just upgraded to gcc-3.2.2 and was successfully able to build smlnj. Here is the output of "emerge info", one more time. Portage 2.0.47-r7 (default-x86-1.4, gcc-3.2.2, glibc-2.2.5-r4,2.3.1-r2) ================================================================= System uname: 2.4.19-rthal5 i686 Intel(R) Xeon(TM) CPU 1.70GHz GENTOO_MIRRORS="http://www.ibiblio.org/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /opt/jakarta/tomcat/conf /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 oss 3dnow apm cups nls xv zlib gdbm berkdb slang bonobo svga java sdl gpm libwww perl gnome opengl cdr scanner mmx sse gphoto2 X fbcon kde qt qtmt arts gtk gtkhtml motif tcltk imlib ncurses readline lcms gif jpeg png tiff avi mpeg quicktime alsa esd mikmod nas xmms oggvorbis encode pam ssl crypt imap tcpd mozilla truetype spell xml xml2 pdflib plotutils tetex guile python libg++ samba" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-mcpu=i686 -O3 -pipe" CXXFLAGS="-mcpu=i686 -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j4" AUTOCLEAN="no" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
Created attachment 8880 [details] smlnj-110.42.ebuild modified to work with gcc 3.2.2 I finally was able to reproduce the problem when compiling with gcc 3.2.2. This version of the ebuild patches on of the shell scripts (comments out one line, really). I have added a src_unpack function that patches the right file.
Hi guys. Ivan: thanks for sorting this issue out. I have tested and committed the ebuild. BTW, I removed the pkg_pre/postinst functions and instead created necessary symlinks inside src_install, - it is cleaner this way (symlinks get registered in a database). Please test. George
Closing now
moved to stable, also added 110.43. Reclosing the bug. george
Hello all, i've fighted with 110.42 to get it to work on my box and i didn't succeed (sml worked, but ml-lex didn't). While updating the ebuilds to use the mirror:// mechanism i found someone on IRC to help me get both the latest stable (110.0.7) and working (110.45) versions working. So i removed 110.{42,43} and added the two new ebuilds which builds upon them. Now the Manifest bugs are fixed, the gcc-3.* one too, and ml-{lex,yacc,...} work in the two versions. I hope you don't mind me invading smlnj's maintainership too much :)