Bug 203137 - textproc/sm[iu]: respect *FLAGS
Summary: textproc/sm[iu]: respect *FLAGS
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: Jan Beich
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-09-15 20:30 UTC by Jan Beich
Modified: 2015-12-07 05:06 UTC (History)
2 users (show)

See Also:


Attachments
bsd.prog.mk version (1.53 KB, patch)
2015-09-15 20:30 UTC, Jan Beich
no flags Details | Diff
/dev/null version (1.06 KB, patch)
2015-09-15 20:30 UTC, Jan Beich
no flags Details | Diff
MAKE_ARGS version (1.08 KB, patch)
2015-09-15 21:22 UTC, Jan Beich
no flags Details | Diff
REINPLACE_CMD version (conservative) (1.09 KB, patch)
2015-09-15 21:24 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2015-09-15 20:30:00 UTC
Created attachment 161078 [details]
bsd.prog.mk version

CFLAGS, LIBS and LDFLAGS are still at their vendor values. Rather than
patching trivial Makefile using <bsd.prog.mk> or even /dev/null maybe
easier (from maintenance POV).

Ports default: -O2 -pipe -fstack-protector -fno-strict-aliasing
Currently (hidden by @): -g -O0 -Wall -Werror -ansi -I. -I/usr/include

https://www.freebsd.org/doc/en/books/porters-handbook/dads-cflags.html
Comment 1 Jan Beich freebsd_committer freebsd_triage 2015-09-15 20:30:55 UTC
Created attachment 161079 [details]
/dev/null version
Comment 2 Jan Beich freebsd_committer freebsd_triage 2015-09-15 20:33:27 UTC
Dropping maintainer-feedback flag. It doesn't handle more than one maintainer. For approval just state so unambiguously in a comment.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2015-09-15 21:22:48 UTC
Created attachment 161084 [details]
MAKE_ARGS version
Comment 4 Jan Beich freebsd_committer freebsd_triage 2015-09-15 21:24:00 UTC
Created attachment 161086 [details]
REINPLACE_CMD version (conservative)
Comment 5 Jan Beich freebsd_committer freebsd_triage 2015-09-15 21:37:43 UTC
Comment on attachment 161079 [details]
/dev/null version

/dev/null as a makefile relies on implicit rules that look like the following:

  $ env -i /usr/local/bin/gmake -p -f /dev/null
  ...
  # default
  CC = cc
  ...
  # default
  LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
  ...
  %: %.c
  #  recipe to execute (built-in):
          $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@

  $ env -i __MAKE_CONF= make -dsg1 -f /dev/null foo
  CC               = cc
  CFLAGS           = -O2 -pipe ${_CPUCFLAGS} ${CFLAGS.${MACHINE_ARCH}}
  ...
  .c              : 
          ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
          ${CTFCONVERT_CMD}
  ...
  Wildcard expanding "foo"...SuffFindDeps (foo)
          No known suffix on foo. Using .NULL suffix
  adding suffix rules
          trying foo.c...not there
          trying foo.cc...not there
          trying foo.cpp...not there
          trying foo.cxx...not there
          trying foo.C...not there
          trying foo.F...not there
          trying foo.f...not there
          trying foo.e...not there
          trying foo.r...not there
          trying foo.sh...not there
          trying foo.y...not there
          trying foo.l...not there
Comment 6 Chris Hutchinson 2015-09-15 23:29:16 UTC
(In reply to Jan Beich from comment #0)
> Created attachment 161078 [details]
> bsd.prog.mk version
> 
> CFLAGS, LIBS and LDFLAGS are still at their vendor values. Rather than
> patching trivial Makefile using <bsd.prog.mk> or even /dev/null maybe
> easier (from maintenance POV).
> 
> Ports default: -O2 -pipe -fstack-protector -fno-strict-aliasing
> Currently (hidden by @): -g -O0 -Wall -Werror -ansi -I. -I/usr/include
> 
> https://www.freebsd.org/doc/en/books/porters-handbook/dads-cflags.html

Thanks Jan!
The smi/Makefile version in this patch (diff) is superior to my
version.

Incorporated.
Thanks!

--Chris
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-09-17 18:54:04 UTC
A commit references this bug:

Author: jbeich
Date: Thu Sep 17 18:53:08 UTC 2015
New revision: 397201
URL: https://svnweb.freebsd.org/changeset/ports/397201

Log:
  textproc/smi: respect *FLAGS and fix LICENSE

  - Replace vendor Makefile with a virtual one based on bsd.prog.mk to
    avoid too much patching despite simplicity [1]
  - No BSD2CLAUSE license or any mention of it within the distfile [2]

  PR:		203137 [1], 203138 [2]
  Approved by:	Chris Hutchinson <portmaster@bsdforge.com> (maintainer)

Changes:
  head/textproc/smi/Makefile
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-12-07 05:03:30 UTC
A commit references this bug:

Author: jbeich
Date: Mon Dec  7 05:02:58 UTC 2015
New revision: 403183
URL: https://svnweb.freebsd.org/changeset/ports/403183

Log:
  textproc/smi: respect *FLAGS (similar to r397201)

  - Replace vendor Makefile with a virtual one based on bsd.prog.mk to
    avoid too much patching despite simplicity

  PR:		203137
  Approved by:	maintainer timeout (83 days)

Changes:
  head/textproc/smu/Makefile
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-07 05:06:22 UTC
Assign to committer that resolved