Bug 205069 - [patch] games/ufoai-data: fix "no such file or directory: /usr/ports/games/ufoai-data/work/base/"
Summary: [patch] games/ufoai-data: fix "no such file or directory: /usr/ports/games/uf...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Thomas Zander
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-12-06 17:25 UTC by florian.ermisch
Modified: 2016-01-03 11:10 UTC (History)
4 users (show)

See Also:
riggs: maintainer-feedback+


Attachments
Patch to fix "cd: /usr/[...]/work/base: No such file or directory" (1009 bytes, patch)
2015-12-06 17:25 UTC, florian.ermisch
no flags Details | Diff
Setting WRKSRC instead of specifying WRKDIR's subdir all the time (913 bytes, patch)
2015-12-12 16:15 UTC, florian.ermisch
no flags Details | Diff
patch (860 bytes, patch)
2015-12-24 00:56 UTC, m.tsatsenko
m.tsatsenko: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description florian.ermisch 2015-12-06 17:25:11 UTC
Created attachment 163909 [details]
Patch to fix "cd: /usr/[...]/work/base: No such file or directory"

When I tried to install games/ufoai yesterday (from ports as there was 
no pkg for 10.2 amd64) ufoai-data failed:

=> SHA256 Checksum OK for ufoai/ufoai-2.5-data.tar.
===>   ufoai-data-2.5 depends on file: /usr/local/bin/unzip - found
cd: /usr/ports/games/ufoai-data/work/base: No such file or directory
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/games/ufoai-data
*** Error code 1


I checked /usr/ports/games/ufoai-data/work/ and found "ufoai-data-2.5" 
with a subdir named "base". 
After inserting "${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}/" into every
occurrence of "${WRKDIR}/base" (see attached patch) I could install and 
play the game.
Comment 1 m.tsatsenko 2015-12-09 23:45:33 UTC
Hey.
Thanks for reporting that. but don't like the way how you have fixed it. Why do not you just fix ${WRKDIR} itself?
Comment 2 florian.ermisch 2015-12-12 16:13:30 UTC
(In reply to m.tsatsenko from comment #1)

Oh, sorry, I just forgot to look into setting WRKDIR between the 
first change which only fixed the build and the later ones allowing
the game to actually run.

When I understand the Porter's Handbook "Specifying the Working 
Directory" [0] correctly I should set WRKSRC to the subdir in 
question, right?

[0] https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-wrkdir.html
Comment 3 florian.ermisch 2015-12-12 16:15:43 UTC
Created attachment 164150 [details]
Setting WRKSRC instead of specifying WRKDIR's subdir all the time

2nd try.
Comment 4 m.tsatsenko 2015-12-23 23:12:14 UTC
Hi!
You got the idea, but the patch is wrong.
You are still modifying each line where ${WRKSRC} is used
Comment 5 m.tsatsenko 2015-12-23 23:15:09 UTC
I will submit my own patch soon
Comment 6 m.tsatsenko 2015-12-24 00:56:33 UTC
Created attachment 164574 [details]
patch

I am sorry. Seems you were almost right.
The problem was a typo ${WRKDIR} instead of ${WRKSRC}.
The patch fixes it
Comment 7 VK 2015-12-24 02:23:55 UTC
Thanks guys.

Can you confirm testing (portlint, poudriere) passes? Does the approved patch obsolete the previous one? Maintainer feedback complete?
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-12-31 20:48:31 UTC
A commit references this bug:

Author: riggs
Date: Thu Dec 31 20:48:04 UTC 2015
New revision: 404960
URL: https://svnweb.freebsd.org/changeset/ports/404960

Log:
  Fix build failure

  PR:		205069
  Submitted by:	florian.ermisch@alumni.tu-berlin.de
  Reviewed by:	m.tsatsenko@gmail.com (maintainer)
  Approved by:	m.tsatsenko@gmail.com (maintainer)

Changes:
  head/games/ufoai-data/Makefile
Comment 9 John Marino freebsd_committer freebsd_triage 2016-01-03 10:27:06 UTC
I don't think this is finished.

Doesn't the PLIST need the fix too?

e.g.

@@ -29,19 +29,19 @@ NO_WRKSUBDIR=       yes
 NO_ARCH=       yes

 DATADIR=       share/${PKGNAMEPREFIX:S/-//}
-PLIST=         ${WRKDIR}/pkg-plist
+PLIST=         ${WRKSRC}/pkg-plist
Comment 10 Thomas Zander freebsd_committer freebsd_triage 2016-01-03 11:10:13 UTC
(In reply to John Marino from comment #9)

For consistency, we could generate the PLIST in WRKSRC instead of WRKDIR, true. However it is not necessary for plist generation to work in this case, since everything is generated dynamically and collected into ${PLIST}. Before committing, I had a couple of poudriere runs on different OSVERSIONs to verify.