source: libcaca/trunk/build-win32 @ 2299

Revision 2299, 1.5 KB checked in by sam, 5 years ago (diff)
  • Remove #include <stdint.h> etc. from "common.h". Instead, make sure that <cucul.h> will provide the C99 types, even if libcaca has been installed.
  • Rename what's left of "common.h" to "stubs.h".
  • Remove all references to erroneous <inttypes.h> from source files.
  • Property svn:executable set to *
  • Property svn:keywords set to Id
RevLine 
[341]1#! /bin/sh
2
3##  Win32 cross-compilation for libcaca -- Sam Hocevar <sam@zoy.org>
4##  $Id$
5
6set -x
7set -e
8
9# Clean up our working directory
[975]10SRCDIR="`pwd`"
11DIRNAME="libcaca-win32-`sed -ne 's/^AM_INIT_AUTOMAKE(.*, \(.*\)).*/\1/p' configure.ac`"
12INSTALLDIR="`pwd`/${DIRNAME}"
13BUILDDIR="${INSTALLDIR}/build"
14rm -Rf "${INSTALLDIR}"
15rm -f "${INSTALLDIR}.zip"
16mkdir "${INSTALLDIR}"
17mkdir "${BUILDDIR}"
[341]18
[975]19cd "${BUILDDIR}"
[341]20# Build for win32
[975]21"${SRCDIR}/configure" --host=i586-mingw32msvc --program-suffix=.exe --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-doc
[628]22make pkglibdir=/lib pkgdatadir=/data bindir=/bin
[341]23# Install into our private directory
[975]24make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
25cd "${SRCDIR}"
26rm -Rf "${BUILDDIR}"
[628]27
[975]28mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/"
29mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/"
30rm -f "${INSTALLDIR}/caca-config.exe" # Just in case. *sigh*.
31i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe
32i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll
33rmdir "${INSTALLDIR}/bin"
34rmdir "${INSTALLDIR}/lib"
[628]35
[975]36mkdir "${INSTALLDIR}/doc"
[2299]37for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
[628]38   sed -e 's/$/
[975]39/' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
[628]40done
[975]41rm -Rf "${INSTALLDIR}/share"
42rm -Rf "${INSTALLDIR}/man"
43rm -Rf "${INSTALLDIR}/include"
44rm -Rf "${INSTALLDIR}/pkg-config"
45rm -f "${INSTALLDIR}/caca-config"
46rm -f "${INSTALLDIR}/"*.a
47rm -f "${INSTALLDIR}/"*.la
[341]48
49# Pack the directory
50zip "${DIRNAME}.zip" `find "${DIRNAME}"`
[975]51rm -Rf "${INSTALLDIR}"
[341]52
Note: See TracBrowser for help on using the repository browser.