New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #26074 (new update)

Opened 3 years ago

Last modified 10 months ago

update zim

Reported by: bassliu@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jpo@…, burkhard@…, stefan+macports@…, pb.mosca@…
Port: zim

Description

zim in repository is 0.28, it's very old. the lastest version is 0.48, check the website

Attachments

zim.tar.bz2 (1.3 KB) - added by burkhard@… 20 months ago.
Portfile and associated files
zim.tar.2.bz2 (1.3 KB) - added by burkhard@… 14 months ago.
Updated Portfile for zim 0.55
Portfile.diff (3.9 KB) - added by burkhard@… 14 months ago.
New Portfile for zim 0.56 (unified diff to zim 0.28)
zim (83 bytes) - added by burkhard@… 14 months ago.
files/zim (goes with Portfile.diff)
Portfile (2.6 KB) - added by stefan+macports@… 14 months ago.
zim-app (125 bytes) - added by stefan+macports@… 14 months ago.
Portfile.2 (2.6 KB) - added by burkhard@… 14 months ago.
zim-app.2 (80 bytes) - added by burkhard@… 14 months ago.

Change History

comment:1 Changed 3 years ago by macsforever2000@…

  • Version 1.9.1 deleted
  • Type changed from request to update
  • Port set to zim

comment:2 Changed 3 years ago by ryandesign@…

zim 0.28 used perl; zim 0.48 uses python. So there is a lot to be changed in the portfile to do this update.

comment:3 Changed 2 years ago by jpo@…

The latest upstream version is now 0.50.

There are some Mac OS X installation notes available in http://zim-wiki.org/install.html .

/jpo

comment:4 Changed 2 years ago by jpo@…

  • Cc jpo@… added

Cc Me!

Changed 20 months ago by burkhard@…

Portfile and associated files

comment:5 Changed 20 months ago by burkhard@…

I added a Portfile for the current version (0.53). It works for me on Snow Leopard.

comment:6 Changed 20 months ago by burkhard@…

  • Cc burkhard@… added

Cc Me!

comment:7 Changed 17 months ago by stefan+macports@…

Using the attached portfile, this works really well even when running with +quartz (on snow leopard as well). Automatically generating an additional .app bundle would be quite nice.

comment:8 Changed 17 months ago by stefan+macports@…

  • Cc stefan+macports@… added

Cc Me!

Changed 14 months ago by burkhard@…

Updated Portfile for zim 0.55

comment:9 Changed 14 months ago by burkhard@…

Does anybody know what has to happen to get the new version included in Macports?

comment:10 follow-up: ↓ 11 Changed 14 months ago by macsforever2000@…

A couple of comments. If you package up your changes in an archive, it's less likely to get reviewed. It is best to attach the individual files unless there are lots of them, which is not the case. Also, unified diffs of the existing portfile are preferred and also increase the chances of getting your changes looked at and committed.

About the actual changes:

  1. The revision line needs to be removed.
  2. Your email should be obfuscated like "ualberta.ca:burkhard"
  3. The md5 and sha1 checksums should be removed and a sha256 added.
  4. I'm not sure why you are using a python portgroup because that is used for python modules. Is this a python module? If so, it should be called py-zim. You should not be using the python2.6 portgroup. Use the unified python 1.0 portgroup and subports instead.
  5. You should allow different versions of python to be used and have python 2.7 be the default. Either add python variants for python26, python27, etc. or make subports called py26-zim, py27-zim etc. if this is a python module.

Changed 14 months ago by burkhard@…

New Portfile for zim 0.56 (unified diff to zim 0.28)

Changed 14 months ago by burkhard@…

files/zim (goes with Portfile.diff)

comment:11 in reply to: ↑ 10 Changed 14 months ago by burkhard@…

Thanks a lot for your reply. That was exactly the kind of feedback I've been looking for.

In the attached updated Portfile.diff I've addressed points 1,2,3 and 5.

For point 4: Zim is not a python module, but as most python applications it comes with a lot of python modules. (Essentially the application is implemented as a set of modules.) My understanding is that these modules should be installed in the correct python site-packages directory, which seems to be the default if I use a python portgroup. I've looked at the Portfile for "mercurial" for reference and here the python portgroup is used, too.

As I am new to writing Portfiles there are a couple of other things I am not sure about. For example, I've created a wrapper bash script to set the XDG path correctly, but maybe macports just relies on the user to set those environment variables correctly?

comment:12 Changed 14 months ago by stefan+macports@…

I wasn't able to successfully use your latest portfile out of the box. Zim does not start with python 2.7, so I have to install the python2.6 variant. This however makes zim's setup.py fail at checking if the HOME env variable holds a directory. Removing the check in zim/config.py works though.

Apart from these things, I've added the app portgroup to create an app bundle and changed a few things to make the bundle actually start zim from i.e. spotlight.

Changed 14 months ago by stefan+macports@…

Changed 14 months ago by stefan+macports@…

comment:13 Changed 14 months ago by burkhard@…

Which version of OS X are you running? I am using 10.6.8 and for me both variants (python2.6 and python2.7) did work. What else could be the reason that it works for me, but not for you?

Thanks for the app portgroup! I didn't know about it and it looks very useful.

The zim-app you uploaded was specific for python 2.6, which I believe was a result of using reinplace on a file in the filespath directory. I am attaching a Portfile that uses the workpath directory instead and also uses the icon directly from the zim source directory. The 'files' directory now only contains the two bash scripts 'zim' and 'zim-app'.

Changed 14 months ago by burkhard@…

Changed 14 months ago by burkhard@…

comment:14 Changed 14 months ago by stefan+macports@…

Oh, your changes definitely make sense. The zim-app was the file after replacing took place, sorry. I'm using 10.6.8 as well and it's definitely weird that 2.7 does not work. I don't get any messages, no log entries, the process simply exits. I'm not sure if there are any differences between my two python versions installed that could cause this but I don't remember having done anything special to either of them.

Btw, I would prefer not to have two zim scipts like now but it seems spotlight adds parameters like -p that zim does not like and in effect does not start. Maybe it is possible to determine if the script was called from spotlight and then strip paramters, not sure.

comment:15 Changed 10 months ago by pb.mosca@…

  • Cc pb.mosca@… added

Cc Me!

comment:16 Changed 10 months ago by pb.mosca@…

Hi,

I was wondering where we were with the inclusion of this updated port? Does it work now? I whould really appreciate to have it too.

Thanks.

Note: See TracTickets for help on using tickets.