From: Ekaitz Zarraga <ekaitz@elenq.tech>
To: "help-guix\\@gnu.org" <help-guix@gnu.org>
Subject: Need help packaging IUP (part 1: IM)
Date: Mon, 20 Mar 2023 22:44:06 +0000 [thread overview]
Message-ID: <KEnQiP10jASzYyVu0QkHFPdvPtCYpES7A6bU7tLBBroZAlrEDITQX1RY8w80NfcK-9JcJNJ0cu6axFM2rcgg2177Ktl0G-lajS20kPqlVqQ=@elenq.tech> (raw)
Hi,
I'm trying to package IUP (https://www.tecgraf.puc-rio.br/iup/) and I'm already stuck on the first package :)
They have a pretty wild general Makefile but I think I'm managing to deal with it.
The main problem I have now is the RUNPATH is not set properly. If I keep the RUNPATH validation phase it fails.
I tried several ways to add it but I didn't manage to fix it.
I leave my current package description below.
Thanks for your help!
Cheers,
Ekaitz
PS: Also, anyone has a suggestion on how can I transform the phases to turn then something like:
(add-build-phase "im_jp2") => (add-before build' build-im_jp2 (lambda _ (invoke ...)))
I tried with a simple function but the the quoting killed all my hopes and I'm not good with macros (yet).
---
(define-module (iup)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (gnu packages)
#:use-module ((gnu packages base) #:prefix base:)
#:use-module (gnu packages algebra)
#:use-module (gnu packages commencement)
#:use-module (gnu packages gl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages lua)
#:use-module (gnu packages xorg)
#:use-module (guix download)
#:use-module (guix build utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:))
(define-public im
(package
(name "im")
(version "3.15")
(source (origin
(method url-fetch)
(uri (string-append
"https://sourceforge.net/projects/imtoolkit/files/"
version "/Docs%20and%20Sources/im-" version
"_Sources.tar.gz"))
(sha256
(base32 "1c5p8j7sw3r7kmkd4qa49zmh3dlp5zszp2sagi71aqjq84pngp40"))))
(inputs (list base:which
libpng
fftw
fftwf))
(build-system gnu-build-system)
(arguments
(list
#:tests? #f
#:validate-runpath? #f ;; FIXME: Fix the runpath!!
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'set-ldflags
;; FIXME: LDFLAGS don't work, so the runpath is broken
(lambda _
(setenv "LDFLAGS" (string-append "-Wl,-rpath=" #$output "/lib"))))
(delete 'configure)
;; Left lua-related libs out of the mix for the moment as they
;; have some build errors and I don't need them yet.
(add-before 'build 'cd
(lambda _
(chdir "src")))
(add-before 'build 'build-im
(lambda _
(invoke "make" "im")))
(add-before 'build 'build-im-jp2
(lambda _
(invoke "make" "im_jp2")))
(add-before 'build 'build-im-process
(lambda _
(invoke "make" "im_process")))
(add-before 'build 'build-im-process-omp
(lambda _
(invoke "make" "im_process_omp")))
(add-before 'build 'build-im-fftw3
(lambda _
(invoke "make" "im_fftw3")))
(delete 'build)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((include (string-append #$output "/include"))
(lib (string-append #$output "/lib")))
(mkdir-p include)
(mkdir-p lib)
(copy-recursively "../include" include)
(invoke "find" "../lib" "-exec" "cp" "{}" lib ";")))))))
(home-page "https://www.tecgraf.puc-rio.br/im")
(synopsis "IM is a toolkit for image representation, storage, capture and
processing")
(description "The main goal of the library is to provide a simple API and
abstraction of imaging for scientific applications. The most popular file
formats are supported: TIFF, BMP, PNG, JPEG, GIF and AVI. Image representation
includes scientific data types, and about a hundred Image Processing operations
are available.")
(license license:expat)))
next reply other threads:[~2023-03-20 22:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 22:44 Ekaitz Zarraga [this message]
2023-03-20 22:59 ` Need help packaging IUP (part 1: IM) Felix Lechner via
2023-03-21 12:25 ` Reza Housseini
2023-03-21 12:45 ` Ekaitz Zarraga
2023-03-21 15:43 ` Ekaitz Zarraga
2023-03-21 16:01 ` Reza Housseini
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='KEnQiP10jASzYyVu0QkHFPdvPtCYpES7A6bU7tLBBroZAlrEDITQX1RY8w80NfcK-9JcJNJ0cu6axFM2rcgg2177Ktl0G-lajS20kPqlVqQ=@elenq.tech' \
--to=ekaitz@elenq.tech \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).