|
From: m s. <mw...@us...> - 2009-01-04 17:18:14
|
Hi all,
I have recently created a script to build Gnuuplot on Windows under the MinGW/Msys environment with PNG, Freetype and GD. I have also used this for Solaris and Linux environments. This is based on a CVS snapshot from about 9 months ago.
Here are the versions of the libraries I used (freetype-2.3.5, gd-2.0.33, libpng-1.2.18, zlib-1.2.3). The build script assumes that these libraries are in .tar.gz files located in the top of the Gnuplot tree. The script will build static libraries just for Gnuplot to use. I often work on older Linux boxes that I can't change and don't have the newer versions of these libraries.
The one thing I had to to was modify the gd.h file to never build a DLL. So I created a copy of gd.h named gd.h.win32 to prevent the DLL.
I put the script in the top level of the Gnuplot tree and run it from there. I simply called it build.sh.
Hope it helps someone,
Mike Sutton
BTW some email readers might mess up the line wrap.
-----------------------
#!/bin/sh
# This is a Bourne shell script
#
# This script builds the required support libraries for using Gnuplot
# with GDLIB with TrueType font support.
#
# MODIFICATIONS:
# 05-Mar-2008 Initially generated... MWS
#----------------------------------------------------------------------
USAGE="`basename $0`: [-sZPFG]
where
-s - skip the unpacking step
-Z - skip building zlib
-P - skip building libpng
-F - skip building freetype
-G - skip building gd
"
# initialize variables
unpack=true
build_zlib=true
build_png=true
build_freetype=true
build_gd=true
# parse command line options
while getopts hsZPFG opt
do
case $opt in
s) unpack=false;;
Z) build_zlib=false;;
P) build_png=false;;
F) build_freetype=false;;
G) build_gd=false;;
h| ?) echo "$USAGE"
exit 1;;
esac
done
shift `expr $OPTIND - 1`
freetype="freetype-2.3.5"
gd="gd-2.0.33"
png="libpng-1.2.18"
zlib="zlib-1.2.3"
unpack_list="$zlib $png $gd $freetype "
curdir=`pwd`
# location for support libraries
gnutmp="support_libs"
buildtmp="ztmp"
ZCAT=gzcat
os=`uname -s`
case "$os" in
Linux) ZCAT=zcat;;
MINGW32*) ZCAT="gunzip -c";;
esac
test -d "$gnutmp" || mkdir "$gnutmp"
test -d "$buildtmp" || mkdir "$buildtmp"
cd "$buildtmp"
$unpack && for name in $unpack_list ; do
if [ ! -d "$name" ] ; then
echo "unpacking $name"
$ZCAT ../${name}.tar.gz | tar -xf - || exit 1
fi
done
prefix="$curdir/$gnutmp"
PATH="$prefix/bin:$PATH"
export PATH
LDFLAGS="-L$prefix/lib"
export LDFLAGS
CPPFLAGS="-I$prefix/include"
export CPPFLAGS
# build zlib
if $build_zlib ; then
cd "$zlib"
echo "Building $zlib"
./configure --prefix="$prefix"
make && make install || exit 1
cd ..
fi
# build linpng
if $build_png ; then
cd "$png"
echo "Building $png"
./configure --prefix="$prefix" --disable-shared
make && make install || exit 1
cd ..
fi
# build freetype
if $build_freetype ; then
cd "$freetype"
echo "Building $freetype"
./configure --prefix="$prefix" --disable-shared
make && make install || exit 1
cd ..
fi
# build gd
if $build_gd ; then
case "$os" in
MINGW32*) cp ../gd.h.win32 $gd/gd.h
esac
cd "$gd"
echo "Building $gd"
./configure --prefix="$prefix" --disable-shared \
--with-png="$prefix" --with-freetype="$prefix"
make && make install || exit 1
cd ..
fi
# build gnuplot
cd ..
echo "Building Gnuplot"
./configure --prefix="$prefix" \
--with-png="$prefix" --with-gd="$prefix"
case "$os" in
MINGW32*) make -C src -f ../config/makefile.mgw2 || exit 1
*) make || exit 1
esac
# building gnuplot with Sun cc instead of gcc
# env PATH="$prefix/bin:$PATH" CC=cc CXX=CC ./configure --prefix="$prefix" --with-png="$prefix" --with-gd="$prefix"
--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com
|
|
From: Tatsuro M. <tma...@ya...> - 2009-01-05 06:08:01
|
Hello To my knowledge, dll problem occurs only on gd for msys+mingw build I have used gd-2.0.36RC1 statilc libraries with -DNONDLL option for cppflags and --disable-shared at ./configure. As the external libraries, I added the #define NONDLL 1 at the very top of gd.h. Further components required can be taken from GnuWin32 and GTK+ tool kit for windows. download GTK+ for windows http://www.gtk.org/download-windows.html GnuWin32 http://gnuwin32.sourceforge.net/ I modifed makefile.mgw, # Do you want some special optimization? # -mpentium means optimise for Pentium processor # -mpentiumpro means optimize for Pentium II and Pro procesors CFLAGS = | V # Do you want some special optimization? # -mpentium means optimise for Pentium processor # -mpentiumpro means optimize for Pentium II and Pro procesors CFLAGS=-I/mingw/include -I/GnuWin32/include -I/WinDevTools/include LDFLAGS=-L/mingw/lib -L/GnuWin32/lib -L/GnuWin32/bin -L/WinDevTools/lib -L/WinDevTools/bin In /WinDevTools, there are GTK+ toolkit and other tools. Msys fstab are set for /mingw, /Gnuwin32, and /WinDevTools. This is also one of the examples. Regards Tatsuro --- m sutton <mw...@us...> wrote: > Hi all, > > I have recently created a script to build Gnuuplot on Windows under the MinGW/Msys environment > with PNG, Freetype and GD. I have also used this for Solaris and Linux environments. This is > based on a CVS snapshot from about 9 months ago. > > > Here are the versions of the libraries I used (freetype-2.3.5, gd-2.0.33, libpng-1.2.18, > zlib-1.2.3). The build script assumes that these libraries are in .tar.gz files located in the > top of the Gnuplot tree. The script will build static libraries just for Gnuplot to use. I > often work on older Linux boxes that I can't change and don't have the newer versions of these > libraries. > > The one thing I had to to was modify the gd.h file to never build a DLL. So I created a copy of > gd.h named gd.h.win32 to prevent the DLL. > > I put the script in the top level of the Gnuplot tree and run it from there. I simply called it > build.sh. > > Hope it helps someone, > > Mike Sutton > > BTW some email readers might mess up the line wrap. > > > ----------------------- > #!/bin/sh > # This is a Bourne shell script > # > # This script builds the required support libraries for using Gnuplot > # with GDLIB with TrueType font support. > # > # MODIFICATIONS: > # 05-Mar-2008 Initially generated... MWS > #---------------------------------------------------------------------- > > USAGE="`basename $0`: [-sZPFG] > > where > -s - skip the unpacking step > -Z - skip building zlib > -P - skip building libpng > -F - skip building freetype > -G - skip building gd > " > > # initialize variables > unpack=true > build_zlib=true > build_png=true > build_freetype=true > build_gd=true > > # parse command line options > > while getopts hsZPFG opt > do > case $opt in > s) unpack=false;; > Z) build_zlib=false;; > P) build_png=false;; > F) build_freetype=false;; > G) build_gd=false;; > h| ?) echo "$USAGE" > exit 1;; > > esac > done > shift `expr $OPTIND - 1` > > freetype="freetype-2.3.5" > gd="gd-2.0.33" > png="libpng-1.2.18" > zlib="zlib-1.2.3" > > unpack_list="$zlib $png $gd $freetype " > > curdir=`pwd` > > # location for support libraries > gnutmp="support_libs" > buildtmp="ztmp" > > ZCAT=gzcat > > os=`uname -s` > case "$os" in > Linux) ZCAT=zcat;; > MINGW32*) ZCAT="gunzip -c";; > esac > > > test -d "$gnutmp" || mkdir "$gnutmp" > test -d "$buildtmp" || mkdir "$buildtmp" > > cd "$buildtmp" > $unpack && for name in $unpack_list ; do > if [ ! -d "$name" ] ; then > echo "unpacking $name" > $ZCAT ../${name}.tar.gz | tar -xf - || exit 1 > fi > done > > > prefix="$curdir/$gnutmp" > > PATH="$prefix/bin:$PATH" > export PATH > > LDFLAGS="-L$prefix/lib" > export LDFLAGS > > CPPFLAGS="-I$prefix/include" > export CPPFLAGS > > # build zlib > if $build_zlib ; then > cd "$zlib" > echo "Building $zlib" > ./configure --prefix="$prefix" > make && make install || exit 1 > cd .. > fi > > # build linpng > if $build_png ; then > cd "$png" > echo "Building $png" > ./configure --prefix="$prefix" --disable-shared > make && make install || exit 1 > cd .. > fi > > # build freetype > if $build_freetype ; then > cd "$freetype" > echo "Building $freetype" > ./configure --prefix="$prefix" --disable-shared > make && make install || exit 1 > cd .. > fi > > # build gd > if $build_gd ; then > case "$os" in > MINGW32*) cp ../gd.h.win32 $gd/gd.h > esac > > cd "$gd" > echo "Building $gd" > ./configure --prefix="$prefix" --disable-shared \ > --with-png="$prefix" --with-freetype="$prefix" > > make && make install || exit 1 > cd .. > fi > > # build gnuplot > cd .. > echo "Building Gnuplot" > ./configure --prefix="$prefix" \ > --with-png="$prefix" --with-gd="$prefix" > > case "$os" in > MINGW32*) make -C src -f ../config/makefile.mgw2 || exit 1 > > *) make || exit 1 > esac > > > > > # building gnuplot with Sun cc instead of gcc > # env PATH="$prefix/bin:$PATH" CC=cc CXX=CC ./configure --prefix="$prefix" --with-png="$prefix" > --with-gd="$prefix" > > > > > > > -- > Be Yourself @ mail.com! > Choose From 200+ Email Addresses > Get a Free Account at www.mail.com > > > ------------------------------------------------------------------------------ > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ |
|
From: Mojca M. <moj...@gm...> - 2009-01-08 14:44:54
|
On Sun, Jan 4, 2009 at 3:34 PM, m sutton <mw...@us...> wrote: > Hi all, > > I have recently created a script to build Gnuuplot on Windows under the MinGW/Msys environment with PNG, Freetype and GD. I have also used this for Solaris and Linux environments. This is based on a CVS snapshot from about 9 months ago. > > Here are the versions of the libraries I used (freetype-2.3.5, gd-2.0.33, libpng-1.2.18, zlib-1.2.3). The build script assumes that these libraries are in .tar.gz files located in the top of the Gnuplot tree. The script will build static libraries just for Gnuplot to use. I often work on older Linux boxes that I can't change and don't have the newer versions of these libraries. Thanks a lot! I'm about to start testing (and will report the findings), but I have been wating for such a patch/script for ages. Mojca |
|
From: Mojca M. <moj...@gm...> - 2009-01-10 09:45:19
|
On Sun, Jan 4, 2009 at 3:34 PM, m sutton wrote:
> Hi all,
>
> I have recently created a script to build Gnuuplot on Windows under the MinGW/Msys environment with PNG, Freetype and GD. I have also used this for Solaris and Linux environments. This is based on a CVS snapshot from about 9 months ago.
>
>
> Here are the versions of the libraries I used (freetype-2.3.5, gd-2.0.33, libpng-1.2.18, zlib-1.2.3). The build script assumes that these libraries are in .tar.gz files located in the top of the Gnuplot tree. The script will build static libraries just for Gnuplot to use. I often work on older Linux boxes that I can't change and don't have the newer versions of these libraries.
>
> The one thing I had to to was modify the gd.h file to never build a DLL. So I created a copy of gd.h named gd.h.win32 to prevent the DLL.
>
> I put the script in the top level of the Gnuplot tree and run it from there. I simply called it build.sh.
>
> Hope it helps someone,
>
> Mike Sutton
Hello,
I might contact you off-line, but the binary I compiled with a
slightly modified script that you posted still resulted in plethora of
dependencies on Mac OS X. In particular it would be nice to remove all
those dependencies that begin with /sw/:
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.2.3)
/sw/lib/libpng12.0.dylib (compatibility version 30.0.0,
current version 30.0.0)
/usr/X11R6/lib/libXpm.4.dylib (compatibility version 4.11.0,
current version 4.11.0)
/usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0,
current version 6.2.0)
/usr/X11R6/lib/libfontconfig.1.dylib (compatibility version
1.0.0, current version 1.0.0)
/usr/X11R6/lib/libfreetype.6.dylib (compatibility version
6.3.0, current version 6.3.0)
Libraries that were not addressed (and could be removed later):
/sw/lib/libreadline.5.dylib (compatibility version 5.0.0,
current version 5.0.0)
/sw/lib/libhistory.5.dylib (compatibility version 5.0.0,
current version 5.0.0)
/sw/lib/ncurses/libncurses.5.dylib (compatibility version
5.0.0, current version 5.0.0)
/sw/lib/libiconv.2.dylib (compatibility version 7.0.0, current
version 7.0.0)
/sw/lib/libpdf.6.dylib (compatibility version 7.0.0, current
version 7.2.0)
/sw/Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm
(compatibility version 1.0.0, current version 1.0.0)
These dependencies are OK:
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
(compatibility version 300.0.0, current version 567.40.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.11)
In any case: thanks a lot for showing me where to start. I need to
figure out how to solve the remaining dependencies, but it's a good
start.
> case "$os" in
> MINGW32*) make -C src -f ../config/makefile.mgw2 || exit 1
>
> *) make || exit 1
> esac
This portion of code fails here (I need to figure out why), so I have
removed the "case" temporary and only put "make" on that place.
Thanks again,
Mojca
|