Bug 226191

Summary: cad/ngspice_rework: Update to 27, new slave port ngspice-shlib
Product: Ports & Packages Reporter: Kevin Zheng <kevinz5000>
Component: Individual Port(s)Assignee: Thierry Thomas <thierry>
Status: Closed FIXED    
Severity: Affects Only Me CC: kevinz5000, portmgr, thierry
Priority: --- Flags: kevinz5000: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 229661    
Attachments:
Description Flags
Patch
none
Patch to upgrade to 28
none
Patch to build both options as flavors thierry: maintainer-approval? (kevinz5000)

Description Kevin Zheng 2018-02-25 07:30:50 UTC
Created attachment 190983 [details]
Patch

Update to 27.

Per request of mr@, add a slave port cad/ngspice-shlib (installs as ngspice_rework-shlib) that CONFLICTS with ngspice. This installs the port with SHLIB set, instead of the default X11.

This would be more appropriately a FLAVOR, since one and only one option (either X11 or SHLIB) can be set. However, we did not obtain a response from portmgr@.
Comment 1 Kevin Zheng 2018-05-14 18:56:13 UTC
I'm the maintainer here, can we please have a committer take a look?
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2018-07-17 18:16:59 UTC
Better than a slave port, I would suggest to default to the option SHLIB.
cad/kicad 5.0.0 needs the shared libraries of ngspice and it would simplify packaging.

BTW, ngspice-28 is the latest stable release, according to http://ngspice.sourceforge.net/download.html
Comment 3 Kevin Zheng 2018-07-17 18:35:10 UTC
(In reply to Thierry Thomas from comment #2)
My concern with that is that as of ngspice 27, SHLIB will disable the CLI. I'm going to see if there's a way to build both in 28.
Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2018-08-21 19:53:57 UTC
Created attachment 196426 [details]
Patch to upgrade to 28

The attached patch upgrades ngspice to release 28.

Unfortunately, the options X11 and SHLIB are still incompatible, due to the redefinition of stdio functions.

Remark: ngsconvert ngproc2mod ngmultidec ngmakeidx nghelp are considered as old and outdated applications and they are no more built, unless you set --enable_oldapps
Comment 5 Thierry Thomas freebsd_committer freebsd_triage 2018-08-21 20:09:15 UTC
@portmgr: the proposed patch creates a new slave port for the SHLIB option; is that still correct, or should we prefer a flavor?
Comment 6 Kevin Zheng 2018-08-21 20:11:53 UTC
Approved.

I think it might be possible to build the two ports separately and just make sure the files they install don't overlap.
Comment 7 Thierry Thomas freebsd_committer freebsd_triage 2018-08-21 20:36:18 UTC
(In reply to Kevin Zheng from comment #6)
Great! It would be fine!
Comment 8 Thierry Thomas freebsd_committer freebsd_triage 2018-09-22 08:07:23 UTC
Created attachment 197335 [details]
Patch to build both options as flavors

The proposed patch uses flavors to build the two versions, x11 and shlib, without using a slave port.
Comment 9 Kevin Zheng 2018-09-22 15:37:27 UTC
(In reply to Thierry Thomas from comment #8)
Approved. Let's get this in the tree.
Comment 10 commit-hook freebsd_committer freebsd_triage 2018-09-22 16:30:33 UTC
A commit references this bug:

Author: thierry
Date: Sat Sep 22 16:30:27 UTC 2018
New revision: 480393
URL: https://svnweb.freebsd.org/changeset/ports/480393

Log:
  Upgrade to 28, and use flavors to build the x11 application and the shared library.

  PR:		226191
  Submitted by:	Kevin Zheng (maintainer)
  Approved by:	portmgr (bapt)

Changes:
  head/cad/ngspice_rework/Makefile
  head/cad/ngspice_rework/distinfo
  head/cad/ngspice_rework/pkg-plist