From 18f426c62a55555033ed25ae1b0037638b18553f Mon Sep 17 00:00:00 2001 From: darco Date: Fri, 8 Apr 2005 03:24:10 +0000 Subject: [PATCH] more updates git-svn-id: http://svn.voria.com/code@13 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/Makefile.am | 20 ++++++-- synfig-core/trunk/bootstrap | 16 +++++- synfig-core/trunk/config/build.cfg | 2 +- synfig-core/trunk/config/configure.ac | 21 +++++++- synfig-core/trunk/config/ltmain.patch | 17 +++++++ synfig-core/trunk/macosxbuild.sh | 28 +++++++++++ .../pkg-info/macosx/core-resources/ReadMe.txt | 1 + .../pkg-info/macosx/core-resources/Welcome.txt | 1 + .../pkg-info/macosx/core-resources/install.sh | 58 ++++++++++++++++++++++ .../trunk/pkg-info/macosx/synfig-core.info.in | 14 ++++++ .../trunk/src/modules/mod_geometry/Makefile.am | 4 ++ 11 files changed, 175 insertions(+), 7 deletions(-) create mode 100644 synfig-core/trunk/config/ltmain.patch create mode 100755 synfig-core/trunk/macosxbuild.sh create mode 100644 synfig-core/trunk/pkg-info/macosx/core-resources/ReadMe.txt create mode 100644 synfig-core/trunk/pkg-info/macosx/core-resources/Welcome.txt create mode 100755 synfig-core/trunk/pkg-info/macosx/core-resources/install.sh create mode 100644 synfig-core/trunk/pkg-info/macosx/synfig-core.info.in diff --git a/synfig-core/trunk/Makefile.am b/synfig-core/trunk/Makefile.am index 88d653f..2346db2 100644 --- a/synfig-core/trunk/Makefile.am +++ b/synfig-core/trunk/Makefile.am @@ -3,7 +3,7 @@ #AUTOMAKE_OPTIONS=dist-zip dist-shar dist-bzip2 AUTOMAKE_OPTIONS=dist-zip dist-shar -MAINTAINERCLEANFILES=config/config.guess config/config.sub config/ltmain.sh config/install-sh config/mkinstalldirs config/aclocal.m4 config/missing config/texinfo.tex config/depcomp aclocal.m4 config.h.in configure stamp-h.in Makefile.in config.log config.status .doc_stamp .DS_Store @PACKAGE_TARNAME@-@VERSION@.spec include/etl_profile.h.in libltdl/COPYING.LIB libltdl/Makefile.in libltdl/acinclude.m4 libltdl/config-h.in libltdl/configure.in libltdl/ltdl.h libltdl/Makefile.am libltdl/README libltdl/aclocal.m4 libltdl/configure libltdl/ltdl.c libltdl/stamp-h.in +MAINTAINERCLEANFILES=config/package config/config.guess config/config.sub config/ltmain.sh config/install-sh config/mkinstalldirs config/aclocal.m4 config/missing config/texinfo.tex config/depcomp aclocal.m4 config.h.in configure stamp-h.in Makefile.in config.log config.status .doc_stamp .DS_Store @PACKAGE_TARNAME@-@VERSION@.spec include/etl_profile.h.in libltdl/COPYING.LIB libltdl/Makefile.in libltdl/acinclude.m4 libltdl/config-h.in libltdl/configure.in libltdl/ltdl.h libltdl/Makefile.am libltdl/README libltdl/aclocal.m4 libltdl/configure libltdl/ltdl.c libltdl/stamp-h.in SUBDIRS=libltdl src @@ -82,9 +82,23 @@ install-bin: win32inst.nsi: $(srcdir)/win32inst.nsi.in ./config.status win32inst.nsi - -installer: all win32inst.nsi + +pkg-info/macosx/synfig-core.info: $(srcdir)/pkg-info/macosx/synfig-core.info.in + ./config.status pkg-info/macosx/synfig-core.info + +RMDIR=rm -fr + +if WIN32_PKG +package: all win32inst.nsi makensis win32inst.nsi +else +if MACOSX_PKG +package: all pkg-info/macosx/synfig-core.info + [ -d pkg_root ] && $(RMDIR) pkg_root || true + make install prefix="`pwd`/pkg_root" + $(srcdir)/config/package pkg_root pkg-info/macosx/synfig-core.info -r $(srcdir)/pkg-info/macosx/core-resources +endif +endif run: check diff --git a/synfig-core/trunk/bootstrap b/synfig-core/trunk/bootstrap index c1d8b51..85fb254 100755 --- a/synfig-core/trunk/bootstrap +++ b/synfig-core/trunk/bootstrap @@ -57,7 +57,7 @@ output Prepairing build environment for $PACKAGE-$VERSION... # Look for the CVS directory. If we don't find it, we need to # ask the user if they know what they are doing. -test -d CVS || +( test -d CVS || test -d .svn ) || { output warning: This shell script is intended for those output warning: who either know what they are doing or @@ -215,8 +215,20 @@ set +x " < libltdl/ltdl.h > $TEMPFILE && cp $TEMPFILE libltdl/ltdl.h ) +( +output Patching libtool... +patch config/ltmain.sh config/ltmain.patch +) || +{ + # Something went wrong... + set +x + output Failure. + cleanup; + exit 1 +} + #echo '#define LTDL_SHLIB_EXT ".so"' >> libltdl/config-h.in -echo ' +#echo ' #ifdef WIN32 #define LTDL_SHLIB_EXT ".dll" #else diff --git a/synfig-core/trunk/config/build.cfg b/synfig-core/trunk/config/build.cfg index 085ad19..a6a7f5c 100644 --- a/synfig-core/trunk/config/build.cfg +++ b/synfig-core/trunk/config/build.cfg @@ -5,7 +5,7 @@ PACKAGE_TARNAME=synfig VERSION_MAJ="0" VERSION_MIN="61" VERSION_REV="00" -VERSION_REL= +VERSION_REL=`svn info | grep Revision | sed "s/.* \([0123456789]*\)/\1/"` [ -d CVS ] && VERSION_REL="CVS" diff --git a/synfig-core/trunk/config/configure.ac b/synfig-core/trunk/config/configure.ac index 1120a9e..f683639 100644 --- a/synfig-core/trunk/config/configure.ac +++ b/synfig-core/trunk/config/configure.ac @@ -359,7 +359,7 @@ dnl ]) -MODULE_DIR=$libdir/sinfg/modules +MODULE_DIR='${libdir}/sinfg/modules' moduledir=$libdir/sinfg/modules AC_SUBST(MODULE_DIR) SINFGLIB_DIR=$libdir/sinfg @@ -373,6 +373,24 @@ CXXFLAGS="$CXXFLAGS -fpermissive" AC_CHECK_HEADERS(signal.h termios.h) + +case "$host" in + *mingw* | *cygwin*) + AM_CONDITIONAL(WIN32_PKG, true) + AM_CONDITIONAL(MACOSX_PKG, false) + ;; + *darwin*) + AM_CONDITIONAL(WIN32_PKG, false) + AM_CONDITIONAL(MACOSX_PKG, true) + ;; + *) + AM_CONDITIONAL(WIN32_PKG, false) + AM_CONDITIONAL(MACOSX_PKG, false) + ;; +esac + + + # -- H E A D E R S -------------------------------------------- # -- T Y P E S & S T R U C T S -------------------------------- @@ -498,6 +516,7 @@ src/modules/mod_particle/Makefile src/tool/Makefile src/modules/sinfg_modules.cfg win32inst.nsi +pkg-info/macosx/synfig-core.info dnl src/modules/trgt_mpg/Makefile dnl src/modules/mptr_mplayer/Makefile ) diff --git a/synfig-core/trunk/config/ltmain.patch b/synfig-core/trunk/config/ltmain.patch new file mode 100644 index 0000000..9d51a5c --- /dev/null +++ b/synfig-core/trunk/config/ltmain.patch @@ -0,0 +1,17 @@ +--- ltmain.bak Thu Apr 7 19:12:55 2005 ++++ ltmain.sh Thu Apr 7 19:20:28 2005 +@@ -5362,10 +5362,10 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- if test "$inst_prefix_dir" = "$destdir"; then +- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 +- exit 1 +- fi ++# if test "$inst_prefix_dir" = "$destdir"; then ++# $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 ++# exit 1 ++# fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. diff --git a/synfig-core/trunk/macosxbuild.sh b/synfig-core/trunk/macosxbuild.sh new file mode 100755 index 0000000..fd50599 --- /dev/null +++ b/synfig-core/trunk/macosxbuild.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#OPTIONS="--disable-optimization --enable-debug" + +OPTIONS="" +#OPTIONS="$OPTIONS --enable-timelimit=120" +OPTIONS="$OPTIONS --enable-optimization=2" +OPTIONS="$OPTIONS --enable-optimization=3 --enable-g5opt" +#OPTIONS="$OPTIONS --disable-optimization" +OPTIONS="$OPTIONS --disable-debug" + +BUILDDIR=macosxbuild + +[ -e configure ] || ./bootstrap || exit 1 + +# [ -d $BUILDDIR ] && rm -fr $BUILDDIR + +mkdir $BUILDDIR + +cd $BUILDDIR + +../configure $OPTIONS || exit 1 + +make package + +#make installer + + diff --git a/synfig-core/trunk/pkg-info/macosx/core-resources/ReadMe.txt b/synfig-core/trunk/pkg-info/macosx/core-resources/ReadMe.txt new file mode 100644 index 0000000..cdb5c31 --- /dev/null +++ b/synfig-core/trunk/pkg-info/macosx/core-resources/ReadMe.txt @@ -0,0 +1 @@ +This is the readme for Synfig Core. diff --git a/synfig-core/trunk/pkg-info/macosx/core-resources/Welcome.txt b/synfig-core/trunk/pkg-info/macosx/core-resources/Welcome.txt new file mode 100644 index 0000000..3662015 --- /dev/null +++ b/synfig-core/trunk/pkg-info/macosx/core-resources/Welcome.txt @@ -0,0 +1 @@ +This is the welcome for Sinfg. diff --git a/synfig-core/trunk/pkg-info/macosx/core-resources/install.sh b/synfig-core/trunk/pkg-info/macosx/core-resources/install.sh new file mode 100755 index 0000000..60f8537 --- /dev/null +++ b/synfig-core/trunk/pkg-info/macosx/core-resources/install.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# finish up the installation +# this script should be executed using the sudo command +# this file is copied to sinfg-devel.post_install and sinfg-devel.post_upgrade +# inside the .pkg bundle +LOGFILE="/sinfg_install.log" + +exit 0 + + +umask 022 + +RESOURCE_DIR=`dirname $0` +PREFIX=/usr/local + +cd $RESOURCE_DIR + +echo "Creating sinfg-config script" +[ -d $PREFIX ] || mkdir $PREFIX +[ -d $PREFIX/bin ] || mkdir $PREFIX/bin +[ -d $PREFIX/include ] || mkdir $PREFIX/include +[ -d $PREFIX/lib ] || mkdir $PREFIX/lib +[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin + +echo "Cleaning up any previous installation" +[ -d $PREFIX/include/sinfg ] && rm -fr $PREFIX/include/sinfg +ln -s /Library/Frameworks/sinfg.framework/Headers $PREFIX/include/sinfg + +sed ' +s:@exec_prefix@:/usr/local:g; +s:@prefix@:/usr/local:g; +s:@bindir@:$exec_prefix/bin:g; +s:@libdir@:$exec_prefix/lib:g; +s:@includedir@:$prefix/include:g; +s:@VERSION@:@_VERSION_@:g; +s:@PACKAGE@:@_PACKAGE_@:g; +s:@LIBS@::g; +s:@VERSION@:@_VERSION_@:; +s:@PACKAGE@:@_PACKAGE_@:; +s:@CONFIG_LIBS@:-F/Library/Frameworks/sinfg.framework:; +s:@SINFG_LIBS@:-F/Library/Frameworks/sinfg.framework:; +s:@CONFIG_CFLAGS@:-framework sinfg:; +' < $RESOURCE_DIR/sinfg-config.in > $PREFIX/bin/sinfg-config +chmod 775 $PREFIX/bin/sinfg-config + +echo "Precompiling Headers" +#/usr/bin/c++ -precomp /Library/Frameworks/sinfg.framework/Headers/sinfg.h -o /Library/Frameworks/sinfg.framework/Headers/sinfg.p + +echo "Moving sinfg tool" +cp $RESOURCE_DIR/sinfg $PREFIX/bin || exit 1 + +echo "Done with shell script" + + +exit 0 + + + diff --git a/synfig-core/trunk/pkg-info/macosx/synfig-core.info.in b/synfig-core/trunk/pkg-info/macosx/synfig-core.info.in new file mode 100644 index 0000000..7dc1a3b --- /dev/null +++ b/synfig-core/trunk/pkg-info/macosx/synfig-core.info.in @@ -0,0 +1,14 @@ +Title @PACKAGE_NAME@ @VERSION@ +Version @VERSION@ +Description @PACKAGE_NAME@ +DefaultLocation /usr/local +DeleteWarning +NeedsAuthorization YES +DisableStop NO +UseUserMask YES +Application NO +Relocatable NO +Required NO +InstallOnly NO +RequiresReboot NO +InstallFat NO diff --git a/synfig-core/trunk/src/modules/mod_geometry/Makefile.am b/synfig-core/trunk/src/modules/mod_geometry/Makefile.am index cea6843..e3cbcfc 100644 --- a/synfig-core/trunk/src/modules/mod_geometry/Makefile.am +++ b/synfig-core/trunk/src/modules/mod_geometry/Makefile.am @@ -4,6 +4,10 @@ MAINTAINERCLEANFILES=Makefile.in INCLUDES = -I$(top_srcdir)/src +# GCC on MacOS X does not take kindly to the -ffastmath optimization +# in this module for some reason. +CXXFLAGS=`echo @CXXFLAGS@ | sed s/-ffast-math//g` + moduledir=@MODULE_DIR@ module_LTLIBRARIES = libmod_geometry.la -- 2.7.4