Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#26303 closed request (fixed)

Alien Arena port request

Reported by: xingmaster90@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: alienarena

Description

The current patch is created for the older version of the game, the game doesn't run and the mouse movements are extremely slow and glitchy, it's a free game that was supposed to have a mac release, but the release for the mac was canceled the day before the game was supposed to be released, I don't know if this is how I'm supposed to contact you guys but after looking and asking on a few forums I was told that you guys are the people to talk to.

Attachments (3)

alienarena1.diff (6.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 14 years ago.
beginnings of a port
alienarena2.diff (6.4 KB) - added by ryandesign (Ryan Carsten Schmidt) 14 years ago.
updated port attempt
alienarena3.diff (6.6 KB) - added by ryandesign (Ryan Carsten Schmidt) 14 years ago.
updated port attempt

Download all attachments as: .zip

Change History (10)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: Alien Arena removed
Port: alienarena added
Priority: HighNormal
Summary: You Should Port Alien Arena For The MacAlien Arena port request
Type: defectrequest

We can create a portfile for Alien Arena if it can be compiled for Mac OS X. If it cannot be compiled for Mac OS X, then someone (probably not us) will need to first make it compile on Mac OS X before we can make a portfile for it.

comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

There seems to be some good info about compiling the current version of Alien Arena on Mac OS X in this thread. I'm going to see how far I can get in converting that knowledge into a MacPorts Portfile.

comment:3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Here's my port attempt so far, based on that forum thread and some of my own patches. The port compiles and installs. Run "crx" to try it out.

  • It can't find OpenAL, so it disables sound. The fix probably begins with changing the line const char libopenal_name[] = "libopenal.so.1"; in source/unix/qal_unix.c. The MacPorts OpenAL port does not compile, but we should be able to use the OpenAL Apple provides as part of Mac OS X.
  • It crashes with a segmentation fault right after you start it.
  • I removed calls to "round_page" in source/unix/q_shunix.c because that function doesn't seem to exist on Mac OS X. This is probably a problem, and may be the cause of the crash above. We should find a Mac OS X equivalent of round_page, or alternately an equivalent of mremap, but I have not been able to do so after a bit of Google searching.
  • game.dylib has the wrong install_name. We should also move it into LIBDIR.

All my tests have been on Snow Leopard x86_64.

Note the distfile is 361 MiB so it may take some time to download.

Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: alienarena1.diff added

beginnings of a port

comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Here is an updated port, including an implementation of round_page I cobbled together which may or may not work, and it now uses LIBDIR. It still crashes at launch, inside Com_Printf, called from QGL_Init.

Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: alienarena2.diff added

updated port attempt

comment:5 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

This version should fix the library's install_name.

Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: alienarena3.diff added

updated port attempt

comment:6 in reply to:  3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

The crash in Com_Printf was because QGL_Init couldn't find the OpenGL library. It was looking for libGL.so.1, which is not the library naming convention on Mac OS X so it couldn't find it. It then tried to call dlerror() and pass the result to Com_Printf, which apparently doesn't work and caused the crash. Rather than fix the crash in the error reporting, I fixed it so it could find libGL.

Changing libopenal.so.1 to the correct path to Mac OS X's OpenAL library was all that was needed to get sound working.

My round_page implementation seems to work, though it could probably be optimized, which might speed up the game a bit (though I have not been successful yet in running a profiler to see what's really slowing it down). Commenting out the calls to round_page, as I did in the first patch, definitely doesn't work (causes the game to exit immediately).

Long story short, I think we have a working alienarena port in MacPorts now. Please try it out!

sudo port selfupdate
sudo port install alienarena
crx

Here are the revisions I committed:

  • r71147: added alienarena-data
  • r71149: added alienarena and patches
  • r71150: fixed game.dylib's install_name, for completeness
  • r71151: add notes telling how to start the game

Other changes since attempt 3 above:

  • I got tired of waiting for hundreds of megabytes of game data to unpack, stage, install and activate every time I wanted to rebuild, so I moved the data into a separate port alienarena-data, which is listed as a dependency of alienarena so it will be installed automatically
  • added homepage
  • added 2nd download location
  • added pkgconfig build dependency

comment:7 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

  • r71152: livecheck added
  • r71154: "2nd download location" (arcadepro) removed because they didn't use the original filename
  • r71158, r71159: optimized the round_page implementation
  • r71160: gentoo mirrors added

I may make further updates to the port which I won't necessarily list here, but the current files are available by browsing the repository:

Note: See TracTickets for help on using tickets.