From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Wilms Subject: Re: Trying to package GIMP Resynthesizer Date: Thu, 20 Sep 2018 15:43:33 +0200 Message-ID: <1d0aea2a-f161-cda5-a43b-2d2c634445da@freenet.de> References: <3e52025a-2dde-3960-0bf9-984428dd320f@freenet.de> <3a8e2370-6d45-3111-28c6-de6a9ad8e2f4@freenet.de> <877ejgv2xl.fsf@gnu.org> Reply-To: t_w_@freenet.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2zHX-0005nA-8y for help-guix@gnu.org; Thu, 20 Sep 2018 09:46:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2zHU-00018G-Ia for help-guix@gnu.org; Thu, 20 Sep 2018 09:46:11 -0400 Received: from mout3.freenet.de ([2001:748:100:40::2:5]:53718) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2zHU-00012L-AC for help-guix@gnu.org; Thu, 20 Sep 2018 09:46:08 -0400 Received: from [195.4.92.163] (helo=mjail0.freenet.de) by mout3.freenet.de with esmtpa (ID t_w_@freenet.de) (port 25) (Exim 4.90_1 #2) id 1g2zHQ-00087M-He for help-guix@gnu.org; Thu, 20 Sep 2018 15:46:04 +0200 Received: from [::1] (port=45998 helo=mjail0.freenet.de) by mjail0.freenet.de with esmtpa (ID t_w_@freenet.de) (Exim 4.90_1 #2) id 1g2zHQ-00026a-GQ for help-guix@gnu.org; Thu, 20 Sep 2018 15:46:04 +0200 Received: from sub5.freenet.de ([195.4.92.124]:51942) by mjail0.freenet.de with esmtpa (ID t_w_@freenet.de) (Exim 4.90_1 #2) id 1g2zEz-0004dA-PF for help-guix@gnu.org; Thu, 20 Sep 2018 15:43:33 +0200 In-Reply-To: <877ejgv2xl.fsf@gnu.org> Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" Cc: help-guix 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/