Skip to content

Commit

Permalink
- Added DESTDIR option to scons script that behaves like that of auto…
Browse files Browse the repository at this point in the history
…make.

- Lifted version requirements on pango from autotools.
  • Loading branch information
loonycyborg committed Aug 13, 2008
1 parent e29e18b commit 60efd90
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 6 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ from cross_compile import setup_cross_compile
opts = Options("options.cache")
opts.AddOptions(
("PREFIX", "Install prefix.", "/usr/local"),
("STAGE_PREFIX", "Install stage prefix.", "$PREFIX"),
("DESTDIR", "Directory of staged installation.", "/"),
("QT4DIR", "Root directory of Qt's installation.", ""),
BoolOption("use_frameworked_qt", "Use Qt frameworks on Mac", False),
("SDLDIR", "Root directory of SDL's installation.", "/usr/"),
Expand Down Expand Up @@ -128,9 +128,12 @@ executables += glob("*.dll")
datafiles = map(Dir, Split("data images model-sources music"))
datafiles += ["FreeSans.ttf"] + map(glob, Split("*.dae *.3ds *.3d"))

def prepend_destdir(env, path):
return join(env["DESTDIR"], path.lstrip("/"))

data_install_dir = join(env["PREFIX"], "share/silvertree-rpg")
data_stage_dir = join(env["STAGE_PREFIX"], "share/silvertree-rpg")
install_executables = Install(join(env["STAGE_PREFIX"], "bin"), executables)
data_stage_dir = prepend_destdir(env, data_install_dir)
install_executables = Install(prepend_destdir(env, join(env["PREFIX"], "bin")), executables)
install_data = Install(data_stage_dir, datafiles)
if not env["PLATFORM"] == "win32":
Alias("install", [install_executables, install_data])
Expand Down
16 changes: 8 additions & 8 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -7816,12 +7816,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_PANGO_CFLAGS="$PANGO_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pangoft2 >= 1.16.0\"") >&5
($PKG_CONFIG --exists --print-errors "pangoft2 >= 1.16.0") 2>&5
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pangoft2\"") >&5
($PKG_CONFIG --exists --print-errors "pangoft2") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pangoft2 >= 1.16.0" 2>/dev/null`
pkg_cv_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pangoft2" 2>/dev/null`
else
pkg_failed=yes
fi
Expand All @@ -7834,12 +7834,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_PANGO_LIBS="$PANGO_LIBS"
else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pangoft2 >= 1.16.0\"") >&5
($PKG_CONFIG --exists --print-errors "pangoft2 >= 1.16.0") 2>&5
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pangoft2\"") >&5
($PKG_CONFIG --exists --print-errors "pangoft2") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
pkg_cv_PANGO_LIBS=`$PKG_CONFIG --libs "pangoft2 >= 1.16.0" 2>/dev/null`
pkg_cv_PANGO_LIBS=`$PKG_CONFIG --libs "pangoft2" 2>/dev/null`
else
pkg_failed=yes
fi
Expand All @@ -7858,9 +7858,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
PANGO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pangoft2 >= 1.16.0"`
PANGO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pangoft2"`
else
PANGO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pangoft2 >= 1.16.0"`
PANGO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pangoft2"`
fi
# Put the nasty error message in config.log where it belongs
echo "$PANGO_PKG_ERRORS" >&5
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ AC_CHECK_PROG([pkgconfig_available], [pkg-config], [yes], [no])
AS_IF([test x$want_pango = xno],
[have_pango=no],
[AS_IF([test "x$pkgconfig_available" = xyes],
[PKG_CHECK_MODULES(PANGO, pangoft2 >= 1.16.0, [
[PKG_CHECK_MODULES(PANGO, pangoft2, [
CPPFLAGS="$CPPFLAGS $PANGO_CFLAGS"
AC_DEFINE([USE_PANGO], 1, [Pango backend enabled.])
LIBS="$PANGO_LIBS $LIBS"
Expand Down

0 comments on commit 60efd90

Please sign in to comment.