Files
macports-ports/audio/orca/files/patch-tool.diff

58 lines
2.2 KiB
Diff

--- tool.orig
+++ tool
@@ -235,7 +235,7 @@ build_target() {
libraries=
source_files=
out_exe=
- add cc_flags -std=c99 -pipe -finput-charset=UTF-8 -Wall -Wpedantic -Wextra \
+ add cc_flags -std=c99 -pipe -Wall -Wpedantic -Wextra \
-Wwrite-strings
if cc_id_and_vers_gte gcc 6.0.0 || cc_id_and_vers_gte clang 3.9.0; then
add cc_flags -Wconversion -Wshadow -Wstrict-prototypes \
@@ -312,7 +312,7 @@ build_target() {
case $arch in
x86_64)
case $cc_id in
- # 'nehalem' tuning actually produces faster code for orca than later
+ # 'core2' tuning actually produces faster code for orca than later
# archs, for both gcc and clang, even if it's running on a later arch
# CPU. This is likely due to smaller emitted code size. gcc earlier
# than 4.9 does not recognize the arch flag for it it, though, and I
@@ -320,10 +320,10 @@ build_target() {
# behavior we get with it is. Just leave it at default, in that case.
gcc)
if cc_vers_is_gte 4.9; then
- add cc_flags -march=nehalem
+ add cc_flags -march=core2
fi
;;
- clang) add cc_flags -march=nehalem;;
+ clang) add cc_flags -march=core2;;
esac
;;
esac
@@ -345,10 +345,10 @@ build_target() {
out_exe=orca
case $os in
mac)
- if ! brew_prefix=$(printenv HOMEBREW_PREFIX); then
- brew_prefix=/usr/local
- fi
- ncurses_dir="$brew_prefix/opt/ncurses"
+ # if ! brew_prefix=$(printenv HOMEBREW_PREFIX); then
+ # brew_prefix=/usr/local
+ # fi
+ ncurses_dir="@PREFIX@"
if ! [ -d "$ncurses_dir" ]; then
printf 'Error: ncurses directory not found at %s\n' \
"$ncurses_dir" >&2
@@ -361,7 +361,7 @@ build_target() {
add cc_flags "-I$ncurses_dir/include"
# todo mach time stuff for mac?
if [ $portmidi_enabled = 1 ]; then
- portmidi_dir="$brew_prefix/opt/portmidi"
+ portmidi_dir="@PREFIX@"
if ! [ -d "$portmidi_dir" ]; then
printf 'Error: PortMidi directory not found at %s\n' \
"$portmidi_dir" >&2