repository reorganizing
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Thu, 18 Mar 2010 05:06:33 +0000 (23:06 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Thu, 18 Mar 2010 05:06:33 +0000 (23:06 -0600)
19 files changed:
Makefile.am
arch/archlinux/PKGBUILD [moved from extra/PKGBUILD with 100% similarity]
arch/gentoo/yoink.ebuild [moved from extra/yoink.ebuild with 100% similarity]
arch/macosx/bundle.tar.bz2 [moved from macosx/bundle.tar.bz2 with 100% similarity]
arch/macosx/mkbundle.sh.in [moved from macosx/mkbundle.sh.in with 100% similarity]
arch/win32/makedeps.sh [moved from win32/makedeps.sh with 98% similarity]
arch/win32/makepackage.sh [moved from win32/makepackage.sh with 85% similarity]
arch/win32/setup.ico [moved from win32/setup.ico with 100% similarity]
arch/win32/uninstall.ico [moved from win32/uninstall.ico with 100% similarity]
arch/win32/unix2dos.sh [moved from win32/unix2dos.sh with 100% similarity]
arch/win32/yoink.ico [moved from win32/yoink.ico with 100% similarity]
arch/win32/yoink.nsi [moved from win32/yoink.nsi with 97% similarity]
autogen.sh
doc/Makefile.am
doc/man2html.lua [new file with mode: 0755]
doc/man2html.sh [deleted file]
extra/nightfusion.xm [deleted file]
src/Makefile.am
src/yoink.rc

index 7f62c7d7dad4f09e8e70be2a5c2d4bd3e6ab35ed..36d5fab3c44f9f2cddca51431bbf5580ae78207b 100644 (file)
@@ -3,29 +3,31 @@ ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = data doc src
 
-EXTRA_DIST = autogen.sh extra win32
+EXTRA_DIST = autogen.sh extra
 
 
 .PHONY: run debug docs portable installer
 
-run: all
-       @cd src && $(MAKE) run
-
-debug: all
-       @cd src && $(MAKE) debug
-
-docs:
-       $(DOXYGEN)
-
 if WIN32
 
 portable: all
-       $(SH) win32/makepackage.sh -p $(prefix) -d "@DATA_FILES@" \
+       $(SH) arch/win32/makepackage.sh -p $(prefix) -d "@DATA_FILES@" \
                -s $(STRIP) -V $(VERSION)
 
 installer: all
-       $(SH) win32/makepackage.sh -p $(prefix) -d "@DATA_FILES@" \
+       $(SH) arch/win32/makepackage.sh -p $(prefix) -d "@DATA_FILES@" \
                -s $(STRIP) -V $(VERSION) -i $(MAKENSIS)
 
+else
+
+run: all
+       @cd src && $(MAKE) run
+
+debug: all
+       @cd src && $(MAKE) debug
+
 endif
 
+docs:
+       $(DOXYGEN)
+
similarity index 100%
rename from extra/PKGBUILD
rename to arch/archlinux/PKGBUILD
similarity index 100%
rename from extra/yoink.ebuild
rename to arch/gentoo/yoink.ebuild
similarity index 98%
rename from win32/makedeps.sh
rename to arch/win32/makedeps.sh
index e004aec4548944056de8f41ad00cc6cfb648e163..49a79e1f054bbb9ad9c3e3b0a8169adfd03c8703 100755 (executable)
@@ -9,7 +9,7 @@
 # dependencies will be packaged into an archive named deps.tar.bz2 in the
 # current directory.  To install the dependencies, execute this command:
 #
-# tar xf deps.tar.bz2 -C $PREFIX
+# tar xjf deps.tar.bz2 -C $PREFIX
 # 
 # where $PREFIX is the path to your mingw32 toolchain.  If problems occur,
 # check stdout and stderr for clues.  You may be able to easily determine
 # rebuilt, even the ones which were already built successfully.
 #
 
-function showhelp()
+showhelp()
 {
-       echo "Download and cross-compile dependencies for win32."
        echo "Usage: $0 [-h] [-m makeopts] -H host -p prefix"
+       echo "  Downloads and cross-compiles dependencies for win32."
        echo ""
        echo "  -H  Specify the name of your toolchain, like i486-mingw32."
        echo "  -h  Show this help an exit."
@@ -77,7 +77,7 @@ then
 fi
 
 
-function die()
+die()
 {
        echo "die:" $@
        exit 1
@@ -347,7 +347,7 @@ built with mingw32 and these installed dependencies like this:
 
 ./configure --host=$HOST --prefix=$PREFIX \\
             PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
-make && make package
+make installer
 
 These files are licensed such that their general distribution under
 reasonable conditions is allowable.  The copyrights of these binaries go to
similarity index 85%
rename from win32/makepackage.sh
rename to arch/win32/makepackage.sh
index 0cb48857b6e0e3964319ea335dcf96cb5ba580e8..793e43589f39bd699ba6bfecb2fbf0b4973afe5e 100755 (executable)
@@ -4,18 +4,22 @@
 # Yoink
 # Run this script to create a win32 package.
 #
+# You should typically only run this through the "portable" and "installer"
+# makes targets in the package root directory.  The build system will take
+# care to pass the correct arguments.
+#
 
-function showhelp()
+showhelp()
 {
-       echo "Create a portable win32 package or installer."
        echo "Usage: $0 [-h] [-i makensis] [-s strip] -d assets -V version -p prefix"
+       echo "  Creates a portable win32 package or installer."
        echo ""
+       echo "  -V  Specify the version of the program to be packaged"
        echo "  -d  Specify the game assets to be included."
        echo "  -h  Show this help an exit."
        echo "  -i  To make an installer, specify the makensis program."
-       echo "  -V  Specify the version of the program to be packaged"
-       echo "  -s  To strip the binaries, specify the strip program."
        echo "  -p  Specify the path to your toolchain installation."
+       echo "  -s  To strip the binaries, specify the strip program."
 }
 
 while getopts ":V:hd:i:p:s:" opt
@@ -54,7 +58,7 @@ then
        exit 1
 fi
 
-function die()
+die()
 {
        rm -rf "$BUILD"
        echo "die:" $@
@@ -66,8 +70,8 @@ BUILD="$ROOT/tmp-$$"
 DIRECTORY="yoink-$VERSION"
 ARCHIVE="$BUILD/$DIRECTORY"
 
-MAN2HTML="$ROOT/doc/man2html.sh"
-UNIX2DOS="$ROOT/win32/unix2dos.sh"
+MAN2HTML="lua $ROOT/doc/man2html.lua"
+UNIX2DOS="$ROOT/arch/win32/unix2dos.sh"
 
 DLLS="libogg-0 libpng14 libvorbis-0 libvorbisfile-3 lua51 OpenAL32 SDL zlib1"
 
@@ -105,8 +109,8 @@ do
        "$UNIX2DOS" "$doc" "$ARCHIVE/$doc.txt" || die "unix2dos $doc"
 done
 
-"$MAN2HTML" -f -o "$ARCHIVE/Manual.html"
-"$UNIX2DOS" "$ARCHIVE/Manual.html"
+$MAN2HTML -o "$ARCHIVE/Manual.html"
+$UNIX2DOS "$ARCHIVE/Manual.html"
 
 cp -rf "$ROOT/doc/licenses" "$ARCHIVE" || die "copying doc/licenses"
 cd "$ARCHIVE/licenses"
@@ -133,7 +137,7 @@ else
 # build an installer
        NAME="yoinksetup-$VERSION.exe"
        cd "$BUILD"
-       cp "$ROOT/win32/yoink.nsi" .
+       cp "$ROOT/arch/win32/yoink.nsi" .
        "$MAKENSIS" -DROOTPATH="$ROOT" -DINSTALLFILES="$ARCHIVE" \
                -DVERSION="$VERSION" -DOUTFILE="$NAME" yoink.nsi \
                || die "running '$MAKENSIS'"
similarity index 100%
rename from win32/setup.ico
rename to arch/win32/setup.ico
similarity index 100%
rename from win32/uninstall.ico
rename to arch/win32/uninstall.ico
similarity index 100%
rename from win32/unix2dos.sh
rename to arch/win32/unix2dos.sh
similarity index 100%
rename from win32/yoink.ico
rename to arch/win32/yoink.ico
similarity index 97%
rename from win32/yoink.nsi
rename to arch/win32/yoink.nsi
index 2638a655caa0932e13971a6de5a23f9a739c9871..4aa9a65c8f46780ace1e45fc2d6f6315d94a325f 100644 (file)
@@ -27,8 +27,8 @@
 ;--------------------------------
 ;Interface Settings
 
-  !define MUI_ICON "${ROOTPATH}/win32/setup.ico"
-  !define MUI_UNICON "${ROOTPATH}/win32/uninstall.ico"
+  !define MUI_ICON "${ROOTPATH}/arch/win32/setup.ico"
+  !define MUI_UNICON "${ROOTPATH}/arch/win32/uninstall.ico"
 
   !define MUI_COMPONENTSPAGE_SMALLDESC
 
index 7a9c5ef78a3db01c8c592c201254863e2e8da4ae..5bce9bab38baa893f0a2e03a919fbf353418439f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #                        a u t o g e n . s h
 #
-# Copyright (c) 2005-2007 United States Government as represented by
+# Copyright (c) 2005-2009 United States Government as represented by
 # the U.S. Army Research Laboratory.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
 ###
 #
 # Script for automatically preparing the sources for compilation by
-# performing the myrid of necessary steps.  The script attempts to
+# performing the myriad of necessary steps.  The script attempts to
 # detect proper version support, and outputs warnings about particular
 # systems that have autotool peculiarities.
 #
 #   To verbosely try running with an older (unsupported) autoconf:
 #     AUTOCONF_VERSION=2.50 ./autogen.sh --verbose
 #
-# Author: Christopher Sean Morrison <morrison@brlcad.org>
+# Author:
+#   Christopher Sean Morrison <morrison@brlcad.org>
+#
+# Patches:
+#   Sebastian Pipping <sebastian@pipping.org>
 #
 ######################################################################
 
-# set to minimum acceptible version of autoconf
+# set to minimum acceptable version of autoconf
 if [ "x$AUTOCONF_VERSION" = "x" ] ; then
     AUTOCONF_VERSION=2.52
 fi
-# set to minimum acceptible version of automake
+# set to minimum acceptable version of automake
 if [ "x$AUTOMAKE_VERSION" = "x" ] ; then
     AUTOMAKE_VERSION=1.6.0
 fi
-# set to minimum acceptible version of libtool
+# set to minimum acceptable version of libtool
 if [ "x$LIBTOOL_VERSION" = "x" ] ; then
     LIBTOOL_VERSION=1.4.2
 fi
@@ -98,13 +102,14 @@ ident ( ) {
     fi
 
     # extract version from CVS Id string
-    __id="$Id: autogen.sh,v 14.97 2007/06/18 22:25:02 brlcad Exp $"
+    __id="$Id: autogen.sh 33925 2009-03-01 23:27:06Z brlcad $"
     __version="`echo $__id | sed 's/.*\([0-9][0-9][0-9][0-9]\)[-\/]\([0-9][0-9]\)[-\/]\([0-9][0-9]\).*/\1\2\3/'`"
     if [ "x$__version" = "x" ] ; then
        __version=""
     fi
 
     echo "autogen.sh build preparation script by Christopher Sean Morrison"
+    echo "  + config.guess download patch by Sebastian Pipping (2008-12-03)"
     echo "revised 3-clause BSD-style license, copyright (c) $__copyright"
     echo "script version $__version, ISO/IEC 9945 POSIX shell script"
 }
@@ -114,11 +119,12 @@ ident ( ) {
 # USAGE FUNCTION #
 ##################
 usage ( ) {
-    echo "Usage: $AUTOGEN_SH [-h|--help] [-v|--verbose] [-q|--quiet] [--version]"
-    echo "    --help     Help on $NAME_OF_AUTOGEN usage"
-    echo "    --verbose  Verbose progress output"
-    echo "    --quiet    Quiet suppressed progress output"
-    echo "    --version  Only perform GNU Build System version checks"
+    echo "Usage: $AUTOGEN_SH [-h|--help] [-v|--verbose] [-q|--quiet] [-d|--download] [--version]"
+    echo "    --help      Help on $NAME_OF_AUTOGEN usage"
+    echo "    --verbose   Verbose progress output"
+    echo "    --quiet     Quiet suppressed progress output"
+    echo "    --download  Download the latest config.guess from gnulib"
+    echo "    --version   Only perform GNU Build System version checks"
     echo
     echo "Description: This script will validate that minimum versions of the"
     echo "GNU Build System tools are installed and then run autoreconf for you."
@@ -268,6 +274,9 @@ fi
 if [ "x$VERSION_ONLY" = "x" ] ; then
     VERSION_ONLY=no
 fi
+if [ "x$DOWNLOAD" = "x" ] ; then
+    DOWNLOAD=no
+fi
 if [ "x$AUTORECONF_OPTIONS" = "x" ] ; then
     AUTORECONF_OPTIONS="-i -f"
 fi
@@ -288,6 +297,9 @@ fi
 if [ "x$AUTOHEADER_OPTIONS" = "x" ] ; then
     AUTOHEADER_OPTIONS=""
 fi
+if [ "x$CONFIG_GUESS_URL" = "x" ] ; then
+    CONFIG_GUESS_URL="http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/config.guess;hb=HEAD"
+fi
 for arg in $ARGS ; do
     case "x$arg" in
        x--help) HELP=yes ;;
@@ -295,6 +307,8 @@ for arg in $ARGS ; do
        x--quiet) QUIET=yes ;;
        x-[qQ]) QUIET=yes ;;
        x--verbose) VERBOSE=yes ;;
+       x-[dD]) DOWNLOAD=yes ;;
+       x--download) DOWNLOAD=yes ;;
        x-[vV]) VERBOSE=yes ;;
        x--version) VERSION_ONLY=yes ;;
        *)
