Bug 89065 - [patch] games/quakeforge does not respond to keyboard input
Summary: [patch] games/quakeforge does not respond to keyboard input
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-15 12:20 UTC by Kostik Belousov
Modified: 2005-11-22 05:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kostik Belousov 2005-11-15 12:20:21 UTC
After ports recompilation for 6.0 (upgrade from 5-STABLE) I noticed that
quakeforge start and plays the demo, but completely ignores any keyboard input.
Besides that, it reports that plugin /usr/local/lib/quakeforge/console_client.so
cannot be loaded.

Investigation had shown that the plugin is used to drive the game menu, and the
reason it cannot be loaded is that the main executable of the game does not export
the symbol Key_Progs_Init.

Symbol is absent since build links final exe from some static libraries, and
.o with Key_Progs_Init is (for some reasons) not referenced by exe.
As a workaround, I propose to add an explicit reference for the symbol.

Proper fix would be something like -Wl,--whole-archive switch for final link,
but this does not work due to libtool only allows to put switches at the start
of the command line. And cc links libgcc.a twice, that leads to duplicate
symbol definitions.

Fix: 

cat /usr/ports/games/quakeforge/files/patch-nq_source_sys__unix.c

$FreeBSD$

--- nq/source/sys_unix.c.orig
+++ nq/source/sys_unix.c
@@ -69,6 +69,9 @@
        fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK);
 }
 
+extern void Key_Progs_Init (progs_t *pr);
+void (*x)() = Key_Progs_Init;
+
 int
 main (int c, const char *v[])
 {
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2005-11-15 12:21:10 UTC
Maintainer of games/quakeforge,

Please note that PR ports/89065 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/89065

-- 
Edwin Groothuis
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2005-11-15 12:21:15 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 3 Ulrich Spoerlein 2005-11-15 15:57:52 UTC
Dear Edwin,

please have a look at ports/86175 first and commit it. I transfered
maintainership of quake(1)forge to Alejandro Pulver
<alejandro@varnet.biz>, as he is way more active than me, with regard to
Quake.

Ulrich Spoerlein

PS: I can confirm the bug, did something happen with gcc or libtool in
between the 5.4 and 6.0 timeframe?
Comment 4 Edwin Groothuis freebsd_committer freebsd_triage 2005-11-17 20:30:11 UTC
Maintainer of games/quakeforge,

Please note that PR ports/89065 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/89065

-- 
Edwin Groothuis
edwin@FreeBSD.org
Comment 5 Alejandro Pulver 2005-11-17 21:46:21 UTC
On Thu, 17 Nov 2005 20:30:11 UT
Edwin Groothuis <edwin@FreeBSD.org> wrote:

> Maintainer of games/quakeforge,
> 
> Please note that PR ports/89065 has just been submitted.
> 
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
> 
> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/89065
> 
> -- 
> Edwin Groothuis
> edwin@FreeBSD.org

I agree with the patch.

Best Regards,
Ale
Comment 6 Edwin Groothuis freebsd_committer freebsd_triage 2005-11-22 05:24:03 UTC
State Changed
From-To: feedback->closed

Patch commited, thanks!