From: Charles McGarvey Date: Sat, 25 Jul 2009 17:51:07 +0000 (-0600) Subject: datarootdir autotools fix X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=5e5a883d665b09cc725c9c2baaaa98703c85c30e;p=chaz%2Fyoink datarootdir autotools fix --- diff --git a/configure.ac b/configure.ac index 2d839c9..c5ac1f0 100644 --- a/configure.ac +++ b/configure.ac @@ -63,17 +63,19 @@ then prefix="$ac_default_prefix" fi -if test x$datadir = x'${datarootdir}' -then - eval datarootdir="$datarootdir" - eval datadir="$datadir/yoink" -fi +AC_ARG_WITH([assetdir], + [AS_HELP_STRING([--with-assetdir=DIR], + [real path to game assets (default: $datarootdir/yoink)])], + [DATADIR="$withval"], + [eval DATADIR="$datarootdir/yoink"]) + +AC_SUBST([DATADIR]) -AC_DEFINE_UNQUOTED([YOINK_DATADIR], ["$datadir"], +AC_DEFINE_UNQUOTED([YOINK_DATADIR], ["$DATADIR"], [Define to path of game asset directory.]) AC_DEFINE_UNQUOTED([YOINK_CONFIGFILES], - ["\$HOME/.yoinkrc:/etc/yoinkrc:$datadir/yoinkrc"], + ["\$HOME/.yoinkrc:/etc/yoinkrc:$DATADIR/yoinkrc"], [Define to colon-delimited config file paths.]) @@ -81,7 +83,7 @@ AC_DEFINE_UNQUOTED([YOINK_CONFIGFILES], # Checks for libraries. # -AM_PATH_SDL([1.2.14], +AM_PATH_SDL([1.2.10], [CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS"]) @@ -170,7 +172,7 @@ echo " Configuration complete!" echo "" echo " Prefix: $prefix" -echo " Data: $datadir" +echo " Data: $DATADIR" echo "" if test x$debug = xyes diff --git a/data/Makefile.am b/data/Makefile.am index 8387830..0ab7958 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,5 +1,5 @@ -nobase_dist_data_DATA = @DATA_FILES@ +nobase_dist_pkgdata_DATA = @DATA_FILES@ appsdir=$(prefix)/share/applications dist_apps_DATA = yoink.desktop diff --git a/doc/yoink.6.in b/doc/yoink.6.in index a7ad776..70bcca5 100644 --- a/doc/yoink.6.in +++ b/doc/yoink.6.in @@ -92,7 +92,7 @@ This is a specific user's configuration file. 3. /etc/yoinkrc This is a system-wide configuration file. .TP -4. @datadir@/yoinkrc +4. @DATADIR@/yoinkrc This is the base configuration file which should be considered read-only. Look to this file as an example of the format used for configuration files. .PP diff --git a/extra/yoink.ebuild b/extra/yoink.ebuild index 69fa2f0..a2b3116 100644 --- a/extra/yoink.ebuild +++ b/extra/yoink.ebuild @@ -39,7 +39,7 @@ src_prepare() { src_configure() { egamesconf \ --disable-dependency-tracking \ - --datadir="${GAMES_DATADIR}/${PN}" \ + --with-assetdir="${GAMES_DATADIR}/${PN}" \ $(use_enable debug) }