Bug 64420 - [PATCH] devel/portlint: check for proper master-slave Makefile handling
Summary: [PATCH] devel/portlint: check for proper master-slave Makefile handling
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: Joe Marcus Clarke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-18 13:40 UTC by Oliver Eikemeier
Modified: 2004-03-21 08:25 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (2.18 KB, patch)
2004-03-18 13:40 UTC, Oliver Eikemeier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Eikemeier 2004-03-18 13:40:22 UTC
This patch updates portlint to check for the rules formulated in PR 64393,
refer to this PR for some rationale.

1.) A port is a slave port if and only if MASTERDIR != .CURDIR

2.) Slave ports should define MASTERDIR using one of the following lines:

MASTERDIR=	${.CURDIR}/../../<category>/<port>
MASTERDIR=	${.CURDIR}/../<port>

3.) Non-slave ports shouldn't define MASTERDIR at all

4.) The last line of a slave port's Makefile has to be

.include "${MASTERDIR}/Makefile"

5.) The last line of a non-slave ports Makefile must be one of:

.include <bsd.port.mk>
.include <bsd.port.post.mk>

6.) slave ports may not include bsd.port(.pre).mk

Fix: bump PORTVERSION and apply the following patch:
How-To-Repeat: 
These are detected as follows:

1.) is flagged FATAL, check with
  /usr/local/share/examples/portlint/portlintgrep 'CURDIR != MASTERDIR'

2.) and 3.) are flagged WARN, check with
  /usr/local/share/examples/portlint/portlintgrep 'define MASTERDIR'

4.) and 5.) are flagged FATAL, check with
  /usr/local/share/examples/portlint/portlintgrep 'last line of'

6.) is flagged FATAL, part of the is seen as violating 1.), check with
  /usr/local/share/examples/portlint/portlintgrep 'may not include'
Comment 1 Oliver Eikemeier freebsd_committer freebsd_triage 2004-03-18 13:45:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marcus

Over to portlint maintainer
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2004-03-21 08:25:07 UTC
State Changed
From-To: open->closed

Committed, thanks!