Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/gspiceui/, sci-electronics/gspiceui/files/
Date: Thu, 24 Feb 2022 13:55:59
Message-Id: 1645710950.2679c27fcd64465c371a274e8bcb82dd96980bb1.andrewammerlaan@gentoo
1 commit: 2679c27fcd64465c371a274e8bcb82dd96980bb1
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 24 13:55:43 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 24 13:55:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2679c27f
7
8 sci-electronics/gspiceui: respect CXX and fix build with clang
9
10 Also update icon cache in postinst
11
12 Closes: https://bugs.gentoo.org/833994
13 Closes: https://bugs.gentoo.org/833993
14 Package-Manager: Portage-3.0.30, Repoman-3.0.3
15 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
16
17 .../gspiceui-1.2.87-respect-users-flags.patch | 34 ++++++++++++++++++++--
18 sci-electronics/gspiceui/gspiceui-1.2.87.ebuild | 5 ++--
19 2 files changed, 34 insertions(+), 5 deletions(-)
20
21 diff --git a/sci-electronics/gspiceui/files/gspiceui-1.2.87-respect-users-flags.patch b/sci-electronics/gspiceui/files/gspiceui-1.2.87-respect-users-flags.patch
22 index fd5881745279..c39b6a329aba 100644
23 --- a/sci-electronics/gspiceui/files/gspiceui-1.2.87-respect-users-flags.patch
24 +++ b/sci-electronics/gspiceui/files/gspiceui-1.2.87-respect-users-flags.patch
25 @@ -1,7 +1,18 @@
26 diff --git a/src/Makefile b/src/Makefile
27 -index 50736fd..22a1328 100644
28 +index 50736fd..8dbfcfa 100644
29 --- a/src/Makefile
30 +++ b/src/Makefile
31 +@@ -39,8 +39,8 @@ DESTDIR = /usr/local/bin
32 + #***************************************************************************************************
33 +
34 + # Which compiler and linker (eg. g++ or clang++)
35 +-CXX = g++
36 +-LD = g++
37 ++CXX ?= g++
38 ++LD ?= g++
39 + ifneq ($(GSPICEUI_MSWIN),0)
40 + LD += -static-libstdc++ -static-libgcc
41 + WINDRES = windres
42 @@ -91,13 +91,7 @@ BINDIR = $(ROOT)/bin
43 # -Os Optimize for size
44 # -Og Optimize debugging experience but don't break debugging
45 @@ -17,12 +28,29 @@ index 50736fd..22a1328 100644
46
47 # I like to compile using the option "-Wall" etc., tests that break wxWidgets are turned off below
48 ifeq ($(GSPICEUI_DEBUG),1)
49 -@@ -181,7 +175,7 @@ $(OBJDIR)/%.o : %.cpp
50 +@@ -117,6 +111,7 @@ INCLUDES = -I.
51 +
52 + # Libraries
53 + LIBS := $(shell $(WXCFG) --libs core,base,html)
54 ++LIBS += -lm -lstdc++
55 + # (The pkg-config stuff was requested by a user, somehow pangox was missing) 2019-08-07 ???
56 + #ifeq ($(GSPICEUI_MSWIN),0)
57 + #LIBS := $(shell $(WXCFG) --libs core,base,html) # $(shell pkg-config --libs-only-l pangox)
58 +@@ -181,7 +176,7 @@ $(OBJDIR)/%.o : %.cpp
59 # -o specify the output file name
60
61 $(BINDIR)/$(PROG) : $(OBJS)
62 - $(LD) -pipe -o $(BINDIR)/$(PROG) obj/*.o $(LIBS)
63 -+ $(LD) -pipe -o $(BINDIR)/$(PROG) obj/*.o $(LDFLAGS) $(LIBS)
64 ++ $(CXX) -o $(BINDIR)/$(PROG) obj/*.o $(LDFLAGS) $(LIBS)
65 ifeq ($(ROOT)/GSpiceUI.app,$(wildcard $(ROOT)/GSpiceUI.app))
66 cp $(BINDIR)/$(PROG) $(ROOT)/GSpiceUI.app/Contents/MacOS/gspiceui
67 endif
68 +@@ -223,7 +218,7 @@ tests : test_Component test_NetList test_CnvtType test_CmdNgSpiceOPT test_CmdNgS
69 +
70 + # Compiler options
71 +
72 +-test_% : CXXFLAGS = -Wall -g -pipe $(shell $(WXCFG) --cxxflags)
73 ++test_% : CXXFLAGS += $(shell $(WXCFG) --cxxflags)
74 + ifeq ($(GSPICEUI_WXLIB),2.8) # This suppresses spurious warnings from gcc with wxWidgets v2.8.12
75 + test_% : CXXFLAGS += -Wno-unused-local-typedefs
76 + endif
77
78 diff --git a/sci-electronics/gspiceui/gspiceui-1.2.87.ebuild b/sci-electronics/gspiceui/gspiceui-1.2.87.ebuild
79 index 8c007ed14442..d5377a288285 100644
80 --- a/sci-electronics/gspiceui/gspiceui-1.2.87.ebuild
81 +++ b/sci-electronics/gspiceui/gspiceui-1.2.87.ebuild
82 @@ -4,7 +4,7 @@
83 EAPI=8
84
85 WX_GTK_VER="3.0-gtk3"
86 -inherit desktop optfeature toolchain-funcs wxwidgets
87 +inherit desktop optfeature wxwidgets xdg
88
89 MY_P="${PN}-v${PV}"
90
91 @@ -50,7 +50,7 @@ src_configure() {
92 }
93
94 src_compile() {
95 - emake CXX="$(tc-getCXX)"
96 + emake
97 }
98
99 src_install() {
100 @@ -70,6 +70,7 @@ src_install() {
101 }
102
103 pkg_postinst() {
104 + xdg_pkg_postinst
105 if use examples ; then
106 elog "If you want to use the examples, copy and extract from"
107 elog "${EROOT}/usr/share/doc/${PF} the sch and lib directory"