1 |
commit: a56587cc5ee323c8081d907534f76dde7b3ba510 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Dec 27 00:02:41 2020 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Sun Dec 27 00:03:20 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a56587cc |
7 |
|
8 |
dev-lang/fbc: fix for missing header |
9 |
|
10 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
11 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
12 |
|
13 |
dev-lang/fbc/fbc-1.07.2-r1.ebuild | 92 +++++++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 92 insertions(+) |
15 |
|
16 |
diff --git a/dev-lang/fbc/fbc-1.07.2-r1.ebuild b/dev-lang/fbc/fbc-1.07.2-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000..324c8741 |
19 |
--- /dev/null |
20 |
+++ b/dev-lang/fbc/fbc-1.07.2-r1.ebuild |
21 |
@@ -0,0 +1,92 @@ |
22 |
+# Copyright 1999-2020 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+DESCRIPTION="A free/open source, multi-platform BASIC compiler." |
28 |
+HOMEPAGE="https://www.freebasic.net" |
29 |
+SRC_URI=" |
30 |
+ https://github.com/freebasic/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz |
31 |
+ https://github.com/freebasic/${PN}/releases/download/${PV}/FreeBASIC-${PV}-source-bootstrap.tar.xz |
32 |
+" |
33 |
+ |
34 |
+LICENSE="FDL-1.2 GPL-2+ LGPL-2.1+" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~amd64 ~x86" |
37 |
+IUSE="gpm libffi opengl X" |
38 |
+ |
39 |
+DEPEND=" |
40 |
+ sys-libs/ncurses:= |
41 |
+ gpm? ( sys-libs/gpm ) |
42 |
+ libffi? ( dev-libs/libffi ) |
43 |
+ opengl? ( virtual/opengl ) |
44 |
+ X? ( |
45 |
+ x11-libs/libX11 |
46 |
+ x11-libs/libXext |
47 |
+ x11-libs/libXpm |
48 |
+ x11-libs/libXrandr |
49 |
+ x11-libs/libXrender |
50 |
+ ) |
51 |
+" |
52 |
+RDEPEND="${DEPEND}" |
53 |
+ |
54 |
+PATCHES=( "${FILESDIR}/${PN}-1.07.0-Pass-ltinfo-to-linker.patch" ) |
55 |
+ |
56 |
+DOCS="${S}/doc/fbc.1" |
57 |
+ |
58 |
+BOOTSTRAP_S="${WORKDIR}/FreeBASIC-${PV}-source-bootstrap" |
59 |
+ |
60 |
+src_unpack() { |
61 |
+ # We only need bootstrap source code if fbc is not already present |
62 |
+ if ! has_version dev-lang/fbc; then |
63 |
+ unpack "FreeBASIC-${PV}-source-bootstrap.tar.xz" |
64 |
+ fi |
65 |
+ unpack "${P}.tar.gz" |
66 |
+} |
67 |
+ |
68 |
+src_prepare() { |
69 |
+ # We only need bootstrap source code if fbc is not already present |
70 |
+ if ! has_version dev-lang/fbc; then |
71 |
+ cd "${BOOTSTRAP_S}" || die "cd failed" |
72 |
+ eapply "${PATCHES[@]}" |
73 |
+ cd "${S}" || die "cd failed" |
74 |
+ fi |
75 |
+ eapply_user |
76 |
+} |
77 |
+ |
78 |
+src_compile() { |
79 |
+ local fbc="fbc" |
80 |
+ local fbcflags="" |
81 |
+ |
82 |
+ # We only need bootstrap compiler if fbc is not already present |
83 |
+ if ! has_version dev-lang/fbc; then |
84 |
+ cd "${BOOTSTRAP_S}" || die "cd failed" |
85 |
+ |
86 |
+ # Build bootstrap compiler |
87 |
+ emake bootstrap-minimal |
88 |
+ |
89 |
+ # Set bootstrap compiler to build fbc |
90 |
+ fbc="${BOOTSTRAP_S}/bin/fbc" |
91 |
+ fbcflags="-i ${BOOTSTRAP_S}/inc" |
92 |
+ |
93 |
+ cd "${S}" || die "cd failed" |
94 |
+ fi |
95 |
+ |
96 |
+ local xcflags=( |
97 |
+ $(usex gpm "" "-DDISABLE_GPM") |
98 |
+ $(usex libffi "" " -DDISABLE_FFI") |
99 |
+ $(usex opengl "" " -DDISABLE_OPENGL") |
100 |
+ $(usex X "" " -DDISABLE_X11") |
101 |
+ ) |
102 |
+ |
103 |
+ # fbc requires a space after the -Wl option |
104 |
+ local fblflags="${LDFLAGS//-Wl,/-Wl }" |
105 |
+ |
106 |
+ # Build fbc |
107 |
+ emake CFLAGS="${CFLAGS} ${xcflags[*]} -I/usr/$(get_libdir)/libffi/include" FBC="${fbc}" FBCFLAGS="${fbcflags}" FBLFLAGS="${fblflags}" TARGET="${CHOST}" |
108 |
+} |
109 |
+ |
110 |
+src_install() { |
111 |
+ emake DESTDIR="${D}" prefix="/usr" TARGET="${CHOST}" install |
112 |
+ einstalldocs |
113 |
+} |