unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Multiple versions of boost.
@ 2016-03-19  9:14 Roel Janssen
  2016-03-19  9:33 ` Ricardo Wurmus
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Janssen @ 2016-03-19  9:14 UTC (permalink / raw)
  To: guix-devel

Dear list,

In my list of packages, I find older versions of Boost.  Specifically,
version 1.57.0 and version 1.56.0.  In Guix we've got version 1.60.0.

I would like to add the older versions as packages as well, and my
current approach is to inherit most of the 1.60.0 package:

(define boost-1.57.0
  (package (inherit boost)
    (name "boost")
    (version "1.57.0")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "mirror://sourceforge/boost/boost_"
                    (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
                    ".tar.bz2"))
              (sha256
               (base32
                "0rs94vdmg34bwwj23fllva6mhrml2i7mvmlb11zyrk1k5818q34i"))))))


Is this a workable approach?  If not, how could I go about adding
multiple versions?

My other questions:
- What is the convention with the Scheme variable name for the package?
- Should I distinguish the package name in its version?

Thank you for your time.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Multiple versions of boost.
  2016-03-19  9:14 Multiple versions of boost Roel Janssen
@ 2016-03-19  9:33 ` Ricardo Wurmus
  0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2016-03-19  9:33 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel


Roel Janssen <roel@gnu.org> writes:

> I would like to add the older versions as packages as well, and my
> current approach is to inherit most of the 1.60.0 package:
>
> (define boost-1.57.0
>   (package (inherit boost)
>     (name "boost")
>     (version "1.57.0")
>     (source (origin
>               (method url-fetch)
>               (uri (string-append
>                     "mirror://sourceforge/boost/boost_"
>                     (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
>                     ".tar.bz2"))
>               (sha256
>                (base32
>                 "0rs94vdmg34bwwj23fllva6mhrml2i7mvmlb11zyrk1k5818q34i"))))))
>
>
> Is this a workable approach?  If not, how could I go about adding
> multiple versions?

In principle this should be enough, but having packaged older versions
of boost myself I know that it’s not enough in reality.  Previous
versions of boost often have different directory names, so patches and
substitutions in build phases in our new boost package don’t apply
cleanly to older boost sources.  On Monday I could share one of my boost
variant packages.

> My other questions:
> - What is the convention with the Scheme variable name for the package?
> - Should I distinguish the package name in its version?

I don’t think there’s a convention.  Sometimes a different version is
needed for one package only, so we name it something like
“guile-for-guile-emacs” or “armadillo-for-rcpparmadillo”.  Then some
other times we just append a part of the version number to the variable
name.

~~ Ricardo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-19  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-19  9:14 Multiple versions of boost Roel Janssen
2016-03-19  9:33 ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

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

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).