Skip to content

Commit

Permalink
qb: Don't overwrite defaults
Browse files Browse the repository at this point in the history
Haiku really should use the configure flags provided, that is why they exists.

In this case.

./configure \
  --global-config-dir=$PREFIX/settings
  --with-assets_dir=$PREFIX/data
  --with-mand_dir=$PREFIX/documentation/man

Changing the defaults just makes the script more complicated for no good reason.
  • Loading branch information
orbea committed Jan 20, 2018
1 parent 6ce57ff commit cc26f4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
22 changes: 5 additions & 17 deletions qb/config.libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ add_define MAKEFILE NOUNUSED_VARIABLE "$HAVE_NOUNUSED_VARIABLE"
[ -z "$CROSS_COMPILE" ] && [ -d /opt/local/lib ] && add_dirs LIBRARY /opt/local/lib

[ "$GLOBAL_CONFIG_DIR" ] || \
{
if [ "$OS" = 'Haiku' ]; then
GLOBAL_CONFIG_DIR="$PREFIX"/settings
else
case "$PREFIX" in
/usr*) GLOBAL_CONFIG_DIR=/etc ;;
*) GLOBAL_CONFIG_DIR="$PREFIX"/etc ;;
esac
fi
{ case "$PREFIX" in
/usr*) GLOBAL_CONFIG_DIR=/etc ;;
*) GLOBAL_CONFIG_DIR="$PREFIX"/etc ;;
esac
}

DYLIB=-ldl;
Expand Down Expand Up @@ -162,16 +157,9 @@ fi
add_define MAKEFILE libretro "$LIBRETRO"
}


if [ "$OS" = 'Haiku' ]; then
add_define MAKEFILE ASSETS_DIR "${ASSETS_DIR:-${PREFIX}/data}"
add_define MAKEFILE MAN_DIR "${MAN_DIR:-${PREFIX}/documentation/man}"
else
add_define MAKEFILE ASSETS_DIR "${ASSETS_DIR:-${PREFIX}/share}"
add_define MAKEFILE MAN_DIR "${MAN_DIR:-${PREFIX}/share/man}"
fi

add_define MAKEFILE BIN_DIR "${BIN_DIR:-${PREFIX}/bin}"
add_define MAKEFILE MAN_DIR "${MAN_DIR:-${PREFIX}/share/man}"

if [ "$OS" = 'DOS' ]; then
HAVE_SHADERPIPELINE=no
Expand Down
6 changes: 1 addition & 5 deletions qb/qb.libs.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
MAKEFILE_DEFINES=''
CONFIG_DEFINES=''

if [ "$OS" = 'Haiku' ]; then
[ "$PREFIX" ] || PREFIX="/boot/home/config/non-packaged"
else
[ "$PREFIX" ] || PREFIX="/usr/local"
fi
[ "$PREFIX" ] || PREFIX="/usr/local"

add_define() # $1 = MAKEFILE or CONFIG $2 = define $3 = value
{ eval "${1}_DEFINES=\"\${${1}_DEFINES} $2=$3\""; }
Expand Down

0 comments on commit cc26f4a

Please sign in to comment.