Opened 11 years ago

Last modified 8 years ago

#37579 new submission

calligra: new port submission

Reported by: yue.liu@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: NicosPavlov, cooljeanius (Eric Gallager), mfuhrer@…, mkae (Marko Käning), eirnym (Eir Nym)
Port: calligra

Description

The port is the kde office suite Calligra Suite.

Attachments (5)

Portfile (2.3 KB) - added by yue.liu@… 11 years ago.
place under kde category
Portfile.2 (2.5 KB) - added by gallafent 11 years ago.
Portfile for calligra
Portfile.3 (2.5 KB) - added by gallafent 11 years ago.
Portfile for calligra (2.6 branch)
Portfile.4 (2.6 KB) - added by gallafent 11 years ago.
Portfile for calligra (2.6 branch), runs kbuildsycoca4 after installation
Portfile.5 (2.6 KB) - added by gallafent 11 years ago.
Portfile for calligra 2.6.1

Download all attachments as: .zip

Change History (21)

Changed 11 years ago by yue.liu@…

Attachment: Portfile added

place under kde category

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Keywords: office kde removed
Summary: new port calligracalligra: new port submission
Version: 2.1.2

A few suggestions.

  • Add the standard modeline as the first line.
  • revision is optional if it's 0.
  • LGPL-2 / GPL-2” is not a valid license format. If both apply, license should be “LGPL-2 GPL-2”; if there is a choice, it should be “{LGPL-2 GPL-2}”.
  • The file has both tabs and spaces; remove the tabs and use 4-space indents, as per the standard modeline.

I’m afraid I can’t test the port, as I do not have KDE installed.

comment:2 Changed 11 years ago by gallafent

The README included in the current version of Calligra states:

“Calligra Suite is free software, mostly under LGPL 2+ but also under the GPL. See COPYING and COPYING.LIB for the details. See also copyright and licensing notices in individual files.”

That is unfortunately not very useful in attempting to determine the licence under which the entire suite is actually distributed, particularly since “mostly” isn't defined. The task of teasing apart the individual licences is not one which is sensibly undertaken:

Humber:calligra-2.5.4 williamg$ grep -ir copyright * | wc -l
   13393
Humber:calligra-2.5.4 williamg$ grep -ir licen[cs] * | wc -l
   35407

Much of this appears to be either GPL or LGPL boilerplate, or copyright notices with individual names beside them. I would suggest that the presence of the GPL code may well lead to Calligra itself being considered a derived work from that code, and that MacPorts assumes that the GPL therefore applies. Clearly some input from the manager of the Calligra project would be helpful to clarify though!

I'll attach a revised portfile in a moment. At present, I'm not able to run the applications that this portfile creates. Double-clicking the application does not launch it.

Running an executable directly also does not work, but provides a hint which I don't know how to act on; for example:

Humber:ports williamg$ /Applications/MacPorts/KDE4/karbon.app/Contents/MacOS/karbon
karbon(60776)/KSharedDataCache ensureFileAllocated: This system misses support for posix_fallocate() -- ensure this partition has room for at least 10547296 bytes. 
karbon(60776)/koffice (lib komain): "karbon" part.desktop not found. 

karbon(60776)/koffice (lib komain): Run 'kde4-config --path services' to see which directories were searched, assuming kde startup had the same environment as your current shell. 

karbon(60776)/koffice (lib komain): Check your installation (did you install Calligra in a different prefix than KDE, without adding the prefix to /etc/kderc ?) 
Humber:ports williamg$ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
org.freedesktop.dbus-session: Already loaded
Humber:ports williamg$ kde4-config --path services
/Users/williamg/Library/Preferences/KDE/share/kde4/services/:/opt/local/share/kde4/services/

If somebody who better understands the interactions of KDE with MacPorts could look at this, we're probably almost all the way to a working port.

Changed 11 years ago by gallafent

Attachment: Portfile.2 added

Portfile for calligra

comment:3 Changed 11 years ago by yue.liu@…

when i was testing this port, i remember sometimes i have to run command sudo update-mime-database ${prefix}/share/mime to make calligra work.

comment:4 Changed 11 years ago by yue.liu@…

about license, krita has codes in GPL, all other parts in LGPL. Not sure how to write the license field.

calligra 2.6.0 will be released shortly, so i suggest don't release 2.5.4 port. I never tested that branch with this portfile.

Changed 11 years ago by gallafent

Attachment: Portfile.3 added

Portfile for calligra (2.6 branch)

comment:5 Changed 11 years ago by gallafent

(For some reason I get a “forbidden” message when I attempt to replace the attachment, hence Portfile.3 …)

Using the 2.5.94 version built using the attached Portfile.3, I still get the same failure of the applications to start as described in comment:2. I tried the mime database command you suggested, which responded thus:

Humber:ports williamg$ sudo update-mime-database /opt/local/share/mime
Password:
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'

Note that '/opt/local/share' is not in the search path
set by the XDG_DATA_HOME and XDG_DATA_DIRS
environment variables, so applications may not
be able to find it until you set them. The
directories currently searched are:

- /var/root/.local/share
- /usr/local/share/
- /usr/share/

After having done this, the applications still fail to start in the same way.

comment:6 Changed 11 years ago by gallafent

