Bug 188095 - [patch][maintainer update] games/quake3: fix compiler errors with Clang
Summary: [patch][maintainer update] games/quake3: fix compiler errors with Clang
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: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-30 20:30 UTC by shirshegsm
Modified: 2014-07-19 16:27 UTC (History)
2 users (show)

See Also:


Attachments
file.diff (2.72 KB, patch)
2014-03-30 20:30 UTC, shirshegsm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description shirshegsm 2014-03-30 20:30:00 UTC
games/quake3 didn't manage to build on 11.0-CURRENT (clang version 3.4 (tags/RELEASE_34/final 197956) 20140216) because:

  cc: error: unknown argument: '-falign-loops=2'
  cc: error: unknown argument: '-falign-jumps=2'

The patch fixes that.

Fix: 1) apply patch
2) $ cd games/quake3
3) $ make
4) woo!

Patch attached with submission follows:
How-To-Repeat: 1) $ cd games/quake3
2) $ make
3) exit 1 :(
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-07-13 07:47:19 UTC
A commit references this bug:

Author: marino
Date: Sun Jul 13 07:46:32 UTC 2014
New revision: 361658
URL: http://svnweb.freebsd.org/changeset/ports/361658

Log:
  games/quake3: Fix build on FreeBSD 11

  While here, removed redundant <pre>,<post> and revbump just in case the
  these flag changes cause executable to change for F10-.

  PR:		188095
  Submitted by:	maintainer (Linas Valiukas)

Changes:
  head/games/quake3/Makefile
  head/games/quake3/files/patch-code-unix-Makefile
Comment 2 shirshegsm 2014-07-19 14:36:22 UTC
John, I think you corrupted the patch by adding your additional changes:

<pre>
<...>
===>  Patching for quake3-1.32c_3
===>   Converting DOS text files to UNIX text files
===>  Applying FreeBSD patches for quake3-1.32c_3
patch: **** malformed patch at line 118: @@ -235,25 +231,33 @@
=> Patch patch-code-unix-Makefile failed to apply cleanly.
=> Patch(es) patch-code-Construct patch-code-botlib-linux-i386.mak patch-code-bspc-Makefile patch-code-bspc-linux-i386.mak patch-code-cgame-cg_weapons.c patch-code-client-cl_ui.c patch-code-game-q_shared.c patch-code-game-q_shared.h patch-code-q3_ui-ui_playermodel.c patch-code-q3_ui-ui_players.c patch-code-q3_ui-ui_saveconfig.c patch-code-qcommon-common.c patch-code-qcommon-files.c patch-code-qcommon-vm.c patch-code-qcommon-vm_x86.c patch-code-renderer-tr_bsp.c patch-code-renderer-tr_shader.c patch-code-server-sv_client.c patch-code-ui-ui_main.c patch-code-ui-ui_players.c applied cleanly.
*** [do-patch] Error code 1
</pre>
Comment 3 John Marino freebsd_committer freebsd_triage 2014-07-19 14:56:32 UTC
I don't think so.
It's never correct to have <option> followed by <pre>.
If the patch is malformed, it's for another reason, makefile inclusions aren't going to affect the patch target.

I'd suspect DOS endings (either patch has DOS endings and shouldn't or target file has DOS endings and needs unix2dos applied).  I say this only from the error message, I didn' t look at it.
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-07-19 15:26:38 UTC
A commit references this bug:

Author: marino
Date: Sat Jul 19 15:25:43 UTC 2014
New revision: 362264
URL: http://svnweb.freebsd.org/changeset/ports/362264

Log:
  games/quake3: Fix corrupted patch

  The svn diff utility didn't apply the patch correctly -- 2 lines ended up
  as one.  Fix to resolve malformed patch error.  Follows:

  PR:		188095

Changes:
  head/games/quake3/files/patch-code-unix-Makefile
Comment 5 shirshegsm 2014-07-19 16:27:55 UTC
Thank you, much appreciated!