# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class RLsei(RPackage):
    """It contains functions that solve least squares linear regression
       problems under linear equality/inequality constraints. Functions for
       solving quadratic programming problems are also available, which
       transform such problems into least squares ones first. It is developed
       based on the 'Fortran' program of Lawson and Hanson (1974, 1995), which
       is public domain and available at
       <http://www.netlib.org/lawson-hanson>."""

    homepage = "https://cloud.r-project.org/package=lsei"
    url      = "https://cloud.r-project.org/src/contrib/lsei_1.2-0.tar.gz"
    list_url = "https://cloud.r-project.org/src/contrib/Archive/lsei"

    version('1.2-0', sha256='4781ebd9ef93880260d5d5f23066580ac06061e95c1048fb25e4e838963380f6')

@@ -243,16 +243,115 @@
 %0A    %22%22%22
+Solving Least Squares or Quadratic Programming Problems under Equality/Inequality Constraints%0A%0A    
 It conta
@@ -406,23 +406,16 @@
 gression
-%0A      
  problem
@@ -411,24 +411,28 @@
 ion problems
+%0A   
  under linea
@@ -483,23 +483,16 @@
  for
-%0A      
  solving
  qua
@@ -487,16 +487,20 @@
  solving
+%0A   
  quadrat
@@ -548,23 +548,16 @@
 e, which
-%0A      
  transfo
@@ -563,16 +563,20 @@
 orm such
+%0A   
  problem
@@ -623,23 +623,16 @@
 eveloped
-%0A      
  based o
@@ -636,16 +636,20 @@
 d on the
+%0A   
  'Fortra
@@ -699,23 +699,16 @@
 ), which
-%0A      
  is publ
@@ -716,16 +716,20 @@
 c domain
+%0A   
  and ava
@@ -741,15 +741,8 @@
 e at
-%0A      
  %3Cht
@@ -985,16 +985,112 @@
 /lsei%22%0A%0A
+    version('1.3-0', sha256='6289058f652989ca8a5ad6fa324ce1762cc9e36c42559c00929b70f762066ab6')%0A
     vers

add version 1.3-0 to r-lsei (#21083)