From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: [PATCH] gnu: Add lpsolve. Date: Sat, 16 May 2015 21:10:26 +0200 Message-ID: <20150516191026.GA6149@debian> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YthTn-0004ge-BZ for guix-devel@gnu.org; Sat, 16 May 2015 15:10:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YthTj-0006U7-6q for guix-devel@gnu.org; Sat, 16 May 2015 15:10:35 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:58358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YthTi-0006TX-U2 for guix-devel@gnu.org; Sat, 16 May 2015 15:10:31 -0400 Content-Disposition: inline List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Hello, the attached patch adds a dependency of libreoffice with a build system of its own. Since there is no check target, I have not tried whether the resulting binary actually works as needed by libreoffice. We will see... Comments are welcome. Andreas * gnu/packages/maths.scm (lpsolve): New variable. --- gnu/packages/maths.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index f27903c..5c7fe6d 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1338,3 +1338,57 @@ library with poor performance.") library for graphics software based on the OpenGL Shading Language (GLSL) specifications.") (license license:expat))) + +(define-public lpsolve + (package + (name "lpsolve") + (version "5.5.2.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version + "/lp_solve_" version "_source.tar.gz")) + (sha256 + (base32 + "176c7f023mb6b8bfmv4rfqnrlw88lsg422ca74zjh19i2h5s69sq")) + (modules '((guix build utils))) + (snippet + '(substitute* (list "lp_solve/ccc" "lpsolve55/ccc") + (("^c=cc") "c=gcc") + ;; Pretend to be on a 64 bit platform to obtain a common directory + ;; name for the build results on all architectures; nothing else + ;; seems to depend on it. + (("^PLATFORM=.*$") "PLATFORM=ux64\n"))))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (with-directory-excursion "lpsolve55" + (system* "bash" "ccc")) + (with-directory-excursion "lp_solve" + (system* "bash" "ccc")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (lib (string-append out "/lib"))) + (mkdir-p lib) + (copy-file "lpsolve55/bin/ux64/liblpsolve55.a" + (string-append lib "/liblpsolve55.a")) + (copy-file "lpsolve55/bin/ux64/liblpsolve55.so" + (string-append lib "/liblpsolve55.so")) + (mkdir-p bin) + (copy-file "lp_solve/bin/ux64/lp_solve" + (string-append bin "/lp_solve")) + #t)))))) + (home-page "http://lpsolve.sourceforge.net/") + (synopsis "Mixed Integer Linear Programming (MILP) solver") + (description + "lp_solve is a mixed integer linear programming solver based on the +revised simplex and the branch-and-bound methods.") + (license license:lgpl2.1))) -- 2.2.1