mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-electronics/gspiceui: respect CXX and fix build with clang
Also update icon cache in postinst Closes: https://bugs.gentoo.org/833994 Closes: https://bugs.gentoo.org/833993 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 50736fd..22a1328 100644
|
||||
index 50736fd..8dbfcfa 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -39,8 +39,8 @@ DESTDIR = /usr/local/bin
|
||||
#***************************************************************************************************
|
||||
|
||||
# Which compiler and linker (eg. g++ or clang++)
|
||||
-CXX = g++
|
||||
-LD = g++
|
||||
+CXX ?= g++
|
||||
+LD ?= g++
|
||||
ifneq ($(GSPICEUI_MSWIN),0)
|
||||
LD += -static-libstdc++ -static-libgcc
|
||||
WINDRES = windres
|
||||
@@ -91,13 +91,7 @@ BINDIR = $(ROOT)/bin
|
||||
# -Os Optimize for size
|
||||
# -Og Optimize debugging experience but don't break debugging
|
||||
@@ -17,12 +28,29 @@ index 50736fd..22a1328 100644
|
||||
|
||||
# I like to compile using the option "-Wall" etc., tests that break wxWidgets are turned off below
|
||||
ifeq ($(GSPICEUI_DEBUG),1)
|
||||
@@ -181,7 +175,7 @@ $(OBJDIR)/%.o : %.cpp
|
||||
@@ -117,6 +111,7 @@ INCLUDES = -I.
|
||||
|
||||
# Libraries
|
||||
LIBS := $(shell $(WXCFG) --libs core,base,html)
|
||||
+LIBS += -lm -lstdc++
|
||||
# (The pkg-config stuff was requested by a user, somehow pangox was missing) 2019-08-07 ???
|
||||
#ifeq ($(GSPICEUI_MSWIN),0)
|
||||
#LIBS := $(shell $(WXCFG) --libs core,base,html) # $(shell pkg-config --libs-only-l pangox)
|
||||
@@ -181,7 +176,7 @@ $(OBJDIR)/%.o : %.cpp
|
||||
# -o specify the output file name
|
||||
|
||||
$(BINDIR)/$(PROG) : $(OBJS)
|
||||
- $(LD) -pipe -o $(BINDIR)/$(PROG) obj/*.o $(LIBS)
|
||||
+ $(LD) -pipe -o $(BINDIR)/$(PROG) obj/*.o $(LDFLAGS) $(LIBS)
|
||||
+ $(CXX) -o $(BINDIR)/$(PROG) obj/*.o $(LDFLAGS) $(LIBS)
|
||||
ifeq ($(ROOT)/GSpiceUI.app,$(wildcard $(ROOT)/GSpiceUI.app))
|
||||
cp $(BINDIR)/$(PROG) $(ROOT)/GSpiceUI.app/Contents/MacOS/gspiceui
|
||||
endif
|
||||
@@ -223,7 +218,7 @@ tests : test_Component test_NetList test_CnvtType test_CmdNgSpiceOPT test_CmdNgS
|
||||
|
||||
# Compiler options
|
||||
|
||||
-test_% : CXXFLAGS = -Wall -g -pipe $(shell $(WXCFG) --cxxflags)
|
||||
+test_% : CXXFLAGS += $(shell $(WXCFG) --cxxflags)
|
||||
ifeq ($(GSPICEUI_WXLIB),2.8) # This suppresses spurious warnings from gcc with wxWidgets v2.8.12
|
||||
test_% : CXXFLAGS += -Wno-unused-local-typedefs
|
||||
endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
EAPI=8
|
||||
|
||||
WX_GTK_VER="3.0-gtk3"
|
||||
inherit desktop optfeature toolchain-funcs wxwidgets
|
||||
inherit desktop optfeature wxwidgets xdg
|
||||
|
||||
MY_P="${PN}-v${PV}"
|
||||
|
||||
@@ -50,7 +50,7 @@ src_configure() {
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CXX="$(tc-getCXX)"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
@@ -70,6 +70,7 @@ src_install() {
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
if use examples ; then
|
||||
elog "If you want to use the examples, copy and extract from"
|
||||
elog "${EROOT}/usr/share/doc/${PF} the sch and lib directory"
|
||||
|
||||
Reference in New Issue
Block a user