all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thorsten Wilms <t_w_@freenet.de>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Trying to package GIMP Resynthesizer
Date: Thu, 20 Sep 2018 15:43:33 +0200	[thread overview]
Message-ID: <1d0aea2a-f161-cda5-a43b-2d2c634445da@freenet.de> (raw)
In-Reply-To: <877ejgv2xl.fsf@gnu.org>

Case solved!

On 20.09.2018 13:11, Ludovic Courtès wrote:
>> Next, in phase install:
>>
>> ---
>> make[3]: Entering directory
>> '/tmp/guix-build-gimp-resynthesizer-2.0.3.drv-0/resynthesizer-2.0.3/src/resynthesizer'
>>   /gnu/store/63gkgnixg6xj3m9cgl25ib2zxl51ngw0-coreutils-8.29/bin/mkdir
>> -p
>> '/gnu/store/kc1s39xl3wzkb5cfsavvbrgri4751zmk-gimp-2.10.6/lib/gimp/2.0/plug-ins'
>>
>> /gnu/store/63gkgnixg6xj3m9cgl25ib2zxl51ngw0-coreutils-8.29/bin/install
>> -c resynthesizer
>> '/gnu/store/kc1s39xl3wzkb5cfsavvbrgri4751zmk-gimp-2.10.6/lib/gimp/2.0/plug-ins'
>> /gnu/store/63gkgnixg6xj3m9cgl25ib2zxl51ngw0-coreutils-8.29/bin/install:
>> cannot create regular file
>> '/gnu/store/kc1s39xl3wzkb5cfsavvbrgri4751zmk-gimp-2.10.6/lib/gimp/2.0/plug-ins/resynthesizer':
>> Permission denied
> “make install” is trying to install the plugin under GIMP’s prefix,
> which is read-only.
> 
> The solution is to adjust the gimp-resynthesizer makefile variables so
> that the plugin gets installed to $(libdir)/gimp/2.0/plug-ins—i.e.,
> under/gnu/store/…-gimp-resnythesizer-2.0.3/lib.

I figured that's what is being done for gimp-fourier, but the Makefile 
situation here is different and I had trouble finding out that there are 
2 Makefiles that need to be patched!

This here builds:

---
(define-module (gimp-resynthesizer)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gimp)
   )

;; GIMP does not respect any plugin search path environment variable, so 
after
;; installation users have to edit their GIMP settings to include
;; “$GUIX_PROFILE/lib/gimp/2.0/plug-ins” in
;; “Edit->Preferences->Folders->Plug Ins”.

(define-public gimp-resynthesizer
   (package
    (name "gimp-resynthesizer")
    (version "2.0.3")
    (source
     (origin
      (method url-fetch)
      (uri (string-append 
"https://github.com/bootchk/resynthesizer/archive/v"
			 version
			 ".tar.gz"))
      (sha256 (base32 
"0l3404w6rqny7h3djskxf149gzx6x4qhndgbh3403c9lbh4pi1kr"))))
    (build-system gnu-build-system)
    (arguments
     `(;; Turn off tests to avoid:
       ;; make[1]: *** No rule to make target '../src/resynth-gui.c', 
needed by 'resynthesizer.pot'.  Stop.
       #:tests? #f
       #:phases
       (modify-phases %standard-phases
	(add-after 'unpack 'set-env
	  (lambda _
	    (setenv "CONFIG_SHELL" (which "sh"))
	    #t))
	(add-after 'configure 'set-prefix
	  ;; Attempt to install to GIMP's plugin directory will fail.
	  ;; Use own store address.
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((target (string-append (assoc-ref outputs "out")
                                          "/lib/gimp/"
                                          (car (string-split 
,(package-version gimp) #\.))
                                          ".0/plug-ins")))
               (substitute* (list "src/resynthesizer/Makefile"
				 "src/resynthesizer-gui/Makefile")
		(("GIMP_LIBDIR = .*")
                  (string-append "GIMP_LIBDIR = " target "\n")))
               (mkdir-p target))
             #t))
	)))
    (native-inputs
     `(("autoconf" ,autoconf-wrapper)
       ("automake" ,automake)
       ("glib" ,glib "bin") ; glib-gettextize
       ("intltool" ,intltool)
       ("pkg-config" ,pkg-config)))
    (inputs
     `(("gimp" ,gimp)
       ("gdk-pixbuf" ,gdk-pixbuf) ; needed by gimp-2.0.pc
       ("cairo" ,cairo)
       ("gegl" ,gegl)
       ("gtk+" ,gtk+-2) ; needed by gimpui-2.0.pc
       ("glib" ,glib)))
    (home-page "https://github.com/bootchk/resynthesizer")
    (synopsis "GIMP plugins for texture synthesis")
    (description
     "Resynthesizer plugins for GIMP. Encompasses tools for healing 
selections (content aware fill), enlarging the canvas and healing the 
border, increasing the resolution while adding detail and transfering 
the style of an image.")
    (license license:gpl3+)))

---

Still have to actually run it! ;)


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

  reply	other threads:[~2018-09-20 13:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19 12:25 Trying to package GIMP Resynthesizer Thorsten Wilms
2018-09-20  2:55 ` Maxim Cournoyer
2018-09-20  9:25   ` Thorsten Wilms
2018-09-20 11:11     ` Ludovic Courtès
2018-09-20 13:43       ` Thorsten Wilms [this message]
2018-09-20 20:14         ` Thorsten Wilms
2018-09-21 11:19           ` Thorsten Wilms
2018-11-07 18:00             ` swedebugia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d0aea2a-f161-cda5-a43b-2d2c634445da@freenet.de \
    --to=t_w_@freenet.de \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.