Update of /cvsroot/mingw/portmaker/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29938/template Added Files: mingwPORT.README mingwPORT.afterconfigure mingwPORT.afterinstall mingwPORT.aftermake mingwPORT.afterpatch mingwPORT.afterquestion mingwPORT.beforeconfigure mingwPORT.beforeinstall mingwPORT.beforemake mingwPORT.beforepatch mingwPORT.beforequestion mingwPORT.cleanup mingwPORT.configure mingwPORT.exports mingwPORT.functions mingwPORT.ini mingwPORT.install mingwPORT.make mingwPORT.patch mingwPORT.question mingwPORT.sh mirrors.sf Log Message: * portmaker: New project. --- NEW FILE: mingwPORT.cleanup --- # mingwPORT.cleanup # Required. Used to clean up after the build process. if [ $RMDIR == NORMDIR ] then cd ${BUILDDIR} make distclean cd ${CURDIR} else rm -rf ${RMDIR} fi cd ${CURDIR} if [ -f ${CURDIR}/mingwPORT.patch ] then if [ -f ${CURDIR}/mingwPORT.beforerpatch ] then . ${CURDIR}/mingwPORT.beforerpatch ] fi patch -t -R -p0 < ${CURDIR}/mingwPORT.patch if [ -f ${CURDIR}/mingwPORT.afterrpatch ] then . ${CURDIR}/mingwPORT.afterrpatch ] fi fi if (isyes $DOWNLOAD) then cd ${SRCDIR}/.. for I in `cat ${ARCHIVE}.log` do if [ -f $I ] then rm -f $I else if [ ! -d ${SRCDIR}/../$I/mingwPORT ] then CLEANDIR="$I $CLEANDIR" fi fi done for I in $CLEANDIR do if [ -d $I ] then rmdir $I fi done rm -f ${ARCHIVE}.log rm -f $ARCHIVE fi --- NEW FILE: mirrors.sf --- ask "Which mirror from the list do you wish to use? 0) none (Oops, I wish to cancel) 1) jaist (JP) 2) puzzle (CH) 3) nchc (TW) 4) easynews (US) 5) ovh (FR) 6) belnet (BE) 7) citkit (RU) 8) cogent (US) 9) voxel (US) 10) kent (UK) 11) heanet (IE) 12) switch (CH) 13) mesh (DE) 14) optusnet (AU) Select a numeric value:" "0" DL case $DL in 0) exit;; 1) DOWNLOADURI=jaist;; 2) DOWNLOADURI=puzzle;; 3) DOWNLOADURI=nchc;; 4) DOWNLOADURI=easynews;; 5) DOWNLOADURI=ovh;; 6) DOWNLOADURI=belnet;; 7) DOWNLOADURI=citkit;; 8) DOWNLOADURI=cogent;; 9) DOWNLOADURI=voxel;; 10) DOWNLOADURI=kent;; 11) DOWNLOADURI=heanet;; 12) DOWNLOADURI=switch;; 13) DOWNLOADURI=mesh;; 14) DOWNLOADURI=optusnet;; esac DOWNLOADURI=${DOWNLOADURI}.dl.sourceforge.net/${PACKAGE} --- NEW FILE: mingwPORT.aftermake --- # mingwPORT.aftermake # Optional. Used to process commands after the source build process. --- NEW FILE: mingwPORT.beforepatch --- # mingwPORT.beforepatch # Add commands to prepare before patching the source PATCHFLAGS=-p0 --- NEW FILE: mingwPORT.beforequestion --- # mingwPORT.beforequestion # Use this file to add script functionality before executing mingwPORT.question. --- NEW FILE: mingwPORT.question --- ask "Download file?" "Yes" DOWNLOAD if (isyes $DOWNLOAD) then if [ -f ${CURDIR}/mirrors.sf ] then ask "SF Mirror" "Yes" SFMIRROR fi if (isyes $SFMIRROR) then . ${CURDIR}/mirrors.sf else ask "Download file URI?" "$DOWNLOADURI" DOWNLOADURI fi case "$ARCHIVETYPE" in tar.gz) ATN=1;; tgz) ATN=2;; tar.bz2) ATN=3;; tbz2) ATN=4;; zip) ATN=5;; *) ATN=0;; esac ask "Archive file type? 0) unknown 1) tar.gz 2) tgz 3) tar.bz2 4) tbz2 5) zip Select a numeric value:" "$ATN" ATN ask "Archive file?" "$ARCHIVEFILE" ARCHIVEFILE ask "Download to path?" "/tmp" ARCHIVEPATH else ask "Unarchive file?" "Yes" UNARCHIVE if (isyes $UNARCHIVE) then ask "Archive file type?" $ARCHIVETYPE ARCHIVETYPE ask "Archive file?" "$PACKAGE-$VERSION.$ARCHIVETYPE" ARCHIVEFILE ask "Archive file path?" "/tmp" ARCHIVEPATH fi fi ask "Source path?" "$SRCDIR" SRCDIR ask "Installation directory?" $PREFIX PREFIX ask "CFLAGS" "$CFLAGS" CFLAGS --- NEW FILE: mingwPORT.afterquestion --- # mingwPORT.afterquestion # Use this file to add script functionality after executing mingwPORT.question. if (isyes $DOWNLOAD) then cd $ARCHIVEPATH && wget $DOWNLOADURI/$ARCHIVEFILE UNARCHIVE=yes fi if (isyes $UNARCHIVE) then ARCHIVE=$ARCHIVEPATH/$ARCHIVEFILE fi if [ ! -z "$ARCHIVE" ] then case ${ARCHIVETYPE} in tar.gz) TARFLAG=zxvf;; tgz) TARFLAG=zxvf;; tar.bz2) TARFLAG=jxvf;; tbz2) TARFLAG=jxvf;; zip) TARFLAG=zip;; esac cd $SRCDIR/.. && tar $TARFLAG $ARCHIVE | tee ${ARCHIVE}.log fi --- NEW FILE: mingwPORT.afterconfigure --- # mingwPORT.afterconfigure # Optional. Used to add commands relative to configuration after the configure # script has executed. --- NEW FILE: mingwPORT.beforemake --- # mingwPORT.beforemake # Optional. Used to setup environment before the source build process. --- NEW FILE: mingwPORT.afterinstall --- # mingwPORT.afterinstall # Optional. Used for extra commands related to the installation process for # the port. --- NEW FILE: mingwPORT.make --- # mingwPORT.make # Required. Used to execute the source build process. make --- NEW FILE: mingwPORT.patch --- # mingwPORT.patch # Replace this file with the output of ``diff -u3prNw origsrc portsrc'' or # ``cvs diff -u3pNw'' if you checked out the source from a cvs repository. --- NEW FILE: mingwPORT.install --- # mingwPORT.install # Required. Used to install the package. make install --- NEW FILE: mingwPORT.functions --- # mingwPORT.functions # Required. Shell functions used by mingwPORT. # ask "User prompt" "Default response" VariableToStoreResponse function ask() { echo -n "$1 ($2) " read $3 if [ -z "$(eval echo \${$3\})" ] then eval $3=\"$2\" fi } # isyes $variable function isyes() { echo $1 | grep '[Yy][Ee][Ss]' > /dev/null } --- NEW FILE: mingwPORT.configure --- # mingwPORT.configure # Required. This is the execution of any configuration scripts before the # build process. if [ ! -d ${PREFIX} ] then mkdir -p ${PREFIX} fi ${SRCDIR}/configure --prefix=`cd ${PREFIX} && pwd -W` --- NEW FILE: mingwPORT.beforeconfigure --- # mingwPORT.beforeconfigure # Required to set BUILDDIR. # Optionally add other commands before executing the configure source. BUILDDIR=bld ;# Modify this variable if you need to build in the source such ;# that it represents the source directory. Something like ;# BUILDDIR=. --- NEW FILE: mingwPORT.README --- package: mingwPORT version: 1.0 http://www.mingw.org port: [PACKAGEFILE] [PACKAGEHOME] DISCLAIMER: This code is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This disclaimer applies to both mingwPORT and the ported package. The mingwPORT code is offered for use in the public domain. You may use, modify or distribute it freely. This copyright notice is only relative to the mingwPORT code and does not extend to the code ported. Each individual package has its own copyright notice and the ported package copyright may have affect to the code contained in the file mingwPORT.patch when the patch is applied to the code. If you distribute the binaries as a result of mingwPORT you may need to also distribute the source and any modifications. If that is the case you are free to distribute the mingwPORT.patch file, if one is supplied with the port, with the source as a modification to the source without including the rest of mingwPORT. HOW TO USE: 1) Every mingwPORT requires MSYS, see http://www.mingw.org for download instructions. 2) The implementation of mingwPORT tries to make it easy for you by asking you questions at the command line. An offer to download the original source file is given with options for the file mirror to use. The archive source is then exploded and the build process is then executed. The mingwPORT process supplies a cleanup facility to remove generated files from your disk. If you don't wish for that to take place, then modify the mingwPORT.cleanup file. Later versions of mingwPORT may ask you whether to cleanup or not. 3) ./mingwPORT.sh is all that is required to get started. --- NEW FILE: mingwPORT.sh --- #! /bin/sh # mingwPORT.template # Required but name changed to reflect package ported. # Used to execute commands to build the ported package. CURDIR=`pwd` . ${CURDIR}/mingwPORT.functions if [ -f ${CURDIR}/mingwPORT.ini ] then . ${CURDIR}/mingwPORT.ini fi if [ -f ${CURDIR}/mingwPORT.question ] then if [ -f ${CURDIR}/mingwPORT.beforequestion ] then . ${CURDIR}/mingwPORT.beforequestion fi . ${CURDIR}/mingwPORT.question if [ -f ${CURDIR}/mingwPORT.afterquestion ] then . ${CURDIR}/mingwPORT.afterquestion fi fi if [ -f ${CURDIR}/mingwPORT.exports ] then . ${CURDIR}/mingwPORT.exports fi if [ -f ${CURDIR}/mingwPORT.patch ] then if [ -f ${CURDIR}/mingwPORT.beforepatch ] then . ${CURDIR}/mingwPORT.beforepatch ] fi patch -t $PATCHFLAGS < ${CURDIR}/mingwPORT.patch if [ -f ${CURDIR}/mingwPORT.afterpatch ] then . ${CURDIR}/mingwPORT.afterpatch ] fi fi if [ -f ${CURDIR}/mingwPORT.beforeconfigure ] then . ${CURDIR}/mingwPORT.beforeconfigure fi if [ -z "$BUILDDIR" ] then BUILDDIR=bld fi if [ -z "$SRCDIR" ] then SRCDIR=`pwd` fi cd $SRCDIR ABSSRCDIR=`pwd` cd $CURDIR if [ ! -d ${BUILDDIR} ] then mkdir ${BUILDDIR} RMDIR=${BUILDDIR} else RMDIR='NORMDIR' fi cd ${BUILDDIR} ABSBUILDDIR=`pwd` . ${CURDIR}/mingwPORT.configure if [ -f ${CURDIR}/mingwPORT.afterconfigure ] then . ${CURDIR}/mingwPORT.afterconfigure fi if [ -f ${CURDIR}/mingwPORT.beforemake ] then . ${CURDIR}/mingwPORT.beforemake fi . ${CURDIR}/mingwPORT.make if [ -f ${CURDIR}/mingwPORT.aftermake ] then . ${CURDIR}/mingwPORT.aftermake fi if [ -f ${CURDIR}/mingwPORT.beforeinsall ] then . ${CURDIR}/mingwPORT.beforeinstall fi . ${CURDIR}/mingwPORT.install if [ -f ${CURDIR}/mingwPORT.afterinstall ] then . ${CURDIR}/mingwPORT.afterinstall fi cd ${CURDIR} . ${CURDIR}/mingwPORT.cleanup # end of port --- NEW FILE: mingwPORT.beforeinstall --- # mingwPORT.beforeinstall # Optional. Used to setup the environment or installation paths before # executing the install script. --- NEW FILE: mingwPORT.exports --- # mingwPORT.exports # Used to export variables for use by configure and or make. export CFLAGS CXXFLAGS --- NEW FILE: mingwPORT.ini --- # mingwPORT.ini # Copyright (C) 2005 Earnie Boyd # # Replace the [*] markers with appropriate values # # E.G.: # PACKAGE=automake # VERSION=1.9 # ARCHIVETYPE=tar.gz # ARCHIVEFILE=automake-1.9.tar.gz # ARCHIVEPATH=/tmp # DOWNLOADURI=http://ftp.gnu.org/gnu/automake # SRCDIR=.. # BLDDIR=./bld # PREFIX=/mingw # CFLAGS="-O3 -s -mms-bitfields -march=`uname -m`" # CXXFLAGS=$CFLAGS PACKAGE=[package] VERSION=[version] ARCHIVETYPE=[archivetype] ARCHIVEFILE=[archivefile] ARCHIVEPATH=[archivepath] DOWNLOADURI=[downloaduri] SRCDIR=[srcdir] BLDDIR=[blddir] PREFIX=[prefix] CFLAGS=[cflags] CXXFLAGS=[cxxflags] --- NEW FILE: mingwPORT.afterpatch --- # mingwPORT.afterpatch # Add commands to prepare after the patch. |