Bug 239993 - net-im/coyim: Makefile cleanup
Summary: net-im/coyim: Makefile cleanup
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-20 14:54 UTC by Santhosh Raju
Modified: 2019-08-30 22:08 UTC (History)
0 users

See Also:


Attachments
Patch that fixes some style issues and clean the Makefile (1.08 KB, patch)
2019-08-20 14:54 UTC, Santhosh Raju
no flags Details | Diff
Patch that fixes some style issues and clean the Makefile. (1.35 KB, patch)
2019-08-20 15:45 UTC, Santhosh Raju
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Santhosh Raju 2019-08-20 14:54:39 UTC
Created attachment 206730 [details]
Patch that fixes some style issues and clean the Makefile

Cleaned up the Makefile by running portlint(1) and portfmt(1).

No changes in logic hence no PKGREVISION bump.

Tested builds in 12.0-RELEASE-p9 (amd64).

Would be nice if this can be applied to the ports tree.
Comment 1 Santhosh Raju 2019-08-20 15:45:46 UTC
Created attachment 206733 [details]
Patch that fixes some style issues and clean the Makefile.

In addition to the above clean up.

Adds explicit invocation of gen_version_file.sh using the shell.

(Without the explicit invocation, this was causing build failures within poudriere).
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2019-08-30 11:22:29 UTC
> Adds explicit invocation of gen_version_file.sh using the shell.

Then the

+sh_OLD_CMD=	"/usr/bin/env bash"
+sh_CMD=		${SH}
+SHEBANG_FILES=	gen_version_file.sh

cruft could be removed, no?  Or is gen_version_file.sh installed or called
again later?
Comment 3 Santhosh Raju 2019-08-30 17:20:23 UTC
(In reply to Tobias Kortkamp from comment #2)

But I would like to remove the bash dependency within the shell script. And just put /bin/sh there.

It is called exactly once, before the build process starts.
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2019-08-30 21:29:44 UTC
(In reply to Santhosh Raju from comment #3)
> But I would like to remove the bash dependency within the shell script. And just put /bin/sh there.

USES=shebangfix only affects the first line of the script.
"#!/usr/bin/env bash" is never used by anything if you explicitly
run the script with ${SH} and patching it away becomes a pointless
exercise.
Comment 5 Santhosh Raju 2019-08-30 21:42:34 UTC
(In reply to Tobias Kortkamp from comment #4)

I did not know that, thank you for the information, sure in that case the additional 3 lines can be removed.

In future if some bash specific dependency arises in the script this can be revisited.
Comment 6 Tobias Kortkamp freebsd_committer freebsd_triage 2019-08-30 22:07:37 UTC
Committed with some additional cleanup. Thanks!
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-08-30 22:08:20 UTC
A commit references this bug:

Author: tobik
Date: Fri Aug 30 22:07:28 UTC 2019
New revision: 510300
URL: https://svnweb.freebsd.org/changeset/ports/510300

Log:
  net-im/coyim: Makefile cleanup

  - Clean up by running portlint(1) and portfmt(1)
  - Remove some USES=shebangfix cruft
  - Make better use of USES=go while here
  - Use ${ECHO_CMD} not ${ECHO} per bsd.commands.mk

  PR:		239993
  Submitted by:	Santhosh Raju <santhosh.raju@gmail.com> (maintainer)

Changes:
  head/net-im/coyim/Makefile