mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
media-gfx/sam2p: correct compiler configuration
Closes: https://bugs.gentoo.org/746638 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: John Helmert III <jchelmert3@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/17869 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
d5df22ae03
commit
fed7eb00df
53
media-gfx/sam2p/files/sam2p-build-fixes.patch
Normal file
53
media-gfx/sam2p/files/sam2p-build-fixes.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
Make stripping configurable, correct CC/CXX/CFLAGS/CXXFLAGS handling, add
|
||||
missing include
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1433167..38bb7cc 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -28,12 +28,13 @@ ifeq ($(MAKECMDGOALS),Makedep.force)
|
||||
MAKE_DIST=000
|
||||
endif
|
||||
|
||||
+GCC_STRIP ?= -s
|
||||
BASH=bash
|
||||
PERL_BADLANG=x
|
||||
export PERL_BADLANG
|
||||
|
||||
CXXX=$(CXD_assert)
|
||||
-LDALL=$(LDXX) -s $(LDFLAGS) $(LIBS)
|
||||
+LDALL=$(LDXX) $(GCC_STRIP) $(LDFLAGS) $(LIBS)
|
||||
ifeq ($(ENABLE_DEBUG), no)
|
||||
CXXX=$(CXD_no)
|
||||
endif
|
||||
@@ -46,8 +47,8 @@ CXXX=$(CXD_checker)
|
||||
LDALL=checkerg++ $(LDFLAGS) $(LIBS)
|
||||
endif
|
||||
|
||||
-CXXALL=$(CXXX) $(CXXFLAGS) $(CXXFLAGSB)
|
||||
-CCALL =$(CXXX) $(CXXFLAGS) $(CXXFLAGSB)
|
||||
+CXXALL=$(CXX) $(CXXFLAGS) $(CXXFLAGSB)
|
||||
+CCALL =$(CC) $(CFLAGS) $(CXXFLAGSB)
|
||||
CXDFAL=$(CXXFLAGS) $(CXXFLAGSB) $(LDFLAGS) $(LIBS)
|
||||
|
||||
.PHONY: clean dist dist-noautoconf dist-more allclean distclean dist-install
|
||||
@@ -67,7 +68,7 @@ ifeq ($(MAKE_DIST),)
|
||||
#
|
||||
# echo to config.h is needed to make config.h younger than config.h.in;
|
||||
# configure doesn't change the timestamp of config.h if it's unchanged.
|
||||
- Makedep config.h: configure Makehelp.in config.h.in ccdep.pl sam2p_version.h; ./configure MAKE=$(MAKE) --enable-gif --enable-lzw && echo "" >>config.h
|
||||
+ Makedep config.h: configure Makehelp.in config.h.in ccdep.pl sam2p_version.h;
|
||||
Makehelp:;
|
||||
include Makehelp # Defines CXX. File generated by ./configure.
|
||||
include Makedep # Contains ALL+=... .
|
||||
@@ -101,8 +102,8 @@ IDE_MODES := release debug
|
||||
IDE_TARGETS_debug := $(patsubst %,%.yes, $(TARGETS))
|
||||
IDE_TARGETS_release := $(TARGETS)
|
||||
|
||||
-CXD_assert =$(CXX) -s -O2
|
||||
-CXD_no =$(CXX) -s -DNDEBUG -O3
|
||||
+CXD_assert =$(CXX) $(GCC_STRIP) $(CXXFLAGS)
|
||||
+CXD_no =$(CXX) $(GCC_STRIP) $(CXXFLAGS)
|
||||
# CXD_yes =$(CXX) $(GFLAG) -lefence
|
||||
CXD_yes =$(CXX) $(GFLAG)
|
||||
CXD_checker=checkerg++ $(GFLAG)
|
||||
@@ -1,30 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1433167..b662e33 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -28,12 +28,13 @@ ifeq ($(MAKECMDGOALS),Makedep.force)
|
||||
MAKE_DIST=000
|
||||
endif
|
||||
|
||||
+GCC_STRIP ?= -s
|
||||
BASH=bash
|
||||
PERL_BADLANG=x
|
||||
export PERL_BADLANG
|
||||
|
||||
CXXX=$(CXD_assert)
|
||||
-LDALL=$(LDXX) -s $(LDFLAGS) $(LIBS)
|
||||
+LDALL=$(LDXX) $(GCC_STRIP) $(LDFLAGS) $(LIBS)
|
||||
ifeq ($(ENABLE_DEBUG), no)
|
||||
CXXX=$(CXD_no)
|
||||
endif
|
||||
@@ -101,8 +102,8 @@ IDE_MODES := release debug
|
||||
IDE_TARGETS_debug := $(patsubst %,%.yes, $(TARGETS))
|
||||
IDE_TARGETS_release := $(TARGETS)
|
||||
|
||||
-CXD_assert =$(CXX) -s -O2
|
||||
-CXD_no =$(CXX) -s -DNDEBUG -O3
|
||||
+CXD_assert =$(CXX) $(GCC_STRIP) $(CXXFLAGS)
|
||||
+CXD_no =$(CXX) $(GCC_STRIP) $(CXXFLAGS)
|
||||
# CXD_yes =$(CXX) $(GFLAG) -lefence
|
||||
CXD_yes =$(CXX) $(GFLAG)
|
||||
CXD_checker=checkerg++ $(GFLAG)
|
||||
@@ -21,7 +21,7 @@ BDEPEND="dev-lang/perl"
|
||||
|
||||
S="${WORKDIR}/${PN}-${COMMIT}"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-configure-strip.patch )
|
||||
PATCHES=( "${FILESDIR}"/${PN}-build-fixes.patch )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
@@ -29,15 +29,15 @@ src_prepare() {
|
||||
# configure.in files are deprecated
|
||||
mv configure.{in,ac} || die
|
||||
|
||||
# upstream thinks they're being helpful by running configure with `make`
|
||||
sed -i '/Makedep/s/ .\/configure.*//' Makefile || die
|
||||
# missing include for memset
|
||||
sed -i '1s;^;#include <string.h>\n;' pts_defl.c
|
||||
|
||||
# eautoreconf is still needed or you get bad warnings
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CXX
|
||||
tc-export CC CXX
|
||||
|
||||
econf \
|
||||
--enable-lzw \
|
||||
Reference in New Issue
Block a user