Gentoo Archives: gentoo-commits

From: Jian Lin <jlin.gentoo@×××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-libs/StringiFor/
Date: Fri, 10 Sep 2021 16:40:07
Message-Id: 1631273014.3697e41d192b7638b1c0fe004fb69124f19d0002.jian@gentoo
1 commit: 3697e41d192b7638b1c0fe004fb69124f19d0002
2 Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
3 AuthorDate: Fri Sep 10 11:23:34 2021 +0000
4 Commit: Jian Lin <jlin.gentoo <AT> outlook <DOT> com>
5 CommitDate: Fri Sep 10 11:23:34 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3697e41d
7
8 dev-libs/StringiFor: Fix BDEPEND python implementation. Add '|| die'.
9
10 Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
11
12 dev-libs/StringiFor/StringiFor-1.1.1.ebuild | 32 +++++++++++++++++------------
13 dev-libs/StringiFor/StringiFor-1.1.3.ebuild | 30 ++++++++++++++++-----------
14 2 files changed, 37 insertions(+), 25 deletions(-)
15
16 diff --git a/dev-libs/StringiFor/StringiFor-1.1.1.ebuild b/dev-libs/StringiFor/StringiFor-1.1.1.ebuild
17 index 65350be77..2239e9843 100644
18 --- a/dev-libs/StringiFor/StringiFor-1.1.1.ebuild
19 +++ b/dev-libs/StringiFor/StringiFor-1.1.1.ebuild
20 @@ -4,8 +4,9 @@
21 EAPI=7
22
23 FORTRAN_STANDARD=2003
24 +PYTHON_COMPAT=( python3_{8..10} )
25
26 -inherit fortran-2 toolchain-funcs
27 +inherit fortran-2 python-any-r1 toolchain-funcs
28
29 # Unfortunately the releases don't have appropriate release-tags
30 # so there commits sha-1 checksum are used
31 @@ -18,9 +19,9 @@ DESCRIPTION="StringiFor, Strings Fortran Manipulator, yet another strings Fortra
32 HOMEPAGE="https://github.com/szaghi/StringiFor"
33 SRC_URI="
34 https://github.com/szaghi/${PN}/archive/"${StringiFor_sha}".tar.gz -> ${P}.tar.gz
35 + https://github.com/szaghi/BeFoR64/archive/"${BeFoR64_sha}".tar.gz -> BeFoR64-1.1.4.tar.gz
36 https://github.com/szaghi/FACE/archive/"${FACE_sha}".tar.gz -> FACE-1.1.2.tar.gz
37 https://github.com/szaghi/PENF/archive/"${PENF_sha}".tar.gz -> PENF-1.2.2.tar.gz
38 - https://github.com/szaghi/BeFoR64/archive/"${BeFoR64_sha}".tar.gz -> BeFoR64-1.1.4.tar.gz
39 "
40
41 S="${WORKDIR}/${PN}-${StringiFor_sha}"
42 @@ -34,7 +35,12 @@ KEYWORDS="~amd64 ~x86"
43 IUSE="static-libs test"
44 RESTRICT="!test? ( test )"
45
46 -BDEPEND="dev-util/FoBiS"
47 +BDEPEND="
48 + ${PYTHON_DEPS}
49 + $(python_gen_any_dep '
50 + dev-util/FoBiS[${PYTHON_USEDEP}]
51 + ')
52 +"
53
54 PATCHES=(
55 "${FILESDIR}/stringifor-1.1.1_fobos_soname.patch"
56 @@ -62,9 +68,9 @@ pkg_setup() {
57 }
58
59 src_prepare() {
60 - mv -T "${WORKDIR}"/BeFoR64-"${BeFoR64_sha}" "${S}"/src/third_party/BeFoR64
61 - mv -T "${WORKDIR}"/FACE-"${FACE_sha}" "${S}"/src/third_party/FACE
62 - mv -T "${WORKDIR}"/PENF-"${PENF_sha}" "${S}"/src/third_party/PENF
63 + mv -T "${WORKDIR}"/BeFoR64-"${BeFoR64_sha}" "${S}"/src/third_party/BeFoR64 || die
64 + mv -T "${WORKDIR}"/FACE-"${FACE_sha}" "${S}"/src/third_party/FACE || die
65 + mv -T "${WORKDIR}"/PENF-"${PENF_sha}" "${S}"/src/third_party/PENF || die
66 default
67
68 sed -i -e 's:\$OPTIMIZE = -O2:\$OPTIMIZE = '"${FFLAGS}"':' \
69 @@ -72,27 +78,27 @@ src_prepare() {
70 }
71
72 src_compile() {
73 - FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_SHARED}
74 - use static-libs && FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_STATIC}
75 + ${EPYTHON} FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_SHARED} || die
76 + use static-libs && { ${EPYTHON} FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_STATIC} || die; }
77 }
78
79 src_test() {
80 - FoBiS.py build -compiler custom -fc $(tc-getFC) ${BUILD_MODE_TESTS}
81 + ${EPYTHON} FoBiS.py build -compiler custom -fc $(tc-getFC) ${BUILD_MODE_TESTS} || die
82 for e in $( find ./exe/ -type f -executable -print ); do
83 if [ "$e" != "./exe/stringifor_test_parse_large_csv" ] ; then
84 - echo " run test $e :" && $e
85 + echo " run test $e :" && { $e || die; }
86 else
87 # The output of this test is too huge so it's cutted here
88 - echo " run test $e :" && $e | tail -n 10
89 + echo " run test $e :" && { $e | tail -n 10 || die; }
90 fi
91 done
92 }
93
94 src_install() {
95 - mv lib/mod lib/stringifor
96 + mv lib/mod lib/stringifor || die
97 doheader -r lib/stringifor/
98
99 - mv lib/libstringifor.so{,.1}
100 + mv lib/libstringifor.so{,.1} || die
101 dosym libstringifor.so.1 /usr/$(get_libdir)/libstringifor.so
102 dolib.so lib/libstringifor.so.1
103
104
105 diff --git a/dev-libs/StringiFor/StringiFor-1.1.3.ebuild b/dev-libs/StringiFor/StringiFor-1.1.3.ebuild
106 index 074ba8377..6bd69ccfa 100644
107 --- a/dev-libs/StringiFor/StringiFor-1.1.3.ebuild
108 +++ b/dev-libs/StringiFor/StringiFor-1.1.3.ebuild
109 @@ -4,8 +4,9 @@
110 EAPI=7
111
112 FORTRAN_STANDARD=2003
113 +PYTHON_COMPAT=( python3_{8..10} )
114
115 -inherit fortran-2 toolchain-funcs
116 +inherit fortran-2 python-any-r1 toolchain-funcs
117
118 # Unfortunately the releases don't have appropriate release-tags
119 # so there commits sha-1 checksum are used
120 @@ -34,7 +35,12 @@ KEYWORDS="~amd64 ~x86"
121 IUSE="static-libs test"
122 RESTRICT="!test? ( test )"
123
124 -BDEPEND="dev-util/FoBiS"
125 +BDEPEND="
126 + ${PYTHON_DEPS}
127 + $(python_gen_any_dep '
128 + dev-util/FoBiS[${PYTHON_USEDEP}]
129 + ')
130 +"
131
132 PATCHES=(
133 "${FILESDIR}/stringifor-1.1.1_fobos_soname.patch"
134 @@ -62,9 +68,9 @@ pkg_setup() {
135 }
136
137 src_prepare() {
138 - mv -T "${WORKDIR}"/BeFoR64-"${BeFoR64_sha}" "${S}"/src/third_party/BeFoR64
139 - mv -T "${WORKDIR}"/FACE-"${FACE_sha}" "${S}"/src/third_party/FACE
140 - mv -T "${WORKDIR}"/PENF-"${PENF_sha}" "${S}"/src/third_party/PENF
141 + mv -T "${WORKDIR}"/BeFoR64-"${BeFoR64_sha}" "${S}"/src/third_party/BeFoR64 || die
142 + mv -T "${WORKDIR}"/FACE-"${FACE_sha}" "${S}"/src/third_party/FACE || die
143 + mv -T "${WORKDIR}"/PENF-"${PENF_sha}" "${S}"/src/third_party/PENF || die
144 default
145
146 sed -i -e 's:\$OPTIMIZE = -O2:\$OPTIMIZE = '"${FFLAGS}"':' \
147 @@ -72,27 +78,27 @@ src_prepare() {
148 }
149
150 src_compile() {
151 - FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_SHARED}
152 - use static-libs && FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_STATIC}
153 + ${EPYTHON} FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_SHARED} || die
154 + use static-libs && { ${EPYTHON} FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_STATIC} || die; }
155 }
156
157 src_test() {
158 - FoBiS.py build -compiler custom -fc $(tc-getFC) ${BUILD_MODE_TESTS}
159 + ${EPYTHON} FoBiS.py build -compiler custom -fc $(tc-getFC) ${BUILD_MODE_TESTS} || die
160 for e in $( find ./exe/ -type f -executable -print ); do
161 if [ "$e" != "./exe/stringifor_test_parse_large_csv" ] ; then
162 - echo " run test $e :" && $e
163 + echo " run test $e :" && { $e || die; }
164 else
165 # The output of this test is too huge so it's cutted here
166 - echo " run test $e :" && $e | tail -n 10
167 + echo " run test $e :" && { $e | tail -n 10 || die; }
168 fi
169 done
170 }
171
172 src_install() {
173 - mv lib/mod lib/stringifor
174 + mv lib/mod lib/stringifor || die
175 doheader -r lib/stringifor/
176
177 - mv lib/libstringifor.so{,.1}
178 + mv lib/libstringifor.so{,.1} || die
179 dosym libstringifor.so.1 /usr/$(get_libdir)/libstringifor.so
180 dolib.so lib/libstringifor.so.1