Bug 223565 - [new ports] chinese/libcangjie, chinese/pycangjie, chinese/ibus-cangjie, devel/pycanberra: enable chinese cangjie input method
Summary: [new ports] chinese/libcangjie, chinese/pycangjie, chinese/ibus-cangjie, deve...
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: Kurt Jaeger
Depends on:
Reported: 2017-11-09 15:07 UTC by bye
Modified: 2018-03-03 11:31 UTC (History)
1 user (show)

See Also:

gz file with 4 svn diff (17.50 KB, application/x-tar)
2017-11-09 15:07 UTC, bye
no flags Details
pycanberra svn diff (1.86 KB, patch)
2017-11-24 15:00 UTC, bye
no flags Details | Diff
ibus-cangjie with pycanberra support (3.00 KB, application/x-tar)
2017-12-20 18:54 UTC, bye
no flags Details
current state of the three missing ports (9.39 KB, patch)
2017-12-21 20:53 UTC, Kurt Jaeger
no flags Details | Diff
proper diff file (3.00 KB, application/x-tar)
2017-12-23 13:41 UTC, bye
no flags Details
ibus-cangjie & pycanberra svn dot diff files (19.50 KB, application/x-tar)
2017-12-24 06:26 UTC, bye
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description bye 2017-11-09 15:07:06 UTC
Created attachment 187882 [details]
gz file with 4 svn diff

This is a package of ports that enables chinese cangjie input method package includes:
WWW: http://cangjians.github.io/

You have to install the packages in this order libcangjie -> pycangjie -> ibus-cangjie

Because of issues with python versions in Makefiles 

pycanberra can be installed anytime before ibus-cangjie; it's optional and allows for sounds.

My Python porting skills might not be up to snuff and this could probably be written better. I am open to suggestions on improving this.

This is a heavy port to test because it needs LLVM and that takes about 1 hour to build the whole thing, gnome stuff I guess.
Comment 1 bye 2017-11-22 14:56:35 UTC
How's this port going?
Comment 2 Kurt Jaeger freebsd_committer 2017-11-24 12:40:12 UTC
make check-plist



complains about:

