summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-02-24 14:55:43 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-02-24 14:55:50 +0100
commit2679c27fcd64465c371a274e8bcb82dd96980bb1 (patch)
treeee0110083205b134f9b25bb1b7a564ed3fca1b0d /sci-electronics
parentapp-text/xchm: drop live ebuild (diff)
downloadgentoo-2679c27fcd64465c371a274e8bcb82dd96980bb1.tar.gz
gentoo-2679c27fcd64465c371a274e8bcb82dd96980bb1.tar.bz2
gentoo-2679c27fcd64465c371a274e8bcb82dd96980bb1.zip
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>
Diffstat (limited to 'sci-electronics')
-rw-r--r--sci-electronics/gspiceui/files/gspiceui-1.2.87-respect-users-flags.patch34
-rw-r--r--sci-electronics/gspiceui/gspiceui-1.2.87.ebuild5
2 files changed, 34 insertions, 5 deletions
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
index fd5881745279..c39b6a329aba 100644
--- 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
@@ -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
diff --git a/sci-electronics/gspiceui/gspiceui-1.2.87.ebuild b/sci-electronics/gspiceui/gspiceui-1.2.87.ebuild
index 8c007ed14442..d5377a288285 100644
--- a/sci-electronics/gspiceui/gspiceui-1.2.87.ebuild
+++ b/sci-electronics/gspiceui/gspiceui-1.2.87.ebuild
@@ -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"