changeset 5708:963c46140540 octave-forge

add CLN and ginac build scripts and patches, add them as dependencies to gcc43_build_deps.sh
author lindnerb
date Fri, 05 Jun 2009 20:42:12 +0000
parents 34bda0ace182
children 70bfdf3f0ccc
files admin/Windows/mingw32/CLN/CLN-1.2.2-3.patch admin/Windows/mingw32/CLN/build-1.2.2-3.sh admin/Windows/mingw32/gcc43_build_deps.sh admin/Windows/mingw32/ginac/build-1.5.1-3.sh admin/Windows/mingw32/ginac/ginac-1.5.1-3.patch
diffstat 5 files changed, 413 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/mingw32/CLN/CLN-1.2.2-3.patch	Fri Jun 05 20:42:12 2009 +0000
@@ -0,0 +1,66 @@
+diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' CLN-1.2.2-orig/benchmarks/Makefile.in CLN-1.2.2/benchmarks/Makefile.in
+--- CLN-1.2.2-orig/benchmarks/Makefile.in	2007-01-17 21:34:35 +0100
++++ CLN-1.2.2/benchmarks/Makefile.in	2009-06-05 10:43:43 +0200
+@@ -89,7 +89,7 @@
+ timebench2ap${EXEEXT} : $(patsubst %,%.o,${MODULES_timebench2ap})
+ timebench2b${EXEEXT} : $(patsubst %,%.o,${MODULES_timebench2b})
+ ${PROGRAMS} : %${EXEEXT} : ${LIBDEPS}
+-	${LIBTOOL_LINK} ${CXX} ${CXXFLAGS} ${TARGET_ARCH} $(patsubst %,%.o,$(MODULES_$(*F))) ${LDFLAGS} ${LIBS} -o $@
++	${LIBTOOL_LINK} ${CXX} ${CXXFLAGS} ${TARGET_ARCH} $(patsubst %,%.o,$(MODULES_$(*F))) ${LDFLAGS} ${LIBS} ${CXXLIBS} -o $@
+ 
+ 
+ install : all
+diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' CLN-1.2.2-orig/examples/Makefile.in CLN-1.2.2/examples/Makefile.in
+--- CLN-1.2.2-orig/examples/Makefile.in	2006-09-06 22:09:08 +0200
++++ CLN-1.2.2/examples/Makefile.in	2009-06-05 11:06:48 +0200
+@@ -91,7 +91,7 @@
+ perfnum${EXEEXT} : $(patsubst %,%.o,${MODULES_perfnum})
+ pi${EXEEXT} : $(patsubst %,%.o,${MODULES_pi})
+ ${PROGRAMS} : %${EXEEXT} : ${LIBDEPS}
+-	${LIBTOOL_LINK} ${CXX} ${CXXFLAGS} ${TARGET_ARCH} $(patsubst %,%.o,$(MODULES_$(*F))) ${LDFLAGS} ${LIBS} -o $@
++	${LIBTOOL_LINK} ${CXX} ${CXXFLAGS} ${TARGET_ARCH} $(patsubst %,%.o,$(MODULES_$(*F))) ${LDFLAGS} ${LIBS} ${CXXLIBS} -o $@
+ 
+ 
+ install : all
+diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' CLN-1.2.2-orig/src/Makefile.in CLN-1.2.2/src/Makefile.in
+--- CLN-1.2.2-orig/src/Makefile.in	2008-03-24 12:01:35 +0100
++++ CLN-1.2.2/src/Makefile.in	2009-06-05 12:52:42 +0200
+@@ -131,7 +131,7 @@
+ ALLASMFILES_LO := $(patsubst %.cc,%.lo,${ALLASMFILES_CC})
+ ALLOBJECTS_LO = ${ALLFILES_LO} ${ALLASMFILES_LO}
+ 
+-_all_ : allo-local ${SUBDIRS_TARGET_ALL} libcln.la
++_all_ : allo-local ${SUBDIRS_TARGET_ALL} libcln.la cln.dll
+ else
+ _all_ : allo-local ${SUBDIRS_TARGET_ALL}
+ endif
+@@ -237,6 +237,17 @@
+ 	echo ${ALLOBJECTS_LO} | tr ' ' '\n' > libcln.objectlist
+ 	${LIBTOOL_LINK} ${CXX} -o libcln.la -rpath ${libdir} -version-info ${CL_CURRENT}:${CL_REVISION}:${CL_AGE} ${LDFLAGS} ${LIBS} -objectlist libcln.objectlist
+ 
++cln.dll : .libs/libcln.a
++	$(CXX) -shared -o $@ \
++	$(LDFLAGS) \
++	-Wl,--out-implib=libcln.dll.a \
++	-Wl,--output-def=libcln.def \
++	-Wl,--whole-archive $< \
++	-Wl,--exclude-libs=libstdc++_s.a \
++	-Wl,--no-whole-archive \
++	$(CXXLIBS) \
++	$(LIBS)
++
+ install : all force
+ 	${MKDIR} ${DESTDIR}${libdir}
+ 	${LIBTOOL_INSTALL} ${INSTALL_PROGRAM} libcln.la ${DESTDIR}${libdir}/libcln.la
+diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' CLN-1.2.2-orig/tests/Makefile.in CLN-1.2.2/tests/Makefile.in
+--- CLN-1.2.2-orig/tests/Makefile.in	2006-10-11 21:08:32 +0200
++++ CLN-1.2.2/tests/Makefile.in	2009-06-04 21:03:54 +0200
+@@ -162,7 +162,7 @@
+ timesqrtmodp${EXEEXT} : $(patsubst %,%.o,$(MODULES_timesqrtmodp))
+ main${EXEEXT} : $(patsubst %,%.o,$(MODULES_main))
+ ${PROGRAMS} : %${EXEEXT} : ${LIBDEPS}
+-	${LIBTOOL_LINK} ${CXX} ${CXXFLAGS} ${TARGET_ARCH} $(patsubst %,%.o,$(MODULES_$(*F))) ${LDFLAGS} ${LIBS} -o $@
++	${LIBTOOL_LINK} ${CXX} ${CXXFLAGS} ${TARGET_ARCH} $(patsubst %,%.o,$(MODULES_$(*F))) ${LDFLAGS} ${LIBS} ${CXXLIBS} -o $@
+ 
+ 
+ install : all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/mingw32/CLN/build-1.2.2-3.sh	Fri Jun 05 20:42:12 2009 +0000
@@ -0,0 +1,144 @@
+#! /usr/bin/sh
+
+# Name of package
+PKG=CLN
+# Version of Package
+VER=1.2.2
+# Release of (this patched) package
+REL=3
+# Name&Version of Package
+PKGVER=${PKG}-${VER}
+# Full name of this patched Package
+FULLPKG=${PKGVER}-${REL}
+
+# Name of source file
+SRCFILE=${PKGVER}.tar.bz2
+TAR_TYPE=j
+# Name of Patch file
+PATCHFILE=${FULLPKG}.patch
+
+# URL of source code file
+URL="http://www.ginac.de/CLN/cln-1.2.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 extracted 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
+MAKEFILE=""
+
+# Additional DIFF Flags for generating diff file
+#DIFF_FLAGS="-x *.def"
+
+# header files to be installed
+INSTALL_HEADERS=""
+INCLUDE_DIR=include/cln
+
+source ../gcc43_common.sh
+
+# Directory the lib is built in
+BUILDDIR=".build_mingw32_${VER}-${REL}_gcc${GCC_VER}${GCC_SYS}"
+
+# disable built-in rules, since make fails when restarting an 
+# interrupted build process trying to call "m2c", and the same
+# when doing make check ??
+MAKE_FLAGS="-r"
+
+# == make check ==
+#
+#  Test passed, 05-jun-2009
+#
+
+mkdirs_post()
+{
+   # configure fails if this directory is non-existent, since
+   # it tries to move two include files there...
+   mkdir -pv ${BUILDDIR}/include/cln
+}
+   
+conf()
+{
+   # add -DNO_ASM to CPPFLAGS since otherwise there are doubly-defined
+   # functions which the linker complains about.
+   # This looks like a bug in the source to me (why are they doubly defined
+   # anyway?) but I don't have the time to track it down.
+   # The INSTALL file recommends to define this anyway...
+
+   ( cd ${BUILDDIR} && ${TOPDIR}/${SRCDIR}/configure \
+     --srcdir=../${SRCDIR} \
+     CC="${CC} $LIBGCCLDFLAGS" \
+     CXX="${CXX} $LIBGCCLDFLAGS" \
+     F77="${F77} $LIBGCCLDFLAGS" \
+     CFLAGS="$CFLAGS ${GCC_ARCH_FLAGS} ${GCC_OPT_FLAGS} -Wall" \
+     CXXFLAGS="$CXXFLAGS ${GCC_ARCH_FLAGS} ${GCC_OPT_FLAGS} -Wall" \
+     CPPFLAGS="$CPPFLAGS -DNO_ASM" \
+     CXXLIBS="$CXXLIBS" \
+     LDFLAGS="${LDFLAGS}" \
+     --prefix="${PREFIX}" \
+     --enable-shared
+   )
+}
+
+build_pre()
+{
+   modify_libtool_all ${BUILDDIR}/libtool
+}
+
+install()
+{
+   install_pre;
+   
+   ${CP} ${CP_FLAGS} ${BUILDDIR}/src/cln.dll ${SHAREDLIB_PATH}
+   ${CP} ${CP_FLAGS} ${BUILDDIR}/src/.libs/libcln.a ${STATICLIBRARY_PATH}
+   ${CP} ${CP_FLAGS} ${BUILDDIR}/src/libcln.dll.a ${LIBRARY_PATH}
+   
+   for a in ${SRCDIR}/include/cln/*.h; do
+      ${CP} ${CP_FLAGS} $a ${INCLUDE_PATH}
+   done
+   
+   for a in ${BUILDDIR}/include/cln/*.h; do
+      ${CP} ${CP_FLAGS} $a ${INCLUDE_PATH}
+   done
+   
+   mkdir -vp ${LICENSE_PATH}/${PKG}
+   ${CP} ${CP_FLAGS} ${SRCDIR}/COPYING ${LICENSE_PATH}/${PKG}
+   
+   ${CP} ${CP_FLAGS} ${BUILDDIR}/cln.pc ${PKGCONFIGDATA_PATH}
+   
+   install_post
+}
+
+uninstall()
+{
+   uninstall_pre;
+
+   ${RM} ${RM_FLAGS} ${SHAREDLIB_PATH}/cln.dll
+   ${RM} ${RM_FLAGS} ${STATICLIBRARY_PATH}/libcln.a
+   ${RM} ${RM_FLAGS} ${LIBRARY_PATH}/libcln.dll.a
+   
+   for a in ${INCLUDE_PATH}/*.h; do
+      ${RM} ${RM_FLAGS} $a
+   done
+   
+   ${RM} ${RM_FLAGS} ${LICENSE_PATH}/${PKG}/COPYING
+   
+   ${RM} ${RM_FLAGS} ${PKGCONFIGDATA_PATH}/cln.pc
+   
+   uninstall_post;
+}
+
+all()
+{
+   download
+   unpack
+   applypatch
+   mkdirs
+   conf
+   build
+   install
+}
+
+main $*
--- a/admin/Windows/mingw32/gcc43_build_deps.sh	Fri Jun 05 20:36:01 2009 +0000
+++ b/admin/Windows/mingw32/gcc43_build_deps.sh	Fri Jun 05 20:42:12 2009 +0000
@@ -63,6 +63,8 @@
 VER_FLTK=1.1.9-3
 
 VER_NETCDF=4.0-3
+VER_CLN=1.2.2-3
+VER_GINAC=1.5.1-3
 
 # Mind the dependency of libraries:
 # CBLAS depends on BLAS
@@ -80,6 +82,7 @@
 # PCRE checks for BZIP2 and READLINE
 # WMF depends on FREETYPE and ZLIB
 # IMAGEMAGICK depends on BZIP, ZLIB, WMF, JPEG, PNG, FREETYPE
+# GINAC depends on CLN and GMP and uses pkg-config
 
 ( cd zlib && build-${VER_ZLIB}.sh ${ACTION} );
 ( cd bzip2 && build-${VER_BZIP2}.sh ${ACTION} );
@@ -127,3 +130,5 @@
 ( cd fltk && build-${VER_FLTK}.sh ${ACTION} );
 
 ( cd netcdf && build-${VER_NETCDF}.sh ${ACTION} );
+( cd CLN && build-${VER_CLN}.sh ${ACTION} );
+( cd ginac && build-${VER_GINAC}.sh ${ACTION} );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/mingw32/ginac/build-1.5.1-3.sh	Fri Jun 05 20:42:12 2009 +0000
@@ -0,0 +1,133 @@
+#! /usr/bin/sh
+
+# Name of package
+PKG=ginac
+# Version of Package
+VER=1.5.1
+# Release of (this patched) package
+REL=3
+# Name&Version of Package
+PKGVER=${PKG}-${VER}
+# Full name of this patched Package
+FULLPKG=${PKGVER}-${REL}
+
+# Name of source file
+SRCFILE=${PKGVER}.tar.bz2
+TAR_TYPE=j
+# Name of Patch file
+PATCHFILE=${FULLPKG}.patch
+
+# URL of source code file
+URL="ftp://ftpthep.physik.uni-mainz.de/pub/GiNaC/ginac-1.5.1.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 extracted 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
+MAKEFILE=""
+
+# Additional DIFF Flags for generating diff file
+#DIFF_FLAGS="-x *.def"
+
+# header files to be installed
+INSTALL_HEADERS="
+ginac.h add.h archive.h assertion.h basic.h class_info.h \
+clifford.h color.h constant.h container.h ex.h excompiler.h expair.h expairseq.h \
+exprseq.h fail.h factor.h fderivative.h flags.h function.h hash_map.h idx.h indexed.h \
+inifcns.h integral.h lst.h matrix.h mul.h ncmul.h normal.h numeric.h operators.h \
+power.h print.h pseries.h ptr.h registrar.h relational.h structure.h \
+symbol.h symmetry.h tensor.h version.h wildcard.h \
+parser/parser.h \
+parser/parse_context.h"
+INCLUDE_DIR=include/ginac
+
+source ../gcc43_common.sh
+
+# Directory the lib is built in
+BUILDDIR=".build_mingw32_${VER}-${REL}_gcc${GCC_VER}${GCC_SYS}"
+
+# disable built-in rules, since make fails when restarting an 
+# interrupted build process trying to call "m2c", and the same
+# when doing make check ??
+#MAKE_FLAGS="-r"
+
+# == make check ==
+#
+#
+
+conf()
+{
+   ( cd ${BUILDDIR} && ${TOPDIR}/${SRCDIR}/configure \
+     --srcdir=../${SRCDIR} \
+     CC="${CC} $LIBGCCLDFLAGS" \
+     CXX="${CXX} $LIBGCCLDFLAGS" \
+     F77="${F77} $LIBGCCLDFLAGS" \
+     CFLAGS="$CFLAGS ${GCC_ARCH_FLAGS} ${GCC_OPT_FLAGS} -Wall" \
+     CXXFLAGS="$CXXFLAGS ${GCC_ARCH_FLAGS} ${GCC_OPT_FLAGS} -Wall" \
+     CXXLIBS="$CXXLIBS" \
+     LDFLAGS="${LDFLAGS}" \
+     --prefix="${PREFIX}" \
+     --enable-shared
+   )
+}
+
+build_pre()
+{
+   modify_libtool_all ${BUILDDIR}/libtool
+}
+
+install()
+{
+   install_pre;
+   
+   ${CP} ${CP_FLAGS} ${BUILDDIR}/ginac/ginac.dll ${SHAREDLIB_PATH}
+   ${CP} ${CP_FLAGS} ${BUILDDIR}/ginac/.libs/libginac.a ${STATICLIBRARY_PATH}
+   ${CP} ${CP_FLAGS} ${BUILDDIR}/ginac/libginac.dll.a ${LIBRARY_PATH}
+   
+   for a in ${INSTALL_HEADERS}; do
+      ${CP} ${CP_FLAGS} ${SRCDIR}/ginac/$a ${INCLUDE_PATH}
+   done
+   
+   mkdir -vp ${LICENSE_PATH}/${PKG}
+   ${CP} ${CP_FLAGS} ${SRCDIR}/COPYING ${LICENSE_PATH}/${PKG}
+   
+   ${CP} ${CP_FLAGS} ${BUILDDIR}/ginac.pc ${PKGCONFIGDATA_PATH}
+   
+   install_post
+}
+
+uninstall()
+{
+   uninstall_pre;
+
+   ${RM} ${RM_FLAGS} ${SHAREDLIB_PATH}/ginac.dll
+   ${RM} ${RM_FLAGS} ${STATICLIBRARY_PATH}/libginac.a
+   ${RM} ${RM_FLAGS} ${LIBRARY_PATH}/libginac.dll.a
+   
+   for a in ${INSTALL_HEADERS}; do
+      ${RM} ${RM_FLAGS} ${INCLUDE_PATH}/$a
+   done
+   
+   ${RM} ${RM_FLAGS} ${LICENSE_PATH}/${PKG}/COPYING
+   
+   ${RM} ${RM_FLAGS} ${PKGCONFIGDATA_PATH}/ginac.pc
+   
+   uninstall_post;
+}
+
+all()
+{
+   download
+   unpack
+   applypatch
+   mkdirs
+   conf
+   build
+   install
+}
+
+main $*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/mingw32/ginac/ginac-1.5.1-3.patch	Fri Jun 05 20:42:12 2009 +0000
@@ -0,0 +1,65 @@
+diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' ginac-1.5.1-orig/check/Makefile.in ginac-1.5.1/check/Makefile.in
+--- ginac-1.5.1-orig/check/Makefile.in	2009-02-25 15:02:38 +0100
++++ ginac-1.5.1/check/Makefile.in	2009-06-05 14:14:00 +0200
+@@ -745,6 +745,8 @@
+ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+ 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ 
++LIBS+=$(CXXLIBS)
++
+ clean-checkPROGRAMS:
+ 	@list='$(check_PROGRAMS)'; for p in $$list; do \
+ 	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' ginac-1.5.1-orig/ginac/Makefile.in ginac-1.5.1/ginac/Makefile.in
+--- ginac-1.5.1-orig/ginac/Makefile.in	2009-02-25 15:02:39 +0100
++++ ginac-1.5.1/ginac/Makefile.in	2009-06-05 14:01:21 +0200
+@@ -244,7 +244,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-lib_LTLIBRARIES = libginac.la
++lib_LTLIBRARIES = libginac.la ginac.dll
+ libginac_la_SOURCES = add.cpp archive.cpp basic.cpp clifford.cpp color.cpp \
+   constant.cpp ex.cpp excompiler.cpp expair.cpp expairseq.cpp exprseq.cpp \
+   fail.cpp factor.cpp fderivative.cpp function.cpp idx.cpp indexed.cpp inifcns.cpp \
+@@ -395,6 +395,16 @@
+ libginac.la: $(libginac_la_OBJECTS) $(libginac_la_DEPENDENCIES) 
+ 	$(libginac_la_LINK) -rpath $(libdir) $(libginac_la_OBJECTS) $(libginac_la_LIBADD) $(LIBS)
+ 
++ginac.dll : .libs/libginac.a
++	$(CXX) -shared -o $@ \
++	$(LDFLAGS) \
++	-Wl,--out-implib=libginac.dll.a \
++	-Wl,--output-def=libginac.def \
++	-Wl,--whole-archive $< \
++	-Wl,--no-whole-archive \
++	$(CXXLIBS) \
++	$(LIBS)
++
+ mostlyclean-compile:
+ 	-rm -f *.$(OBJEXT)
+ 
+diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' ginac-1.5.1-orig/ginsh/Makefile.in ginac-1.5.1/ginsh/Makefile.in
+--- ginac-1.5.1-orig/ginsh/Makefile.in	2009-02-25 15:02:39 +0100
++++ ginac-1.5.1/ginsh/Makefile.in	2009-06-05 12:48:18 +0200
+@@ -311,7 +311,7 @@
+ 	else :; fi
+ ginsh$(EXEEXT): $(ginsh_OBJECTS) $(ginsh_DEPENDENCIES) 
+ 	@rm -f ginsh$(EXEEXT)
+-	$(CXXLINK) $(ginsh_OBJECTS) $(ginsh_LDADD) $(LIBS)
++	$(CXXLINK) $(ginsh_OBJECTS) $(ginsh_LDADD) $(LIBS) $(CXXLIBS)
+ 
+ mostlyclean-compile:
+ 	-rm -f *.$(OBJEXT)
+diff -urN -x '*.exe' -x '*.dll' -x '*.o' -x '*.a' -x '*.bak' ginac-1.5.1-orig/tools/Makefile.in ginac-1.5.1/tools/Makefile.in
+--- ginac-1.5.1-orig/tools/Makefile.in	2009-02-25 15:02:39 +0100
++++ ginac-1.5.1/tools/Makefile.in	2009-06-05 14:00:37 +0200
+@@ -293,7 +293,7 @@
+ 	done
+ viewgar$(EXEEXT): $(viewgar_OBJECTS) $(viewgar_DEPENDENCIES) 
+ 	@rm -f viewgar$(EXEEXT)
+-	$(CXXLINK) $(viewgar_OBJECTS) $(viewgar_LDADD) $(LIBS)
++	$(CXXLINK) $(viewgar_OBJECTS) $(viewgar_LDADD) $(LIBS) $(CXXLIBS)
+ install-binSCRIPTS: $(bin_SCRIPTS)
+ 	@$(NORMAL_INSTALL)
+ 	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"