From: Charles McGarvey Date: Thu, 18 Mar 2010 05:06:33 +0000 (-0600) Subject: repository reorganizing X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=commitdiff_plain;h=cf4c819df08e2ab6c06532d8a4467fa58b2792ae repository reorganizing --- diff --git a/Makefile.am b/Makefile.am index 7f62c7d..36d5fab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) + diff --git a/extra/PKGBUILD b/arch/archlinux/PKGBUILD similarity index 100% rename from extra/PKGBUILD rename to arch/archlinux/PKGBUILD diff --git a/extra/yoink.ebuild b/arch/gentoo/yoink.ebuild similarity index 100% rename from extra/yoink.ebuild rename to arch/gentoo/yoink.ebuild diff --git a/macosx/bundle.tar.bz2 b/arch/macosx/bundle.tar.bz2 similarity index 100% rename from macosx/bundle.tar.bz2 rename to arch/macosx/bundle.tar.bz2 diff --git a/macosx/mkbundle.sh.in b/arch/macosx/mkbundle.sh.in similarity index 100% rename from macosx/mkbundle.sh.in rename to arch/macosx/mkbundle.sh.in diff --git a/win32/makedeps.sh b/arch/win32/makedeps.sh similarity index 98% rename from win32/makedeps.sh rename to arch/win32/makedeps.sh index e004aec..49a79e1 100755 --- a/win32/makedeps.sh +++ b/arch/win32/makedeps.sh @@ -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 @@ -35,10 +35,10 @@ # 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 diff --git a/win32/makepackage.sh b/arch/win32/makepackage.sh similarity index 85% rename from win32/makepackage.sh rename to arch/win32/makepackage.sh index 0cb4885..793e435 100755 --- a/win32/makepackage.sh +++ b/arch/win32/makepackage.sh @@ -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'" diff --git a/win32/setup.ico b/arch/win32/setup.ico similarity index 100% rename from win32/setup.ico rename to arch/win32/setup.ico diff --git a/win32/uninstall.ico b/arch/win32/uninstall.ico similarity index 100% rename from win32/uninstall.ico rename to arch/win32/uninstall.ico diff --git a/win32/unix2dos.sh b/arch/win32/unix2dos.sh similarity index 100% rename from win32/unix2dos.sh rename to arch/win32/unix2dos.sh diff --git a/win32/yoink.ico b/arch/win32/yoink.ico similarity index 100% rename from win32/yoink.ico rename to arch/win32/yoink.ico diff --git a/win32/yoink.nsi b/arch/win32/yoink.nsi similarity index 97% rename from win32/yoink.nsi rename to arch/win32/yoink.nsi index 2638a65..4aa9a65 100644 --- a/win32/yoink.nsi +++ b/arch/win32/yoink.nsi @@ -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 diff --git a/autogen.sh b/autogen.sh index 7a9c5ef..5bce9ba 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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. # @@ -69,19 +69,23 @@ # To verbosely try running with an older (unsupported) autoconf: # AUTOCONF_VERSION=2.50 ./autogen.sh --verbose # -# Author: Christopher Sean Morrison +# Author: +# Christopher Sean Morrison +# +# Patches: +# Sebastian Pipping # ###################################################################### -# 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" diff --git a/doc/Makefile.am b/doc/Makefile.am index c2f51c3..ff48349 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -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 index 0000000..0fa3d5b --- /dev/null +++ b/doc/man2html.lua @@ -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("().*()", "%1Yoink Manual%2") + end, + function(t) -- 2. Insert footer before + return t:gsub("", [[ +

+ This manual page was generated on ]]..os.date("%d %b %Y")..[[. + For more information, go to the + Yoink website. +

+ ]]) + end, + arg.hideEmail and function(t) -- 3. Hide email addresses + return t:gsub("<.+@.+>", "<email address hidden>") + 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 index 49f6c72..0000000 --- a/doc/man2html.sh +++ /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 . -HTML=$(groff -t -e -mandoc -Thtml "$INFILE" | sed -e "1,2d" \ --e "s|.*|Yoink Manual|" -e "s||\ -

\\ -This manual page was generated on $DATE.\\ -For more information, go to the\\ -Yoink website.\\ -

\\ -|") - -if test x$HIDE_EMAIL = xyes -then -# 4. Replace email addresses with a placeholder. - echo "$HTML" \ - | sed -e "s|<.*@.*>|\<email address not shown\>|g" \ - >"$OUTFILE" -else - echo "$HTML" >"$OUTFILE" -fi - diff --git a/extra/nightfusion.xm b/extra/nightfusion.xm deleted file mode 100644 index 06120fc..0000000 Binary files a/extra/nightfusion.xm and /dev/null differ diff --git a/src/Makefile.am b/src/Makefile.am index b63b7d2..98cf9b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/yoink.rc b/src/yoink.rc index 18c10e8..64eee3d 100644 --- a/src/yoink.rc +++ b/src/yoink.rc @@ -39,5 +39,5 @@ BEGIN END END -1000 ICON "../win32/yoink.ico" +1000 ICON "../arch/win32/yoink.ico"