[gimp-perl] Fixed compile when building for GIMP 2.8 or later. From changes by Ed J.
- From: Kevin Cozens <kcozens src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-perl] Fixed compile when building for GIMP 2.8 or later. From changes by Ed J.
- Date: Thu, 2 Jan 2014 01:53:22 +0000 (UTC)
commit 79a4a350899a95e93955fbe6a33d0c17006c47da
Author: Kevin Cozens <kevin ve3syb ca>
Date: Wed Jan 1 20:52:05 2014 -0500
Fixed compile when building for GIMP 2.8 or later. From changes by Ed J.
Gimp.xs | 2 +-
Makefile.PL | 2 +-
config.pl | 51 +++++++++++++++++++++++++++------------------------
extra.c | 16 ++++++++--------
utils/gimpdoc | 2 +-
5 files changed, 38 insertions(+), 35 deletions(-)
---
diff --git a/Gimp.xs b/Gimp.xs
index 38df162..50a3bef 100644
--- a/Gimp.xs
+++ b/Gimp.xs
@@ -1,7 +1,7 @@
#include "config.h"
#include <libgimp/gimp.h>
-#include <libgimp/gimpexport.h>
+#include <libgimp/gimpui.h>
#include <locale.h>
diff --git a/Makefile.PL b/Makefile.PL
index 6b1876c..fa32d54 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -246,7 +246,7 @@ WriteMakefile(
'Gimp/Config.pm' => '$(INST_LIBDIR)/Gimp/Config.pm',
},
'LDFROM' => expand("\$(OBJECT) $LIBS $INTLLIBS"),
- 'INC' => "$INC1 $GIMP_INC_NOUI $CPPFLAGS $CFLAGS",
+ 'INC' => "$INC1 $GIMP_INC_NOUI $GTK_CFLAGS $CPPFLAGS $CFLAGS",
'DEFINE' => "$DEFINE1 $DEFS",
'EXE_FILES' => \ EXE_FILES,
'macro' => \%cfg,
diff --git a/config.pl b/config.pl
index 726c22c..b216be9 100644
--- a/config.pl
+++ b/config.pl
@@ -2,13 +2,14 @@
use Cwd 'abs_path';
-# make $topdir be where the gimp-perl sources start
+# make $topdir be where the gimp-perl sources start
$topdir = ".";
$topdir .= "/.." while ! -f "$topdir/MANIFEST";
$topdir = abs_path $topdir;
use ExtUtils::PkgConfig;
%gimpcfg = ExtUtils::PkgConfig->find("gimp-2.0");
+%gtkcfg = ExtUtils::PkgConfig->find("gtk+-2.0");
%glibcfg = ExtUtils::PkgConfig->find("glib-2.0");
$^W=0;
@@ -21,33 +22,35 @@ $gimplibdir = ExtUtils::PkgConfig->variable("gimp-2.0", "gimplibdir");
$pluginlibs = `$gimppath/gimptool-2.0 --libs`;
chomp $pluginlibs;
-# Get gimp's version and append to make binname
+# Get gimp's version and append to make binname
$gimpbinname = ExtUtils::PkgConfig->modversion("gimp-2.0");
$gimpbinname =~ s/^(\d\.\d).*/$1/; # strip off minor versions
$gimpbinname = "gimp-" . $gimpbinname;
%cfg = (
- GIMP => $gimppath . $gimpbinname,
- GIMPTOOL => $gimppath . "gimptool-2.0",
- _GIMP_INC => $gimpcfg{"cflags"},
- _GIMP_INC_NOUI => $gimpcfg{"cflags"},
- _GIMP_LIBS => $pluginlibs,
- _GIMP_LIBS_NOUI => $gimpcfg{"libs"},
+ GIMP => $gimppath . $gimpbinname,
+ GIMPTOOL => $gimppath . "gimptool-2.0",
+ _GIMP_INC => $gimpcfg{"cflags"},
+ _GIMP_INC_NOUI => $gimpcfg{"cflags"},
+ _GIMP_LIBS => $pluginlibs,
+ _GIMP_LIBS_NOUI => $gimpcfg{"libs"},
- GLIB_CFLAGS => $glibcfg{"cflags"},
- GLIB_LIBS => $glibcfg{"libs"},
+ GTK_CFLAGS => $gtkcfg{"cflags"},
- gimpplugindir => $gimplibdir,
+ GLIB_CFLAGS => $glibcfg{"cflags"},
+ GLIB_LIBS => $glibcfg{"libs"},
- _EXTENSIVE_TESTS => q[1],
+ gimpplugindir => $gimplibdir,
- pdl_inc => '',
- pdl_typemaps => '',
- INC1 => '',
- DEFINE1 => '',
+ _EXTENSIVE_TESTS => q[1],
- LIBS => q[],
- INTLLIBS => q[],
+ pdl_inc => '',
+ pdl_typemaps => '',
+ INC1 => '',
+ DEFINE1 => '',
+
+ LIBS => q[],
+ INTLLIBS => q[],
);
sub expand {
@@ -72,15 +75,15 @@ while (($k,$v)=each(%cfg)) {
}
$GIMPTOOL = expand($GIMPTOOL);
-$INTLLIBS = expand($INTLLIBS);
+$INTLLIBS = expand($INTLLIBS);
$gimpplugindir = `$GIMPTOOL --gimpplugindir`;
$GIMP = expand($GIMP);
-$GIMP_INC =~ s%\$topdir%$topdir%g;
-$GIMP_INC_NOUI =~ s%\$topdir%$topdir%g;
-$GIMP_LIBS =~ s%\$topdir%$topdir%g;
-$GIMP_LIBS_NOUI =~ s%\$topdir%$topdir%g;
+$GIMP_INC =~ s%\$topdir%$topdir%g;
+$GIMP_INC_NOUI =~ s%\$topdir%$topdir%g;
+$GIMP_LIBS =~ s%\$topdir%$topdir%g;
+$GIMP_LIBS_NOUI =~ s%\$topdir%$topdir%g;
# $...1 variables should be put in front of the corresponding MakeMaker values.
$INC1 = "-I$topdir";
@@ -129,7 +132,7 @@ if ($PDL) {
$pdl_inc = $pdl_inc = &PDL::Core::Dev::PDL_INCLUDE;
$pdl_typemaps = "@{[ pdl_typemaps = &PDL::Core::Dev::PDL_TYPEMAP]}";
- $DEFINE1 .= " -DHAVE_PDL=1";
+ $DEFINE1 .= " -DHAVE_PDL=1";
} else {
@pdl_typemaps = "$topdir/typemap.pdl";
}
diff --git a/extra.c b/extra.c
index 710b13f..b69bb62 100644
--- a/extra.c
+++ b/extra.c
@@ -11,7 +11,7 @@
/* need to factor these out, otherwise we always need gtk :( */
#include <libgimp/gimp.h>
-#include <libgimpwidgets/gimpchainbutton.h>
+#include <libgimpwidgets/gimpwidgets.h>
#include <libgimpbase/gimpbasetypes.h>
#include "extra.h"
@@ -53,13 +53,13 @@ newSV_color3 (gdouble e, gdouble f, gdouble g, gdouble a)
return newRV_noinc ((SV *)av);
}
-#define ENUM(name) \
- static GType t_ ## name; \
- static GType name ## _type (void) \
- { \
- if (!t_ ## name) \
- t_ ## name = g_enum_register_static (# name, _ ## name ## _values); \
- return t_ ## name; \
+#define ENUM(name) \
+ static GType t_ ## name; \
+ static GType name ## _type (void) \
+ { \
+ if (!t_ ## name) \
+ t_ ## name = g_enum_register_static (# name, _ ## name ## _values); \
+ return t_ ## name; \
}
ENUM(gimp_unit)
diff --git a/utils/gimpdoc b/utils/gimpdoc
index d2223a9..6080a08 100755
--- a/utils/gimpdoc
+++ b/utils/gimpdoc
@@ -4,7 +4,7 @@ use Gimp qw(:consts spawn_options=no-data);
use Getopt::Std;
#use Config '%Config';
-$VERSION=2.0;
+$VERSION=2.3;
getopts('rw:');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]