Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/esomidas/files/, sci-astronomy/esomidas/
Date: Mon, 25 Sep 2017 19:14:29
Message-Id: 1506366843.d16f45da155f04acb3fdd94bc29d8af804406d78.dilfridge@gentoo
1 commit: d16f45da155f04acb3fdd94bc29d8af804406d78
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 25 19:13:23 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 25 19:14:03 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d16f45da
7
8 sci-astronomy/esomidas: Revision bump for libtirpc support, bug 631378
9
10 Closes: https://bugs.gentoo.org/631378
11 Package-Manager: Portage-2.3.10, Repoman-2.3.3
12
13 sci-astronomy/esomidas/esomidas-17.02-r1.ebuild | 149 +++++++++++++++++++++
14 .../esomidas/files/esomidas-17.02-rpc.patch | 33 +++++
15 sci-astronomy/esomidas/metadata.xml | 3 +
16 3 files changed, 185 insertions(+)
17
18 diff --git a/sci-astronomy/esomidas/esomidas-17.02-r1.ebuild b/sci-astronomy/esomidas/esomidas-17.02-r1.ebuild
19 new file mode 100644
20 index 00000000000..70312bb3975
21 --- /dev/null
22 +++ b/sci-astronomy/esomidas/esomidas-17.02-r1.ebuild
23 @@ -0,0 +1,149 @@
24 +# Copyright 1999-2017 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=6
28 +
29 +inherit eutils fortran-2 toolchain-funcs flag-o-matic
30 +
31 +# MIDVERS is actually used by MIDAS configuration scripts
32 +export MIDVERS="17FEBpl1.2"
33 +
34 +DESCRIPTION="European Southern Observatory Munich Image Data Analysis System"
35 +HOMEPAGE="http://www.eso.org/projects/esomidas/"
36 +SRC_URI="ftp://ftp.eso.org/pub/midaspub/17FEB/sources/${MIDVERS}.tar.gz -> ${P}.tar.gz"
37 +
38 +LICENSE="GPL-2"
39 +SLOT="0/8"
40 +KEYWORDS="~amd64 ~x86"
41 +
42 +IUSE="+libtirpc"
43 +
44 +RDEPEND="
45 + sys-libs/readline:0=
46 + x11-libs/motif:0=
47 + x11-libs/libX11:=
48 + x11-libs/libXt:=
49 + !libtirpc? ( sys-libs/glibc[rpc(-)] )
50 + libtirpc? ( net-libs/libtirpc )
51 +"
52 +DEPEND="${RDEPEND}"
53 +
54 +S="${WORKDIR}/${MIDVERS}"
55 +
56 +PATCHES=(
57 + "${FILESDIR}/${P}-output_to_stdout.patch"
58 + "${FILESDIR}/${P}-gentoo-setup.patch"
59 + "${FILESDIR}/${P}-rpc.patch"
60 +)
61 +
62 +src_prepare() {
63 + default
64 + # variables for all phases and midas internal build system
65 + export MIDASHOME="${WORKDIR}"
66 + export MID_HOME="${S}"
67 + export MID_HOME0="/usr/$(get_libdir)/esomidas/${MIDVERS}"
68 + export MID_INSTALL="${MID_HOME}/install/unix"
69 + export MID_SYS="${MID_HOME}/system/unix/"
70 + export MID_WORK="${MIDASHOME}/midwork"
71 +
72 + # sadly this enforces static linking
73 + if use libtirpc ; then
74 + RPC_OPT="-I/usr/include/tirpc"
75 + RPC_LIB="-ltirpc"
76 + else
77 + RPC_OPT=""
78 + RPC_LIB=""
79 + fi
80 +
81 + # create a gentoo option file
82 + mkdir ${MID_INSTALL}/systems/Gentoo || die
83 + cat >> ${MID_INSTALL}/systems/Gentoo/make_options <<-EOF
84 + CC=$(tc-getCC)
85 + LDCC=$(tc-getCC)
86 + F77=$(tc-getFC)
87 + FC=$(tc-getFC)
88 + LD77_CMD=$(tc-getFC)
89 + AR=$(tc-getAR)
90 + RANLIB=$(tc-getRANLIB)
91 + F_OPT=
92 + C_OPT=
93 + E_OPT=$(use amd64 && echo -Z)
94 + SYS=
95 + SH_OPT=-fPIC
96 + SH_CMD=${MIDASHOME}/${MIDVERS}/local/make_shared
97 + GUI_OPT=-DPATH_MAX=1024
98 + STRIP=echo
99 + EDITFLAGS=-DVOID_SIGHANDLER -DHAVE_ALLOCA -DHAVE_ALLOCA_H -DHAVE_GETPW_DECLS -DHAVE_DIRENT_H -DHAVE_STRING_H -DLinux -DHAVE_UNISTD_H -DHAVE_STDLIB_H
100 + EDITLIBS=-lreadline
101 + UIMX=uimxR5
102 + INSTALL_FLAG=auto
103 + RPC_OPT=${RPC_OPT}
104 + RPC_LIB=${RPC_LIB}
105 + EOF
106 + sed -e "s|gcc|$(tc-getCC) \${LDFLAGS}|" \
107 + ${MID_INSTALL}/systems/Linux/make_shared \
108 + > ${MID_INSTALL}/systems/Gentoo/make_shared || die
109 + sed -e 's|PC/Linux|Gentoo|' \
110 + ${MID_INSTALL}/systems/Linux/setup \
111 + > ${MID_INSTALL}/systems/Gentoo/setup || die
112 +
113 + # gentoo readline avoids exporting the xmalloc,xrealloc and xfree
114 + append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
115 +}
116 +
117 +src_configure() {
118 + ${MID_INSTALL}/select all || die "packages selection failed"
119 + ${MID_INSTALL}/preinstall -a || die "preinstallation failed"
120 + ${MID_INSTALL}/install2 || die "configuration failed"
121 + chmod 755 ${MID_HOME}/local/make_shared
122 +}
123 +
124 +src_compile() {
125 + CMND_YES=2 ${MID_INSTALL}/install3 -a || die "compilation failed"
126 + [[ -x ${MID_HOME}/monit/midasgo.exe ]] || die "somewhere compilation failed"
127 + emake -C monit syskeys.unix
128 + ${MID_SYS}/inmidas -m ${MID_WORK} -j "@ compile.all"
129 + ${MID_SYS}/inmidas -m ${MID_WORK} -j "@ ascii_bin no ; bye"
130 +}
131 +
132 +src_test() {
133 + local test_dir="${WORKDIR}/test_tmp"
134 + mkdir ${test_dir} && cd ${test_dir}
135 + ${MID_SYS}/inmidas -m ${MID_WORK} -j "@ vericopy ; @@ veriall -nodisplay ; bye" || die
136 + test -f ${MID_WORK}/veriall_* || die "tests failed somewhere"
137 + rm -rf ${test_dir}
138 +}
139 +
140 +src_install() {
141 + yes | ${MID_SYS}/cleanmidas
142 + find ${MID_HOME} \( \
143 + -name "*.a" -o \
144 + -name "makefile" -o \
145 + -name "default.mk" -o \
146 + -name "*.h" -o \
147 + -name "*.inc" -o \
148 + -name COPYING -o \
149 + -name "*~" -o \
150 + -name "*.mod" \) -delete
151 + rm -rf ${MID_HOME}/libsrc/ftoc*
152 + find ${MID_HOME} -type d -empty -delete
153 +
154 + sed -e "s:^MIDVERS0=.*:MIDVERS0=${MIDVERS}:" \
155 + -e "s:^MIDASHOME0=.*:MIDASHOME0=/usr/$(get_libdir)/esomidas:" \
156 + -i ${MID_HOME}/system/unix/{inmidas,helpmidas,drs}
157 +
158 + cd "${WORKDIR}"
159 + dodir /usr/$(get_libdir)/esomidas
160 + mv "${S}" "${ED}"${MID_HOME0}
161 + chmod 0644 "${ED}"${MID_HOME0}/contrib/baches/*/*.fit \
162 + "${ED}"${MID_HOME0}/contrib/baches/*/*.fmt \
163 + "${ED}"${MID_HOME0}/contrib/baches/*/*.datorg \
164 + "${ED}"${MID_HOME0}/contrib/baches/*/*.prg \
165 + "${ED}"${MID_HOME0}/contrib/baches/*/*.README
166 + find "${ED}"${MID_HOME0} -name \*.sh | xargs chmod 0755
167 + chmod 0755 "${ED}"${MID_HOME0}/util/bench/brun
168 +
169 + dosym ${MID_HOME0}/system/unix/inmidas /usr/bin/inmidas
170 + dosym ${MID_HOME0}/system/unix/gomidas /usr/bin/gomidas
171 + dosym ${MID_HOME0}/system/ftoc-new ${MID_HOME0}/system/good-ftoc
172 +}
173
174 diff --git a/sci-astronomy/esomidas/files/esomidas-17.02-rpc.patch b/sci-astronomy/esomidas/files/esomidas-17.02-rpc.patch
175 new file mode 100644
176 index 00000000000..d56ec03346c
177 --- /dev/null
178 +++ b/sci-astronomy/esomidas/files/esomidas-17.02-rpc.patch
179 @@ -0,0 +1,33 @@
180 +diff -ruN 17FEBpl1.2.orig/lib/makefile 17FEBpl1.2/lib/makefile
181 +--- 17FEBpl1.2.orig/lib/makefile 2017-04-26 11:44:02.000000000 +0200
182 ++++ 17FEBpl1.2/lib/makefile 2017-09-25 21:08:51.359595847 +0200
183 +@@ -58,7 +58,7 @@
184 + ## Ubuntu version 13.10 on
185 + ##
186 + ## $(SH_CMD) -o $(LIBMIDAS_SH) *.o $(DEV_NULL)
187 +- $(SH_CMD) -o $(LIBMIDAS_SH) *.o -lm $(F2C_LIBS) $(DEV_NULL)
188 ++ $(SH_CMD) -o $(LIBMIDAS_SH) *.o -lm $(F2C_LIBS) $(RPC_LIB) $(DEV_NULL)
189 +
190 + # for the AltLinux distro we had to change the line above to:
191 + # $(SH_CMD) -o $(LIBMIDAS_SH) *.o -lm $(DEV_NULL)
192 +diff -ruN 17FEBpl1.2.orig/libsrc/os/unix/makefile 17FEBpl1.2/libsrc/os/unix/makefile
193 +--- 17FEBpl1.2.orig/libsrc/os/unix/makefile 2017-04-26 11:44:32.000000000 +0200
194 ++++ 17FEBpl1.2/libsrc/os/unix/makefile 2017-09-25 21:08:48.747583816 +0200
195 +@@ -19,7 +19,7 @@
196 +
197 + include ../../../local/default.mk
198 +
199 +-CFLAGS += $(C_OPT) $(DEBUG) $(MEM_OPT) $(SH_OPT) $(OSSYS) $(SYS) -I$(INC)
200 ++CFLAGS += $(C_OPT) $(DEBUG) $(MEM_OPT) $(SH_OPT) $(OSSYS) $(SYS) -I$(INC) $(RPC_OPT)
201 +
202 + LIB = $(LIBDIR)/libos.a
203 +
204 +@@ -43,7 +43,7 @@
205 + # testos.exe only for checking the linking process, in cannot be executed...
206 +
207 + testos.exe: testos.o $(LIB)
208 +- $(LDCC) testos.o $(LIB) $(MLIB) $(SLIB) -o $@
209 ++ $(LDCC) testos.o $(LIB) $(MLIB) $(SLIB) $(RPC_LIB) -o $@
210 + $(STRIP) $@
211 +
212 + $(LIB): $(OBJ)
213
214 diff --git a/sci-astronomy/esomidas/metadata.xml b/sci-astronomy/esomidas/metadata.xml
215 index 40556383b31..8e581953fd7 100644
216 --- a/sci-astronomy/esomidas/metadata.xml
217 +++ b/sci-astronomy/esomidas/metadata.xml
218 @@ -13,4 +13,7 @@
219 surface photometry, image sharpening and decomposition, statistics and
220 various others.
221 </longdescription>
222 +<use>
223 + <flag name="libtirpc">Build against <pkg>net-libs/libtirpc</pkg> for RPC support</flag>
224 +</use>
225 </pkgmetadata>