@@ -584,7 +598,7 @@ else
        _version="0.0.0"
     fi
     $ECHO "Found GNU Automake version $_version"
-    version_check "$AUTOMAKE_VERSION" "$_version" 
+    version_check "$AUTOMAKE_VERSION" "$_version"
     if [ $? -ne 0 ] ; then
        _report_error=yes
     fi
@@ -686,7 +700,7 @@ else
        _version="0.0.0"
     fi
     $ECHO "Found GNU Libtool version $_version"
-    version_check "$LIBTOOL_VERSION" "$_version" 
+    version_check "$LIBTOOL_VERSION" "$_version"
     if [ $? -ne 0 ] ; then
        _report_error=yes
     fi
@@ -756,24 +770,17 @@ protect_from_clobber ( ) {
     # prevalent behavior, so we protect against it by keeping a backup
     # of the file that can later be restored.
 
-    if test -f COPYING ; then
-       if test -f COPYING.$$.protect_from_automake.backup ; then
-           $VERBOSE_ECHO "Already backed up COPYING in `pwd`"
-       else
-           $VERBOSE_ECHO "Backing up COPYING in `pwd`"
-           $VERBOSE_ECHO "cp -p COPYING COPYING.$$.protect_from_automake.backup"
-           cp -p COPYING COPYING.$$.protect_from_automake.backup
-       fi
-    fi
-    if test -f INSTALL ; then
-       if test -f INSTALL.$$.protect_from_automake.backup ; then
-           $VERBOSE_ECHO "Already backed up INSTALL in `pwd`"
-       else
-           $VERBOSE_ECHO "Backing up INSTALL in `pwd`"
-           $VERBOSE_ECHO "cp -p INSTALL INSTALL.$$.protect_from_automake.backup"
-           cp -p INSTALL INSTALL.$$.protect_from_automake.backup
+    for file in COPYING INSTALL ; do
+       if test -f ${file} ; then
+           if test -f ${file}.$$.protect_from_automake.backup ; then
+               $VERBOSE_ECHO "Already backed up ${file} in `pwd`"
+           else
+               $VERBOSE_ECHO "Backing up ${file} in `pwd`"
+               $VERBOSE_ECHO "cp -p ${file} ${file}.$$.protect_from_automake.backup"
+               cp -p ${file} ${file}.$$.protect_from_automake.backup
+           fi
        fi
-    fi
+    done
 }
 
 
