Bug 217499 - [patch] comms/chirp: Fix port after py-serial upgrade in r424787, formalize gtk dependency
Summary: [patch] comms/chirp: Fix port after py-serial upgrade in r424787, formalize g...
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: Diane Bruce
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-03-02 17:03 UTC by Kyle Evans
Modified: 2017-03-04 12:45 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (hamradio)


Attachments
svn(1) diff of added patches to comms/chirp and gtk2 dependency added (23.72 KB, patch)
2017-03-02 17:03 UTC, Kyle Evans
no flags Details | Diff
svn(1) diff for update to chirp (39.96 KB, patch)
2017-03-03 02:01 UTC, Kyle Evans
no flags Details | Diff
svn(1) diff of comms/chirp (18.76 KB, patch)
2017-03-03 03:02 UTC, Kyle Evans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2017-03-02 17:03:45 UTC
Created attachment 180442 [details]
svn(1) diff of added patches to comms/chirp and gtk2 dependency added

py-serial got updated in r424787 to a 3.* version, which chirp 0.4.1 is not compatible with because of a couple function => property changes. Given that upstream hasn't made a non-daily release since 0.4.1, I've backported the following two commits from upstream:

http://chirp.danplanet.com/projects/chirp/repository/revisions/0758ce12bbae
http://chirp.danplanet.com/projects/chirp/repository/revisions/d1bc2c917785

I did this fully acknowledging that comms/chirp could use an update to a newer version, but unless we want to switch it to track daily- versions with an epoch change then this is the next best thing. =)

I've also formalized the dependency on py27-gtk2 and tested this patch with my Baofeng UV-5RA.
Comment 1 Diane Bruce freebsd_committer freebsd_triage 2017-03-02 23:58:49 UTC
It might make more sense to use his http://trac.chirp.danplanet.com/chirp_daily
and redo the port version as 0.4.1.2017.02.22 e.g. encode the date into the
version as per the Porter's Handbook
Comment 2 Kyle Evans freebsd_committer freebsd_triage 2017-03-03 01:25:28 UTC
(In reply to Diane Bruce from comment #1)

That's fair -- I was torn before I did this between proposing using the daily- packages or just backporting these patches. Given that the daily- packages are actually somewhat far and few between and seem pretty stable from the one I played with, that doesn't sound like a bad idea.

I'll whip up an update to the 2017/02/22 package here shortly and propose that version instead, along with the GTK2 dependency addition. This has the added benefit that the chirpui patch can go away (it uses sys.prefix now) and the other two still apply and are useful, IIRC.
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2017-03-03 02:01:22 UTC
Created attachment 180452 [details]
svn(1) diff for update to chirp

Alright, that was easier than I anticipated. Some notes:

1.) The way I handled the magical "extract MASTER_SITES/DISTNAME" from PORTVERSION is really ugly looking. Should I instead move the date part out to a separate make(1) variable and use that for PORTVERSION+MASTER_SITES+DISTNAME?

2.) files/patch-chirpui_mainapp.py goes away because that section got rewritten and is now "more correct" upstream

3.) I did skim over the plist and didn't seem anything blatantly wrong. This version does include the compiled bits in PYTHON_SITELIBDIR, but IIRC that's kind of the way the ports tree is moving for the time being anyways.

Portlint doesn't offer any complaints other than what it had before (patch file naming, CHIRP_DEPENDS,  NLS knob), but my build server is currently offline so poudriere run is a no go for me for a couple days =(. I did `make package` and play with it a little bit to make sure there wasn't anything blatantly wrong.
Comment 4 Diane Bruce freebsd_committer freebsd_triage 2017-03-03 02:19:09 UTC
(In reply to Kyle Evans from comment #2)

Looks like you are missing PLIST_SUB= %%PYTHON_PYOEXTENSION%% as it fails
poudriere here. All the .pyo files are complained about.

Yes I dunno about the ugliness either.
Comment 5 Kyle Evans freebsd_committer freebsd_triage 2017-03-03 02:28:12 UTC
(In reply to Diane Bruce from comment #4)

Interesting -- I thought that might've been a Python 3 specific thing, but ${PORTSDIR}/Mk/Uses/python.mk:191 indicates that it should be adding all of these PLIST_SUB entries just by using USES= python and `make -VPLIST_SUB` indicates it's working fine here...I'll dig into it some more tomorrow.
Comment 6 Kyle Evans freebsd_committer freebsd_triage 2017-03-03 03:02:47 UTC
Created attachment 180454 [details]
svn(1) diff of comms/chirp

Alright, sorry about that, this is probably the technically right way it should be done -- with USES_PYTHON= autoplist. If poudriere isn't happy with this, then I'll consult those that know better because I don't see what else could be wrong here. =)
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-03-04 02:48:29 UTC
A commit references this bug:

Author: db
Date: Sat Mar  4 02:47:33 UTC 2017
New revision: 435381
URL: https://svnweb.freebsd.org/changeset/ports/435381

Log:
  py-serial got updated in r424787 to a 3.* version, which chirp 0.4.1 is not
  compatible with because of a couple function => property changes.
  Given that upstream hasn't made a non-daily release since 0.4.1 we are
  forced to track daily builds for now.

  PR:		ports/217499
  Submitted by:	bsdports@kyle-evans.net

Changes:
  head/comms/chirp/Makefile
  head/comms/chirp/distinfo
  head/comms/chirp/files/patch-chirp_platform.py
  head/comms/chirp/files/patch-chirpui_mainapp.py
  head/comms/chirp/files/patch-setup.py
  head/comms/chirp/pkg-plist