From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 5 Aug 2007 01:29:50 +0400 From: Alexey Tourbin To: devel@lists.altlinux.org Message-ID: <20070804212950.GG7938@solemn.turbinal> Mail-Followup-To: devel@lists.altlinux.org References: <20070803093425.GV7938@solemn.turbinal> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ag0ALTx5bNxCf4La" Content-Disposition: inline In-Reply-To: <20070803093425.GV7938@solemn.turbinal> Subject: Re: [devel] rpm-build-mono configlist X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2007 21:29:51 -0000 Archived-At: List-Archive: List-Post: --Ag0ALTx5bNxCf4La Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 03, 2007 at 01:34:25PM +0400, Alexey Tourbin wrote: > =E7=CF=D3=D0=CF=C4=C1, =D7=CF=D4 =DC=D4=CF=D4 =CB=D5=D3=CF=CB =CB=CF=C4= =C1 =D1 =CE=C5 =D0=CF=CE=D1=CC =C9 =D3=CF=C2=C9=D2=C1=C0=D3=D8 =C5=C7=CF = =D5=C2=C9=D4=D8. > =F0=CF-=CD=CF=C5=CD=D5, =CF=CE =D0=D2=CF=D3=D4=CF =CE=C5 =D2=C1=C2=CF=D4= =C1=C5=D4, =C1 =C4=CF=C2=C1=D7=CC=D1=D4=D8 2>/dev/null =C4=C5=CC=CF =CE=C5 = =C8=C9=D4=D2=CF=C5. =F1 =D2=C1=DA=CF=C2=D2=C1=CC=D3=D1, =C4=CC=D1 =DE=C5=C7=CF =CE=D5=D6=CE=D9 = *.dll.config =C6=C1=CA=CC=D9, =C9 =D2=C5=C1=CC=C9=DA=CF=D7=C1=CC =D0=CF=C9= =D3=CB soname-=DA=C1=D7=C9=D3=C9=CD=CF=D3=D4=C5=CA =D7 *.dll =C2=C1=CA=D4=CB=CF=C4= =C5 mono. =FC=D4=CF, =D7 =DE=C1=D3=D4=CE=CF=D3=D4=C9, =CF=DA=CE=C1=DE=C1= =C5=D4, =DE=D4=CF =D4=C5=D0=C5=D2=D8 mono =D0=C1=CB=C5=D4=D9, =CB=C1=CB =D0=D2=C1= =D7=C9=CC=CF, =CE=C5 =CD=CF=C7=D5=D4 =C2=D9=D4=D8 noarch. =E5=D3=CC=C9 =CB=D4=CF-=D4=CF =D2=C1=DA=C2=C9=D2=C1=C5=D4=D3=D1 =D7 =D4=CF= =CD, =CB=C1=CB =D2=C1=C2=CF=D4=C1=C5=D4 mono =CE=C1 =D5=D2=CF=D7=CE=C5 =DA= =C1=C7=D2=D5=DA=CB=C9 =D2=C1=DA=C4=C5=CC=D1=C5=CD=D9=C8 =C2=C9=C2=CC=C9=CF=D4=C5=CB, =D0=D2=CF=DB= =D5 =D0=CF=D3=CD=CF=D4=D2=C5=D4=D8 =CE=C9=D6=C5=D3=CC=C5=C4=D5=C0=DD=C5=C5 = =C9 =D7=D9=D3=CB=C1=DA=C1=D4=D8=D3=D1. commit 5c616477a2f2fe314d7e684c0e1b75bb85b8f227 Author: Alexey Tourbin Date: Sun Aug 5 00:40:15 2007 +0400 mono.req: implemented MonoLibReq() to grab sonames from *.dll.config fi= les =20 The idea is that, since Mono bytecode must be portable, it cannot conta= in soname references, only "module references". Module to soname mapping = is done with system-dependent *.dll.config xml file. =20 I grab module references from dll and try to resolve them into sonames. =20 See also http://www.mail-archive.com/pld-devel-en@lists.pld-linux.org/msg03358.h= tml diff --git a/mono.req b/mono.req index 1d8e911..eff48d4 100755 --- a/mono.req +++ b/mono.req @@ -27,6 +27,32 @@ Monodis() fi } =20 +MonoLibReq() +{ + local f=3D"$1" out=3D; shift + out=3D$(Monodis --moduleref "$f") + local refs=3D + refs=3D$(echo "$out" |sed -n 's/^[1-9][0-9]*: *//p') + + [ -n "${RPM_LIB-}" ] || RPM_LIB=3D`rpm --eval %_lib` + local suffix; [ "$RPM_LIB" =3D lib64 ] && suffix=3D'()(64bit)' || suffix= =3D + + local ref + for ref in $refs; do + local target=3D"$(fgrep "dll=3D\"$ref\"" "$f".config 2>/dev/null | + sed -n 's/.*target=3D"\(lib[^"]*[.]so[.][^"]*\)".*/\1/p' |head -1)" + if [ -n "$target" ]; then + Verbose "$f: $ref -> $target" + echo "$target$suffix" + elif [ -z "${ref##lib*.so.*}" ]; then + Verbose "$f: $ref =3D $ref" + echo "$ref$suffix" + else + Info "$f: cannot resolve module reference $ref" + fi + done +} + MonoReq() { local f=3D"$1" out=3D; shift @@ -50,6 +76,9 @@ MonoReq() print "mono(" LIBNAME ") " OP " " VERSION START=3D0 }' + if [ -f "$f".config ]; then + MonoLibReq "$f" + fi } =20 MonoProv() --Ag0ALTx5bNxCf4La Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGtO/NfBKgtDjnu0YRAgZaAKDJMMljV1hpLeYmUY8Y+IAjtQ3fdwCg3C/g vLmjtWyLk2+TU2znpIqo9Zc= =VR3r -----END PGP SIGNATURE----- --Ag0ALTx5bNxCf4La--