From: <lin...@us...> - 2010-06-05 16:38:27
|
Revision: 7403 http://octave.svn.sourceforge.net/octave/?rev=7403&view=rev Author: lindnerb Date: 2010-06-05 16:38:20 +0000 (Sat, 05 Jun 2010) Log Message: ----------- mingw32 (gcc-4.5.0): add libpng, libtiff and libjpeg Modified Paths: -------------- trunk/octave-forge/admin/Windows/mingw32/gcc45_build_deps.sh Added Paths: ----------- trunk/octave-forge/admin/Windows/mingw32/libjpeg/build-8b-5.sh trunk/octave-forge/admin/Windows/mingw32/libpng/build-1.2.43-5.sh trunk/octave-forge/admin/Windows/mingw32/libpng/libpng-1.2.43-5.patch trunk/octave-forge/admin/Windows/mingw32/libtiff/build-3.9.2-5.sh Modified: trunk/octave-forge/admin/Windows/mingw32/gcc45_build_deps.sh =================================================================== --- trunk/octave-forge/admin/Windows/mingw32/gcc45_build_deps.sh 2010-06-05 09:31:27 UTC (rev 7402) +++ trunk/octave-forge/admin/Windows/mingw32/gcc45_build_deps.sh 2010-06-05 16:38:20 UTC (rev 7403) @@ -23,6 +23,10 @@ VER_FFTW3=5.7-$REL VER_PCRE=8.00-$REL +VER_JPEG=8b-$REL +VER_TIFF=3.9.2-$REL +VER_PNG=1.2.43-$REL + # Mind the dependency of libraries: # CBLAS depends on BLAS # LAPACK depends on BLAS @@ -57,4 +61,6 @@ ( cd fftw3 && build-${VER_FFTW3}.sh ${ACTION} ); ( cd pcre && build-${VER_PCRE}.sh ${ACTION} ); - +( cd libjpeg && build-${VER_JPEG}.sh ${ACTION} ); +( cd libtiff && build-${VER_TIFF}.sh ${ACTION} ); +( cd libpng && build-${VER_PNG}.sh ${ACTION} ); Added: trunk/octave-forge/admin/Windows/mingw32/libjpeg/build-8b-5.sh =================================================================== --- trunk/octave-forge/admin/Windows/mingw32/libjpeg/build-8b-5.sh (rev 0) +++ trunk/octave-forge/admin/Windows/mingw32/libjpeg/build-8b-5.sh 2010-06-05 16:38:20 UTC (rev 7403) @@ -0,0 +1,116 @@ +#! /usr/bin/sh + +# Name of package +PKG=jpeg +# Version of Package +VER=8b +# Release of (this patched) package +REL=5 +# Name&Version of Package +PKGVER=${PKG}-${VER} +# Full name of this patched Package +FULLPKG=${PKGVER}-${REL} + +# Name of source file(s) +SRCFILE=jpegsrc.v$VER.tar.gz +# Name of Patch file +PATCHFILE=${FULLPKG}.patch + +# URL(s) of source code file(s) +URL="http://www.ijg.org/files/jpegsrc.v$VER.tar.gz" + +# 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= + +# Header files to install +HEADERS_INSTALL="jpeglib.h jmorecfg.h jerror.h" +HEADERS_BUILD_INSTALL="jconfig.h" + +# install subdirectory below $PREFIX/$INC_DIR (if any) +INCLUDE_SUBDIR= + +# License file(s) to install +LICENSE_INSTALL="README" + +# pkg-config .pc files to install +PKG_CONFIG_INSTALL="" + +# Additional DIFF Flags for generating diff file +DIFF_FLAGS= + +# load common functions +source ../gcc45_common.sh + +# Directory the lib is built in (set this *after* loading gcc45_common.sh) +BUILDDIR=".build_${BUILD_TARGET}_${FULLPKG}_gcc${GCC_VERSION}${GCC_SYSTEM}" + +# == override resp. specify build actions == + +conf_pre() +{ + echo; +} + +conf_post() +{ + modify_libtool_nolibprefix ${BUILDDIR}/libtool +} + +install() +{ + install_pre; + + # Install library, import library and static library + ${CP} ${CP_FLAGS} ${BUILDDIR}/.libs/jpeg-8.dll $PREFIX/$BIN_DIR + ${CP} ${CP_FLAGS} ${BUILDDIR}/.libs/libjpeg.dll.a $PREFIX/$LIB_DIR + ${CP} ${CP_FLAGS} ${BUILDDIR}/.libs/libjpeg.a $PREFIX/$STATICLIB_DIR + + install_common; + install_post; +} + +install_strip() +{ + install + $STRIP $STRIP_FLAGS $PREFIX/$BIN_DIR/jpeg-8.dll +} + +uninstall() +{ + uninstall_pre; + + # Install library, import library and static library + ${RM} ${RM_FLAGS} ${SHAREDLIB_PATH}/jpeg-8.dll + ${RM} ${RM_FLAGS} ${LIBRARY_PATH}/libjpeg.dll.a + ${RM} ${RM_FLAGS} ${STATICLIB_PATH}/libjpeg.a + + uninstall_common; + uninstall_post; +} + +pkg_pre() +{ + # No extra patch required + PATCHFILE="" +} + +all() { + download + unpack + applypatch + mkdirs + conf + build + install +} + +main $* Added: trunk/octave-forge/admin/Windows/mingw32/libpng/build-1.2.43-5.sh =================================================================== --- trunk/octave-forge/admin/Windows/mingw32/libpng/build-1.2.43-5.sh (rev 0) +++ trunk/octave-forge/admin/Windows/mingw32/libpng/build-1.2.43-5.sh 2010-06-05 16:38:20 UTC (rev 7403) @@ -0,0 +1,111 @@ +#! /usr/bin/sh + +# Name of package +PKG=libpng +# Version of Package +VER=1.2.43 +# Release of (this patched) package +REL=5 +# Name&Version of Package +PKGVER=${PKG}-${VER} +# Full name of this patched Package +FULLPKG=${PKGVER}-${REL} + +# Name of source file(s) +SRCFILE=${PKGVER}.tar.xz +# Name of Patch file +PATCHFILE=${FULLPKG}.patch + +# URL(s) of source code file(s) +URL="ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-$VER.tar.xz" + +# 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=makefile.mingw +# Any extra flags to pass make to +MAKE_XTRA= + +# Header files to install +HEADERS_INSTALL="png.h pngconf.h" +HEADERS_BUILD_INSTALL="" + +# install subdirectory below $PREFIX/$INC_DIR (if any) +INCLUDE_SUBDIR= + +# License file(s) to install +LICENSE_INSTALL="LICENSE" + +# pkg-config .pc files to install +PKG_CONFIG_INSTALL="libpng.pc" + +# Additional DIFF Flags for generating diff file +DIFF_FLAGS= + +# load common functions +source ../gcc45_common.sh + +# Directory the lib is built in (set this *after* loading gcc45_common.sh) +BUILDDIR=".build_${BUILD_TARGET}_${FULLPKG}_gcc${GCC_VERSION}${GCC_SYSTEM}" + +# == override resp. specify build actions == + +# Set *after* sourceing gcc45_common.sh, since we require $PREFIX to be set +MAKE_XTRA="prefix=$PREFIX" + +conf() +{ + conf_pre; + substvars ${SRCDIR}/scripts/${MAKEFILE} ${BUILDDIR}/${MAKEFILE} + conf_post; +} + +install() +{ + install_pre; + + # Install library, import library and static library + ${CP} ${CP_FLAGS} ${BUILDDIR}/png12.dll $PREFIX/$BIN_DIR + ${CP} ${CP_FLAGS} ${BUILDDIR}/libpng.dll.a $PREFIX/$LIB_DIR + ${CP} ${CP_FLAGS} ${BUILDDIR}/libpng.a $PREFIX/$STATICLIB_DIR + + install_common; + install_post; +} + +uninstall() +{ + uninstall_pre; + + # Install library, import library and static library + ${RM} ${RM_FLAGS} $PREFIX/$BIN_DIR/png12.dll + ${RM} ${RM_FLAGS} $PREFIX/$LIB_DIR/libpng.dll.a + ${RM} ${RM_FLAGS} $PREFIX/$STATICLIB_DIR/libpng.a + + uninstall_common; + uninstall_post; +} + +check() +{ + check_pre; + ( cd ${BUILDDIR} && make_common test ) + check_post; +} + +all() { + download + unpack + applypatch + mkdirs + conf + build + install +} + +main $* Added: trunk/octave-forge/admin/Windows/mingw32/libpng/libpng-1.2.43-5.patch =================================================================== --- trunk/octave-forge/admin/Windows/mingw32/libpng/libpng-1.2.43-5.patch (rev 0) +++ trunk/octave-forge/admin/Windows/mingw32/libpng/libpng-1.2.43-5.patch 2010-06-05 16:38:20 UTC (rev 7403) @@ -0,0 +1,121 @@ +diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' -x '~' -x .hg -x '*.orig' -x '*.rej' libpng-1.2.43-orig/scripts/libpng.pc.in libpng-1.2.43/scripts/libpng.pc.in +--- libpng-1.2.43-orig/scripts/libpng.pc.in 2010-02-25 12:55:53 +0100 ++++ libpng-1.2.43/scripts/libpng.pc.in 2010-06-05 18:28:25 +0200 +@@ -1,7 +1,7 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ +-includedir=@includedir@/libpng12 ++includedir=@includedir@ + + Name: libpng + Description: Loads and saves PNG files +diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' -x '~' -x .hg -x '*.orig' -x '*.rej' libpng-1.2.43-orig/scripts/makefile.mingw libpng-1.2.43/scripts/makefile.mingw +--- libpng-1.2.43-orig/scripts/makefile.mingw 2010-02-25 12:55:54 +0100 ++++ libpng-1.2.43/scripts/makefile.mingw 2010-06-05 18:28:25 +0200 +@@ -18,6 +18,8 @@ + # the MINGW project) and not under CMD.EXE which does not provide + # "cat" or "sed". + ++SRCDIR=@SRCDIR@ ++ + # This makefile intends to support building outside the src directory + # if desired. When invoking it, specify an argument to SRCDIR on the + # command line that points to the top of the directory where your source +@@ -40,9 +42,9 @@ + + # If you're using a cross-compiler, add the appropriate prefix (e.g., + # "i386-mingw32msvc-") to the following three commands: +-CC=gcc +-AR=ar +-RANLIB=ranlib ++CC?=gcc ++AR?=ar ++RANLIB?=ranlib + + MKDIR_P=/bin/mkdir -pv + +@@ -74,9 +76,9 @@ + # -W -Wall -O $(ALIGN) -funroll-loops \ + # -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 + ### Normal (non-asm) compilation +-CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ +- -W -Wall -O3 $(ALIGN) -funroll-loops -DPNG_NO_MMX_CODE \ +- -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 ++override CFLAGS += \ ++ -Wall -O3 $(ALIGN) -funroll-loops -DPNG_NO_MMX_CODE \ ++ -fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5 + + LIBNAME = libpng12 + PNGMAJ = 0 +@@ -84,16 +86,17 @@ + PNGMIN = 1.2.43 + PNGVER = $(PNGMAJ).$(PNGMIN) + +-SHAREDLIB=libpng$(MINGDLL).dll ++SHAREDLIB=png$(MINGDLL).dll + STATLIB=libpng.a + IMPLIB=libpng.dll.a + SHAREDDEF=libpng.def + LIBS=$(SHAREDLIB) $(STATLIB) + EXE=.exe + +-LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz) +-LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS)) +-LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz ++#LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz) ++#LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS)) ++LDSFLAGS=$(LDFLAGS) ++LDEXTRA=-Wl,--out-implib=$(IMPLIB) -lz + + INCPATH=$(prefix)/include + LIBPATH=$(exec_prefix)/lib +@@ -120,9 +123,8 @@ + + %.o : %.c + $(CC) -c $(CFLAGS) -o $@ $< +-%.pic.o : CFLAGS += -DPNG_BUILD_DLL + %.pic.o : %.c +- $(CC) -c $(CFLAGS) -o $@ $< ++ $(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $< + + all: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config + +@@ -134,15 +136,16 @@ + $(addprefix $(D),$(INCPATH)'\n' $(LIBPATH)'\n' $(BINPATH)'\n' \ + $(MANPATH)'\n' $(MAN3PATH)'\n' $(MAN5PATH)'\n')'\n' + +-libpng.pc: scripts/libpng.pc.in ++libpng.pc: $(SRCDIR)/scripts/libpng.pc.in + @echo -e Making pkg-config file for this libpng installation..'\n' \ + using PREFIX=\"$(prefix)\"'\n' +- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ ++ cat $< | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ +- -e s!@includedir@!$(INCPATH)! \ +- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc ++ -e s!-lpng12!-lpng\ -lz\ -lm! \ ++ -e 's!-L[^ ]\+!!g' \ ++ -e 's!-I[^ ]\+!!g' > libpng.pc + + libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in + @echo -e Making $(LIBNAME) libpng-config file for this libpng \ +@@ -169,13 +172,13 @@ + sed -e 's/\([^;]*\);/;/' > $@ + + $(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF) +- $(CC) $(LDSFLAGS) -o $@ $(OBJSDLL) -L. $(LDEXTRA) ++ $(CC) -shared $(LDSFLAGS) -o $@ $(OBJSDLL) $(SHAREDDEF) -L. $(LDEXTRA) + + pngtest$(EXE): pngtest.pic.o $(SHAREDLIB) +- $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@ ++ $(CC) -WL,-Bdynamic $< $(LDFLAGS) -o $@ -L. -lpng -lz + + pngtest-stat$(EXE): pngtest.o $(STATLIB) +- $(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@ ++ $(CC) -Wl,-Bstatic $< $(LDFLAGS) -o $@ -L. -lpng -L$(prefix)/staticlib -lz + + test: test-static test-shared + Added: trunk/octave-forge/admin/Windows/mingw32/libtiff/build-3.9.2-5.sh =================================================================== --- trunk/octave-forge/admin/Windows/mingw32/libtiff/build-3.9.2-5.sh (rev 0) +++ trunk/octave-forge/admin/Windows/mingw32/libtiff/build-3.9.2-5.sh 2010-06-05 16:38:20 UTC (rev 7403) @@ -0,0 +1,121 @@ +#! /usr/bin/sh + +# Name of package +PKG=tiff +# Version of Package +VER=3.9.2 +# Release of (this patched) package +REL=5 +# Name&Version of Package +PKGVER=${PKG}-${VER} +# Full name of this patched Package +FULLPKG=${PKGVER}-${REL} + +# Name of source file(s) +SRCFILE=${PKGVER}.tar.gz +# Name of Patch file +PATCHFILE=${FULLPKG}.patch + +# URL(s) of source code file(s) +URL="ftp://ftp.remotesensing.org/pub/libtiff/tiff-$VER.tar.gz" + +# 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= + +# Header files to install +HEADERS_INSTALL=" +libtiff/tiff.h +libtiff/tiffvers.h +libtiff/tiffio.h" +HEADERS_BUILD_INSTALL=" +libtiff/tiffconf.h" + +# install subdirectory below $PREFIX/$INC_DIR (if any) +INCLUDE_SUBDIR= + +# License file(s) to install +LICENSE_INSTALL="COPYRIGHT" + +# pkg-config .pc files to install +PKG_CONFIG_INSTALL="" + +# Additional DIFF Flags for generating diff file +DIFF_FLAGS= + +# load common functions +source ../gcc45_common.sh + +# Directory the lib is built in (set this *after* loading gcc45_common.sh) +BUILDDIR=".build_${BUILD_TARGET}_${FULLPKG}_gcc${GCC_VERSION}${GCC_SYSTEM}" + +# == override resp. specify build actions == + +conf_pre() +{ + CONFIGURE_XTRA_ARGS="\ + --disable-cxx" +} + +conf_post() +{ + modify_libtool_nolibprefix ${BUILDDIR}/libtool +} + +install() +{ + install_pre; + + # Install library, import library and static library + ${CP} ${CP_FLAGS} ${BUILDDIR}/libtiff/.libs/tiff-3.dll $PREFIX/$BIN_DIR + ${CP} ${CP_FLAGS} ${BUILDDIR}/libtiff/.libs/libtiff.dll.a $PREFIX/$LIB_DIR + ${CP} ${CP_FLAGS} ${BUILDDIR}/libtiff/.libs/libtiff.a $PREFIX/$STATICLIB_DIR + + install_common; + install_post; +} + +install_strip() +{ + install; + $STRIP $STRIP_FLAGS $PREFIX/$BIN_DIR/tiff-3.dll +} + +uninstall() +{ + uninstall_pre; + + # Install library, import library and static library + ${RM} ${RM_FLAGS} $PREFIX/$BIN_DIR/tiff-3.dll + ${RM} ${RM_FLAGS} $PREFIX/$LIB_DIR/libtiff.dll.a + ${RM} ${RM_FLAGS} $PREFIX/$STATICLIB_DIR/libtiff.a + + uninstall_common; + uninstall_post; +} + +pkg_pre() +{ + # No extra patch required + PATCHFILE="" +} + +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. |