@@ -840,57 +847,32 @@ restore_clobbered ( ) {
 
     spacer=no
 
-    # COPYING
-    if test -f COPYING.$$.protect_from_automake.backup ; then
-       if test -f COPYING ; then
-           # compare entire content, restore if needed
-           if test "x`cat COPYING`" != "x`cat COPYING.$$.protect_from_automake.backup`" ; then
-               if test "x$spacer" = "xno" ; then
-                   $VERBOSE_ECHO
-                   spacer=yes
-               fi
-               # restore the backup
-               $VERBOSE_ECHO "Restoring COPYING from backup (automake -f likely clobbered it)"
-               $VERBOSE_ECHO "rm -f COPYING"
-               rm -f COPYING
-               $VERBOSE_ECHO "mv COPYING.$$.protect_from_automake.backup COPYING"
-               mv COPYING.$$.protect_from_automake.backup COPYING
-           fi # check contents
-       elif test -f COPYING.$$.protect_from_automake.backup ; then
-           $VERBOSE_ECHO "mv COPYING.$$.protect_from_automake.backup COPYING"
-           mv COPYING.$$.protect_from_automake.backup COPYING
-       fi # -f COPYING
-
-       # just in case
-       $VERBOSE_ECHO "rm -f COPYING.$$.protect_from_automake.backup"
-       rm -f COPYING.$$.protect_from_automake.backup
-    fi # -f COPYING.$$.protect_from_automake.backup
-
-    # INSTALL
-    if test -f INSTALL.$$.protect_from_automake.backup ; then
-       if test -f INSTALL ; then
+    for file in COPYING INSTALL ; do
+       if test -f ${file}.$$.protect_from_automake.backup ; then
+           if test -f ${file} ; then
            # compare entire content, restore if needed
-           if test "x`cat INSTALL`" != "x`cat INSTALL.$$.protect_from_automake.backup`" ; then
+           if test "x`cat ${file}`" != "x`cat ${file}.$$.protect_from_automake.backup`" ; then
                if test "x$spacer" = "xno" ; then
                    $VERBOSE_ECHO
                    spacer=yes
                fi
                # restore the backup
-               $VERBOSE_ECHO "Restoring INSTALL from backup (automake -f likely clobbered it)"
-               $VERBOSE_ECHO "rm -f INSTALL"
-               rm -f INSTALL
-               $VERBOSE_ECHO "mv INSTALL.$$.protect_from_automake.backup INSTALL"
-               mv INSTALL.$$.protect_from_automake.backup INSTALL
+               $VERBOSE_ECHO "Restoring ${file} from backup (automake -f likely clobbered it)"
+               $VERBOSE_ECHO "rm -f ${file}"
+               rm -f ${file}
+               $VERBOSE_ECHO "mv ${file}.$$.protect_from_automake.backup ${file}"
+               mv ${file}.$$.protect_from_automake.backup ${file}
            fi # check contents
-       elif test -f INSTALL.$$.protect_from_automake.backup ; then
-           $VERBOSE_ECHO "mv INSTALL.$$.protect_from_automake.backup INSTALL"
-           mv INSTALL.$$.protect_from_automake.backup INSTALL
-       fi # -f INSTALL
-
-       # just in case
-       $VERBOSE_ECHO "rm -f INSTALL.$$.protect_from_automake.backup"
-       rm -f INSTALL.$$.protect_from_automake.backup
-    fi # -f INSTALL.$$.protect_from_automake.backup
+           elif test -f ${file}.$$.protect_from_automake.backup ; then
+               $VERBOSE_ECHO "mv ${file}.$$.protect_from_automake.backup ${file}"
+               mv ${file}.$$.protect_from_automake.backup ${file}
+           fi # -f ${file}
+       
+           # just in case
+           $VERBOSE_ECHO "rm -f ${file}.$$.protect_from_automake.backup"
+           rm -f ${file}.$$.protect_from_automake.backup
+       fi # -f ${file}.$$.protect_from_automake.backup
+    done
 
     CONFIGURE="`locate_configure_template`"
     if [ "x$CONFIGURE" = "x" ] ; then
@@ -1003,15 +985,50 @@ initialize ( ) {
        fi
     done
 
-    ##########################################
-    # make sure certain required files exist #
-    ##########################################
-    for file in AUTHORS COPYING ChangeLog INSTALL NEWS README ; do
-       if test ! -f $file ; then
-           $VERBOSE_ECHO "Touching ${file} since it does not exist"
-           touch $file
+    ###########################################################
+    # make sure certain required files exist for GNU projects #
+    ###########################################################
+    _marker_found=""
+    _marker_found_message_intro='Detected non-GNU marker "'
+    _marker_found_message_mid='" in '
+    for marker in foreign cygnus ; do
+       _marker_found_message=${_marker_found_message_intro}${marker}${_marker_found_message_mid}
+       _marker_found="`grep 'AM_INIT_AUTOMAKE.*'${marker} $CONFIGURE`"
+       if [ ! "x$_marker_found" = "x" ] ; then
+           $VERBOSE_ECHO "${_marker_found_message}`basename \"$CONFIGURE\"`"
+           break
+       fi
+       if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then
+           _marker_found="`grep 'AUTOMAKE_OPTIONS.*'${marker} Makefile.am`"
+           if [ ! "x$_marker_found" = "x" ] ; then
+               $VERBOSE_ECHO "${_marker_found_message}Makefile.am"
+               break
+           fi
        fi
     done
+    if [ "x${_marker_found}" = "x" ] ; then
+       _suggest_foreign=no
+       for file in AUTHORS COPYING ChangeLog INSTALL NEWS README ; do
+           if [ ! -f $file ] ; then
+               $VERBOSE_ECHO "Touching ${file} since it does not exist"
+               _suggest_foreign=yes
+               touch $file
+           fi
+       done
+
+       if [ "x${_suggest_foreign}" = "xyes" ] ; then
+           $ECHO
+           $ECHO "Warning: Several files expected of projects that conform to the GNU"
+           $ECHO "coding standards were not found.  The files were automatically added"
+           $ECHO "for you since you do not have a 'foreign' declaration specified."
+           $ECHO
+           $ECHO "Considered adding 'foreign' to AM_INIT_AUTOMAKE in `basename \"$CONFIGURE\"`"
+           if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then
+               $ECHO "or to AUTOMAKE_OPTIONS in your top-level Makefile.am file."
+           fi
+           $ECHO
+       fi
+    fi
 
     ##################################################
     # make sure certain generated files do not exist #
@@ -1072,6 +1089,75 @@ cd "$START_PATH"
 initialize
 
 
+#########################################
+# DOWNLOAD_GNULIB_CONFIG_GUESS FUNCTION #
+#########################################
+
+# TODO - should make sure wget/curl exist and/or work before trying to
+# use them.
+
+download_gnulib_config_guess () {
+    # abuse gitweb to download gnulib's latest config.guess via HTTP
+    config_guess_temp="config.guess.$$.download"
+    ret=1
+    for __cmd in wget curl fetch ; do
+       $VERBOSE_ECHO "Checking for command ${__cmd}"
+       ${__cmd} --version > /dev/null 2>&1
+       ret=$?
+       if [ ! $ret = 0 ] ; then
+           continue
+        fi
+
+       __cmd_version=`${__cmd} --version | head -n 1 | sed -e 's/^[^0-9]\+//' -e 's/ .*//'`
+       $VERBOSE_ECHO "Found ${__cmd} ${__cmd_version}"
+
+       opts=""
+       case ${__cmd} in
+           wget)
+               opts="-O" 
+               ;;
+           curl)
+               opts="-o"
+               ;;
+           fetch)
+               opts="-t 5 -f"
+               ;;
+       esac
+
+       $VERBOSE_ECHO "Running $__cmd \"${CONFIG_GUESS_URL}\" $opts \"${config_guess_temp}\""
+       eval "$__cmd \"${CONFIG_GUESS_URL}\" $opts \"${config_guess_temp}\"" > /dev/null 2>&1
+       if [ $? = 0 ] ; then
+           mv -f "${config_guess_temp}" ${_aux_dir}/config.guess
+           ret=0
+           break
+       fi
+    done
+
+    if [ ! $ret = 0 ] ; then
+       $ECHO "Warning: config.guess download failed from: $CONFIG_GUESS_URL"
+       rm -f "${config_guess_temp}"
+    fi
+}
+
+
+##############################
+# LIBTOOLIZE_NEEDED FUNCTION #
+##############################
+libtoolize_needed () {
+    ret=1 # means no, don't need libtoolize
+    for feature in AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT ; do
+       $VERBOSE_ECHO "Searching for $feature in $CONFIGURE"
+       found="`grep \"^$feature.*\" $CONFIGURE`"
+       if [ ! "x$found" = "x" ] ; then
+           ret=0 # means yes, need to run libtoolize
+           break
+       fi
+    done
+    return ${ret}
+}
+
+
+
 ############################################
 # prepare build via autoreconf or manually #
 ############################################
