1 |
commit: 44646e26ab25ae7e7a4bb563476dfbc65af38e5c |
2 |
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr> |
3 |
AuthorDate: Sun Aug 22 19:37:23 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 22 19:37:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44646e26 |
7 |
|
8 |
sci-electronics/splat: Port to EAPI 8 |
9 |
|
10 |
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr> |
11 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
12 |
|
13 |
.../splat/files/splat-1.2.2-gcc43.patch | 4 +- |
14 |
sci-electronics/splat/splat-1.4.2.ebuild | 55 +++++++++++----------- |
15 |
2 files changed, 30 insertions(+), 29 deletions(-) |
16 |
|
17 |
diff --git a/sci-electronics/splat/files/splat-1.2.2-gcc43.patch b/sci-electronics/splat/files/splat-1.2.2-gcc43.patch |
18 |
index 11e65e77f14..be906150b9f 100644 |
19 |
--- a/sci-electronics/splat/files/splat-1.2.2-gcc43.patch |
20 |
+++ b/sci-electronics/splat/files/splat-1.2.2-gcc43.patch |
21 |
@@ -1,5 +1,5 @@ |
22 |
---- splat-1.2.1.orig/utils/fontdata.c |
23 |
-+++ splat-1.2.1/utils/fontdata.c |
24 |
+--- a/utils/fontdata.c |
25 |
++++ b/utils/fontdata.c |
26 |
@@ -32,6 +32,7 @@ |
27 |
#include <string.h> |
28 |
#include <stdlib.h> |
29 |
|
30 |
diff --git a/sci-electronics/splat/splat-1.4.2.ebuild b/sci-electronics/splat/splat-1.4.2.ebuild |
31 |
index d9bb7221cd6..8a0b78e7f31 100644 |
32 |
--- a/sci-electronics/splat/splat-1.4.2.ebuild |
33 |
+++ b/sci-electronics/splat/splat-1.4.2.ebuild |
34 |
@@ -1,9 +1,9 @@ |
35 |
# Copyright 1999-2021 Gentoo Authors |
36 |
# Distributed under the terms of the GNU General Public License v2 |
37 |
|
38 |
-EAPI=5 |
39 |
+EAPI=8 |
40 |
|
41 |
-inherit epatch toolchain-funcs |
42 |
+inherit toolchain-funcs |
43 |
|
44 |
DESCRIPTION="RF Signal Propagation, Loss, And Terrain analysis tool" |
45 |
HOMEPAGE="https://www.qsl.net/kd2bd/splat.html" |
46 |
@@ -14,18 +14,20 @@ SLOT="0" |
47 |
KEYWORDS="~amd64 ~ppc ~x86" |
48 |
IUSE="doc hires l10n_es" |
49 |
|
50 |
-DEPEND="sys-libs/zlib |
51 |
- app-arch/bzip2" |
52 |
+DEPEND=" |
53 |
+ app-arch/bzip2 |
54 |
+ sys-libs/zlib |
55 |
+" |
56 |
RDEPEND="${DEPEND}" |
57 |
|
58 |
-src_prepare() { |
59 |
- epatch "${FILESDIR}/${PN}-1.2.2-gcc43.patch" |
60 |
-} |
61 |
+PATCHES=( |
62 |
+ "${FILESDIR}"/${PN}-1.2.2-gcc43.patch |
63 |
+) |
64 |
|
65 |
src_configure() { |
66 |
# fake resulting file from interactive configuration script |
67 |
# using default resolution |
68 |
- cat <<- EOF > "${S}/splat.h" |
69 |
+ cat <<- EOF > "${S}/splat.h" || die |
70 |
/* Parameters for 3 arc-second standard resolution mode of operation */ |
71 |
#define MAXPAGES 9 |
72 |
#define HD_MODE 0 |
73 |
@@ -33,7 +35,7 @@ src_configure() { |
74 |
if use hires; then |
75 |
# fake resulting file from interactive configuration script |
76 |
# using default resolution |
77 |
- cat <<- EOF > "${S}/hires.h" |
78 |
+ cat <<- EOF > "${S}/hires.h" || die |
79 |
/* Parameters for 3 arc-second hires resolution mode of operation */ |
80 |
#define MAXPAGES 9 |
81 |
#define HD_MODE 1 |
82 |
@@ -42,20 +44,21 @@ src_configure() { |
83 |
} |
84 |
|
85 |
src_compile() { |
86 |
- local CC=$(tc-getCC) CXX=$(tc-getCXX) |
87 |
+ tc-export CC CXX |
88 |
|
89 |
- ${CXX} -Wall ${CXXFLAGS} ${LDFLAGS} itwom3.0.cpp splat.cpp -o rfsplat -lm -lbz2 || die |
90 |
+ cp {splat,rfsplat}.cpp || die |
91 |
+ emake LDLIBS="-lm -lbz2" -E "rfsplat: itwom3.0.o" |
92 |
if use hires; then |
93 |
- cp "${S}/hires.h" "${S}/splat.h" |
94 |
- ${CXX} -Wall ${CXXFLAGS} ${LDFLAGS} itwom3.0.cpp splat.cpp -o rfsplat-hd -lm -lbz2 || die |
95 |
+ cp {hires,splat}.h || die |
96 |
+ cp {splat,rfsplat-hd}.cpp || die |
97 |
+ emake LDLIBS="-lm -lbz2" -E "rfsplat-hd: itwom3.0.o" |
98 |
fi |
99 |
|
100 |
- cd utils |
101 |
- ${CC} -Wall ${CFLAGS} ${LDFLAGS} citydecoder.c -o citydecoder |
102 |
- ${CC} -Wall ${CFLAGS} ${LDFLAGS} usgs2sdf.c -o usgs2sdf |
103 |
- ${CC} -Wall ${CFLAGS} ${LDFLAGS} srtm2sdf.c -o srtm2sdf -lbz2 |
104 |
- #${CC} -Wall ${CFLAGS} ${LDFLAGS} fontdata.c -o fontdata -lz |
105 |
- ${CC} -Wall ${CFLAGS} ${LDFLAGS} bearing.c -o bearing -lm |
106 |
+ cd utils || die |
107 |
+ |
108 |
+ emake citydecoder usgs2sdf |
109 |
+ emake LDLIBS=-lbz2 srtm2sdf |
110 |
+ emake LDLIBS=-lm bearing |
111 |
} |
112 |
|
113 |
src_install() { |
114 |
@@ -63,9 +66,8 @@ src_install() { |
115 |
use l10n_es && SPLAT_LANG="spanish" |
116 |
# splat binary |
117 |
dobin rfsplat |
118 |
- if use hires; then |
119 |
- dobin rfsplat-hd |
120 |
- fi |
121 |
+ |
122 |
+ use hires && dobin rfsplat-hd |
123 |
|
124 |
# utilities |
125 |
dobin utils/{citydecoder,usgs2sdf,srtm2sdf,postdownload,bearing} |
126 |
@@ -74,17 +76,16 @@ src_install() { |
127 |
dodoc CHANGES README utils/fips.txt |
128 |
newdoc utils/README README.UTILS |
129 |
|
130 |
- if use doc; then |
131 |
- dodoc docs/${SPLAT_LANG}/{pdf/splat.pdf,postscript/splat.ps} |
132 |
- fi |
133 |
+ use doc && dodoc docs/${SPLAT_LANG}/{pdf/splat.pdf,postscript/splat.ps} |
134 |
+ |
135 |
#sample data |
136 |
docinto sample_data |
137 |
- dodoc sample_data/* |
138 |
+ dodoc -r sample_data/. |
139 |
} |
140 |
|
141 |
pkg_postinst() { |
142 |
elog "The original SPLAT! command got renamed to 'rfsplat' to avoid" |
143 |
- elog "filename collission with app-portage/splat." |
144 |
+ elog "filename collision with app-portage/splat." |
145 |
elog "" |
146 |
elog "Be aware that it is still referenced as 'splat' in the documentation." |
147 |
} |