Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sci-libs/jdqz/, sci-libs/jdqz/files/
Date: Tue, 28 Apr 2020 19:56:54
Message-Id: 1588103805.649af021240c18aa1331e996f87023b65f9bf712.Alessandro-Barbieri@gentoo
1 commit: 649af021240c18aa1331e996f87023b65f9bf712
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Tue Apr 28 18:28:56 2020 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Tue Apr 28 19:56:45 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=649af021
7
8 sci-libs/jdqz: patched makefiles
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12
13 sci-libs/jdqz/files/makefile.patch | 72 ++++++++++++++++++++++++++++++
14 sci-libs/jdqz/jdqz-0_pre19971107-r2.ebuild | 59 ++++++++++++++++++++++++
15 2 files changed, 131 insertions(+)
16
17 diff --git a/sci-libs/jdqz/files/makefile.patch b/sci-libs/jdqz/files/makefile.patch
18 new file mode 100644
19 index 0000000..626af34
20 --- /dev/null
21 +++ b/sci-libs/jdqz/files/makefile.patch
22 @@ -0,0 +1,72 @@
23 +diff -ur a/jdlib/Makefile b/jdlib/Makefile
24 +--- a/jdlib/Makefile 1996-08-23 10:50:41.000000000 +0200
25 ++++ b/jdlib/Makefile 2020-04-28 20:06:19.373359811 +0200
26 +@@ -2,21 +2,18 @@
27 + # Coded by Diederik R. Fokkema
28 + #
29 + # $Id$
30 +-#
31 ++#
32 + #
33 +
34 + export SHELL=/bin/sh
35 +-export FC = f77
36 +-export FFLAGS = -u -O
37 +
38 +-LIB = libjdqz.a
39 ++LIB = libjdqz.so.0
40 ++SOURCES = $(wildcard *.f)
41 ++OBJS = $(SOURCES:.f=.o)
42 +
43 +-OBJS = $(patsubst %.f,%.o,$(wildcard *.f))
44 ++.PHONY: all
45 ++all: ${LIB}
46 +
47 +-$(LIB): $(LIB)($(OBJS))
48 +- ranlib $@
49 ++$(LIB): $(OBJS)
50 ++ $(FC) -fPIC ${FCFLAGS} $(OBJS) -o $@ ${LDFLAGS} -shared -Wl,-soname,libjdqz.so.0
51 +
52 +-$(LIB)(jdqz.o): jdqz.f
53 +- $(FC) -u -O1 -c jdqz.f
54 +- $(AR) rv $(LIB) jdqz.o
55 +- -rm jdqz.o
56 +diff -ur a/jdtest/Makefile b/jdtest/Makefile
57 +--- a/jdtest/Makefile 1996-09-02 10:13:34.000000000 +0200
58 ++++ b/jdtest/Makefile 2020-04-28 20:12:09.021605638 +0200
59 +@@ -1,13 +1,10 @@
60 +-FC = f77
61 +-FFLAGS = -u -O
62 +-
63 + LIBPATH = -L../jdlib
64 +-LIBS = -ljdqz -llapack -lblas
65 ++LIBS = -ljdqz
66 + SUBDIRS = ../jdlib
67 + OBJ = example.o
68 +
69 + all: $(OBJ)
70 +- $(FC) $(LDFLAGS) -o example $(OBJ) $(LIBPATH) $(LIBS)
71 ++ $(FC) -fPIE $(FCFLAGS) $(LDFLAGS) -o example $(OBJ) $(LIBPATH) $(LIBS)
72 +
73 + clean:
74 + -rm -f example
75 +diff -ur a/Makefile b/Makefile
76 +--- a/Makefile 1996-08-23 10:47:42.000000000 +0200
77 ++++ b/Makefile 2020-04-28 20:13:35.101159047 +0200
78 +@@ -1,14 +1,11 @@
79 +-FC = f77
80 +-FFLAGS = -u -O
81 +-
82 + LIBPATH = -L../jdlib
83 +-LIBS = -ljdqr -llapack -lblas
84 ++LIBS = -ljdqr
85 + SUBDIRS = jdlib
86 + TEST = jdtest
87 +
88 + all: libs jdqr
89 +
90 +-jdqr:
91 ++jdqr:
92 + @for i in $(TEST); do (cd $$i; $(MAKE)); done
93 +
94 + libs:
95
96 diff --git a/sci-libs/jdqz/jdqz-0_pre19971107-r2.ebuild b/sci-libs/jdqz/jdqz-0_pre19971107-r2.ebuild
97 new file mode 100644
98 index 0000000..ff20b56
99 --- /dev/null
100 +++ b/sci-libs/jdqz/jdqz-0_pre19971107-r2.ebuild
101 @@ -0,0 +1,59 @@
102 +# Copyright 1999-2020 Gentoo Authors
103 +# Distributed under the terms of the GNU General Public License v2
104 +
105 +EAPI="7"
106 +
107 +inherit flag-o-matic fortran-2 toolchain-funcs
108 +
109 +DESCRIPTION="Jacobi-Davidson type method for the generalized standard eigenvalue problem."
110 +HOMEPAGE="https://www.win.tue.nl/casa/research/scientificcomputing/topics/jd/software.html"
111 +SRC_URI="https://www.win.tue.nl/casa/research/scientificcomputing/topics/jd/${PN}.tar.gz -> ${P}.tar.gz"
112 +
113 +LICENSE="GPL-3"
114 +SLOT="0"
115 +KEYWORDS="~amd64"
116 +IUSE="doc"
117 +
118 +# virtual/lapack does not pull in [deprecated] so we have to deal with this mess like this until it does
119 +DEPEND="
120 + virtual/blas
121 + virtual/lapack
122 + || ( sci-libs/openblas sci-libs/lapack[deprecated] )
123 +"
124 +RDEPEND="${DEPEND}"
125 +BDEPEND="doc? ( dev-texlive/texlive-latex )"
126 +
127 +PATCHES=( "${FILESDIR}/makefile.patch" )
128 +
129 +S="${WORKDIR}/${PN}"
130 +
131 +src_prepare() {
132 + libs="$($(tc-getPKG_CONFIG) --libs blas)"
133 + libs+=" $($(tc-getPKG_CONFIG) --libs lapack)"
134 + append-fflags "${libs}"
135 + default
136 +}
137 +
138 +src_compile() {
139 + if use doc; then
140 + pdflatex manual.tex || die
141 + fi
142 +
143 + cd "jdlib" || die
144 + emake
145 + ln -s libjdqz.so.0 libjdqz.so || die
146 +}
147 +
148 +src_test() {
149 + cd "jdtest" || die
150 + emake
151 + cd ".." || die
152 + LD_LIBRARY_PATH="./jdlib" ./jdtest/example || die
153 +}
154 +
155 +src_install() {
156 + dolib.so jdlib/libjdqz.so
157 + dolib.so jdlib/libjdqz.so.0
158 +
159 + use doc && dodoc manual.pdf
160 +}