Subject: Re: graphics/xv fails to build on macppc
To: Loic Hoguin <essen@dev-extend.eu>
From: Loic Hoguin <essen@dev-extend.eu>
List: pkgsrc-users
Date: 03/24/2007 14:35:17
------------NTQZ6zCWKZisIPK3pqFOOi
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
On Sat, 24 Mar 2007 13:03:32 +0100, Loic Hoguin <essen@dev-extend.eu>
wrote:
>>> ... today on my iBook running Netbsd/macppc
>>> current (4.99.16) and it fails with the following error:
>> [...]
>>> xvpcd.c:(.text+0xce8): undefined reference to `alloca'
>>
>> NetBSD-macppc doesn't seem to support alloca(). You could submit a
>> problem report (category "port-macppc") about that. But considering
>> that it is broken API it would probably better to patch "xv" not
>> use it alloca() (or not use "xv" at all :-).
>
> Okie. If it's broken by design it won't do any good to implement it.
> I'll try to patch it (mainly to learn about the process) but if it's
> really unmaintened and insecure I think it shouldn't be in pkgsrc.
I have attached a patch that replace the alloca call by a malloc/free.
I tested it with PhotoCD files found on Google (with a filetype:pcd search)
and it works well under current/macppc and netbsd4/i386.
The patches/patch-ab file is no longer needed since we remove the alloca
call.
Please look or test it before I submit a pr.
--
Loïc Hoguin
Dev:Extend
------------NTQZ6zCWKZisIPK3pqFOOi
Content-Disposition: attachment; filename=patchxv
Content-Type: application/octet-stream; name=patchxv
Content-Transfer-Encoding: Base64
SW5kZXg6IGRpc3RpbmZvCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9j
dnNyb290L3BrZ3NyYy9ncmFwaGljcy94di9kaXN0aW5mbyx2CnJldHJpZXZpbmcg
cmV2aXNpb24gMS4xMwpkaWZmIC11IC1yMS4xMyBkaXN0aW5mbwotLS0gZGlzdGlu
Zm8JMTQgTWF5IDIwMDYgMjE6MTY6MDAgLTAwMDAJMS4xMworKysgZGlzdGluZm8J
MjQgTWFyIDIwMDcgMTM6MDk6M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