[clam-devel] Mingw environment script
David García Garzón
david.garcia at barcelonamedia.org
Tue Nov 2 04:52:08 PDT 2010
A new script landed in clam/CLAM/scripts/mingw-cross. It is a script to setup
a mingw crosscompilation environment by downloading and crosscompiling most
CLAM dependencies. The first goal is automating mingw setup which right now is
quite tedious. Current achievent is building all the dependencies that were
compiled by hand in the wiki[1]. Eventually it could evolve to a way of
generating long awaited CLAM SDK packages for windows.
The script is inspired in the mingw-cross-env project. Its maintainer insisted
on not supporting dynamic libraries, but i still liked a lot the idea so some
patches and downloading/upgrading scripts has been reused. Also our script is
written in python instead of Makefile. It is not that smart but it will be
more flexible and not hackers only.
Once the steps to compile a package are clear, which is actually the hard
part, it is quite easy to add it to the system and hardcode that knowledge. I
started with a procedural approach but it is becoming an almost declarative
one. An example module declaration:
buildPackage( "libvorbis",
uri = "http://www.vorbis.com/",
deps = "libogg",
checkVersion =
""" wget -q -O- 'http://www.xiph.org/downloads/' | """
""" sed -n 's,.*libvorbis-\([0-9][^>]*\)\.tar.*,\\1,p' | """
""" head -1 """,
tarballName = "%(name)s-%(version)s.tar.gz",
downloadUri = "http://downloads.xiph.org/releases/vorbis/%(tarball)s",
buildCommand =
""" cd %(srcdir)s && """
""" ./configure --host='%(target)s' --prefix='%(prefix)s' &&
"""
""" make && """
""" make install """
)
Any patch to be applied, can be dropped in the same folder than the script by
naming it: mingw-packagename-sortkey-description.patch
Current working packages are: pthread fftw libmad id3lib libogg libvorbis
libsndfile speex liblo cppunit dlfcn-win32 ladspa-sdk directx portaudio
xerces-c libsigc++
Not fully working: flac gettext glib glibmm libxml++ (help will help)
To eventually add: boost qt libpython (contributions welcome)
David.
More information about the clam-devel
mailing list