Opened 14 years ago

Closed 10 years ago

#26074 closed update (fixed)

update zim

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

Description

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

Attachments (13)

zim.tar.bz2 (1.3 KB) - added by burkhard@… 13 years ago.
Portfile and associated files
zim.tar.2.bz2 (1.3 KB) - added by burkhard@… 12 years ago.
Updated Portfile for zim 0.55
Portfile.diff (3.9 KB) - added by burkhard@… 12 years ago.
New Portfile for zim 0.56 (unified diff to zim 0.28)
zim (83 bytes) - added by burkhard@… 12 years ago.
files/zim (goes with Portfile.diff)
Portfile (2.6 KB) - added by stefan+macports@… 12 years ago.
zim-app (125 bytes) - added by stefan+macports@… 12 years ago.
Portfile.2 (2.6 KB) - added by burkhard@… 12 years ago.
zim-app.2 (80 bytes) - added by burkhard@… 12 years ago.
Portfile.2.diff (3.4 KB) - added by gabriel.ben.jamin@… 10 years ago.
Portfile.diff.2 (4.2 KB) - added by gabriel.ben.jamin@… 10 years ago.
Diff to a current Portfile
main.log (133.7 KB) - added by mf2k (Frank Schima) 10 years ago.
Portfile.3.diff (4.2 KB) - added by gabriel.ben.jamin@… 10 years ago.
Correct diff to 0.60
main.2.log (133.5 KB) - added by mf2k (Frank Schima) 10 years ago.

Download all attachments as: .zip

Change History (43)

comment:1 Changed 14 years ago by mf2k (Frank Schima)

Port: zim added
Type: requestupdate
Version: 1.9.1

comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

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 13 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 13 years ago by jpo@…

Cc: jpo@… added

Cc Me!

Changed 13 years ago by burkhard@…

Attachment: zim.tar.bz2 added

Portfile and associated files

comment:5 Changed 13 years ago by burkhard@…

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

comment:6 Changed 13 years ago by burkhard@…

Cc: burkhard@… added

Cc Me!

comment:7 Changed 12 years 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 12 years ago by stefan+macports@…

Cc: stefan+macports@… added

Cc Me!

Changed 12 years ago by burkhard@…

Attachment: zim.tar.2.bz2 added

Updated Portfile for zim 0.55

comment:9 Changed 12 years ago by burkhard@…

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

comment:10 Changed 12 years ago by mf2k (Frank Schima)

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 12 years ago by burkhard@…

Attachment: Portfile.diff added

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

Changed 12 years ago by burkhard@…

Attachment: zim added

files/zim (goes with Portfile.diff)

comment:11 in reply to:  10 Changed 12 years 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 12 years 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 12 years ago by stefan+macports@…

Attachment: Portfile added

Changed 12 years ago by stefan+macports@…

Attachment: zim-app added

comment:13 Changed 12 years 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 12 years ago by burkhard@…

Attachment: Portfile.2 added

Changed 12 years ago by burkhard@…

Attachment: zim-app.2 added

comment:14 Changed 12 years 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 12 years ago by pb.mosca@…

Cc: pb.mosca@… added

Cc Me!

comment:16 Changed 12 years 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.

comment:17 Changed 10 years ago by gabriel.ben.jamin@…

I don't want to seem testy, but this ticket is in desperate of attention. It's been 3 years, zim's most recent version is 0.60 and it's still Python-based instead of Perl. In a minute, I'll make the diffs as soon as I can figure out how to handle the checksums in the Portfile (I'm a relative novice).

comment:18 Changed 10 years ago by gabriel.ben.jamin@…

Cc: gabriel.ben.jamin@… added

Cc Me!

Changed 10 years ago by gabriel.ben.jamin@…

Attachment: Portfile.2.diff added

comment:19 Changed 10 years ago by gabriel.ben.jamin@…

I have added a diff (that is hopefully correct). Assuming there are no problems, what else is needed?

comment:20 Changed 10 years ago by gabriel.ben.jamin@…

The diff is hastily constructed. I apologize, I was acting on frustration. I'll be back when I have full confidence in my results.

Changed 10 years ago by gabriel.ben.jamin@…

Attachment: Portfile.diff.2 added

Diff to a current Portfile

comment:21 Changed 10 years ago by gabriel.ben.jamin@…

Well, I brought the Portfile up-to-date--but it doesn't run from the terminal. Is this as designed, or a new bug?

comment:22 Changed 10 years ago by mf2k (Frank Schima)

This does not work for me. I see this error:

Error: Failed to destroot zim: xinstall: Cannot stat: /opt/mports/trunk/dports/editors/zim/files/zim, No such file or directory

Changed 10 years ago by mf2k (Frank Schima)

Attachment: main.log added

comment:23 Changed 10 years ago by gabriel.ben.jamin@…

Well, that's two problems right there! Somehow in the process of putting together the Portfile, a post-destroot became a pre-destroot, which naturally ruined it. And now it runs from the command-line.

What a sloppy, embarrassing mistake. I'm sorry.

Diff to come shortly.

comment:24 Changed 10 years ago by gabriel.ben.jamin@…

Actually, what should I diff from?

comment:25 Changed 10 years ago by mf2k (Frank Schima)

diff from the latest version in svn trunk.

comment:26 Changed 10 years ago by gabriel.ben.jamin@…

Wait. Minor error; will update.

Changed 10 years ago by gabriel.ben.jamin@…

Attachment: Portfile.3.diff added

Correct diff to 0.60

comment:27 Changed 10 years ago by gabriel.ben.jamin@…

Finally, it's in a working state. My apologies again.

comment:28 Changed 10 years ago by mf2k (Frank Schima)

This Portfile has a few problems:

  • The maintainer "gabrielbenjamin" is not valid because that means a Macports committer. You should use your email address obfuscated: "gmail.com:gabriel.ben.jamin".
  • The license should be "GPL-2".
  • I'm not sure why you are using the python 1.0 portgroup? It is usually meant for python modules.
  • This does not build for me. Error below along with the main.log attached.
--->  Staging zim into destroot
Error: Failed to destroot zim: xinstall: Cannot stat: /opt/mports/trunk/dports/editors/zim/files/zim, No such file or directory

Changed 10 years ago by mf2k (Frank Schima)

Attachment: main.2.log added

comment:29 in reply to:  28 Changed 10 years ago by gabriel.ben.jamin@…

Replying to mf2k@…: I retained the portgroups from burkhard's changes. See 11. I see keywords from the python portgroup in the portfile; is there a more appropriate portgroup with the necessary keywords?

This error is strange. I can't reproduce it; what's your setup?

comment:30 Changed 10 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

r120945. I had not noticed that zim and zim-app were required among the mass of attached files.

Note: See TracTickets for help on using tickets.