Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/cernlib/
Date: Tue, 06 Feb 2018 19:43:09
Message-Id: 1517946162.500f7577ce2258a1540dbe19a315fcd6d292c480.heroxbd@gentoo
1 commit: 500f7577ce2258a1540dbe19a315fcd6d292c480
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 6 19:12:00 2018 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 6 19:42:42 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=500f7577
7
8 sci-physics/cernlib: bump to debian patchset 4.3
9
10 This fixes build on 17.0 profiles with PIE.
11
12 Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837657
13
14 Package-Manager: Portage-2.3.24, Repoman-2.3.6
15
16 sci-physics/cernlib/Manifest | 1 +
17 sci-physics/cernlib/cernlib-2006-r7.ebuild | 107 +++++++++++++++++++++++++++++
18 2 files changed, 108 insertions(+)
19
20 diff --git a/sci-physics/cernlib/Manifest b/sci-physics/cernlib/Manifest
21 index a5d741a6319..8e42f93ad04 100644
22 --- a/sci-physics/cernlib/Manifest
23 +++ b/sci-physics/cernlib/Manifest
24 @@ -1,3 +1,4 @@
25 DIST cernlib_20061220+dfsg3-2.debian.tar.gz 257093 BLAKE2B 35ae90e38ddb935f252531cdf49dc038cdb7543b9168076f97458323a2458938cfa2f1768165d4cc59649021e2b268139dd53b3ef09d2a6601e1f68792c69af1 SHA512 43a2ca55d42b92bfb551b029c75728e80b4c83473397b52f746d9481c7503762bc5a281732908bfeb29a64f728fed4c127ed1cb9101c16e4fb2dd28c452730ea
26 DIST cernlib_20061220+dfsg3-4.1.debian.tar.xz 170100 BLAKE2B 7bc206a246cc437babae6cdb38bd5831ccf4f665bbe65f2ebabf7df8a68c0b7c317f4a7ed283024bf70b6fe50fa8f01bd9a2882cfba174020a23f768f69c237c SHA512 d259ab304b040c6bab8535c0db60aaa466ef7bb9bbcce9b2d8931505a180c92935d428e0dd45bfa6199ec939f67580a6d3ac1035c0384bdcf9e6601a351ce90a
27 +DIST cernlib_20061220+dfsg3-4.3.debian.tar.xz 168928 BLAKE2B 15147d1d84d3e4abb06620154425a035e64d6e5254177f9647634fdf63e4a5aa42deba6c8f638f338cf85e8766732388cc6298813dd5b007d1ef97fddcef3d39 SHA512 8cb666d9ef62627e7e3e55bd1986b40ca9ddfcc882101b1a3597c1d60870e30649b5c7716687f7e4106b30ba0aa88a9ca7bc3a3651b0d1405f55a6f611dc308b
28 DIST cernlib_20061220+dfsg3.orig.tar.gz 6434476 BLAKE2B 069eda316ffbc4873e79952283a0aa2693ed58a3cc369bca72e29a4feaef4840922b4f62ababba1476f2aa0309f68833a4a35a3b5c6ac015bdbd85b3b58b2efe SHA512 11fade45c5ae69c858f37a82e74ab1a69416314a23c12ec5205ee6b918590d66f26d3ae68afa466ae3109d736212968ece956a444270ddd189a27a24c0ccece8
29
30 diff --git a/sci-physics/cernlib/cernlib-2006-r7.ebuild b/sci-physics/cernlib/cernlib-2006-r7.ebuild
31 new file mode 100644
32 index 00000000000..ddc16413da2
33 --- /dev/null
34 +++ b/sci-physics/cernlib/cernlib-2006-r7.ebuild
35 @@ -0,0 +1,107 @@
36 +# Copyright 1999-2018 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=5
40 +
41 +inherit eutils fortran-2 multilib toolchain-funcs
42 +
43 +DEB_PN=cernlib
44 +DEB_PV=20061220+dfsg3
45 +DEB_PR=4.3
46 +DEB_P=${DEB_PN}_${DEB_PV}
47 +
48 +DESCRIPTION="CERN program library for High Energy Physics"
49 +HOMEPAGE="https://cernlib.web.cern.ch/cernlib/"
50 +SRC_URI="
51 + mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}.orig.tar.gz
52 + mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}-${DEB_PR}.debian.tar.xz"
53 +
54 +SLOT="0"
55 +LICENSE="GPL-2 LGPL-2 BSD"
56 +KEYWORDS="~amd64 ~hppa ~sparc ~x86 ~amd64-linux ~x86-linux"
57 +
58 +RDEPEND="
59 + x11-libs/motif:0
60 + virtual/lapack
61 + dev-lang/cfortran"
62 +DEPEND="${RDEPEND}
63 + x11-misc/imake
64 + x11-misc/makedepend
65 + virtual/pkgconfig"
66 +
67 +S="${WORKDIR}/${DEB_PN}-${DEB_PV}"
68 +
69 +src_prepare() {
70 + mv ../debian . || die
71 + epatch "${FILESDIR}"/${P}-nogfortran.patch
72 + # set some default paths
73 + sed -i \
74 + -e "s:/usr/local:${EROOT}/usr:g" \
75 + -e "s:prefix)/lib/\$(DEB_HOST_MULTIARCH):prefix)/$(get_libdir):" \
76 + -e "s:\$(prefix)/etc:${EROOT}/etc:" \
77 + -e 's:$(prefix)/man:$(prefix)/share/man:' \
78 + debian/add-ons/cernlib.mk || die "sed failed"
79 +
80 + # use system blas and lapack set by gentoo framework
81 + sed -i \
82 + -e "s:\$DEPS -lm:$($(tc-getPKG_CONFIG) --libs blas):" \
83 + -e "s:\$DEPS -llapack -lm:$($(tc-getPKG_CONFIG) --libs lapack):" \
84 + -e 's:`depend $d $a blas`::' \
85 + -e 's:X11R6:X11:g' \
86 + -e 's: /[^ ]*`dpkg-arch.*`::' \
87 + debian/add-ons/bin/cernlib.in || die "sed failed"
88 +
89 + cp debian/add-ons/Makefile .
90 + export DEB_BUILD_OPTIONS="$(tc-getFC) nostrip nocheck"
91 +
92 + einfo "Applying Debian patches"
93 + emake -j1 patch
94 +
95 + epatch "${FILESDIR}"/${P}-fgets.patch
96 + epatch "${FILESDIR}"/${P}-ypatchy-short-name.patch
97 + # since we depend on cfortran, do not use the one from cernlib
98 + rm src/include/cfortran/cfortran.h || die
99 +
100 + # respect users flags
101 + sed -i \
102 + -e 's/-O3/-O2/g' \
103 + -e "s/-O2/${CFLAGS}/g" \
104 + -e "s|\(CcCmd[[:space:]]*\)gcc|\1$(tc-getCC)|g" \
105 + -e "s|\(CplusplusCmd[[:space:]]*\)g++|\1$(tc-getCXX)|g" \
106 + -e "s|\(FortranCmd[[:space:]]*\)gfortran|\1$(tc-getFC)|g" \
107 + src/config/linux.cf \
108 + || die "sed linux.cf failed"
109 + sed -i \
110 + -e "s|\(ArCmdBase[[:space:]]*\)ar|\1$(tc-getAR)|g" \
111 + -e "s|\(RanlibCmd[[:space:]]*\)ranlib|\1$(tc-getRANLIB)|g" \
112 + src/config/Imake.tmpl \
113 + || die "sed Imake.tmpl failed"
114 +
115 + sed -i \
116 + -e 's/\$(FCLINK)/\$(FCLINK) $(LDFLAGS)/' \
117 + -e 's/\$(CCLINK)/\$(CCLINK) $(LDFLAGS)/' \
118 + src/config/{biglib,fortran,Imake}.rules \
119 + src/patchy/Imakefile \
120 + || die "sed for ldflags propagation failed"
121 +
122 + # add missing headers for implicit
123 + sed -i \
124 + -e '0,/^#include/i#include <stdlib.h>' \
125 + src/kernlib/kerngen/ccgen*/*.c || die
126 +}
127 +
128 +src_compile() {
129 + # parallel make breaks and complex patched imake system, hard to debug
130 + emake -j1 cernlib-indep cernlib-arch
131 +}
132 +
133 +src_test() {
134 + LD_LIBRARY_PATH="${S}"/shlib emake -j1 cernlib-test
135 +}
136 +
137 +src_install() {
138 + default
139 + cd debian
140 + dodoc changelog README.* deadpool.txt NEWS copyright
141 + newdoc add-ons/README README.add-ons
142 +}