cabbage: make sure -march=native is never used

This commit is contained in:
q66 2019-02-20 00:27:53 +01:00 committed by maxice8
parent 532245d09d
commit ba15466637

View file

@ -1,7 +1,7 @@
# Template file for 'cabbage'
pkgname=cabbage
version=2.0.03
revision=1
revision=2
_jucever=5.3.2
create_wrksrc=yes
build_wrksrc="${pkgname}-${version}"
@ -21,6 +21,23 @@ checksum="b7c604bb6a7f9752934f89d72133713f7a65e82478bba80ccb4709d0edb58033
80f36d010a1f9bb14469fba70e12a5df7e24e92bec511c7157d5a1e90c0314d3
5e8f1058177472f6dd3b5c1e7f8e0e76f37c5f751fed65936e04ff2441ce831a"
# without TARGET_ARCH, the build system will assume -march=native,
# which is wrong as we're building a generic package and -march does
# not even always work
case "$XBPS_TARGET_MACHINE" in
i686*) _tarch="-mtune=i686";;
x86_64*) _tarch="-march=x86-64";;
aarch64*) _tarch="-march=armv8-a";;
armv5te*) _tarch="-march=armv5te";;
armv6*) _tarch="-march=armv6";;
armv7*) _tarch="-march=armv7-a";;
ppc64le*) _tarch="-mcpu=powerpc64le";;
ppc64*) _tarch="-mcpu=970";;
ppc*) _tarch="-mcpu=powerpc";;
mips*) _tarch="-mtune=mips32r2";;
*) broken="Unsupported architecture";;
esac
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" libexecinfo-devel"
broken="error: '_NL_IDENTIFICATION_LANGUAGE' was not declared in this scope" ;;
@ -72,28 +89,28 @@ post_extract() {
do_build() {
cd "${wrksrc}/JUCE-${_jucever}/extras/Projucer/Builds/LinuxMakefile/"
make ${makejobs}
make ${makejobs} TARGET_ARCH="${_tarch}"
cd "${wrksrc}/cabbage-${version}/Builds/LinuxMakefile"
Projucer --resave ../../CabbageIDE.jucer
mv Makefile MakeCabbageIDE
make -f MakeCabbageIDE ${makejobs} CONFIG=Release
make -f MakeCabbageIDE ${makejobs} CONFIG=Release TARGET_ARCH="${_tarch}"
Projucer --resave ../../CabbagePlugin.jucer
mv Makefile MakePluginEffect
make -f MakePluginEffect ${makejobs} CONFIG=Release
make -f MakePluginEffect ${makejobs} CONFIG=Release TARGET_ARCH="${_tarch}"
mv ./build/CabbagePlugin.so ./build/CabbagePluginEffect.so
Projucer --resave ../../CabbagePluginSynth.jucer
mv Makefile MakePluginSynth
make -f MakePluginSynth ${makejobs} CONFIG=Release
make -f MakePluginSynth ${makejobs} CONFIG=Release TARGET_ARCH="${_tarch}"
mv ./build/CabbagePlugin.so ./build/CabbagePluginSynth.so
Projucer --resave ../../CabbageLite.jucer
cp -r ../../../JUCE-5.3.2/modules/juce_audio_plugin_client/ ../../JuceLibraryCode/modules/
mv Makefile MakeCabbageLite
make -f MakeCabbageLite ${makejobs} CONFIG=Release
make -f MakeCabbageLite ${makejobs} CONFIG=Release TARGET_ARCH="${_tarch}"
}
do_install() {