Gentoo Archives: gentoo-dev

From: "Xianwen Chen (陈贤文)" <x@××××.ac>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] How to set CXX compiler?
Date: Mon, 06 Jul 2020 07:47:42
Message-Id: 3b1da98edb220ede04da8aa9c227c8de@chen.ac
In Reply to: Re: [gentoo-dev] How to set CXX compiler? by James Le Cuirot
1 Thank you, Michael and James.
2
3 Yes, I plan to submit a nice patch to the Makefile to upstream.
4
5 However, I think something is not right on my computer.
6
7 I have earlier tried to specify
8
9 emake CC="$(tc-getCXX)" prefix="${EPREFIX}/usr" DESTDIR="${D}"
10
11 Somehow, emerge does not know what $(tc-getCXX) is.
12
13 ###############################################################
14
15 >>> Emerging (1 of 1) sci-geosciences/sosicon-2020.06.04::an-overlay
16 * 655c75a4de75dbd4998ced6473aea255fed2492c.zip BLAKE2B SHA512 size ;-)
17 ... [ ok ]
18 >>> Unpacking source...
19 >>> Unpacking 655c75a4de75dbd4998ced6473aea255fed2492c.zip to /var/tmp/portage/sci-geosciences/sosicon-2020.06.04/work
20 >>> Source unpacked in /var/tmp/portage/sci-geosciences/sosicon-2020.06.04/work
21 >>> Preparing source in /var/tmp/portage/sci-geosciences/sosicon-2020.06.04/work/sosicon-655c75a4de75dbd4998ced6473aea255fed2492c/src ...
22 >>> Source prepared.
23 >>> Configuring source in /var/tmp/portage/sci-geosciences/sosicon-2020.06.04/work/sosicon-655c75a4de75dbd4998ced6473aea255fed2492c/src ...
24 >>> Source configured.
25 >>> Compiling source in /var/tmp/portage/sci-geosciences/sosicon-2020.06.04/work/sosicon-655c75a4de75dbd4998ced6473aea255fed2492c/src ...
26 /var/tmp/portage/sci-geosciences/sosicon-2020.06.04/temp/environment:
27 line 454: tc-getCXX: command not found
28 make -j1 CC= prefix=/usr
29 DESTDIR=/var/tmp/portage/sci-geosciences/sosicon-2020.06.04/image
30 ** Pre build steps...
31 ragel/bin/linux64/ragel -C -L -o parser_ragel.cpp ragel/parser.rl
32 ragel/bin/linux64/ragel -C -L -o sosi_north_east_ragel.cpp
33 ragel/sosi_north_east.rl
34 ragel/bin/linux64/ragel -C -L -o sosi_north_east_height_ragel.cpp
35 ragel/sosi_north_east_height.rl
36 ragel/bin/linux64/ragel -C -L -o sosi_origo_ne_ragel.cpp
37 ragel/sosi_origo_ne.rl
38 ragel/bin/linux64/ragel -C -L -o sosi_ref_ragel.cpp ragel/sosi_ref.rl
39 ** Compiling...
40 o ../bin/cmd/linux64/sosicon main.cpp command_line.cpp factory.cpp
41 logger.cpp utils.cpp byte_order.cpp sosi/sosi_ref_list.cpp
42 sosi_ref_ragel.cpp sosi/sosi_element.cpp sosi/sosi_element_search.cpp
43 sosi/sosi_north_east.cpp sosi_north_east_ragel.cpp
44 sosi_north_east_height_ragel.cpp sosi/sosi_origo_ne.cpp
45 sosi_origo_ne_ragel.cpp sosi/sosi_charset_singleton.cpp
46 sosi/sosi_unit.cpp sosi/sosi_translation_table.cpp shape/shapefile.cpp
47 converter_sosi2shp.cpp converter_sosi2xml.cpp converter_sosi2tsv.cpp
48 converter_sosi2psql.cpp converter_sosi2mysql.cpp converter_sosi_stat.cpp
49 coordinate_collection.cpp parser.cpp parser_ragel.cpp -march=nocona -O2
50 -pipe;
51 /bin/sh: o: command not found
52
53 ###############################################################
54
55 Below is the content of the ebuild:
56
57 ###############################################################
58
59 # Copyright 1999-2020 Gentoo Authors
60 # Distributed under the terms of the GNU General Public License v2
61
62 EAPI=7
63
64 RESTRICT="splitdebug"
65
66 sosicon_git_commit="655c75a4de75dbd4998ced6473aea255fed2492c"
67
68 DESCRIPTION="Converts a sosi file to a shapefile or to PostGIS"
69 HOMEPAGE="https://github.com/espena/sosicon/"
70 SRC_URI="
71 https://github.com/espena/sosicon/archive/${sosicon_git_commit}.zip
72 "
73
74 SLOT="0/3.0"
75 LICENSE="GPL-3"
76 KEYWORDS="amd64 x86"
77
78 S="${WORKDIR}/sosicon-${sosicon_git_commit}/src"
79
80 src_prepare(){
81 default
82
83 mv makefile Makefile
84
85 sed -i "s|INSTALL_PATH ?= /usr/local|INSTALL_PATH = ${D}|g" Makefile ||
86 die
87 sed -i "s|COMPILER_OPTS =|COMPILER_OPTS = ${CXXFLAGS}|g" Makefile || die
88 }
89
90 src_compile() {
91 emake CC="$(tc-getCXX)" prefix="${EPREFIX}/usr" DESTDIR="${D}"
92
93 }
94
95 src_install() {
96 mkdir ${D}/bin
97 emake install prefix="${EPREFIX}/usr" DESTDIR="${D}"
98 }
99
100 ###############################################################
101
102 Xianwen

Replies

Subject Author
[gentoo-dev] Re: How to set CXX compiler? Nikos Chantziaras <realnc@×××××.com>