-Charles McGarvey <chaz@dogcows.com>
+Charles McGarvey <onefriedrice@brokenzipper.com>
# Checks for configuration arguments.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-AC_ARG_ENABLE([developer],
- [ --enable-developer use all compiler flags developers need],
- [developer=$enableval],
- [developer=no])
-
AC_ARG_ENABLE([debug],
[ --enable-debug include debugging symbols and features],
[debug=$enableval],
[debug=no])
+AC_ARG_ENABLE([double-precision],
+ [ --enable-double-precision use double-precision numbers],
+ [double_precision=$enableval],
+ [double_precision=no])
+
AC_ARG_ENABLE([profile],
[ --enable-profile make a binary for use with gprof profiler],
[profile=$enableval],
[extra_warnings=$enableval],
[extra_warnings=no])
+AC_ARG_ENABLE([threads],
+ [ --enable-threads use threads for some parallel tasks],
+ [threads=$enableval],
+ [threads=no])
+
AC_ARG_WITH([log-level],
[AS_HELP_STRING([--with-log-level=NUM],
[0, none... 1, errors... 4, everything (default: 3)])],
[log_level=$withval],
[log_level=3])
-AC_ARG_ENABLE([double],
- [ --enable-double use double-precision numbers],
- [double=$enableval],
- [double=no])
-
-if test x$developer = xyes
+if test x$debug = xyes
then
- debug=yes
- log_level=4
-
- if test x$WIN32 != xyes
- then
-# i haven't had much success with gprof profiling on win32
- profile=yes
- fi
+ CFLAGS="$CFLAGS -Wall -g -DDEBUG"
+ CXXFLAGS="$CXXFLAGS -Wall -g -DDEBUG"
+else
+ CFLAGS="$CFLAGS -DNDEBUG"
+ CXXFLAGS="$CXXFLAGS -DNDEBUG"
fi
-if test x$debug = xyes
+if test x$double_precision = xyes
then
- CFLAGS="$CFLAGS -Wall -O0 -DDEBUG"
- CXXFLAGS="$CXXFLAGS -Wall -O0 -DDEBUG"
-else
- CFLAGS="$CFLAGS -O2 -DNDEBUG"
- CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
+ AC_DEFINE([USE_DOUBLE_PRECISION], 1,
+ [Define to 1 if you want to use doubles instead of floats.])
fi
if test x$profile = xyes
CXXFLAGS="$CXXFLAGS -Wextra -Wno-unused-parameter"
fi
-if test x$double = xyes
+if test x$threads = xyes
then
- AC_DEFINE([USE_DOUBLE_PRECISION], 1,
- [Define to 1 if you want to use double-precison numbers.])
+ AC_DEFINE([USE_THREADS], 1,
+ [Define to 1 if you want to use threads for parallel tasks.])
fi
-
AC_DEFINE_UNQUOTED([YOINK_LOGLEVEL], [$log_level],
[Define to detail level of logging.])
prefix="$ac_default_prefix"
fi
-AC_ARG_WITH([assetdir],
- [AS_HELP_STRING([--with-assetdir=DIR],
- [real path to assets (default: $datarootdir/yoink)])],
- [DATADIR="$withval"],
- [eval DATADIR="$datarootdir/yoink"])
-
if test x$WIN32 = xyes
then
DATADIR="data"
+else
+ eval eval DATADIR="${datadir}/yoink"
fi
AC_SUBST([DATADIR])
echo ""
echo " Configuration complete! :-)"
echo ""
-echo " Target: $target"
-echo " Prefix: $prefix"
-echo " Data Directory: $DATADIR"
-echo " Log Level: $log_level"
-echo " Debug: $debug"
-echo " Profile: $profile"
-echo " Extra Warnings: $extra_warnings"
+echo " Target: $target"
+echo " Prefix: $prefix"
+echo " Data Directory: $DATADIR"
+echo " Log Level: $log_level"
+echo " Debug: $debug"
+echo " Double Precision: $double_precision"
+echo " Profile: $profile"
+echo " Extra Warnings: $extra_warnings"
echo ""
echo " To finish the installation, execute:"
echo " make"
+++ /dev/null
-The zlib/libpng License
-
-Copyright (c) 2003 Neil Carter
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be
-appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
+++ /dev/null
-
-Night Fusion
-http://8bitcollective.com/members/FearofDark/
-
-Copyright Stephen H. Johnston
-Licensed under the Creative Commons BY-NC-SA License
-http://creativecommons.org/licenses/by-nc-sa/2.5/
-
----------------------------------------------------------------------------
-
-The zlib/libpng License
-
-Copyright (c) 2003 Neil Carter
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be
-appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
-
+++ /dev/null
-The zlib/libpng License
-
-Copyright (c) 2003 Neil Carter
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must not
-claim that you wrote the original software. If you use this software in a
-product, an acknowledgment in the product documentation would be
-appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and must not be
-misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
LICENSE="BSD-2 BSD LGPL-2.1 ZLIB"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
-IUSE="debug profile"
+IUSE="debug double-precision profile threads"
RDEPEND="dev-lang/lua
media-libs/freealut
src_configure() {
egamesconf \
--disable-dependency-tracking \
- --with-assetdir="${GAMES_DATADIR}/${PN}" \
$(use_enable debug) \
- $(use_enable profile)
+ $(use_enable double-precision) \
+ $(use_enable profile) \
+ $(use_enable threads)
}
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
- dodoc AUTHORS ChangeLog README TODO
+ dodoc AUTHORS ChangeLog COPYING README TODO
doman doc/yoink.6
doicon data/yoink.png
make_desktop_entry ${PN} Yoink
%defattr(-,root,root)
%{_bindir}/yoink
%doc %{_mandir}/man6/*
-%doc COPYING AUTHORS README NEWS
+%doc AUTHORS ChangeLog COPYING README TODO
%{_datadir}/yoink
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
;; Modern UI Configuration ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-!define MUI_ICON "$ROOT_DIR/src/yoink_setup.ico"
-!define MUI_UNICON "$ROOT_DIR/src/yoink_uninstall.ico"
+!define MUI_ICON "$ROOT_DIR/src/setup.ico"
+!define MUI_UNICON "$ROOT_DIR/src/uninstall.ico"
; Language
!define MUI_LANGDLL_ALWAYSSHOW
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
File "$ROOT_DIR/src/yoink.exe"
; data
File /r /x Makefile* /x *.desktop "$ROOT_DIR/data"
+ ; documentation
+ File "$ROOT_DIR/AUTHORS" "$ROOT_DIR/ChangeLog" "$ROOT_DIR/COPYING"
+ File "$ROOT_DIR/README" "$ROOT_DIR/TODO"
; uninstall
WriteUninstaller "uninstall.exe"
EOF
#ifndef USE_DOUBLE_PRECISION
<< "-"
#endif
- << "double "
+ << "double-precision "
#ifndef PROFILING_ENABLED
<< "-"
#endif
<< "profile "
+#ifndef USE_THREADS
+ << "-"
+#endif
+ << "threads "
<< std::endl;
#if !defined (_WIN32) && !defined(__WIN32__)
system("uname -a");