@@ -1115,6 +1201,12 @@ if [ "x$HAVE_AUTORECONF" = "xyes" ] ; then
 
        $ECHO "Attempting to run the preparation steps individually"
        reconfigure_manually=yes
+    else
+       if [ "x$DOWNLOAD" = "xyes" ] ; then
+           if libtoolize_needed ; then
+               download_gnulib_config_guess
+           fi
+       fi
     fi
 else
     reconfigure_manually=yes
@@ -1193,22 +1285,13 @@ manual_autogen ( ) {
     ##############
     # libtoolize #
     ##############
-    need_libtoolize=no
-    for feature in AC_PROG_LIBTOOL LT_INIT ; do
-       $VERBOSE_ECHO "Searching for $feature in $CONFIGURE"
-       found="`grep \"^$feature.*\" $CONFIGURE`"
-       if [ ! "x$found" = "x" ] ; then
-           need_libtoolize=yes
-           break
-       fi
-    done
-    if [ "x$need_libtoolize" = "xyes" ] ; then
+    if libtoolize_needed ; then
        if [ "x$HAVE_LIBTOOLIZE" = "xyes" ] ; then
            $VERBOSE_ECHO "$LIBTOOLIZE $LIBTOOLIZE_OPTIONS"
            libtoolize_output="`$LIBTOOLIZE $LIBTOOLIZE_OPTIONS 2>&1`"
            ret=$?
            $VERBOSE_ECHO "$libtoolize_output"
-           
+
            if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi
        else
            if [ "x$HAVE_ALT_LIBTOOLIZE" = "xyes" ] ; then
@@ -1216,7 +1299,7 @@ manual_autogen ( ) {
                libtoolize_output="`$LIBTOOLIZE $ALT_LIBTOOLIZE_OPTIONS 2>&1`"
                ret=$?
                $VERBOSE_ECHO "$libtoolize_output"
-               
+
                if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi
            fi
        fi
@@ -1244,7 +1327,11 @@ manual_autogen ( ) {
                $ECHO $ECHO_N "Continuing build preparation ... $ECHO_C"
            fi
        fi # ltmain.sh
-    fi # need_libtoolize
+
+       if [ "x$DOWNLOAD" = "xyes" ] ; then
+           download_gnulib_config_guess
+       fi
+    fi # libtoolize_needed
 
     ############
     # autoconf #
@@ -1264,7 +1351,7 @@ manual_autogen ( ) {
        macros_to_search=""
        ac_major="`echo ${AUTOCONF_VERSION}. | cut -d. -f1 | sed 's/[^0-9]//g'`"
        ac_minor="`echo ${AUTOCONF_VERSION}. | cut -d. -f2 | sed 's/[^0-9]//g'`"
-       
+
        if [ $ac_major -lt 2 ] ; then
            macros_to_search="$ac2_59_macros $ac2_55_macros $ac2_54_macros"
        else
@@ -1293,7 +1380,7 @@ manual_autogen ( ) {
            $ECHO
            $ECHO "Warning:  Unsupported macros were found in $CONFIGURE"
            $ECHO
-           $ECHO "The `echo $CONFIGURE | basename` file was scanned in order to determine if any"
+           $ECHO "The `basename \"$CONFIGURE\"` file was scanned in order to determine if any"
            $ECHO "unsupported macros are used that exceed the minimum version"
            $ECHO "settings specified within this file.  As such, the following macros"
            $ECHO "should be removed from configure.ac or the version numbers in this"
@@ -1337,7 +1424,7 @@ EOF
                $ECHO " $AUTOGEN_SH --verbose"
            else
                $ECHO "reviewing the minimum GNU Autotools version settings contained in"
-               $ECHO "this script along with the macros being used in your `echo $CONFIGURE | basename` file."
+               $ECHO "this script along with the macros being used in your `basename \"$CONFIGURE\"` file."
            fi
            $ECHO
            $ECHO $ECHO_N "Continuing build preparation ... $ECHO_C"
@@ -1382,7 +1469,7 @@ EOF
        automake_output="`$AUTOMAKE $AUTOMAKE_OPTIONS 2>&1`"
        ret=$?
        $VERBOSE_ECHO "$automake_output"
-       
+
        if [ ! $ret = 0 ] ; then
 
            ###################
@@ -1394,7 +1481,7 @@ EOF
            automake_output="`$AUTOMAKE $ALT_AUTOMAKE_OPTIONS 2>&1`"
            ret=$?
            $VERBOSE_ECHO "$automake_output"
-           
+
            if [ ! $ret = 0 ] ; then
                # test if libtool is busted
                libtool_failure "$automake_output"
index c2f51c3ba6c36614d77fdd9871ef4d32254acf76..ff48349d984061be81f0c1ecb2b3975c75f7a2bd 100644 (file)
@@ -1,4 +1,4 @@
 
 man6_MANS = yoink.6
-EXTRA_DIST = licenses yoink.6
+EXTRA_DIST = licenses man2html.lua yoink.6
 
diff --git a/doc/man2html.lua b/doc/man2html.lua
new file mode 100755 (executable)
index 0000000..0fa3d5b
--- /dev/null
@@ -0,0 +1,82 @@
+#!/usr/bin/lua
+
+--
+-- Yoink
+-- Run this script to convert the manual page to html.
+--
+
+function showhelp()
+       print("Usage: "..arg[0].." [-eh] [-i manpage] [-o htmlfile]")
+       print("  Convert the manual page to html with groff.")
+       print("")
+       print("  -e  Hide email addresses in the manual page.")
+       print("  -h  Show this help an exit.")
+       print("  -i  Specify the manual page to convert.")
+       print("  -o  Specify output path of html file.")
+end
+
+-----
+
+function die(...) print("die:", ...); os.exit(1) end
+function isReadable(file) return os.execute("test -r "..file) == 0 end
+
+arg.hideEmail = false
+arg.output = "yoink.html"
+
+arg.input = "yoink.6"
+if not isReadable(arg.input) then arg.input = "doc/yoink.6" end
+
+do
+       local t = {
+               ["-e"] = function(a,i) a.hideEmail = true end,
+               ["-h"] = function(a,i) showhelp(); os.exit() end,
+               ["-i"] = function(a,i) a.input = a[i+1];  return 1 end,
+               ["-o"] = function(a,i) a.output = a[i+1]; return 1 end
+       }
+       function parseArgs(args)
+               local skip = 0
+               for i,v in ipairs(args) do
+                       if skip <= 0 then
+                               if type(t[v]) ~= "function" then
+                                       print("unknown option: "..v)
+                                       showhelp(); os.exit(1)
+                               end
+                               skip = t[v](args, i)
+                               if tonumber(skip) then skip = skip + 1 else skip = 1 end
+                       end
+                       skip = skip - 1
+               end
+       end
+end
+parseArgs(arg)
+
+filters = {
+       function(t)                                             -- 1. Edit page title
+               return t:gsub("(<title>).*(</title>)", "%1Yoink Manual%2")
+       end,
+       function(t)                                             -- 2. Insert footer before </body>
+               return t:gsub("</body>", [[
+<p style="font-size: 9px; text-align: center;">
+       This manual page was generated on ]]..os.date("%d %b %Y")..[[.
+       For more information, go to the
+               <a href="http://www.dogcows.com/yoink/">Yoink website</a>.
+</p>
+</body> ]])
+       end,
+       arg.hideEmail and function(t)   -- 3. Hide email addresses
+               return t:gsub("&lt;.+@.+&gt;", "&lt;email address hidden&gt;")
+       end or nil
+}
+
+output, err = io.open(arg.output, "w")
+if not output then die("io.open", err) end
+input = io.popen("groff -t -e -mandoc -Thtml "..arg.input)
+
+for line in input:lines() do
+       for _,filter in ipairs(filters) do line = filter(line) end
+       output:write(line.."\n")
+end
+
+output:close()
+input:close()
+
diff --git a/doc/man2html.sh b/doc/man2html.sh
deleted file mode 100755 (executable)
index 49f6c72..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh
-
-#
-# Yoink
-# Run this script to convert the manual page to html.
-#
-# Requires groff.
-# Have fun!
-#
-
-function showhelp()
-{
-       echo "Create an html manual page."
-       echo "Usage: $0 [-Hfh] [-i manpage] [-o htmlfile]"
-       echo ""
-       echo "  -H  Hide email addresses in the manual page."
-       echo "  -f  Force overwrite of output file."
-       echo "  -h  Show this help an exit."
-       echo "  -i  Specify the manual page to convert."
-       echo "  -o  Specify output path of html file."
-}
-
-INFILE="doc/yoink.6"
-OUTFILE="yoink.html"
-
-while getopts ":Hfhi:o:" opt
-do
-       case $opt in
-               H)
-                       HIDE_EMAIL=yes
-                       ;;
-               f)
-                       FORCE=yes
-                       ;;
-               h)
-                       showhelp
-                       exit 0
-                       ;;
-               i)
-                       INFILE="$OPTARG"
-                       ;;
-               o)
-                       OUTFILE="$OPTARG"
-                       ;;
-               \?)
-                       echo "Invalid option: -$OPTARG" >&2
-                       showhelp
-                       exit 1
-                       ;;
-       esac
-done
-
-if test x$FORCE != xyes && test -e "$OUTFILE"
-then
-       echo "Refusing to overwrite file: $OUTFILE.  Use -f to override." >&2
-       exit 1
-fi
-
-if test ! -f "$INFILE"
-then
-       echo "Can't open file: $INFILE" >&2
-       exit 1
-fi
-
-DATE=$(date +"%d %b %Y")
-
-# 1. Remove first two lines (comments about groff).
-# 2. Edit page title.
-# 3. Insert a footer before </body>.
-HTML=$(groff -t -e -mandoc -Thtml "$INFILE" | sed -e "1,2d" \
--e "s|<title>.*</title>|<title>Yoink Manual</title>|" -e "s|</body>|\
-<p style=\"font-size: 9px; text-align: center;\">\\
-This manual page was generated on $DATE.\\
-For more information, go to the\\
-<a href=\"http://www.dogcows.com/yoink/\">Yoink website</a>.\\
-</p>\\
-</body>|")
-
-if test x$HIDE_EMAIL = xyes
-then
-# 4. Replace email addresses with a placeholder.
-       echo "$HTML" \
-       | sed -e "s|&lt;.*@.*&gt;|\&lt;email address not shown\&gt;|g" \
-       >"$OUTFILE"
-else
-       echo "$HTML" >"$OUTFILE"
-fi
-
diff --git a/extra/nightfusion.xm b/extra/nightfusion.xm
deleted file mode 100644 (file)
index 06120fc..0000000
Binary files a/extra/nightfusion.xm and /dev/null differ
index b63b7d2aa431f1cbe14240c157439a2910b32b59..98cf9b91e804e3ae52377c093b9a13719352fa8c 100644 (file)
@@ -11,6 +11,8 @@
 
 noinst_LIBRARIES = libmoof.a
 
+libmoof_a_CPPFLAGS = -I$(top_srcdir)/src/Moof
+
 libmoof_a_SOURCES = \
                                        Moof/Aabb.cc \
                                        Moof/Aabb.hh \
@@ -71,8 +73,6 @@ libmoof_a_SOURCES = \
                                        Moof/fastevents.h \
                                        $(ENDLIST)
 
-libmoof_a_CPPFLAGS = -I$(top_srcdir)/src/Moof
-
 EXTRA_DIST = Moof/cml Moof/stlplus
 
 
@@ -82,6 +82,9 @@ EXTRA_DIST = Moof/cml Moof/stlplus
 
 bin_PROGRAMS = yoink
 
+yoink_CPPFLAGS = -I$(top_srcdir)/src/Moof
+yoink_LDADD = libmoof.a
+
 yoink_SOURCES = \
                                Animation.cc \
                                Animation.hh \
@@ -111,14 +114,13 @@ yoink_SOURCES = \
                                $(ENDLIST)
 
 if WIN32
-yoink_SOURCES += yoink.rc yoink.ico
-.rc.o:
-       $(AM_V_GEN) $(WINDRES) -o $@ -i $<
-endif
 
-yoink_CPPFLAGS = -I$(top_srcdir)/src/Moof
-yoink_LDADD = libmoof.a
+yoink_SOURCES += yoink.rc
 
+.rc.o:
+       $(WINDRES) -o $@ -i $<
+
+else
 
 YOINK_ENVIRONMENT = YOINK_DATADIR="$(top_srcdir)/data"
 
@@ -126,5 +128,7 @@ run: all
        $(YOINK_ENVIRONMENT) ./yoink $(YOINK_OPTS)
 
 debug: all
-       $(YOINK_ENVIRONMENT) ddd ./yoink
+       $(YOINK_ENVIRONMENT) gdb ./yoink
+
+endif
 
index 18c10e8bcb716a5a4ba894df3e71e912f783338c..64eee3d93a1f59aded19483aac796f073e47c5b4 100644 (file)
@@ -39,5 +39,5 @@ BEGIN
        END
 END
 
-1000 ICON "../win32/yoink.ico"
+1000 ICON "../arch/win32/yoink.ico"
 
This page took 0.052871 seconds and 4 git commands to generate.