You are not logged in.

#1 2012-02-17 03:19:33

cjpembo
Member
Registered: 2008-08-06
Posts: 105

[REQUEST] mlton-svn (Almost done, need a little help)

Working on a mlton-svn package; almost done.  Builds fine, but I'm having trouble with the following:

mlton needs mlton installed so the source code can self-compile.

Not a problem:  aur package mlton-bin provides a pre-compiled working copy. 

My mlton-snv package needs to:

1.  check if either mlton-bin or mlton-svn are already installed (each pkg provides=('mlton') in PKGFILE)
2.  if mlton is not installed, build/install mlton-bin first, build mlton-svn, remove mlton-bin, install mlton-svn
3.  if mlton is installed, build/install mlton-svn
4.  force single-threaded make (-j4 fails on my system)
      this goes in options=()


Here is my PKGFILE


# Based on mlton package by: Brian De Wolf <arch@bldewolf.com>
# Contributor: Chris Pemberton <cjpembo@gmail.com>

pkgname=mlton-svn
pkgver=7558
pkgrel=1
pkgdesc="An open-source, whole-program, optimizing Standard ML compiler"
url="http://mlton.org/"
license="MLTON" # BSD like: http://mlton.org/License
depends=()
makedepends=('patch' 'mlton-bin')
conflicts=('mlton-bin')
replaces=('mlton-bin')
provides=('mlton')
arch=(i686 x86_64)

_svntrunk=svn://mlton.org/mlton/trunk
_svnmod=mlton


build() {

  svn co $_svntrunk $svnmod
  cd $startdir/src/trunk
  make -j1 all-no-docs
  make DESTDIR=$startdir/pkg install-no-docs
}

With a little help, this should be good to go... and I'll be one step closer to OpenModelica on Archlinux.

Currently the PKGFILE downloads latest svn, compiles, removes preinstalled mlton, and installs.  Just having trouble with it checking for pre-installed mlton automagically.

Thanks

Last edited by cjpembo (2012-02-17 03:33:56)

Offline

#2 2012-02-27 20:37:11

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,060

Re: [REQUEST] mlton-svn (Almost done, need a little help)

use mlton as makedepend ?

if mlton-bin is pre-installed then the mlton-svn install will replace it.
if a previous svn version is installed, it will be upgraded to the newer version.

Note : this method will work if you have mlton-svn in a repo and install with pacman -S , not sure if pacman -U supports upgrading.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB