Bug 233240

Summary: math/octave: improves USES flags and DOCS option, strips shared library
Product: Ports & Packages Reporter: Lorenzo Salvadore <salvadore>
Component: Individual Port(s)Assignee: Stephen Montgomery-Smith <stephen>
Status: Closed FIXED    
Severity: Affects Only Me CC: ndowens04, stephen
Priority: --- Flags: bugzilla: maintainer-feedback? (stephen)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 233357    
Attachments:
Description Flags
patch for octave
none
new patch for octave
none
patch for octave, correction 2
none
patch for octave, correction 3 salvadore: maintainer-approval? (stephen)

Description Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-15 10:00:57 UTC
I propose a patch for the following things.

* Fixes some issues suggested by poudriere:
- adds USES+= gl (USE_GL without USES+= gl is deprecated);
- adds USES+= desktop-file-utils iconv;
- adds USE_XORG+= xcursor xinerama xrender;
- adds USE_QT+= printsupport sql widgets;
- strips liboctave.so.6.0.0.

* Changes the behavior of DOCS by adding CONFIGURE_DOCS_ENABLE= docs and defining USE_TEX if and only if DOCS is enabled, so that the port depends on TeX and builds documentation if and only if DOCS is enabled (while now it always depends on Tex and always builds documentation: only the installation of the documentation is option dependent). This has a side effect on manpages, that are now installed if and only if DOCS is enabled (but I would say that for a program such as octave, manpages are not really the main documentation, so I think it makes sense).
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-15 10:08:21 UTC
I am having problems uploading the patch. I will keep trying and if nothing improves I will just copy-paste it in a comment (it is not too long).
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-15 10:12:03 UTC
Created attachment 199256 [details]
patch for octave

My bad: I made the patch with a work directory in. Now it is fine.
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-15 10:26:30 UTC
Forgot to say about testing.

I tested with poudriere on 11.2-RELEASE i386/amd64.
Comment 4 Nathan 2018-11-15 22:52:34 UTC
Comment on attachment 199256 [details]
patch for octave

+
+.include <bsd.port.options.mk>
+.if ${PORT_OPTIONS:MDOCS}
+USE_TEX=	dvipsk:build formats:build
+.endif
+
Change all that to:
DOCS_USE= TEX=dvipsk:build formats:build

Even though you didn't do it, can you move:
INFO=		octave liboctave
somewhere above OPTIONS, as it doesn't belong after OPTIONS
Comment 5 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2018-11-16 01:41:42 UTC
I'm fine with these changes.  Do you want me to go ahead and commit them?
Comment 6 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-16 03:06:13 UTC
Created attachment 199263 [details]
new patch for octave

I moved INFO as suggested by Nathan.

Replacing the conditional block with DOCS_USE_TEX is not possible: it looks like <option>_USE_TEX is not implemented yet; I tried the modification but the test fails.

Also I sorted pkg-plist alphabeticaly.

I would go on with the commit.
Comment 7 Nathan 2018-11-16 03:07:27 UTC
It's not DOCS_USE_TEX, it is DOCS_USE= TEX....
Comment 8 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-16 04:46:12 UTC
(In reply to Nathan from comment #7)

Oh, sorry, I misread.

Then of course I will correct and repeat the test as soon as possible.
Comment 9 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-16 04:58:04 UTC
Created attachment 199264 [details]
patch for octave, correction 2

Corrected with DOCS_USE= TEX=... as Nathan suggested and tested: this time I have not made any more mistakes (I hope!).

Thanks Nathan.
Comment 10 Tobias Kortkamp freebsd_committer freebsd_triage 2018-11-16 11:00:49 UTC
(In reply to Lorenzo Salvadore from comment #9)
+DOCS_USE=	TEX=dvipsk:build formats:build

should be

DOCS_USE=	TEX=dvipsk:build,formats:build

or formats:build would not be added to USE_TEX anymore.
Comment 11 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-16 11:21:33 UTC
Created attachment 199267 [details]
patch for octave, correction 3

I added the missing ",". Thanks.

Sorry for the multiple mistakes.
Comment 12 commit-hook freebsd_committer freebsd_triage 2018-11-16 15:19:01 UTC
A commit references this bug:

Author: stephen
Date: Fri Nov 16 15:18:35 UTC 2018
New revision: 485083
URL: https://svnweb.freebsd.org/changeset/ports/485083

Log:
  - adds USES+= gl (USE_GL without USES+= gl is deprecated);
  - adds USES+= desktop-file-utils iconv;
  - adds USE_XORG+= xcursor xinerama xrender;
  - adds USE_QT+= printsupport sql widgets;
  - strips liboctave.so.6.0.0.
  - Corrects configure options for --withosmesa

  PR:		ports/233240
  Submitted by:	Lorenzo Salvadore <phascolarctos@protonmail.ch>

Changes:
  head/math/octave/Makefile
  head/math/octave/pkg-plist
Comment 13 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2018-11-16 15:24:17 UTC
Committed, thank you.

I also added a correction to the spelling of the --with-osmesa options.