summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2021-04-25 19:37:00 +0200
committerDavid Seifert <soap@gentoo.org>2021-04-25 19:37:00 +0200
commit1a7bdcfe1f82535cc34ef22c103bf0f8c6236431 (patch)
treeeb1558a70c9c851f47873d0902b501fee164029f /games-emulation
parentmedia-libs/svt-av1: use new github->gitlab remote-id (diff)
downloadgentoo-1a7bdcfe1f82535cc34ef22c103bf0f8c6236431.tar.gz
gentoo-1a7bdcfe1f82535cc34ef22c103bf0f8c6236431.tar.bz2
gentoo-1a7bdcfe1f82535cc34ef22c103bf0f8c6236431.zip
games-emulation/higan: Respect CPPFLAGS/CXXFLAGS/LDFLAGS
Closes: https://bugs.gentoo.org/780336 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/higan/files/higan-116_pre20210404-makefile.patch85
-rw-r--r--games-emulation/higan/higan-116_pre20210404.ebuild11
2 files changed, 93 insertions, 3 deletions
diff --git a/games-emulation/higan/files/higan-116_pre20210404-makefile.patch b/games-emulation/higan/files/higan-116_pre20210404-makefile.patch
new file mode 100644
index 000000000000..21f3f35ae3e5
--- /dev/null
+++ b/games-emulation/higan/files/higan-116_pre20210404-makefile.patch
@@ -0,0 +1,85 @@
+--- a/higan-ui/GNUmakefile
++++ b/higan-ui/GNUmakefile
+@@ -54,7 +54,7 @@
+
+ all: $(all.objects)
+ $(info Linking $(output.path)/$(name) ...)
+- +@$(compiler) -o $(output.path)/$(name) $(all.objects) $(all.options)
++ $(compiler) $(LDFLAGS) -o $(output.path)/$(name) $(all.objects) $(all.options)
+ ifeq ($(platform),macos)
+ rm -rf $(output.path)/$(name).app
+ mkdir -p $(output.path)/$(name).app/Contents/MacOS/
+--- a/hiro/GNUmakefile
++++ b/hiro/GNUmakefile
+@@ -70,7 +70,7 @@
+ $(if $(filter qt%,$(hiro)),$(info Compiling $(hiro.path)/qt/qt.moc ...))
+ $(if $(filter qt%,$(hiro)),@$(moc) -i -o $(hiro.path)/qt/qt.moc $(hiro.path)/qt/qt.hpp)
+ $(info Compiling $(subst ../,,$<) ...)
+- @$(compiler) $(hiro.flags) $(flags) $(flags.deps) -c $< -o $@
++ $(compiler) $(hiro.flags) $(flags) $(flags.deps) -c $< -o $@
+
+ $(object.path)/hiro-resource.o: $(hiro.resource)
+ $(info Compiling $(subst ../,,$<) ...)
+--- a/icarus/GNUmakefile
++++ b/icarus/GNUmakefile
+@@ -19,7 +19,7 @@
+
+ all: $(hiro.objects) $(objects)
+ $(info Linking $(output.path)/$(name) ...)
+- +@$(compiler) -o $(output.path)/$(name) $(hiro.objects) $(objects) $(hiro.options) $(options)
++ $(compiler) $(LDFLAGS) -o $(output.path)/$(name) $(hiro.objects) $(objects) $(hiro.options) $(options)
+ ifeq ($(platform),macos)
+ rm -rf $(output.path)/$(name).app
+ mkdir -p $(output.path)/$(name).app/Contents/MacOS/
+--- a/nall/GNUmakefile
++++ b/nall/GNUmakefile
+@@ -77,17 +77,7 @@
+ endif
+
+ # build optimization levels
+-ifeq ($(build),debug)
+- flags += -Og -g -DBUILD_DEBUG
+-else ifeq ($(build),stable)
+- flags += -O1 -DBUILD_STABLE
+-else ifeq ($(build),size)
+- flags += -Os -DBUILD_SIZE
+-else ifeq ($(build),release)
+- flags += -O2 -DBUILD_RELEASE
+-else ifeq ($(build),performance)
+- flags += -O3 -DBUILD_PERFORMANCE
+-endif
++flags += $(CPPFLAGS) $(CXXFLAGS) -DBUILD_RELEASE
+
+ # link-time optimization
+ ifeq ($(lto),true)
+@@ -167,7 +157,7 @@
+
+ %.o: $<
+ $(info Compiling $(subst ../,,$<) ...)
+- @$(call compile)
++ $(call compile)
+
+ # function compile([arguments])
+ compile = \
+--- a/ruby/GNUmakefile
++++ b/ruby/GNUmakefile
+@@ -74,7 +74,7 @@
+
+ $(object.path)/ruby.o: $(ruby.path)/ruby.cpp $(call rwildcard,$(ruby.path))
+ $(info Compiling $(subst ../,,$<) ...)
+- @$(compiler) $(ruby.flags) $(flags) $(flags.deps) -c $< -o $@
++ $(compiler) $(ruby.flags) $(flags) $(flags.deps) -c $< -o $@
+
+ ruby.verbose:
+ $(info ruby Drivers:)
+--- a/sourcery/GNUmakefile
++++ b/sourcery/GNUmakefile
+@@ -11,7 +11,7 @@
+
+ all: $(objects)
+ $(info Linking out/$(name) ...)
+- +@$(compiler) -o out/$(name) $(objects) $(options)
++ $(compiler) $(LDFLAGS) -o out/$(name) $(objects) $(options)
+
+ verbose: nall.verbose all;
+
diff --git a/games-emulation/higan/higan-116_pre20210404.ebuild b/games-emulation/higan/higan-116_pre20210404.ebuild
index bf6c718a2f3d..53899e2c610a 100644
--- a/games-emulation/higan/higan-116_pre20210404.ebuild
+++ b/games-emulation/higan/higan-116_pre20210404.ebuild
@@ -41,6 +41,11 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ # insane build system, reinvents every built-in rule
+ "${FILESDIR}"/${P}-makefile.patch
+)
+
src_compile() {
local makeopts=(
platform=linux
@@ -80,7 +85,7 @@ src_install() {
# Install higan
dobin higan-ui/out/higan
- insinto "/usr/share/${P}"
+ insinto /usr/share/${P}
doins -r higan/System
domenu higan-ui/resource/higan.desktop
@@ -94,8 +99,8 @@ src_install() {
domenu icarus/resource/icarus.desktop
doicon -s scalable icarus/resource/icarus.svg
- insinto "/usr/share/${P}/Database"
+ insinto /usr/share/${P}/Database
doins -r icarus/Database
- insinto "/usr/share/${P}/Firmware"
+ insinto /usr/share/${P}/Firmware
doins -r icarus/Firmware
}