[MacPorts] #38099: Portfile for Krita
#38099: Portfile for Krita -----------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Keywords: | Port: -----------------------------------+-------------------------------- I have hacked a Portfile for Krita, I think it needs a review, before it get official. I succeded to install by those command listed in the Portfile. To make krita work nice, you have to apply a theme under the settings menu. -- Ticket URL: <https://trac.macports.org/ticket/38099> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by egall@…): You should probably use the kde4 portgroup for this: https://svn.macports.org/repository/macports/trunk/dports/_resources/port1.0... -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): So I should submit it somewhere else? -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): Replying to [comment:1 egall@…]:
You should probably use the kde4 portgroup for this: https://svn.macports.org/repository/macports/trunk/dports/_resources/port1.0...
So I should submit it somewhere else? -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by egall@…): Replying to [comment:3 patrik.andersson.se@…]:
Replying to [comment:1 egall@…]:
You should probably use the kde4 portgroup for this: https://svn.macports.org/repository/macports/trunk/dports/_resources/port1.0...
So I should submit it somewhere else?
No, this is the right place, I was just suggesting you use the kde4 portgroup when writing the portfile. I'm working on a diff that uses it now... -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): Replying to [comment:4 egall@…]:
Replying to [comment:3 patrik.andersson.se@…]:
Replying to [comment:1 egall@…]:
You should probably use the kde4 portgroup for this: https://svn.macports.org/repository/macports/trunk/dports/_resources/port1.0...
So I should submit it somewhere else?
No, this is the right place, I was just suggesting you use the kde4 portgroup when writing the portfile. I'm working on a diff that uses it now... Great!
-- Ticket URL: <https://trac.macports.org/ticket/38099#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by egall@…): OK, I've attached a diff for you. I haven't been able to test it myself though, because libiodbc doesn't have a +quartz variant. It passes lint now though. -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): Replying to [comment:6 egall@…]:
OK, I've attached a diff for you. I haven't been able to test it myself though, because libiodbc doesn't have a +quartz variant. It passes lint now though.
Thank you for the review! I'm trying to rewrite it so it fits the port system better. -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): I have changed the port so it will build correct in the working dir. It fails during the activation stage. I have attached a log where the option "destroot.violate_mtree yes" was not set in the Portfile. {{{ :debug:destroot Executing portdestroot::destroot_finish :debug:destroot checking for mtree violations :warn:destroot violation by /include :warn:destroot violation by /lib :warn:destroot violation by /share :warn:destroot krita violates the layout of the ports-filesystems! :warn:destroot Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases! :debug:destroot changing euid/egid - current euid: 0 - current egid: 0 :debug:destroot egid changed to: 502 :debug:destroot euid changed to: 503 :debug:install install phase started at Sun Feb 17 22:44:14 CET 2013 :notice:install ---> Installing krita @2.6.0_0 :debug:install Can't run install on this port without elevated privileges. Escalating privileges back to root. :debug:install euid changed to: 0. egid changed to: 0. :debug:install Executing org.macports.install (krita) :info:install kbuildsycoca4 running... :debug:activate activate phase started at Sun Feb 17 22:44:20 CET 2013 :debug:activate Executing org.macports.activate (krita) :error:activate org.macports.activate for port krita returned: Registry error: krita @2.6.0_0 is not installed. :debug:activate Error code: registry::invalid :debug:activate Backtrace: Registry error: krita @2.6.0_0 is not installed. invoked from within "throw registry::invalid "Registry error: ${name}${composite_spec} is not installed."" (procedure "_check_registry" line 38) invoked from within "_check_registry $name $version $revision $variants" invoked from within "registry::read { set requested [_check_registry $name $version $revision $variants] # set name again since the one we were passed may..." (procedure "portimage::activate" line 19) invoked from within "registry_activate $subport $version $revision $portvariants [array get user_options]" (procedure "portactivate::activate_main" line 4) invoked from within "$procedure $targetname" :info:activate Warning: targets not executed for krita: org.macports.activate :notice:activate Please see the log file for port krita for details: /opt/local/var/macports/logs/_Users_patrikandersson_ports_kde4_krita/krita/main.log }}} -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by larryv@…): Replying to [comment:9 patrik.andersson.se@…]:
I have changed the port so it will build correct in the working dir. It fails during the activation stage. I have attached a log where the option "destroot.violate_mtree yes" was not set in the Portfile.
You should not be installing files outside of the MacPorts prefix without a very good reason. -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by jmr@…): You're overriding the install phase and not doing any of what the install phase needs to do. The code in your custom install phase should be run in post-activate if anywhere (though I'm not convinced it should be run automatically at all). -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): Replying to [comment:11 jmr@…]:
You're overriding the install phase and not doing any of what the install phase needs to do. The code in your custom install phase should be run in post-activate if anywhere (though I'm not convinced it should be run automatically at all).
I put it in the post-activate phase and it works better, but now it says that the build is broken and the log is empty. Probably it has to do with krita's installation-phase, since it then creates some folders(destroot/lib,share,include), see log above. {{{ ---> Computing dependencies for krita ---> Cleaning krita ---> Deactivating krita @2.6.0_0 ---> Cleaning krita ---> Uninstalling krita @2.6.0_0 ---> Cleaning krita ---> Computing dependencies for krita ---> Fetching distfiles for krita ---> Verifying checksum(s) for krita ---> Extracting krita ---> Configuring krita ---> Building krita ---> Staging krita into destroot Warning: krita installs files outside the common directory structure. ---> Installing krita @2.6.0_0 ---> Activating krita @2.6.0_0 ########################################################## # Don't forget that dbus needs to be started as the local # user (not with sudo) before any KDE programs will launch # To start it run the following command: # launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus- session.plist ########################################################## ---> Cleaning krita ---> Updating database of binaries: 100.0% ---> Scanning binaries for linking errors: 100.0% ---> Found 1312 broken file(s), matching files to ports Warning: No port py-gtk2 found in the index; can't rebuild Error: Port krita is still broken after rebuilding it more than 3 times. Error: Please run port -d -y rev-upgrade and use the output to report a bug. Port krita still broken after rebuilding 3 time(s) while executing "error "Port $portname still broken after rebuilding [expr $broken_port_counts($port (procedure "revupgrade_scanandrebuild" line 268) invoked from within "revupgrade_scanandrebuild broken_port_counts $opts" (procedure "macports::revupgrade" line 5) invoked from within "macports::revupgrade $opts" (procedure "action_revupgrade" line 2) invoked from within "action_revupgrade $action $portlist $opts" (procedure "action_target" line 94) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 95) invoked from within "process_cmd $remaining_args" invoked from within "if { [llength $remaining_args] > 0 } { # If there are remaining arguments, process those as a command set exit_status [process_cmd $remaining..." (file "/opt/local/bin/port" line 4785) }}} -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by larryv@…): Why do you override build and destroot with phases that basically do the same thing that the default build and destroot do? And you’re still installing files outside of the prefix. Why? Please install using `sudo port -k install` and attach a new `main.log`. (The `-k` switch prevents MacPorts from automatically cleaning.) -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): The reason why I override the build-phase was because it did "make all" and it failed for Krita. I will try run without the modifications of destroot and post results tonight. I was asked by the maintainer of krita if I could create a port to simplify the installation on krita, so I did an attempt. But since I'm not an active developer in the Krita-project, I only use their current build system which is a bit different from the usual ./configure & make & make install since it uses cmake instead. Their build-system do creates some folders which apparently is outside the prefix, well it could be my fault as well, {{{ system -W ${workpath} "cmake -DCMAKE_INSTALL_PREFIX=${destroot} \ ${worksrcpath} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCREATIVEONLY=ON" }}} I thought ${destroot} would be a suitable prefix for the install prefix, then it will create some subfolder like ./lib ./share and ./include in DCMAKE_INSTALL_PREFIX. Could this be changed to a better prefix to prevent it installing outside the prefix? -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by larryv@…): Replying to [comment:14 patrik.andersson.se@…]:
The reason why I override the build-phase was because it did "make all" and it failed for Krita. I will try run without the modifications of destroot and post results tonight.
You can accomplish this by setting `build.target` to nothing. (Its default value is “all”.) But I don’t see why `make` should work while `make all` fails.
I only use their current build system which is a bit different from the usual ./configure & make & make install since it uses cmake instead.
I thought ${destroot} would be a suitable prefix for the install prefix, then it will create some subfolder like ./lib ./share and ./include in DCMAKE_INSTALL_PREFIX. Could this be changed to a better prefix to prevent it installing outside the prefix?
You should look into using the [[source:trunk/dports/_resources/port1.0/group/cmake-1.0.tcl|cmake PortGroup]], which [http://guide.macports.org/chunked/reference.portgroup.html handles a lot of the work] required for using CMake. You can use it by changing the top of your portfile to {{{ PortSystem 1.0 PortGroup kde4 1.1 PortGroup cmake 1.0 }}} Once you do this, you should be able to remove your custom configure, build, and destroot phases, as well as the “`destroot.violate_mtree`” bit. -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:15> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by egall@…): Replying to [comment:15 larryv@…]:
Replying to [comment:14 patrik.andersson.se@…]:
The reason why I override the build-phase was because it did "make all" and it failed for Krita. I will try run without the modifications of destroot and post results tonight.
You can accomplish this by setting `build.target` to nothing. (Its default value is “all”.) But I don’t see why `make` should work while `make all` fails.
I only use their current build system which is a bit different from the usual ./configure & make & make install since it uses cmake instead.
I thought ${destroot} would be a suitable prefix for the install prefix, then it will create some subfolder like ./lib ./share and ./include in DCMAKE_INSTALL_PREFIX. Could this be changed to a better prefix to prevent it installing outside the prefix?
You should look into using the [[source:trunk/dports/_resources/port1.0/group/cmake-1.0.tcl|cmake PortGroup]], which [http://guide.macports.org/chunked/reference.portgroup.html handles a lot of the work] required for using CMake. You can use it by changing the top of your portfile to {{{ PortSystem 1.0 PortGroup kde4 1.1 PortGroup cmake 1.0 }}}
Once you do this, you should be able to remove your custom configure, build, and destroot phases, as well as the “`destroot.violate_mtree`” bit.
The kde4 portgroup actually already includes the cmake portgroup within it, so putting them both would be redundant. -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:16> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by larryv@…): Replying to [comment:16 egall@…]:
The kde4 portgroup actually already includes the cmake portgroup within it, so putting them both would be redundant.
Even better. -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:17> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): No successful build today, the log says that it could not do make install in build-directory. I removed all overriding function and just added some configure options for DCBUILD_TYPE and DCREATIVEONLY, it seems to go better now, when it is better integrated the kde port-group. I will publish result tomorrow. -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:18> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): Now "sudo port install krita" does not leaves any errors, but I'm unable to run it as user or super-user. There are some permission problems to be solved, see the run.log for more details. I can also add that Krita writes on its homepage that you shall not do this as root. -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:19> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by patrik.andersson.se@…): Can someone test my latest portfile? -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:20> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38099: Portfile for Krita ------------------------------------+-------------------------------- Reporter: patrik.andersson.se@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Comment (by egall@…): There's a separate ticket for the entire Calligra suite, which includes Krita, here: #37579 -- Ticket URL: <https://trac.macports.org/ticket/38099#comment:21> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts