some hints and remarks for building gimp-2.3.1+ from cvs

ftruncate is not present in my version of mingw, so I changed it to make it compile.
diff -u -r1.5 gimpwin32-io.h
--- libgimpbase/gimpwin32-io.h  19 Feb 2005 00:50:35 -0000      1.5
+++ libgimpbase/gimpwin32-io.h  28 Jun 2005 09:19:09 -0000
@@ -91,7 +91,7 @@
       ftruncate implementation as an inline function. Thanks to Dominik R.
/* needs coorection for msvc though ;( */
-#ifdef _MSC_VER
+#ifdef G_OS_WIN32
#define ftruncate(f,s) g_win32_ftruncate(f,s)

Maybe this should be autodetected by configure as
or maybe glib should provide g_ftruncate to wrap the platform-specific implementation...

The native windows version of Python has it's headers in C:\Python24\include
and not in C:\Python24\include\python24, so I changed the pythondev m4 macro as follows:

diff -u -r1.1 pythondev.m4
--- m4macros/pythondev.m4       24 Jun 2005 21:17:57 -0000      1.1
+++ m4macros/pythondev.m4       28 Jun 2005 09:19:09 -0000
@@ -10,7 +10,7 @@
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION} -I${py_prefix}/include"
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"

the WMF plugin uses freetype2, but freetype2 likes to have "ft2build.h" included...

diff -u -r1.52 wmf.c
--- plug-ins/common/wmf.c       4 Mar 2005 15:12:28 -0000       1.52
+++ plug-ins/common/wmf.c       28 Jun 2005 09:19:09 -0000
@@ -23,6 +23,8 @@

#include "config.h"

+#include "ft2build.h"
#include <libwmf/api.h>
#include <libwmf/gd.h>

the autodetection of python on MSYS is not too good:
the "\"es need to be replaced with "/"es, so I added this to

import sys
import os
import re
if os.environ.get("MSYSTEM") == "MINGW32":
       sys.prefix = re.sub('\\\\',os.sep,sys.prefix)
       sys.exec_prefix = re.sub('\\\\',os.sep,sys.exec_prefix)

which is still not perfect: I modified python.m4 to replace "\"es by "/"es:

[am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX').replace('\\','/')" 2>/dev/
null ||

(I think python should know about msyspath too in addition to ntpath)

-- lode

Gimp-developer mailing list

Reply via email to