Incidentally, I notice the presence of a <appname>.shell script in appname.app bundle. When running this script, I see the following:

Humber:ports williamg$ /Applications/MacPorts/KDE4/karbon.app/Contents/MacOS/karbon.shell 
/Applications/MacPorts/KDE4/karbon.app/Contents/MacOS/karbon.shell: line 4: /opt/local/var/macports/build/_Users_williamg_Projects_MacPorts_ports_kde4_calligra/calligra/work/build/karbon/karbon.app/Contents/MacOS/karbon: No such file or directory

I also noticed that krita.app displays (very briefly) a splash screen when double-clicked in the finder, before exiting. Running it from the command line, it exits in the same way as the others.

comment:7 Changed 11 years ago by gallafent

This thread, “SyCoCa - Fixing broken KDE apps” provided the (manual) solution for me.

I ran kbuildsycoca4 from the shell, and now the Calligra apps will start.

I have added the suggested post-activate step to the Portfile, which I will attach in a moment (it will be Portfile.4).

There is a question mark though; during that thread Nicolas Pavillon says:

“To the best of my understanding, this was not possible to apply this approach on the ports I am maintaining, because kbuildsycoca needs to be run at user level, and not system. In the particular case I am thinking about, kdevelop, running it from the Portfile had no effect (there had been some discussion in the mailing list to try to run it from within the Portfile at user level, but with no direct solution).

“It is just that if indeed this can be run within the standard installation process, this would greatly simplify things.”

I would be grateful if somebody could try building using the attached Portfile.4, to see if this does make runnable Calligra apps for them with the kbuildsycoca4 having been run as root.

Apart from this wrinkle, Portfile.4 now builds and installs successfully for me!

Thanks to Yue Liu for creating the port, hope that the kbuildsycoca4 question can be resolved and the port added to the repository :)

Last edited 11 years ago by gallafent (previous) (diff)

Changed 11 years ago by gallafent

Attachment: Portfile.4 added

Portfile for calligra (2.6 branch), runs kbuildsycoca4 after installation

comment:8 Changed 11 years ago by NicosPavlov

Cc: nicos@… added

Cc Me!

comment:9 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:10 Changed 11 years ago by cooljeanius (Eric Gallager)

There's a separate ticket for making a port just for Krita, which appears to be part of this, too: #38099

comment:11 Changed 11 years ago by gallafent

At present there's a problem building this port on Mac OS 10.7 using Xcode 4.6. The relevant portion of the log is:

:info:build Linking CXX executable TestKoLcmsColorProfile.app/Contents/MacOS/TestKoLcmsColorProfile
:info:build cd /opt/local/var/macports/build/_Users_williamg_Projects_MacPorts_ports_kde4_calligra/calligra/work/build/plugins/colorengines/lcms2/tests && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/TestKoLcmsColorProfile.dir/link.txt --verbose=1
:info:build /usr/bin/clang++   -pipe -O2 -arch x86_64  -fno-common -O3 -DNDEBUG -DQT_NO_DEBUG -arch x86_64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  -arch x86_64 CMakeFiles/TestKoLcmsColorProfile.dir/TestKoLcmsColorProfile_automoc.cpp.o CMakeFiles/TestKoLcmsColorProfile.dir/TestKoLcmsColorProfile.cpp.o  -o TestKoLcmsColorProfile.app/Contents/MacOS/TestKoLcmsColorProfile  /opt/local/lib/libkdeui.5.10.1.dylib ../../../../lib/libpigmentcms.11.0.0.dylib /opt/local/lib/libQtTest.dylib /opt/local/lib/liblcms2.dylib ../../../../lib/kolcmsengine.so /opt/local/lib/libQtSvg.dylib /opt/local/lib/libQtGui.dylib ../../../../lib/libkoplugin.11.0.0.dylib /opt/local/lib/libkdecore.5.10.1.dylib /opt/local/lib/libQtDBus.dylib /opt/local/lib/libQtCore.dylib -framework Carbon /opt/local/lib/libQtXml.dylib /opt/local/lib/libImath.dylib /opt/local/lib/libIlmImf.dylib /opt/local/lib/libIex.dylib /opt/local/lib/libHalf.dylib /opt/local/lib/libIlmThread.dylib 
:info:build /opt/local/bin/cmake -E cmake_progress_report /opt/local/var/macports/build/_Users_williamg_Projects_MacPorts_ports_kde4_calligra/calligra/work/build/CMakeFiles 
:info:build [ 16%] ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) for architecture x86_64

I'll attach an updated portfile matching the current released version (2.6.1) in a moment; that version still exhibits this problem. I haven't investigated the cause.

Changed 11 years ago by gallafent

Attachment: Portfile.5 added

Portfile for calligra 2.6.1

comment:12 Changed 11 years ago by mfuhrer@…

Cc: mfuhrer@… added

Cc Me!

comment:13 Changed 11 years ago by juanrgar (Juan R. García Blanco)

Cc: juanrgar@… added

Cc Me!

comment:14 Changed 11 years ago by juanrgar (Juan R. García Blanco)

Cc: juanrgar@… removed

Cc Me!

comment:15 Changed 10 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:16 Changed 8 years ago by eirnym (Eir Nym)

Cc: eirnym@… added

Cc Me!

Note: See TracTickets for help on using tickets.