help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to package GIMP Resynthesizer


From: Thorsten Wilms
Subject: Re: Trying to package GIMP Resynthesizer
Date: Thu, 20 Sep 2018 15:43:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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 via email to

[Prev in Thread] Current Thread [Next in Thread]