summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xalgorithm.pdfbin260255 -> 0 bytes
-rwxr-xr-xcode.pdfbin180639 -> 0 bytes
-rw-r--r--debian/changelog50
-rw-r--r--debian/compat1
-rw-r--r--debian/control36
-rw-r--r--debian/copyright14
-rw-r--r--debian/liblbfgsb-dev.docs1
-rw-r--r--debian/liblbfgsb-doc.doc-base7
-rw-r--r--debian/liblbfgsb-doc.install1
-rw-r--r--debian/patches/0003-Prevent-bound-violation.patch27
-rw-r--r--debian/patches/0004-Fix-NaN-propagation.patch26
-rw-r--r--debian/patches/0005-Disable-printing-of-time.patch23
-rw-r--r--debian/patches/0006-Stop-generating-iteration-log-files.patch113
-rw-r--r--debian/patches/replace-linpack-with-lapack.patch24
-rw-r--r--debian/patches/series4
-rw-r--r--debian/patches/silence.patch14
-rwxr-xr-xdebian/rules26
-rw-r--r--debian/upstream/metadata24
-rw-r--r--debian/watch11
19 files changed, 324 insertions, 78 deletions
diff --git a/algorithm.pdf b/algorithm.pdf
deleted file mode 100755
index bfc9af6..0000000
--- a/algorithm.pdf
+++ /dev/null
Binary files differ
diff --git a/code.pdf b/code.pdf
deleted file mode 100755
index b257b27..0000000
--- a/code.pdf
+++ /dev/null
Binary files differ
diff --git a/debian/changelog b/debian/changelog
index ab119a6..bc9ce42 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,51 @@
+lbfgsb (3.0+dfsg.4-1) unstable; urgency=medium
+
+ [ Debian Janitor ]
+ * Use https in upstream metadata.
+ * Remove duplicate field in upstream metadata.
+
+ [ Gard Spreemann ]
+ * New DFSG repack without upstream's PDFs. This is due to doubts about
+ whether upstream intends these to be under the BSD-3-clause
+ license. Moreover, as already typeset PDFs, they are not in a
+ preferred form for modification.
+ * Drop liblbfgsb-doc binary that used to ship said PDFs.
+ * Install README with liblbfgsb-dev.
+ * Standards-version 4.6.2.0. No changes needed.
+ * Clean up watch file.
+
+ -- Gard Spreemann <gspr@nonempty.org> Tue, 28 Feb 2023 20:13:22 +0100
+
+lbfgsb (3.0+dfsg.3-11) unstable; urgency=medium
+
+ * Simplify build flags. (Closes: #1015469)
+ * Standards-version 4.6.1.0. No changes needed.
+
+ -- Gard Spreemann <gspr@nonempty.org> Wed, 20 Jul 2022 13:24:01 +0200
+
+lbfgsb (3.0+dfsg.3-10) unstable; urgency=medium
+
+ [ Debian Janitor ]
+ * Trim trailing whitespace.
+
+ [ Gard Spreemann ]
+ * Standards-version 4.6.0.1. No changes needed.
+ * Started upstream metadata.
+ * Change log file disabling patch to preserve upstream ABI.
+
+ -- Gard Spreemann <gspr@nonempty.org> Mon, 13 Dec 2021 15:11:19 +0100
+
+lbfgsb (3.0+dfsg.3-9) unstable; urgency=medium
+
+ * New-style dh compat level.
+ * Add patch based on SciPy to prevent bounds violation. (Closes: #966448)
+ * Let gbp cosmetically reformat patches.
+ * Add patch based on SciPy to fix NaN propagation.
+ * Add patches based on SciPy to prevent time printing and log files.
+ * Move to Salsa.
+
+ -- Gard Spreemann <gspr@nonempty.org> Thu, 30 Jul 2020 11:01:06 +0200
+
lbfgsb (3.0+dfsg.3-8) unstable; urgency=medium
* Relax compilation flags for tests to allow them to run on more
@@ -69,7 +117,7 @@ lbfgsb (3.0+dfsg.2-1) unstable; urgency=medium
* Multi-arch support for the library packages.
* Explicitly set compile flags.
* Enable hardening.
-
+
-- Gard Spreemann <gspreemann@gmail.com> Fri, 20 May 2016 18:04:05 +0200
lbfgsb (3.0+dfsg.1-1) unstable; urgency=medium
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index b1bd38b..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-13
diff --git a/debian/control b/debian/control
index 7c817b4..8475a74 100644
--- a/debian/control
+++ b/debian/control
@@ -2,12 +2,12 @@ Source: lbfgsb
Maintainer: Gard Spreemann <gspr@nonempty.org>
Section: math
Priority: optional
-Standards-Version: 4.5.0
-Build-Depends: debhelper (>= 13), gfortran, libblas-dev, liblapack-dev
+Standards-Version: 4.6.2.0
+Build-Depends: debhelper-compat (= 13), gfortran, libblas-dev, liblapack-dev
Rules-Requires-Root: no
-Homepage: http://users.iems.northwestern.edu/~nocedal/lbfgsb.html
-Vcs-Browser: https://git.nonempty.org/debian-lbfgsb
-Vcs-Git: https://git.nonempty.org/debian-lbfgsb -b debian/sid
+Homepage: https://users.iems.northwestern.edu/~nocedal/lbfgsb.html
+Vcs-Browser: https://salsa.debian.org/gspr/lbfgsb
+Vcs-Git: https://salsa.debian.org/gspr/lbfgsb.git -b debian/sid
Package: liblbfgsb0
Section: libs
@@ -60,32 +60,6 @@ Description: Limited-memory quasi-Newton bound-constrained optimization (static
optimization (2011), to appear in ACM Transactions on Mathematical
Software.
-Package: liblbfgsb-doc
-Section: doc
-Architecture: all
-Multi-Arch: foreign
-Depends: ${misc:Depends}
-Description: Limited-memory quasi-Newton bound-constrained optimization (documentation)
- Fortran library implementing limited-memory quasi-Newton
- bound-constrained optimization as described in [1,2,3].
- .
- This package contains the documentation describing the library and
- algorithm.
- .
- [1] R. H. Byrd, P. Lu and J. Nocedal. A Limited Memory Algorithm for
- Bound Constrained Optimization, (1995), SIAM Journal on Scientific
- and Statistical Computing , 16, 5, pp. 1190-1208.
- .
- [2] C. Zhu, R. H. Byrd and J. Nocedal. L-BFGS-B: Algorithm 778:
- L-BFGS-B, FORTRAN routines for large scale bound constrained
- optimization (1997), ACM Transactions on Mathematical Software, Vol
- 23, Num. 4, pp. 550 - 560.
- .
- [3] J.L. Morales and J. Nocedal. L-BFGS-B: Remark on Algorithm 778:
- L-BFGS-B, FORTRAN routines for large scale bound constrained
- optimization (2011), to appear in ACM Transactions on Mathematical
- Software.
-
Package: liblbfgsb-examples
Section: libs
Architecture: any
diff --git a/debian/copyright b/debian/copyright
index 55c28cd..80e30f8 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,16 +1,18 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: L-BFGS-B
-Files-Excluded: x.* ._* OUTPUTS/._* ../._Lbfgsb.3.0 linpack.f blas.f
-Source: http://users.iems.northwestern.edu/~nocedal/lbfgsb.html
- The pristine upstream source contains prebuilt binaries and various metadata
- files, as well as unused copied of LINPACK and BLAS. These are removed.
+Files-Excluded: x.* ._* OUTPUTS/._* ../._Lbfgsb.3.0 linpack.f blas.f *.pdf
+Source: https://users.iems.northwestern.edu/~nocedal/lbfgsb.html
+ The upstream source contains prebuilt binaries and various metadata
+ files, as well as unused copies of LINPACK and BLAS. These are
+ removed. It also contains PDFs, to which it seems unclear whether the
+ license is intended to apply. These are therefore also removed.
Files: *
-Copyright: Ciyou Zhu, Richard Byrd, Jorge Nocedal, Jose Luis Morales
+Copyright: 2011 Ciyou Zhu, Richard Byrd, Jorge Nocedal, Jose Luis Morales
License: BSD-3-clause
Files: debian/*
-Copyright: 2013-2020 Gard Spreemann <gspr@nonempty.org>
+Copyright: 2013-2023 Gard Spreemann <gspr@nonempty.org>
License: BSD-3-clause
Files: debian/tests/*.f90
diff --git a/debian/liblbfgsb-dev.docs b/debian/liblbfgsb-dev.docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/liblbfgsb-dev.docs
@@ -0,0 +1 @@
+README
diff --git a/debian/liblbfgsb-doc.doc-base b/debian/liblbfgsb-doc.doc-base
deleted file mode 100644
index 34a46a8..0000000
--- a/debian/liblbfgsb-doc.doc-base
+++ /dev/null
@@ -1,7 +0,0 @@
-Document: liblbfgsb-doc
-Title: L-BFGS-B manual
-Abstract: This manual describes the algorithm behind, and the implementation of L-BFGS-B.
-Section: Science/Mathematics
-
-Format: PDF
-Files: /usr/share/doc/liblbfgsb/*.pdf
diff --git a/debian/liblbfgsb-doc.install b/debian/liblbfgsb-doc.install
deleted file mode 100644
index e92aec8..0000000
--- a/debian/liblbfgsb-doc.install
+++ /dev/null
@@ -1 +0,0 @@
-*.pdf usr/share/doc/liblbfgsb/ \ No newline at end of file
diff --git a/debian/patches/0003-Prevent-bound-violation.patch b/debian/patches/0003-Prevent-bound-violation.patch
new file mode 100644
index 0000000..04a4acc
--- /dev/null
+++ b/debian/patches/0003-Prevent-bound-violation.patch
@@ -0,0 +1,27 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Thu, 30 Jul 2020 10:15:21 +0200
+Subject: Prevent bound violation.
+
+This is based on SciPy's commits
+ cb9ed45d1a25d77204c737a8e1489dfb9606241f
+ e5ffa787555a60caf2ed9d0046a9ab782457fea4
+---
+ lbfgsb.f | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lbfgsb.f b/lbfgsb.f
+index 008370d..7c6b7fc 100644
+--- a/lbfgsb.f
++++ b/lbfgsb.f
+@@ -2569,8 +2569,11 @@ c Line search is impossible.
+ if (stp .eq. one) then
+ call dcopy(n,z,1,x,1)
+ else
++c take step and prevent rounding error beyond bound
+ do 41 i = 1, n
+ x(i) = stp*d(i) + t(i)
++ if (nbd(i).eq.1.or.nbd(i).eq.2) x(i) = max(x(i), l(i))
++ if (nbd(i).eq.2.or.nbd(i).eq.3) x(i) = min(x(i), u(i))
+ 41 continue
+ endif
+ else
diff --git a/debian/patches/0004-Fix-NaN-propagation.patch b/debian/patches/0004-Fix-NaN-propagation.patch
new file mode 100644
index 0000000..dae12ec
--- /dev/null
+++ b/debian/patches/0004-Fix-NaN-propagation.patch
@@ -0,0 +1,26 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Thu, 30 Jul 2020 10:25:38 +0200
+Subject: Fix NaN propagation.
+
+This is based on SciPy commit
+ 4eb242fabeef7d1871d21936bee275be4fda1844
+---
+ lbfgsb.f | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lbfgsb.f b/lbfgsb.f
+index 7c6b7fc..501879b 100644
+--- a/lbfgsb.f
++++ b/lbfgsb.f
+@@ -2977,6 +2977,11 @@ c ************
+ sbgnrm = zero
+ do 15 i = 1, n
+ gi = g(i)
++ if (gi.ne.gi) then
++c NaN value in gradient: propagate it
++ sbgnrm = gi
++ return
++ endif
+ if (nbd(i) .ne. 0) then
+ if (gi .lt. zero) then
+ if (nbd(i) .ge. 2) gi = max((x(i)-u(i)),gi)
diff --git a/debian/patches/0005-Disable-printing-of-time.patch b/debian/patches/0005-Disable-printing-of-time.patch
new file mode 100644
index 0000000..9f84bf4
--- /dev/null
+++ b/debian/patches/0005-Disable-printing-of-time.patch
@@ -0,0 +1,23 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Thu, 30 Jul 2020 10:30:09 +0200
+Subject: Disable printing of time.
+
+Per SciPy commit
+ 04cd360b25c4bb1b831895f51b653ac282afc78c
+---
+ lbfgsb.f | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/lbfgsb.f b/lbfgsb.f
+index 501879b..59f0a97 100644
+--- a/lbfgsb.f
++++ b/lbfgsb.f
+@@ -2873,8 +2873,6 @@ c ************
+ if (info .eq. -8) write (6,9018)
+ if (info .eq. -9) write (6,9019)
+ endif
+- if (iprint .ge. 1) write (6,3007) cachyt,sbtime,lnscht
+- write (6,3008) time
+ if (iprint .ge. 1) then
+ if (info .eq. -4 .or. info .eq. -9) then
+ write (itfile,3002)
diff --git a/debian/patches/0006-Stop-generating-iteration-log-files.patch b/debian/patches/0006-Stop-generating-iteration-log-files.patch
new file mode 100644
index 0000000..efff3f1
--- /dev/null
+++ b/debian/patches/0006-Stop-generating-iteration-log-files.patch
@@ -0,0 +1,113 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Mon, 13 Dec 2021 14:56:07 +0100
+Subject: Stop generating iteration log files
+
+Based on SciPy commit c3c54c15eafe7fa7a2b7a499cb64f38f1a7ee057
+---
+ lbfgsb.f | 37 ++-----------------------------------
+ 1 file changed, 2 insertions(+), 35 deletions(-)
+
+diff --git a/lbfgsb.f b/lbfgsb.f
+index 59f0a97..18d4715 100644
+--- a/lbfgsb.f
++++ b/lbfgsb.f
+@@ -140,8 +140,6 @@ c 0<iprint<99 print also f and |proj g| every iprint iterations;
+ c iprint=99 print details of every iteration except n-vectors;
+ c iprint=100 print also the changes of active set and final x;
+ c iprint>100 print details of every iteration including x and g;
+-c When iprint > 0, the file iterate.dat will be created to
+-c summarize the iteration.
+ c
+ c csave is a working string of characters of length 60.
+ c
+@@ -426,8 +424,6 @@ c 0<iprint<99 print also f and |proj g| every iprint iterations;
+ c iprint=99 print details of every iteration except n-vectors;
+ c iprint=100 print also the changes of active set and final x;
+ c iprint>100 print details of every iteration including x and g;
+-c When iprint > 0, the file iterate.dat will be created to
+-c summarize the iteration.
+ c
+ c csave is a working string of characters of length 60.
+ c
+@@ -547,10 +543,8 @@ c 'info' records the termination information.
+ info = 0
+
+ itfile = 8
+- if (iprint .ge. 1) then
+-c open a summary file 'iterate.dat'
+- open (8, file = 'iterate.dat', status = 'unknown')
+- endif
++c Originally a file named iterate.dat was created. We disable
++c this behavior in Debian.
+
+ c Check the input arguments for errors.
+
+@@ -646,7 +640,6 @@ c Compute the infinity norm of the (-) projected gradient.
+
+ if (iprint .ge. 1) then
+ write (6,1002) iter,f,sbgnrm
+- write (itfile,1003) iter,nfgv,sbgnrm,f
+ endif
+ if (sbgnrm .le. pgtol) then
+ c terminate the algorithm.
+@@ -1361,8 +1354,6 @@ c 0<iprint<99 print also f and |proj g| every iprint iterations;
+ c iprint=99 print details of every iteration except n-vectors;
+ c iprint=100 print also the changes of active set and final x;
+ c iprint>100 print details of every iteration including x and g;
+-c When iprint > 0, the file iterate.dat will be created to
+-c summarize the iteration.
+ c
+ c sbgnrm is a double precision variable.
+ c On entry sbgnrm is the norm of the projected gradient at x.
+@@ -2705,9 +2696,6 @@ c ************
+ write (6,7001) epsmch
+ write (6,*) 'N = ',n,' M = ',m
+ if (iprint .ge. 1) then
+- write (itfile,2001) epsmch
+- write (itfile,*)'N = ',n,' M = ',m
+- write (itfile,9001)
+ if (iprint .gt. 100) then
+ write (6,1004) 'L =',(l(i),i = 1,n)
+ write (6,1004) 'X0 =',(x(i),i = 1,n)
+@@ -2798,8 +2786,6 @@ c the truncated Newton step has been used.
+ imod = mod(iter,iprint)
+ if (imod .eq. 0) write (6,2001) iter,f,sbgnrm
+ endif
+- if (iprint .ge. 1) write (itfile,3001)
+- + iter,nfgv,nseg,nact,word,iback,stp,xstep,sbgnrm,f
+
+ 1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))
+ 2001 format
+@@ -2873,23 +2859,6 @@ c ************
+ if (info .eq. -8) write (6,9018)
+ if (info .eq. -9) write (6,9019)
+ endif
+- if (iprint .ge. 1) then
+- if (info .eq. -4 .or. info .eq. -9) then
+- write (itfile,3002)
+- + iter,nfgv,nseg,nact,word,iback,stp,xstep
+- endif
+- write (itfile,3009) task
+- if (info .ne. 0) then
+- if (info .eq. -1) write (itfile,9011)
+- if (info .eq. -2) write (itfile,9012)
+- if (info .eq. -3) write (itfile,9013)
+- if (info .eq. -4) write (itfile,9014)
+- if (info .eq. -5) write (itfile,9015)
+- if (info .eq. -8) write (itfile,9018)
+- if (info .eq. -9) write (itfile,9019)
+- endif
+- write (itfile,3008) time
+- endif
+ endif
+
+ 1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))
+@@ -3152,8 +3121,6 @@ c 0<iprint<99 print also f and |proj g| every iprint iterations;
+ c iprint=99 print details of every iteration except n-vectors;
+ c iprint=100 print also the changes of active set and final x;
+ c iprint>100 print details of every iteration including x and g;
+-c When iprint > 0, the file iterate.dat will be created to
+-c summarize the iteration.
+ c
+ c info is an integer variable.
+ c On entry info is unspecified.
diff --git a/debian/patches/replace-linpack-with-lapack.patch b/debian/patches/replace-linpack-with-lapack.patch
index 83e3261..a875ea2 100644
--- a/debian/patches/replace-linpack-with-lapack.patch
+++ b/debian/patches/replace-linpack-with-lapack.patch
@@ -1,11 +1,21 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Thu, 30 Jul 2020 09:57:45 +0200
+Subject: replace-linpack-with-lapack
+
The library code originally uses LINPACK (from an embedded
copy). Since LINPACK has largely been superseded by LAPACK, this patch
replaces calls to the former with equivalent calls to the
latter. Specifically, dpofa is replaced by dpotrf, and dtrsl is
replaced by dtrtrs.
+---
+ lbfgsb.f | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/lbfgsb.f b/lbfgsb.f
+index 9c9e7d9..54fd1f9 100644
--- a/lbfgsb.f
+++ b/lbfgsb.f
-@@ -1185,7 +1185,7 @@
+@@ -1185,7 +1185,7 @@ c solve Jp2=v2+LD^(-1)v1.
p(i2) = v(i2) + sum
20 continue
c Solve the triangular system
@@ -14,7 +24,7 @@ replaced by dtrtrs.
if (info .ne. 0) return
c solve D^(1/2)p1=v1.
-@@ -1197,7 +1197,7 @@
+@@ -1197,7 +1197,7 @@ c PART II: solve [ -D^(1/2) D^(-1/2)*L' ] [ p1 ] = [ p1 ]
c [ 0 J' ] [ p2 ] [ p2 ].
c solve J^Tp2=p2.
@@ -23,7 +33,7 @@ replaced by dtrtrs.
if (info .ne. 0) return
c compute p1=-D^(-1/2)(p1-D^(-1/2)L'p2)
-@@ -2135,7 +2135,7 @@
+@@ -2135,7 +2135,7 @@ c [(-L_a +R_z)L'^-1 S'AA'S*theta ]
c first Cholesky factor (1,1) block of wn to get LL'
c with L' stored in the upper triangle of wn.
@@ -32,7 +42,7 @@ replaced by dtrtrs.
if (info .ne. 0) then
info = -1
return
-@@ -2143,7 +2143,7 @@
+@@ -2143,7 +2143,7 @@ c with L' stored in the upper triangle of wn.
c then form L^-1(-L_a'+R_z') in the (1,2) block.
col2 = 2*col
do 71 js = col+1 ,col2
@@ -41,7 +51,7 @@ replaced by dtrtrs.
71 continue
c Form S'AA'S*theta + (L^-1(-L_a'+R_z'))'L^-1(-L_a'+R_z') in the
-@@ -2158,7 +2158,7 @@
+@@ -2158,7 +2158,7 @@ c upper triangle of (2,2) block of wn.
c Cholesky factorization of (2,2) block of wn.
@@ -50,7 +60,7 @@ replaced by dtrtrs.
if (info .ne. 0) then
info = -2
return
-@@ -2227,7 +2227,7 @@
+@@ -2227,7 +2227,7 @@ c store T in the upper triangle of the array wt.
c Cholesky factorize T to J*J' with
c J' stored in the upper triangle of wt.
@@ -59,7 +69,7 @@ replaced by dtrtrs.
if (info .ne. 0) then
info = -3
endif
-@@ -3208,12 +3208,12 @@
+@@ -3208,12 +3208,12 @@ c Compute wv:=K^(-1)wv.
m2 = 2*m
col2 = 2*col
diff --git a/debian/patches/series b/debian/patches/series
index 6d5db6c..cd4d11e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,6 @@
replace-linpack-with-lapack.patch
silence.patch
+0003-Prevent-bound-violation.patch
+0004-Fix-NaN-propagation.patch
+0005-Disable-printing-of-time.patch
+0006-Stop-generating-iteration-log-files.patch
diff --git a/debian/patches/silence.patch b/debian/patches/silence.patch
index 828b96c..7d34a63 100644
--- a/debian/patches/silence.patch
+++ b/debian/patches/silence.patch
@@ -1,3 +1,7 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Thu, 30 Jul 2020 09:57:45 +0200
+Subject: silence
+
The library's documentation indicates that it will only write out
messages when the iprint flag is greater than zero. There are two
places where writing still happens unconditionally, which this patch
@@ -5,9 +9,15 @@ fixes.
A similar patch was also applied by the SciPy project (see their issue
3238).
+---
+ lbfgsb.f | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/lbfgsb.f b/lbfgsb.f
+index 54fd1f9..008370d 100644
--- a/lbfgsb.f
+++ b/lbfgsb.f
-@@ -2550,7 +2550,9 @@
+@@ -2550,7 +2550,9 @@ c Determine the maximum step length.
if (gd .ge. zero) then
c the directional derivative >=0.
c Line search is impossible.
@@ -18,7 +28,7 @@ A similar patch was also applied by the SciPy project (see their issue
info = -4
return
endif
-@@ -3279,8 +3281,10 @@
+@@ -3279,8 +3281,10 @@ c
55 continue
if ( dd_p .gt.zero ) then
call dcopy( n, xp, 1, x, 1 )
diff --git a/debian/rules b/debian/rules
index 60d2ed6..48c4f4c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,16 +2,8 @@
SONAME=liblbfgsb.so.0
-# Enable hardening, but remove pie flag since we're building a shared
-# object. See also
-# https://lists.debian.org/debian-devel/2013/01/msg00225.html.
-MAINTOPTS = hardening=+all,-pie
-FCFLAGS:=$(shell DEB_BUILD_MAINT_OPTIONS=$(MAINTOPTS) dpkg-buildflags --get FCFLAGS)
-LDFLAGS:=$(shell DEB_BUILD_MAINT_OPTIONS=$(MAINTOPTS) dpkg-buildflags --get LDFLAGS)
-
-MAINTOPTS_EX = hardening=+all
-FCFLAGS_EX:=$(shell DEB_BUILD_MAINT_OPTIONS=$(MAINTOPTS_EX) dpkg-buildflags --get FCFLAGS)
-LDFLAGS_EX:=$(shell DEB_BUILD_MAINT_OPTIONS=$(MAINTOPTS_EX) dpkg-buildflags --get LDFLAGS)
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+include /usr/share/dpkg/buildflags.mk
%:
dh $@
@@ -28,22 +20,22 @@ build/liblbfgsb.a: build/lbfgsb.o build/timer.o
ar cr $@ $^
build/lbfgsb-examples_driver1_77: driver1.f build/liblbfgsb.so
- gfortran $(FCFLAGS_EX) $(LDFLAGS_EX) -o $@ $< -llbfgsb -Lbuild
+ gfortran $(FCFLAGS) $(LDFLAGS) -o $@ $< -llbfgsb -Lbuild
build/lbfgsb-examples_driver1_90: driver1.f90 build/liblbfgsb.so
- gfortran $(FCFLAGS_EX) $(LDFLAGS_EX) -o $@ $< -llbfgsb -Lbuild
+ gfortran $(FCFLAGS) $(LDFLAGS) -o $@ $< -llbfgsb -Lbuild
build/lbfgsb-examples_driver2_77: driver2.f build/liblbfgsb.so
- gfortran $(FCFLAGS_EX) $(LDFLAGS_EX) -o $@ $< -llbfgsb -Lbuild
+ gfortran $(FCFLAGS) $(LDFLAGS) -o $@ $< -llbfgsb -Lbuild
build/lbfgsb-examples_driver2_90: driver2.f90 build/liblbfgsb.so
- gfortran $(FCFLAGS_EX) $(LDFLAGS_EX) -o $@ $< -llbfgsb -Lbuild
+ gfortran $(FCFLAGS) $(LDFLAGS) -o $@ $< -llbfgsb -Lbuild
build/lbfgsb-examples_driver3_77: driver3.f build/liblbfgsb.so
- gfortran $(FCFLAGS_EX) $(LDFLAGS_EX) -o $@ $< -llbfgsb -Lbuild
+ gfortran $(FCFLAGS) $(LDFLAGS) -o $@ $< -llbfgsb -Lbuild
build/lbfgsb-examples_driver3_90: driver3.f90 build/liblbfgsb.so
- gfortran $(FCFLAGS_EX) $(LDFLAGS_EX) -o $@ $< -llbfgsb -Lbuild
+ gfortran $(FCFLAGS) $(LDFLAGS) -o $@ $< -llbfgsb -Lbuild
execute_before_dh_auto_build:
mkdir -p build
@@ -57,4 +49,4 @@ execute_before_dh_auto_clean:
rm -rf build
override_dh_compress:
- dh_compress -X.pdf -X.f -X.f90 -Xoutput_
+ dh_compress -X.f -X.f90 -Xoutput_
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..d39dea8
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,24 @@
+Reference:
+- Title: A Limited Memory Algorithm for Bound Constrained Optimization
+ Author: R. H. Byrd, P. Lu and J. Nocedal
+ Journal: SIAM Journal on Scientific and Statistical Computing
+ Year: 1995
+ Volume: 16
+ Number: 5
+ Pages: 1190-1208
+- Title: 'L-BFGS-B: Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound
+ constrained optimization'
+ Author: C. Zhu, R. H. Byrd and J. Nocedal
+ Journal: ACM Transactions on Mathematical Software
+ Year: 1997
+ Volume: 23
+ Number: 4
+ Pages: 550-560
+- Title: 'Remark on Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound
+ constrained optimization'
+ Author: J.L. Morales and J. Nocedal
+ Journal: ACM Transactions on Mathematical Software
+ Year: 2011
+ Volume: 38
+ Number: 1
+ Pages: 1-4
diff --git a/debian/watch b/debian/watch
index db539dc..b02a559 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,5 +1,6 @@
-version=3
-
-opts="dversionmangle=s/\+dfsg\.\d+$//,filenamemangle=s/\S+\/v?(\S+)\.tar\.gz/lbfgsb-$1\.tar\.gz/" \
- http://users.iems.northwestern.edu/~nocedal/lbfgsb.html \
- Software/Lbfgsb\.(.+)\.tar\.(?:bz2|gz|xz) \ No newline at end of file
+version=4
+opts="dversionmangle=s/@DEB_EXT@//, \
+ filenamemangle=s/(?:.*?)?v?(\d[\d.]*@ARCHIVE_EXT@)/@PACKAGE@-$1/, \
+ oversionmangle=s/(.*)/$1+dfsg.4/" \
+ http://users.iems.northwestern.edu/~nocedal/lbfgsb.html \
+ Software/Lbfgsb\.(.+)\.tar\.gz