From: <lin...@us...> - 2009-10-26 10:14:57
|
Revision: 6387 http://octave.svn.sourceforge.net/octave/?rev=6387&view=rev Author: lindnerb Date: 2009-10-26 10:14:49 +0000 (Mon, 26 Oct 2009) Log Message: ----------- mingw32: add gcc-4.4.0 tools build script, add gcc-4.4.0 atlas build script, add gcc-4.4.0 cpufeature build script Added Paths: ----------- trunk/octave-forge/admin/Windows/mingw32/tools/atlas/build-3.8.2-4.sh trunk/octave-forge/admin/Windows/mingw32/tools/atlas/makefile-4.in trunk/octave-forge/admin/Windows/mingw32/tools/build-4.sh trunk/octave-forge/admin/Windows/mingw32/tools/cpufeature/build-1.0.0-4.sh Added: trunk/octave-forge/admin/Windows/mingw32/tools/atlas/build-3.8.2-4.sh =================================================================== --- trunk/octave-forge/admin/Windows/mingw32/tools/atlas/build-3.8.2-4.sh (rev 0) +++ trunk/octave-forge/admin/Windows/mingw32/tools/atlas/build-3.8.2-4.sh 2009-10-26 10:14:49 UTC (rev 6387) @@ -0,0 +1,130 @@ +#! /usr/bin/sh + +# Name of package +PKG=atlas +# Version of Package +VER=3.8.2 +# Release of (this patched) package +REL=4 +# Name&Version of Package +PKGVER=${PKG}-${VER} +# Full name of this patched Package +FULLPKG=${PKGVER}-${REL} + +# Name of source file +SRCFILE=${PKG}${VER}.tar.bz2 +# Name of Patch file +PATCHFILE=${FULLPKG}.patch + +# URL(s) of source code file(s) +URL="http://downloads.sourceforge.net/math-atlas/atlas3.8.2.tar.bz2" + +# Top dir of this building process (i.e. where the patch file and source file(s) reside) +TOPDIR=`pwd` +# Directory source code is extraced to (relative to TOPDIR) +SRCDIR=${PKGVER} +# Directory original source code is extracted to (for generating diffs) (relative to TOPDIR) +SRCDIR_ORIG=${SRCDIR}-orig + +# Make file to use (optional) +MAKEFILE= +# Any extra flags to pass make to +MAKE_XTRA= + +# subdirectory to install heraders to (empty for default) +INCLUDE_DIR= + +# Herader files to install +HEADERS_INSTALL="" + +# pkg-config .pc files to install +PKG_CONFIG_INSTALL="" + +# Additional DIFF Flags for generating diff file +DIFF_FLAGS= + +# load common functions +source ../../gcc44_common.sh +source ../../gcc44_pkg_version.sh + +# Directory the lib is built in (set this *after* loading gcc44_common.sh) +BUILDDIR=".build_${BUILD_TARGET}_${FULLPKG}_gcc${GCC_VERSION}${GCC_SYSTEM}" + +# == override resp. specify build actions == + +MSG="Building ATLAS libraries must be done using CYGWIN!"; + +DIRS=`ls -1 | sed -ne "/^ARCH_\([A-Za-z0-9]\+\)_atlas-${VER}_gcc-4./p"` +ARCHS=`ls -1 | sed -ne "s/^\(ARCH_[A-Za-z0-9]\+\)_atlas-${VER}_gcc-4./\1/p"` + +unpack() { echo $MSG; } + +unpack_orig() { echo $MSG; } + +mkdirs() { echo $MSG; } + +conf() { echo $MSG; } + +build() +{ + LDFLAGS+=" -Wl,-s" + + for a in $DIRS; do + BDIR=${BUILDDIR}_$a + echo "Entering directory $BDIR ..." + mkdir -pv $BDIR + sed \ + -e "s+@SRCDIR@+${TOPDIR}/$a+" \ + -e "s+@TOPDIR@+${TOPDIR}+" \ + -e "s+@GCC_VER@+${GCC_VERSION}+" \ + -e "s+@GCC_SYS@+${GCC_SYSTEM}+" \ + -e "s+@REL@+${REL}+" \ + ${TOPDIR}/makefile-4.in > "${BDIR}/makefile" + make_common -C $BDIR shlibs + done +} + +install() { echo; } + +install_pkg() +{ + echo "Installing libraries for the following architectures:" + echo $ARCHS + + for a in $DIRS; do + ARCH=`echo $a | sed -e "s/\(ARCH_[a-zA-Z0-9]\+\).*/\1/"` + + BDIR=${BUILDDIR}_$a + TDBIN=${PACKAGE_ROOT}/ATLAS/${ARCH}/${SHAREDLIB_DEFAULT} + TDLIB=${PACKAGE_ROOT}/ATLAS/${ARCH}/${LIBRARY_DEFAULT} + TDSLB=${PACKAGE_ROOT}/ATLAS/${ARCH}/${STATICLIBRARY_DEFAULT} + mkdir -vp $TDBIN + mkdir -vp $TDLIB + mkdir -vp $TDSLB + cp ${CP_FLAGS} ${BDIR}/lapack.dll $TDBIN + cp ${CP_FLAGS} ${BDIR}/atlas.dll $TDBIN + cp ${CP_FLAGS} ${BDIR}/blas.dll $TDBIN + cp ${CP_FLAGS} ${BDIR}/cblas.dll $TDBIN + + cp ${CP_FLAGS} ${BDIR}/liblapack.dll.a $TDLIB + cp ${CP_FLAGS} ${BDIR}/libatlas.dll.a $TDLIB + cp ${CP_FLAGS} ${BDIR}/libblas.dll.a $TDLIB + cp ${CP_FLAGS} ${BDIR}/libcblas.dll.a $TDLIB + + cp ${CP_FLAGS} ${BDIR}/liblapack.a $TDSLB + cp ${CP_FLAGS} ${a}/libatlas.a $TDSLB + cp ${CP_FLAGS} ${a}/libf77blas.a $TDSLB + cp ${CP_FLAGS} ${a}/libcblas.a $TDSLB + + #"${SEVENZIP}" $SEVENZIP_FLAGS ATLAS-${VER}-${REL}_$a.7z $TDBIN $TDLIB $TDSLB + + done +} + + +all() { + build + install_pkg +} + +main $* Added: trunk/octave-forge/admin/Windows/mingw32/tools/atlas/makefile-4.in =================================================================== --- trunk/octave-forge/admin/Windows/mingw32/tools/atlas/makefile-4.in (rev 0) +++ trunk/octave-forge/admin/Windows/mingw32/tools/atlas/makefile-4.in 2009-10-26 10:14:49 UTC (rev 6387) @@ -0,0 +1,70 @@ + + + + +SRCDIR=@SRCDIR@ +TOPDIR=@TOPDIR@ +REL=@REL@ +GCC_VER=@GCC_VER@ +GCC_SYS=@GCC_SYS@ + + +BLASBUILDDIR=.build_mingw32_blas-${REL}_gcc${GCC_VER}${GCC_SYS} +CBLASBUILDDIR=.build_mingw32_cblas-${REL}_gcc${GCC_VER}${GCC_SYS} +LAPACKBUILDDIR=.build_mingw32_lapack-lite-3.1.1-${REL}_gcc${GCC_VER}${GCC_SYS} + +BLASDEF=${TOPDIR}/../../blas/${BLASBUILDDIR}/blas.def +CBLASDEF=${TOPDIR}/../../cblas/${CBLASBUILDDIR}/lib/libcblas.def +LAPACKDEF=${TOPDIR}/../../lapack/${LAPACKBUILDDIR}/liblapack.def + +SHLIBEXT=.dll + +all : shlibs + +shlibs : atlas blas cblas lapack + +atlas : atlas.dll +blas : libblas.def blas.dll +cblas : libcblas.def cblas.dll +lapack : liblapack.def lapack.dll + +libblas.def : ${BLASDEF} +libcblas.def : ${CBLASDEF} +liblapack.def : ${LAPACKDEF} + +libblas.def libcblas.def liblapack.def : + cp -av $< $@ + +atlas.dll : $(SRCDIR)/libatlas.a + $(F77) $(LDFLAGS) -shared -o $@ \ + -Wl,--out-implib=libatlas.dll.a \ + -Wl,--whole-archive $< \ + -Wl,--output-def=libatlas_out.def \ + -Wl,--no-whole-archive + +blas.dll : $(SRCDIR)/libf77blas.a atlas.dll + $(F77) $(LDFLAGS) -shared -o $@ libblas.def \ + -Wl,--out-implib=libblas.dll.a \ + -Wl,--whole-archive $< \ + -Wl,--output-def=libblas_out.def \ + -Wl,--no-whole-archive libatlas.dll.a + +cblas.dll : $(SRCDIR)/libcblas.a atlas.dll + $(F77) $(LDFLAGS) -shared -o $@ libcblas.def \ + -Wl,--out-implib=libcblas.dll.a \ + -Wl,--whole-archive $< \ + -Wl,--output-def=libcblas_out.def \ + -Wl,--no-whole-archive libatlas.dll.a + +lapack.dll : liblapack.a blas.dll cblas.dll atlas.dll + $(F77) $(LDFLAGS) -shared -o $@ liblapack.def \ + -Wl,--out-implib=liblapack.dll.a \ + -Wl,--whole-archive $< \ + -Wl,--output-def=liblapack_out.def \ + -Wl,--no-whole-archive libblas.dll.a libcblas.dll.a libatlas.dll.a + + +liblapack.a : $(SRCDIR)/liblapack.a $(SRCDIR)/libf77blas.a + cp -av $(SRCDIR)/liblapack.a . + mkdir tmp && cd tmp && ar x $(SRCDIR)/libf77blas.a lsame.o && ar r ../liblapack.a lsame.o + rm -rf tmp Added: trunk/octave-forge/admin/Windows/mingw32/tools/build-4.sh =================================================================== --- trunk/octave-forge/admin/Windows/mingw32/tools/build-4.sh (rev 0) +++ trunk/octave-forge/admin/Windows/mingw32/tools/build-4.sh 2009-10-26 10:14:49 UTC (rev 6387) @@ -0,0 +1,22 @@ +#!/usr/bin/sh + +if [ -z "$1" ]; then ACTION=all; else ACTION="$*"; fi +echo $0: ACTION = "${ACTION}"; + +# install GCC 4.3.0-2 +( cd gcc-4.4.0 && ./build-4.4.0-4.sh ${ACTION} ) + +# install MSYS 1.0.11 +( cd msys && ./build-1.0.11-4.sh ${ACTION} ) + +# install Notepad++ +( cd notepad++ && ./build-5.5.1-4.sh ${ACTION} ) + +# install gnuplot +( cd gnuplot && ./build-4.3.0-2009-07-08-4.sh ${ACTION} ) + +# install ATLAS +( cd atlas && ./build-3.8.2-4.sh ${ACTION} ) + +# install CPUFEATURE +( cd cpufeature && ./build-1.0.0-4.sh ${ACTION} ) Added: trunk/octave-forge/admin/Windows/mingw32/tools/cpufeature/build-1.0.0-4.sh =================================================================== --- trunk/octave-forge/admin/Windows/mingw32/tools/cpufeature/build-1.0.0-4.sh (rev 0) +++ trunk/octave-forge/admin/Windows/mingw32/tools/cpufeature/build-1.0.0-4.sh 2009-10-26 10:14:49 UTC (rev 6387) @@ -0,0 +1,120 @@ +#! /usr/bin/sh + +# Name of package +PKG=cpufeature +# Version of Package +VER=1.0.0 +# Release of (this patched) package +REL=4 +# Name&Version of Package +PKGVER=${PKG}-${VER} +# Full name of this patched Package +FULLPKG=${PKGVER}-${REL} + +# Name of source file(s) +SRCFILE=${PKGVER}.tar.bz2 +# Name of Patch file +PATCHFILE=${FULLPKG}.patch + +# URL(s) of source code file(s) +URL="" + +# Top dir of this building process (i.e. where the patch file and source file(s) reside) +TOPDIR=`pwd` +# Directory source code is extraced to (relative to TOPDIR) +SRCDIR=${PKGVER} +# Directory original source code is extracted to (for generating diffs) (relative to TOPDIR) +SRCDIR_ORIG=${SRCDIR}-orig + +# Make file to use (optional) +MAKEFILE= +# Any extra flags to pass make to +MAKE_XTRA= + +# subdirectory to install heraders to (empty for default) +INCLUDE_DIR= + +# Herader files to install +HEADERS_INSTALL="" + +# pkg-config .pc files to install +PKG_CONFIG_INSTALL="" + +# Additional DIFF Flags for generating diff file +DIFF_FLAGS= + +# load common functions +source ../../gcc44_common.sh +source ../../gcc44_pkg_version.sh + +# Directory the lib is built in (set this *after* loading gcc44_common.sh) +BUILDDIR=".build_${BUILD_TARGET}_${FULLPKG}_gcc${GCC_VERSION}${GCC_SYSTEM}" + +# == override resp. specify build actions == + +conf() +{ + conf_pre; + substvars ${SRCDIR}/makefile.in ${BUILDDIR}/makefile + conf_post; +} + +install() +{ + echo not required +} + +install_pkg() +{ + install_pre + cp -uvp ${BUILDDIR}/cpufeature.exe ${PACKAGE_ROOT}/bin + install_post +} + +uninstall() +{ + uninstall_pre; + + # Install library, import library and static library + ${RM} ${RM_FLAGS} ${PACKAGE_ROOT}/bin/cpufeature.exe + #${RM} ${RM_FLAGS} ${SHAREDLIB_PATH}/zlib1.dll + #${RM} ${RM_FLAGS} ${LIBRARY_PATH}/libz.dll.a + #${RM} ${RM_FLAGS} ${STATICLIB_PATH}/libz.a + + # Uninstall headers + for a in $HEADERS_INSTALL; do + ${RM} ${RM_FLAGS} ${INCLUDE_PATH}/$a + done + + # Uninstall pkg-config .pc files + for a in $PKG_CONFIG_INSTALL; do + ${RM} ${RM_FLAGS} ${PKGCONFIGDATA_PATH}/$a + done + + # Uninstall license file + ${RM} ${RM_FLAGS} ${LICENSE_PATH}/${PKG}/README + + uninstall_post; +} + +check() +{ + check_pre; + + ( cd ${BUILDDIR} && make -f ${MAKEFILE} test ) + ( cd ${BUILDDIR} && make -f ${MAKEFILE} testdll ) + + check_post; +} + +all() { + #download + #unpack + #applypatch + mkdirs + conf + build + install +} + +main $* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |