mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 04:39:07 -07:00
sci-chemistry/surf: Port to EAPI 7
Closes: https://bugs.gentoo.org/731888 Closes: https://bugs.gentoo.org/742023 Package-Manager: Portage-3.0.7, Repoman-3.0.1 Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
108
sci-chemistry/surf/files/surf-1.0-Wreturn-type.patch
Normal file
108
sci-chemistry/surf/files/surf-1.0-Wreturn-type.patch
Normal file
@@ -0,0 +1,108 @@
|
||||
--- a/compute.c
|
||||
+++ b/compute.c
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
Current_atom = atom_id;
|
||||
|
||||
- if (!compute_neighbors(atom_id, &num_constraints)) return;
|
||||
+ if (!compute_neighbors(atom_id, &num_constraints)) return -1;
|
||||
|
||||
compute_planes(atom_id, num_constraints,constraints);
|
||||
|
||||
@@ -597,7 +597,7 @@
|
||||
*/
|
||||
if (all_verts_in_sphere(rvertices, rvertices_count, sq_radius))
|
||||
{ /* printf("atom_id %d all_in = TRUE \n", atom_id); */
|
||||
- return;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
for(i = 0; i < rfaces_count; i++) /* for each face */
|
||||
@@ -647,7 +647,7 @@
|
||||
if (DOTPROD3(diff, diff) < 1e-10)
|
||||
/* atom center lies in the feasible region, and so can be also
|
||||
taken to be the tes_origin - no more computations required */
|
||||
- return;
|
||||
+ return -1;
|
||||
|
||||
/* try computing the tes_origin as the average of all int_pts */
|
||||
VEC3_ZERO(temp_origin); count = 0;
|
||||
--- a/tessel_concave.c
|
||||
+++ b/tessel_concave.c
|
||||
@@ -178,7 +178,7 @@
|
||||
if ((sq_side_len[0] < EPS) &&
|
||||
(sq_side_len[1] < EPS) &&
|
||||
(sq_side_len[2] < EPS))
|
||||
- { return;
|
||||
+ { return -1;
|
||||
}
|
||||
|
||||
/* evaluate which side of the plane the points lie wrt the probe center */
|
||||
@@ -195,14 +195,14 @@
|
||||
max_len = FMAX((FMAX(sq_side_len[0], sq_side_len[1])), sq_side_len[2]);
|
||||
max_side = (max_len==sq_side_len[0])?0:((max_len==sq_side_len[1])? 1 : 2);
|
||||
|
||||
- if (num_fine_points == 0) return; /* all points are on the wrong side */
|
||||
+ if (num_fine_points == 0) return -1; /* all points are on the wrong side */
|
||||
|
||||
if (max_len <= Max_Tess_Len_Sq)
|
||||
{ /* sufficiently small so display but first check to see whether it
|
||||
intersects the plane or not and if so, clip it accordingly */
|
||||
if (num_fine_points == 3)
|
||||
{ gen_tris(points[0], points[1], points[2]);
|
||||
- return;
|
||||
+ return -1;
|
||||
}
|
||||
else if (num_fine_points == 1) /* two points are on the wrong side */
|
||||
i = (itemp[0] == 1)? 0 : ((itemp[1] == 1)? 1: 2);
|
||||
@@ -305,7 +305,7 @@
|
||||
(sq_side_len[1] < EPS) &&
|
||||
(sq_side_len[2] < EPS))
|
||||
{
|
||||
- return;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
if (max_len > Max_Tess_Len_Sq)
|
||||
--- a/tessel_convex.c
|
||||
+++ b/tessel_convex.c
|
||||
@@ -74,7 +74,7 @@
|
||||
atoms[atom_id].center[Y], atoms[atom_id].center[Z], atoms[atom_id].radius);
|
||||
fflush(stderr);
|
||||
free(sph_side);
|
||||
- return;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
|
||||
--- a/tessel_torus.c
|
||||
+++ b/tessel_torus.c
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
if (j > n)
|
||||
{ printf("gen_torus(): Too many torus verts %d (limit %d)\n",j, n);
|
||||
- return ;
|
||||
+ return -1;
|
||||
}
|
||||
old_j = j;
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
gen_linear_recurse(tor_pts[0][i],tor_pts[1][i],r[k],&j,fcenter,fradius,0);
|
||||
if (j > n)
|
||||
{ printf("gen_torus(): Too many torus verts %d (limit %d)\n",j, n);
|
||||
- return ;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
for(m = 0; m < j-1; m++)
|
||||
--- a/utils.c
|
||||
+++ b/utils.c
|
||||
@@ -91,7 +91,7 @@
|
||||
disc = radius*radius - DOTPROD3(EO, EO);
|
||||
if (FP_EQ_EPS(disc, 0, GP_EPS*GP_EPS))
|
||||
{ VEC3_ASN_OP(int_point, =, ray_pt);
|
||||
- return;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
one_by_sq_dir_mag = 1.0/DOTPROD3(ray_dir, ray_dir);
|
||||
112
sci-chemistry/surf/files/surf-1.0-makefile.patch
Normal file
112
sci-chemistry/surf/files/surf-1.0-makefile.patch
Normal file
@@ -0,0 +1,112 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,24 +1,19 @@
|
||||
# Compilation flags
|
||||
#CC = cc
|
||||
-CC = cc
|
||||
-INCLUDE = -I.
|
||||
+CPPFLAGS += -I.
|
||||
#LINCLUDE = -lcurses -ltermcap -lm
|
||||
-LINCLUDE = -lm
|
||||
-OPT_CFLAGS = -O2 $(FLAGS) $(INCLUDE)
|
||||
-#CFLAGS = -g $(FLAGS) $(INCLUDE)
|
||||
-CFLAGS = -O2 $(FLAGS) $(INCLUDE)
|
||||
+LDLIBS = -lm
|
||||
|
||||
# These are the user object files in the application
|
||||
SRCS = surf.c io.c compute.c dual.c utils.c lp.c chull.c tessel_cases.c \
|
||||
tessel_patches.c tessel_convex.c tessel_concave.c tessel_torus.c
|
||||
|
||||
# obj files for sequential execution
|
||||
-OBJS = surf.o io.o compute.o dual.o utils.o lp.o chull.o tessel_cases.o \
|
||||
+OBJS = io.o compute.o dual.o utils.o lp.o chull.o tessel_cases.o \
|
||||
tessel_patches.o tessel_convex.o tessel_concave.o tessel_torus.o
|
||||
|
||||
# make objects
|
||||
-surf: $(OBJS) Makefile
|
||||
- $(CC) $(CFLAGS) $(OBJS) -o surf $(LINCLUDE)
|
||||
+surf: $(OBJS)
|
||||
|
||||
lint:
|
||||
lint $(INCLUDE) $(SRCS)
|
||||
@@ -29,80 +24,3 @@
|
||||
release:
|
||||
tar -cvf surf.tar README *.[hc] Makefile
|
||||
compress surf.tar
|
||||
-
|
||||
-.c.o:
|
||||
- $(CC) $(CFLAGS) -c $*.c
|
||||
-
|
||||
-
|
||||
-# make depend makes the proper include file dependencies. You _could_ run
|
||||
-# it on a sun4, but there's a bug in the SunOS version of sed that causes
|
||||
-# the all-important "cat makedep | sed -e 's/\.o/.d4o/p'" etc. line to
|
||||
-# not print the results to the stdout (but to keep pumping it through the
|
||||
-# edits. The 'p' flag effectively does nothing). To avoid this I have
|
||||
-# replaced the 'p' flag by the 'w file' flag in sed.
|
||||
-
|
||||
-DEPEND = $(SRCS)
|
||||
-
|
||||
-depend: $(DEPEND)
|
||||
- @ echo making dependencies...
|
||||
- @ echo ' ' > makedep
|
||||
- @ makedepend $(INCLUDE) -f makedep $(DEPEND)
|
||||
- @ echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
|
||||
- @ echo '$$r makedep' >>eddep
|
||||
- @ echo 'w' >>eddep
|
||||
- @ cp Makefile Makefile.bak
|
||||
- @ ed - Makefile < eddep
|
||||
- @ rm eddep makedep
|
||||
- @ echo ' ' >> Makefile
|
||||
- @ echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
|
||||
- @ echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
|
||||
- @ echo '# see make depend above' >> Makefile
|
||||
- @ echo 'done.'
|
||||
- @ echo ' ' >> Makefile
|
||||
-
|
||||
-# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
-
|
||||
-
|
||||
-# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
-
|
||||
-surf.o: surf.h /usr/include/stdio.h /usr/include/math.h /usr/include/stdlib.h
|
||||
-surf.o: /usr/include/sgidefs.h /usr/include/string.h /usr/include/sys/time.h
|
||||
-surf.o: linalg.h
|
||||
-io.o: surf.h /usr/include/stdio.h /usr/include/math.h /usr/include/stdlib.h
|
||||
-io.o: /usr/include/sgidefs.h /usr/include/string.h /usr/include/sys/time.h
|
||||
-io.o: linalg.h
|
||||
-compute.o: surf.h /usr/include/stdio.h /usr/include/math.h
|
||||
-compute.o: /usr/include/stdlib.h /usr/include/sgidefs.h /usr/include/string.h
|
||||
-compute.o: /usr/include/sys/time.h linalg.h chull.h dual.h
|
||||
-dual.o: surf.h /usr/include/stdio.h /usr/include/math.h /usr/include/stdlib.h
|
||||
-dual.o: /usr/include/sgidefs.h /usr/include/string.h /usr/include/sys/time.h
|
||||
-dual.o: linalg.h dual.h chull.h
|
||||
-utils.o: surf.h /usr/include/stdio.h /usr/include/math.h
|
||||
-utils.o: /usr/include/stdlib.h /usr/include/sgidefs.h /usr/include/string.h
|
||||
-utils.o: /usr/include/sys/time.h linalg.h
|
||||
-lp.o: surf.h /usr/include/stdio.h /usr/include/math.h /usr/include/stdlib.h
|
||||
-lp.o: /usr/include/sgidefs.h /usr/include/string.h /usr/include/sys/time.h
|
||||
-lp.o: linalg.h
|
||||
-chull.o: surf.h /usr/include/stdio.h /usr/include/math.h
|
||||
-chull.o: /usr/include/stdlib.h /usr/include/sgidefs.h /usr/include/string.h
|
||||
-chull.o: /usr/include/sys/time.h linalg.h chull.h
|
||||
-tessel_cases.o: surf.h /usr/include/stdio.h /usr/include/math.h
|
||||
-tessel_cases.o: /usr/include/stdlib.h /usr/include/sgidefs.h
|
||||
-tessel_cases.o: /usr/include/string.h /usr/include/sys/time.h linalg.h dual.h
|
||||
-tessel_patches.o: surf.h /usr/include/stdio.h /usr/include/math.h
|
||||
-tessel_patches.o: /usr/include/stdlib.h /usr/include/sgidefs.h
|
||||
-tessel_patches.o: /usr/include/string.h /usr/include/sys/time.h linalg.h
|
||||
-tessel_convex.o: surf.h /usr/include/stdio.h /usr/include/math.h
|
||||
-tessel_convex.o: /usr/include/stdlib.h /usr/include/sgidefs.h
|
||||
-tessel_convex.o: /usr/include/string.h /usr/include/sys/time.h linalg.h
|
||||
-tessel_concave.o: surf.h /usr/include/stdio.h /usr/include/math.h
|
||||
-tessel_concave.o: /usr/include/stdlib.h /usr/include/sgidefs.h
|
||||
-tessel_concave.o: /usr/include/string.h /usr/include/sys/time.h linalg.h
|
||||
-tessel_torus.o: surf.h /usr/include/stdio.h /usr/include/math.h
|
||||
-tessel_torus.o: /usr/include/stdlib.h /usr/include/sgidefs.h
|
||||
-tessel_torus.o: /usr/include/string.h /usr/include/sys/time.h linalg.h
|
||||
-
|
||||
-# DEPENDENCIES MUST END AT END OF FILE
|
||||
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
|
||||
-# see make depend above
|
||||
-
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="4"
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
@@ -12,31 +12,21 @@ SRC_URI="http://www.ks.uiuc.edu/Research/vmd/extsrcs/surf.tar.Z -> ${P}.tar.Z"
|
||||
LICENSE="SURF"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="
|
||||
!www-client/surf
|
||||
sys-apps/ed
|
||||
x11-misc/makedepend"
|
||||
RDEPEND=""
|
||||
RDEPEND="!www-client/surf"
|
||||
|
||||
S=${WORKDIR}
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_prepare() {
|
||||
sed \
|
||||
-e 's:$(CC) $(CFLAGS) $(OBJS):$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS):g' \
|
||||
-i Makefile || die
|
||||
}
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-makefile.patch
|
||||
"${FILESDIR}"/${P}-Wreturn-type.patch
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
emake depend \
|
||||
&& emake \
|
||||
CC="$(tc-getCC)" \
|
||||
OPT_CFLAGS="${CFLAGS} \$(INCLUDE)" \
|
||||
CFLAGS="${CFLAGS} \$(INCLUDE)"
|
||||
src_configure() {
|
||||
tc-export CC
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
dodoc README
|
||||
dobin surf
|
||||
einstalldocs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user