On Thu, Mar 31, 2011 at 8:19 PM, Vincent Cheng <vincentc1...@gmail.com>wrote:

> On Thu, Mar 31, 2011 at 7:16 AM, Bertrand Marc <beberk...@gmail.com>wrote:
>
>> 2011/3/31 Vincent Cheng <vincentc1...@gmail.com>
>>
>>> Hi,
>>>
>>> Are there any updates on this? I'm interested in seeing 0 A.D. in
>>> Debian's repositories as well; would you like any help in packaging it?
>>>
>>> Kind regards,
>>> - Vincent Cheng
>>>
>>
>> Hi Vincent,
>>
>> I did the initial packaging work a few months ago now [1]. I don't
>> remember very well. I think I had working packages, but there was some kind
>> of hack needed to configure properly (as I remember). There was also a
>> couple of libraries shipped with the archive, some of them were not part of
>> Debian last year.
>>
>> You are welcome if you want to take over this ITP or work on the svn. I am
>> not sure I'll have plenty of time for 0ad this month.
>>
>> Regards,
>> Bertrand
>>
>> [1] http://svn.debian.org/wsvn/pkg-games/packages/trunk/0ad/
>> http://svn.debian.org/wsvn/pkg-games/packages/trunk/0ad-data/
>>
>
> I'd be glad to help you out with the packaging, although I admit I've had
> very little experience with svn. Is there some sort of quick-start guide for
> working with Debian's svn repositories?
>
> Aside from that, I seem to be having quite a bit of trouble getting 0 A.D.
> to build itself and run, as documented here [1].
>
> - Vincent
>
> [1] http://www.wildfiregames.com/forum/index.php?showtopic=14568
>

A working patch was provided on Wildfire Games' forums (and attached with
this e-mail); now 0ad can be successfully built and run. I'm going to upload
my packaging to Debian Mentors and see if anybody would like to sponsor this
package.

- Vincent
Index: lib/file/file.cpp
===================================================================
--- lib/file/file.cpp	(revision 9141)
+++ lib/file/file.cpp	(working copy)
@@ -94,8 +94,8 @@
 		return LibError_from_errno();
 
 	const size_t totalTransferred = (size_t)ret;
-	if(totalTransferred != size)
-		WARN_RETURN(ERR::IO);
+	//if(totalTransferred != size)
+	//	WARN_RETURN(ERR::IO);
 
 	monitor.NotifyOfSuccess(FI_LOWIO, accessType, totalTransferred);
 	return INFO::OK;
@@ -110,29 +110,31 @@
 	req.aio_fildes     = fd;
 	req.aio_offset     = alignedOfs;
 	req.aio_nbytes     = alignedSize;
-	struct sigevent* sig = 0;	// no notification signal
-	aiocb* const reqs = &req;
-	if(lio_listio(LIO_NOWAIT, &reqs, 1, sig) != 0)
-		return LibError_from_errno();
-	return INFO::OK;
+	//struct sigevent* sig = 0;	// no notification signal
+	//aiocb* const reqs = &req;
+	//if(lio_listio(LIO_NOWAIT, &reqs, 1, sig) != 0)
+	//	return LibError_from_errno();
+	//return INFO::OK;
+	return IO(fd, accessType, alignedOfs, alignedBuf, alignedSize);
 }
 
 
 LibError WaitUntilComplete(aiocb& req, u8*& alignedBuf, size_t& alignedSize)
 {
-	// wait for transfer to complete.
-	while(aio_error(&req) == EINPROGRESS)
-	{
-		aiocb* const reqs = &req;
-		aio_suspend(&reqs, 1, (timespec*)0);	// wait indefinitely
-	}
+	//// wait for transfer to complete.
+	//while(aio_error(&req) == EINPROGRESS)
+	//{
+	//	aiocb* const reqs = &req;
+	//	aio_suspend(&reqs, 1, (timespec*)0);	// wait indefinitely
+	//}
 
-	const ssize_t bytesTransferred = aio_return(&req);
-	if(bytesTransferred == -1)	// transfer failed
-		WARN_RETURN(ERR::IO);
+	//const ssize_t bytesTransferred = aio_return(&req);
+	//if(bytesTransferred == -1)	// transfer failed
+	//	WARN_RETURN(ERR::IO);
 
 	alignedBuf = (u8*)req.aio_buf;	// cast from volatile void*
-	alignedSize = bytesTransferred;
+	//alignedSize = bytesTransferred;
+	alignedSize = req.aio_nbytes;
 	return INFO::OK;
 }
 

Reply via email to