Bug 210763

Summary: chinese/opencc: Update to 1.0.4
Product: Ports & Packages Reporter: Iblis Lin <iblis.dif01>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Only Me CC: lichray, pi
Priority: --- Keywords: patch
Version: LatestFlags: lichray: maintainer-feedback+
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210781
Bug Depends on:    
Bug Blocks: 210781    
Description Flags
opencc patch
opencc patch v2
opencc patch v3
opencc patch v4
poudriere testport log on 10.3-RELEASE for patch v4 none

Description Iblis Lin 2016-07-02 17:11:19 UTC
Created attachment 172043 [details]
opencc patch
Comment 1 lichray 2016-07-02 17:24:11 UTC
There are ports relying the shared library, please fix.
Comment 2 Iblis Lin 2016-07-02 18:14:56 UTC
(In reply to lichray from comment #1)
This patch include a OPTION `STATIC` to let user choose to build share lib or not. So... Do you want to remove this option?
Comment 3 lichray 2016-07-02 18:20:01 UTC
(In reply to Iblis Lin from comment #2)
I see.  I'll give it a test later.
Comment 4 lichray 2016-07-02 20:58:22 UTC
(In reply to Iblis Lin from comment #2)

This version breaks bsdconv-opencc.  I'm unable to approve it.

It seems that static and shared libraries are mutual exclusive.  I expect the shared library is always being built (or just remove this option, if making this optional is not a common practice in the ports tree), as fcitx is a major "customer" in the ports using opencc; building opencc without shared library is surprising IMO.
Comment 5 Iblis Lin 2016-07-03 13:42:55 UTC
Created attachment 172060 [details]
opencc patch v2

(In reply to lichray from comment #4)
> This version breaks bsdconv-opencc.
Hmm... There are some api changes from 0.4.3 to 1.x version. The api changes make bsdconv-opencc broken. I will try to fix it and send to upstream later.

> building opencc without shared library is surprising IMO.
Ok, I removed the option now, please checkout the new patch.
Comment 6 lichray 2016-07-03 22:09:38 UTC
(In reply to Iblis Lin from comment #5)

Maybe: 1. mark bsdconv-opencc BROKEN, or 2. move the old opencc to something like opencc1.
Comment 7 lichray 2016-07-04 02:10:57 UTC
(In reply to lichray from comment #6)
Filed an issue to bsdconv-opencc author (& maintainer): https://github.com/buganini/bsdconv-opencc/issues/1
Comment 8 Iblis Lin 2016-07-04 08:28:15 UTC
Created attachment 172090 [details]
opencc patch v3

The patch, v3, make `fcitx-rime` PORTREVISION increase to 1.
Comment 9 lichray 2016-07-05 13:23:26 UTC
(note: this patch also applies to chinese/fcitx-rime)
Comment 10 Kurt Jaeger freebsd_committer 2016-07-08 16:59:07 UTC
fails to build, even with USES=python, see

(replace 103 with 10i, 93a, cur for other versions).
Comment 11 Iblis Lin 2016-07-08 18:22:02 UTC
Created attachment 172251 [details]
opencc patch v4

- Add `python:build` to USES

- Also add a post-patch target to change python cmd path.
  (This port just needs a `python` symblink, is there any correct way to do this?)
Comment 12 Iblis Lin 2016-07-08 18:27:14 UTC
Created attachment 172252 [details]
poudriere testport log on 10.3-RELEASE for patch v4
Comment 13 lichray 2016-07-08 18:51:07 UTC
(In reply to Iblis Lin from comment #11)
A more "correct" way to the upstream may be to use cmake find Python, but to us patching is good enough.
Comment 14 Kurt Jaeger freebsd_committer 2016-07-08 19:02:19 UTC
It fails to build on 9.3a, should this work ?

Comment 15 VK freebsd_triage 2016-07-08 19:25:38 UTC
Iblis, thanks for the patches. Please note that confirming the build with Poudriere is sufficient, attaching the build logs is not required (unless explicitly asked for) and only clutters the bugzilla database. ;)
Comment 16 lichray 2016-07-08 19:29:45 UTC
(In reply to Kurt Jaeger from comment #14)
Need https://www.freebsd.org/doc/en/books/porters-handbook/uses-compiler.html
Not sure whether C++11 library is needed as well.
Comment 17 Kurt Jaeger freebsd_committer 2016-07-09 03:36:51 UTC
With compiler:c++11-lib testbuilds are all fine.
Comment 18 Kurt Jaeger freebsd_committer 2016-07-09 03:43:56 UTC
Committed, thanks!
Comment 19 commit-hook freebsd_committer 2016-07-09 03:44:00 UTC
A commit references this bug:

Author: pi
Date: Sat Jul  9 03:43:15 UTC 2016
New revision: 418255
URL: https://svnweb.freebsd.org/changeset/ports/418255

  chinese/opencc: 0.4.3 -> 1.0.4

  PR:		210763
  Changes:	https://github.com/BYVoid/OpenCC/blob/master/NEWS.md
  Submitted by:	Iblis Lin <iblis@hs.ntnu.edu.tw>
  Approved by:	lichray@gmail.com (maintainer)