Mono Floating Errors

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

Re: Mono Floating Errors

Postby WarheadsSE » Mon Dec 16, 2013 1:43 am

Yay... what of the PKGBUILD from upstream?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Mono Floating Errors

Postby dan64 » Mon Dec 16, 2013 10:28 pm

At the moment I made the build partially by hand.

The steps that I have followed to build the package are:

1) Issues the following commands

$this->bbcode_second_pass_code('', '
git clone https://github.com/mono/mono.git
cd mono
git submodule init
git submodule update
')

2) After cloning and updating the mono repo and submodule, I have used the following PKGBUILD

$this->bbcode_second_pass_code('', '
pkgname=mono
pkgver=3.2.7
pkgrel=1
pkgdesc="Free implementation of the .NET platform including runtime and compiler"
url="http://www.mono-project.com/"
arch=('armv7h' 'i686' 'x86_64')
license=('GPL' 'LGPL2' 'MPL' 'custom:MITX11')
depends=('zlib' 'libgdiplus>=2.10' 'sh')
makedepends=('git' 'pkgconfig' 'mono')
options=('!libtool' '!makeflags')
provides=('monodoc' 'mono=3.2.0')
conflicts=('monodoc')
install=mono.install


build()
{
cd ${startdir}/${pkgname}
./autogen.sh --prefix=/usr --sysconfdir=/etc --bindir=/usr/bin --sbindir=/usr/bin
make
# build jay
cd ${startdir}/${pkgname}/mcs/jay
make
}

package()
{

cd ${startdir}/${pkgname}
make DESTDIR=${pkgdir} install || return 1

# install jay
cd ${startdir}/${pkgname}/mcs/jay
make DESTDIR=${pkgdir} prefix=/usr INSTALL=../../install-sh install
cd ${startdir}/${pkgname}

# install binfmt conf file and pathes
install -D -m644 "${startdir}"/mono.binfmt.d "${pkgdir}"/usr/lib/binfmt.d/mono.conf

#install license
mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
install -m644 mcs/MIT.X11 ${pkgdir}/usr/share/licenses/${pkgname}/
}
')

I'm doing some experiment with a more complete (and maybe too complex) PKGBUILD, but it takes a lot of time to test, and I have some problem, so for the moment this is the only version that works well.
dan64
 
Posts: 75
Joined: Mon Jan 31, 2011 8:52 pm

Re: Mono Floating Errors

Postby dan64 » Tue Dec 17, 2013 6:46 pm

Finally here the complete PKGBUILD. I had odd problems on my Trimslice building mono, it seems that the reason is related to the length of ${srcdir}. So I suggest the following rule:

If LEN(${srcdir}) < 20 set DIST_DIR=${srcdir}/${pkgname}
else DIST_DIR=${startdir}/${pkgname}

$this->bbcode_second_pass_code('', '
pkgname=mono
pkgver=3.2.7
pkgrel=1
pkgdesc="Free implementation of the .NET platform including runtime and compiler"
url="http://www.mono-project.com/"
arch=('armv7h' 'i686' 'x86_64')
license=('GPL' 'LGPL2' 'MPL' 'custom:MITX11')
depends=('zlib' 'libgdiplus>=2.10' 'sh')
makedepends=('git' 'pkgconfig' 'mono')
options=('!libtool' '!makeflags')
provides=('monodoc' 'mono=3.2.0')
conflicts=('monodoc')
install=mono.install

source=(mono.binfmt.d)
md5sums=('SKIP')

_gitroot="https://github.com/mono/mono.git"
_gitname="mono"

build()
{
DIST_DIR=${startdir}/${pkgname}

msg 'Connecting to GIT server: Creating mono package ...'

if [ -d "$DIST_DIR" ] ; then
warning 'Repository directory already exists!'
msg 'Attempting to pull from repo...'
cd "$DIST_DIR"
git pull origin
msg 'The local files are updated'
else
msg "Cloning $_gitroot repository to $DIST_DIR..."
git clone "$_gitroot" "$DIST_DIR"
fi
cd "$DIST_DIR"
git submodule init
git submodule update

msg "GIT checkout done or server timeout"
msg "Starting make..."

cd "$DIST_DIR"
# build mono
./autogen.sh --prefix=/usr --sysconfdir=/etc --bindir=/usr/bin --sbindir=/usr/bin
make || return 1

# build jay
cd $DIST_DIR/mcs/jay
make || return 1
}

package()
{
msg "Building the Package..."

DIST_DIR=${startdir}/${pkgname}
cd $DIST_DIR
make DESTDIR=${pkgdir} install || return 1

# install jay
cd $DIST_DIR/mcs/jay
make DESTDIR=${pkgdir} prefix=/usr INSTALL=../../install-sh install
cd $DIST_DIR

# install binfmt conf file and pathes
install -D -m644 "${srcdir}"/mono.binfmt.d "${pkgdir}"/usr/lib/binfmt.d/mono.conf

#install license
mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
install -m644 mcs/MIT.X11 ${pkgdir}/usr/share/licenses/${pkgname}/
}
')

Good luck !
dan64
 
Posts: 75
Joined: Mon Jan 31, 2011 8:52 pm

Previous

Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 10 guests