===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra-1.0-py%%PYTHON_VER%%.egg-info/PKG-INFO
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra-1.0-py%%PYTHON_VER%%.egg-info/SOURCES.txt
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra-1.0-py%%PYTHON_VER%%.egg-info/dependency_links.txt
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra-1.0-py%%PYTHON_VER%%.egg-info/top_level.txt
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra/__init__.py
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra/__init__.pyc
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra/__init__.%%PYTHON_PYOEXTENSION%%
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra/pycanberra.py
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra/pycanberra.pyc
Error: Missing: %%PYTHON_SITELIBDIR%%/pycanberra/pycanberra.%%PYTHON_PYOEXTENSION%%
===> Error: Plist issues found.
Comment 3 bye 2017-11-24 14:58:36 UTC
(In reply to Kurt Jaeger from comment #2)

I didn't realize that the autoplist handled this for me.
Comment 4 bye 2017-11-24 15:00:05 UTC
Created attachment 188242 [details]
pycanberra svn diff

This is an updated pycanberra removing the pkg-plist which should be handled automatically by USES_PYTHON= autoplist directive.

Also removed bsd.make.[pre|post] stuff
Comment 5 commit-hook freebsd_committer 2017-11-24 18:31:54 UTC
A commit references this bug:

Author: pi
Date: Fri Nov 24 18:31:19 UTC 2017
New revision: 454830
URL: https://svnweb.freebsd.org/changeset/ports/454830

  New port: devel/pycanberra

  A very basic wrapper for libcanberra.

  Ensure all strings passed to libcanberra are byte strings.

  WWW: https://github.com/totdb/pycanberra

  PR:		223565
  Submitted by:	owen94012@gmail.com

Comment 6 commit-hook freebsd_committer 2017-11-24 18:41:04 UTC
A commit references this bug:

Author: pi
Date: Fri Nov 24 18:40:22 UTC 2017
New revision: 454831
URL: https://svnweb.freebsd.org/changeset/ports/454831

  devel/pycanberra: remove comment line

  PR:		223565
  Reported by:	joneum

Comment 7 Kurt Jaeger freebsd_committer 2017-11-24 18:41:14 UTC
Comment 8 Kurt Jaeger freebsd_committer 2017-11-24 19:58:31 UTC
Testbuild fails, see the buildlog at

Comment 9 bye 2017-11-24 20:29:20 UTC
(In reply to Kurt Jaeger from comment #8)

Are you building this in Poudriere? I think I've seen this error before from a previous port, can you please add:


to the ibus-cangjie Makefile? If it's too much trouble I'll just create a new svn diff and attach that.
Comment 10 bye 2017-11-25 17:20:49 UTC
Were you able to build the port or do I need to submit an updated diff file?
Comment 11 bye 2017-11-26 01:15:51 UTC
(In reply to bcomputerguy from comment #10) o

You have to install them in this order:
libcangjie -> pycangjie -> ibus-cangjie

can you try that? I just did a test and it worked as expected.
Comment 12 Kurt Jaeger freebsd_committer 2017-11-26 16:23:37 UTC
I'm testbuilding with poudriere, and it fails, see the log.

If this:

libcangjie -> pycangjie -> ibus-cangjie                                         

is required to build, the _DEPENDS should reflect it. Can you submit an update that reflects this ?
Comment 13 bye 2017-12-20 18:54:28 UTC
Created attachment 189001 [details]
ibus-cangjie with pycanberra support

I build ibus-cangjie.

I had to abuse flavors a bit, forcing pycangjie to build version above 3.4 and commenting out the python check line in the configure.ac file.

I'll try to get upstream to fix the issues but for now the port builds cleanly as is.

pycanberra needs to be updated with this diff as well.
Comment 14 Kurt Jaeger freebsd_committer 2017-12-21 11:17:13 UTC
Comment 15 bye 2017-12-21 11:21:33 UTC
(In reply to Kurt Jaeger from comment #14)

Awesome, I'll see if I can get some changes upstream to remove those kludges I put in the Makefiles.

Suitable to submit to the ports tree?
Comment 16 Kurt Jaeger freebsd_committer 2017-12-21 11:35:30 UTC
I'm still building. It re-builds gtk20 and cmake.

Ah, there are issues:

[00:10:39] [03] [00:00:12] Skipping chinese/pycangjie | zh-pycangjie-1.3: Dependent port chinese/libcangjie | zh-libcangjie-1.3 failed
Comment 17 bye 2017-12-21 11:45:59 UTC
(In reply to Kurt Jaeger from comment #16)

What version of FreeBSD are you building on?
I don't get any failures, can you provide more details?

FreeBSD blubee 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r326056: Tue Nov 21 14:54:55 UTC 2017     root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
Comment 18 Kurt Jaeger freebsd_committer 2017-12-21 20:49:55 UTC
Testbuilds for chinese/bus-cangjie all fail to find a working python during configure. Any ideas ?

See the poudriere build logs at:


I build with poudriere on cur (12.0-CURRENT 1200051 amd64), 11.1amd64 and 10.3i386.
Comment 19 Kurt Jaeger freebsd_committer 2017-12-21 20:53:13 UTC
Created attachment 189021 [details]
current state of the three missing ports

The diff is the state of the ports I'm testbuilding right now (some small fixes to build with flavors).
Comment 20 bye 2017-12-21 23:44:17 UTC
(In reply to Kurt Jaeger from comment #18)

This doesn't make any sense, why wouldn't it pull in python?
Comment 21 bye 2017-12-22 00:02:53 UTC
(In reply to Kurt Jaeger from comment #19)

You shouldn't need to apply any changes, the port builds cleanly. I tested it before submitting and I just rested it just now.

Unless I'm missing something w/ poudriere why is it building correctly for me with the diffs that I setup and failing for you?

build log: https://pastebin.com/0Kuhy49c
Comment 22 Kurt Jaeger freebsd_committer 2017-12-22 08:40:34 UTC
(In reply to bcomputerguy from comment #20)
Good question, but if you check your log, the configure run does not mention python, while my build checks for python. I'm as surprised as you are.
Comment 23 bye 2017-12-22 09:07:07 UTC
(In reply to Kurt Jaeger from comment #22)

it seems that I updated the wrong diff.

I had to add a kludge, comment out the python check in the configure file because I "KNOW" i'll have installed python3.6 with ibus-cangjie.

If it checks for python, it will find it but configure will fail because python version < 3.2.3

I filed a bug about it here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224486

I'll look at the diffs and see why I uploaded the wrong .diff files.

can you add this to your ibus-cangjie/Makefile
.include <bsd.port.pre.mk>
	@(cd ${WRKSRC} && 								\
	      ${REINPLACE_CMD} -e 's|([3.2.3])|([2.7])|g' ${WRKSRC}/configure.ac &&	\
	      autopoint --force && 							\
	      intltoolize --force --copy --automake &&					\
	      aclocal -I m4 &&								\
	      autoheader &&								\
	      automake --add-missing --copy &&						\
	      autoconf &&								\
	     ./configure ${CONFIGURE_ENV})
	      #ugly kludge fix [1]
	      #[1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224486
	      #I know python3 will be installed so I'll just look around this check
.include <bsd.port.post.mk>
Comment 24 bye 2017-12-23 13:41:23 UTC
Created attachment 189054 [details]
proper diff file

I have to apologize, I made the diff without committing my local changes AND I didn't look at the diff files before uploading them, so the diffs were really incomplete.

I made all the changes and now things should build as expected.
Apologies again for my oversight...
Comment 25 Kurt Jaeger freebsd_committer 2017-12-23 15:33:23 UTC
(In reply to bcomputerguy from comment #24)

Please check the uploaded file:

fetch -o ib.diff https://bugs.freebsd.org/bugzilla/attachment.cgi?id=189054
ib.diff                                       100% of 3072  B   16 MBps 00m00s
$ less ib.diff
"ib.diff" may be a binary file.  See it anyway? 
$ file ib.diff
ib.diff: POSIX tar archive
$ tar vft ib.diff
-rw-r--r--  0 blubee blubee      0 Dec 20 19:49 ibus-cangjie.diff
-rw-r--r--  0 blubee blubee    729 Dec 20 19:02 pycanberra.diff
$ l ib.diff 
-rw-rw-r--  1 pi  wheel  3072 Dec 23 15:25 ib.diff

I think it's still not correct. Can you re-check ?
Comment 26 bye 2017-12-24 06:26:10 UTC
Created attachment 189072 [details]
ibus-cangjie & pycanberra svn dot diff files

If there's still something wrong with these files, here's a pastebin of their contents:

ibus-cangjie.diff [chinese/[libcangjie|pycangjie|ibus-cangjie]

pycanberra.diff [devel/pycangjie]
Comment 27 Kurt Jaeger freebsd_committer 2017-12-31 11:20:23 UTC
Comment 28 commit-hook freebsd_committer 2017-12-31 19:12:48 UTC
A commit references this bug:

Author: pi
Date: Sun Dec 31 19:12:26 UTC 2017
New revision: 457714
URL: https://svnweb.freebsd.org/changeset/ports/457714

  New port: chinese/pycangjie

  This is a Python wrapper to libcangjie,
  the library implementing the Cangjie input method.

  WWW: http://cangjians.github.io/projects/pycangjie/

  PR:		223565
  Submitted by:	hello@blubee.me

Comment 29 commit-hook freebsd_committer 2017-12-31 19:14:54 UTC
A commit references this bug:

Author: pi
Date: Sun Dec 31 19:14:13 UTC 2017
New revision: 457715
URL: https://svnweb.freebsd.org/changeset/ports/457715

  New port: chinese/libcangjie

  This is a C library implementing the Cangjie input method.
  This library is based on Wan Leung Wong's original libcangjie
  with some updated API.

  WWW: https://github.com/Cangjians/libcangjie

  PR:		223565
  Submitted by:	hello@blubee.me

Comment 30 commit-hook freebsd_committer 2017-12-31 19:15:56 UTC
A commit references this bug:

Author: pi
Date: Sun Dec 31 19:15:50 UTC 2017
New revision: 457716
URL: https://svnweb.freebsd.org/changeset/ports/457716

  New port: chinese/ibus-cangjie

  This is an IBus engine for users of the Cangjie and
  Quick input methods.

  It is primarily intended to Hong Kong people
  who want to input Traditional Chinese,
  as they are (by far) the majority of Cangjie and Quick users.

  WWW: http://cangjians.github.io/projects/ibus-cangjie/

  PR:		223565
  Submitted by:	hello@blubee.me

Comment 31 Kurt Jaeger freebsd_committer 2017-12-31 19:20:47 UTC
One thing: the removal of the python stuff in chinese/ibus-cangjie/Makefile.

I suggest you look into this once more, maybe this can be done
much more cleanly using some patch to configure.ac and autoreconf, 
maybe next time there's an update to that port ?
Comment 32 bye 2018-01-02 16:27:27 UTC
(In reply to Kurt Jaeger from comment #31)
Upstream seems a bit meh as far as responsiveness but I'll keep trying.
Comment 33 bye 2018-01-03 04:56:31 UTC
build failing on i386, 
logs: http://package19.nyi.freebsd.org/data/103i386-default-build-as-user/457820/logs/zh-ibus-cangjie-2.4.log

url: http://package19.nyi.freebsd.org/build.html?mastername=103i386-default-build-as-user&build=457820

The problem is that you guys didn't commit the [devel/pycanberra] diff.

Can you please commit that as well?
Comment 34 Kurt Jaeger freebsd_committer 2018-01-12 18:12:55 UTC
antoine fixed that in r457831, see


Or is there something else that does not work ?
Comment 35 bye 2018-01-13 14:55:17 UTC
(In reply to Kurt Jaeger from comment #34)
Everything is OK now.
I was getting ddos by buildscout because of build failures.
Comment 36 bye 2018-01-16 07:47:38 UTC
I just checked and ibus-canjie isn't in head?

Reports that the port has been deleted.

svn info reports:
svn info /usr/ports/
路徑: /usr/ports
Working Copy Root Path: /usr/ports
URL: svn://svn.freebsd.org/ports/head
Relative URL: ^/head
檔案庫根目錄: svn://svn.freebsd.org/ports
檔案庫 UUID: 35697150-7ecd-e111-bb59-0022644237b5
修訂版: 459157
節點種類: 目錄
排程: 正常
最後更新作者: kwm
最後修改修訂版: 459157
最後修改日期: 2018-01-16 14:54:08 +0800 (週二, 16  1月 2018)

so everything seems up to date.

Why was ibus-cangjie deleted?
Comment 37 Kurt Jaeger freebsd_committer 2018-03-03 11:31:24 UTC
(In reply to bcomputerguy from comment #36)
Was later re-added, because first version was not buildable.