Commit 1567645a authored by Matthias Klumpp's avatar Matthias Klumpp

New upstream version 3.5.1

parent 7257a16b
*~
*.o
*.a
*.so
.hg
.hgignore
.svn
.dub
......@@ -25,7 +25,7 @@ int main(string[] args)
foreach ( arg; args )
{
if ( !["gtkd", "gtkdgl", "sv", "gstreamer", "vte", "all"].canFind(arg) )
if ( !["gtkd", "gtkdgl", "sv", "gstreamer", "vte", "peas", "all"].canFind(arg) )
{
writefln("Unknown option: %s", arg);
return 1;
......@@ -57,6 +57,9 @@ int main(string[] args)
case "vte":
build("srcvte", "vted");
break;
case "peas":
build("srcpeas", "peasd");
break;
default:
assert(false);
break;
......@@ -75,10 +78,32 @@ void build(string dir, string lib)
}
else
{
std.file.write("build.rf", format("-c %s -Isrc -of%s.obj %s", dcflags, lib, dFiles(dir)));
executeShell("dmd @build.rf");
executeShell(format("dmd -lib %s -of%s.lib %s.obj", ldflags, lib, lib));
std.file.remove(lib ~".obj");
if (lib == "gtkd")
{
string files = dFiles(dir);
int pivot = indexOf(files, ' ', files.length / 2);
string files2 = files[pivot .. $];
files = files [0 .. pivot];
std.file.write("build.rf", format("-c %s -Isrc -ofgtkd1.obj %s", dcflags, files));
executeShell("dmd @build.rf");
std.file.write("build.rf", format("-c %s -Isrc -ofgtkd2.obj %s", dcflags, files2));
executeShell("dmd @build.rf");
executeShell(format("dmd -lib %s -of%s.lib gtkd1.obj gtkd2.obj", ldflags, lib));
std.file.remove("gtkd1.obj");
std.file.remove("gtkd2.obj");
}
else
{
std.file.write("build.rf", format("-c %s -Isrc -of%s.obj %s", dcflags, lib, dFiles(dir)));
executeShell("dmd @build.rf");
executeShell(format("dmd -lib %s -of%s.lib %s.obj", ldflags, lib, lib));
std.file.remove(lib ~".obj");
}
}
std.file.remove("build.rf");
......
GtkD ChangeLog
==============
Release: 3.5.1
--------------
- Set the correct path for the pkgconfig files. #181
Release: 3.5.0
--------------
-Add dub configurations for the demos. #177
-Fix gio.Socket.receive. #178
-Allow removing signal handlers and register each handler seperatly with GTK #170
-Use the correct Homebrew path #172
Release: 3.4.1
--------------
-Properly remove toggle references when an object is destroyed. #169
Release: 3.4.0
--------------
-Update to GTK 3.22
-Properly finalize GTK objects. #165
-Reset the ID for glib.Timeout. #154
-Add libPeas Binding. #152
-Load libraries in the Global namespace to avoid Sourceview errors.
-Check the "GTK_BASEPATH" and "HOMEBREW_ROOT" environment variables on OSX.
-Print a more informative error message when we fail to load a library.
Release: 3.3.0
--------------
-Update to GTK 3.20.
......
SHELL=/bin/sh
prefix=/usr/local
libdir=lib
datadir=$(prefix)/share
prefix?=/usr/local
OS=$(shell uname || uname -s)
ARCH=$(shell uname -m || arch)
datadir?=$(prefix)/share
ifeq (, $(shell which dpkg-architecture))
libdir?=lib/
else
libdir?=lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
endif
ifndef DC
ifneq ($(strip $(shell which dmd 2>/dev/null)),)
DC=dmd
......@@ -24,7 +29,7 @@ endif
default-goal: libs test
shared: shared-libs
all: libs shared-libs gstreamer vte shared-gstreamer shared-vte test
all: libs shared-libs gstreamer vte peas shared-gstreamer shared-vte shared-peas test
ifeq ("$(DC)","gdc")
DCFLAGS=-O2
......@@ -49,28 +54,12 @@ ifeq ("$(OS)","Linux")
LDFLAGS+=$(LINKERFLAG)-ldl
endif
ifndef MODEL
ifeq ("$(ARCH)", "x86_64")
MODEL=64
else
MODEL=32
endif
endif
ifeq ($(MODEL), 64)
DCFLAGS+=-m64
LDFLAGS+=-m64
else
DCFLAGS+=-m32
LDFLAGS+=-m32
endif
AR=ar
RANLIB=ranlib
#######################################################################
GTKD_VERSION=3.3.0
GTKD_VERSION=3.5.1
SO_VERSION=0
MAJOR = $(word 1,$(subst ., ,$(GTKD_VERSION)))
......@@ -107,6 +96,12 @@ SOURCES_VTED = $(wildcard srcvte/*/*.d)
OBJECTS_VTED = $(patsubst %.d,%.o,$(SOURCES_VTED))
PICOBJECTS_VTED = $(patsubst %.o,%.pic.o,$(OBJECTS_VTED))
LIBNAME_PEASD = libpeasd-$(MAJOR).a
SONAME_PEASD = libpeasd-$(MAJOR).so
SOURCES_PEASD = $(wildcard srcpeas/*/*.d)
OBJECTS_PEASD = $(patsubst %.d,%.o,$(SOURCES_PEASD))
PICOBJECTS_PEASD = $(patsubst %.o,%.pic.o,$(OBJECTS_PEASD))
#######################################################################
BINNAME_DEMO = TestWindow
......@@ -132,12 +127,14 @@ gtkdgl: $(LIBNAME_GTKDGL)
sv: $(LIBNAME_GTKDSV)
gstreamer: $(LIBNAME_GSTREAMERD)
vte: $(LIBNAME_VTED)
peas: $(LIBNAME_PEASD)
shared-gtkd: $(SONAME_GTKD)
shared-gtkdgl: $(SONAME_GTKDGL)
shared-sv: $(SONAME_GTKDSV)
shared-gstreamer: $(SONAME_GSTREAMERD)
shared-vte: $(SONAME_VTED)
shared-peas: $(SONAME_PEASD)
#######################################################################
......@@ -161,6 +158,10 @@ $(LIBNAME_VTED): IMPORTS=-Isrc -Isrcvte
$(LIBNAME_VTED): $(LIBNAME_GTKD) $(OBJECTS_VTED)
$(make-lib)
$(LIBNAME_PEASD): IMPORTS=-Isrc -Isrcpeas
$(LIBNAME_PEASD): $(LIBNAME_GTKD) $(OBJECTS_PEASD)
$(make-lib)
#######################################################################
$(SONAME_GTKD): IMPORTS=-Isrc
......@@ -183,6 +184,10 @@ $(SONAME_VTED): IMPORTS=-Isrc -Isrcvte
$(SONAME_VTED): $(PICOBJECTS_VTED)
$(make-shared-lib)
$(SONAME_PEASD): IMPORTS=-Isrc -Isrcpeas
$(SONAME_PEASD): $(PICOBJECTS_PEASD)
$(make-shared-lib)
#######################################################################
# -Idemos
......@@ -197,10 +202,10 @@ test: $(BINNAME_DEMO)
# Create a versioned symlink so the demo is able to load it.
$(BINNAME_DEMO): IMPORTS=-Isrc -Idemos/gtkD/TestWindow
$(BINNAME_DEMO): DCFLAGS=-m$(MODEL)
$(BINNAME_DEMO): $(OBJECTS_DEMO)
$(if $(wildcard $(SONAME_GTKD)),,$(if $(wildcard $(LIBNAME_GTKD)),,$(MAKE) $(LIBNAME_GTKD)))
$(if $(wildcard $(SONAME_GTKD)),$(eval LDFLAGS+= $(LINKERFLAG)-rpath=./))
$(if $(wildcard $(SONAME_GTKD)),$(if $(findstring "gdc","$(DC)"),$(eval LDFLAGS+=-shared-libphobos)))
$(if $(wildcard $(SONAME_GTKD)),$(if $(wildcard $(SONAME_GTKD).$(SO_VERSION)),,$(shell ln -s $(SONAME_GTKD) $(SONAME_GTKD).$(SO_VERSION))))
$(DC) $(OBJECTS_DEMO) $(output) $(LINKERFLAG)-L. $(LINKERFLAG)-lgtkd-$(MAJOR) $(LDFLAGS)
......@@ -225,12 +230,13 @@ pkgconfig-gtkdgl: gtkdgl-$(MAJOR).pc
pkgconfig-sv: gtkdsv-$(MAJOR).pc
pkgconfig-gstreamer: gstreamerd-$(MAJOR).pc
pkgconfig-vte: vted-$(MAJOR).pc
pkgconfig-peas: peasd-$(MAJOR).pc
gtkd-$(MAJOR).pc:
echo Name: GtkD > $@
echo Description: A D binding and OO wrapper for GTK+. >> $@
echo Version: $(GTKD_VERSION) >> $@
echo Libs: $(LINKERFLAG)-L$(prefix)/lib/ $(LINKERFLAG)-lgtkd-$(MAJOR) $(LINKERFLAG)-ldl >> $@
echo Libs: $(LINKERFLAG)-L$(prefix)/$(libdir)/ $(LINKERFLAG)-lgtkd-$(MAJOR) $(LINKERFLAG)-ldl >> $@
echo Cflags: -I$(prefix)/include/d/gtkd-$(MAJOR)/ >> $@
gtkdgl-$(MAJOR).pc:
......@@ -261,6 +267,13 @@ vted-$(MAJOR).pc:
echo Libs: $(LINKERFLAG)-lvted-$(MAJOR) >> $@
echo Requires: gtkd-$(MAJOR) >> $@
peasd-$(MAJOR).pc:
echo Name: PeasD > $@
echo Description: A D binding and OO wrapper for Peas. >> $@
echo Version: $(GTKD_VERSION) >> $@
echo Libs: $(LINKERFLAG)-lpeasd-$(MAJOR) >> $@
echo Requires: gtkd-$(MAJOR) >> $@
#######################################################################
ifeq ("$(OS)","Darwin")
......@@ -289,6 +302,9 @@ install-gstreamer: $(LIBNAME_GSTREAMERD) install-gtkd install-headers-gstreamer
install-vte: $(LIBNAME_VTED) install-gtkd install-headers-vte
install -m 644 $(LIBNAME_VTED) $(DESTDIR)$(prefix)/$(libdir)
install-peas: $(LIBNAME_PEASD) install-gtkd install-headers-peas
install -m 644 $(LIBNAME_PEASD) $(DESTDIR)$(prefix)/$(libdir)
install-shared-gtkd: $(SONAME_GTKD)
install -d $(DESTDIR)$(prefix)/$(libdir)
$(install-so)
......@@ -305,6 +321,9 @@ install-shared-gstreamer: $(SONAME_GSTREAMERD) install-shared-gtkd
install-shared-vte: $(SONAME_VTED) install-shared-gtkd
$(install-so)
install-shared-peas: $(SONAME_PEASD) install-shared-gtkd
$(install-so)
install-headers-gtkd: gtkd-$(MAJOR).pc
install -d $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)
install -d $(DESTDIR)$(datadir)/pkgconfig
......@@ -327,9 +346,13 @@ install-headers-vte: vted-$(MAJOR).pc install-headers-gtkd
(cd srcvte; echo $(SOURCES_VTED) | sed -e s,srcvte/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xv)
install -m 644 vted-$(MAJOR).pc $(DESTDIR)$(datadir)/pkgconfig
install-headers-peas: peasd-$(MAJOR).pc install-headers-gtkd
(cd srcpeas; echo $(SOURCES_PEASD) | sed -e s,srcpeas/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xv)
install -m 644 peasd-$(MAJOR).pc $(DESTDIR)$(datadir)/pkgconfig
uninstall: uninstall-gtkdgl uninstall-gtkdsv uninstall-gstreamer
$(foreach dir,$(shell ls src) , rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(datadir)/pkgconfig/gtkd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/gtkd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKD).$(SO_VERSION)
......@@ -337,7 +360,7 @@ uninstall: uninstall-gtkdgl uninstall-gtkdsv uninstall-gstreamer
uninstall-gtkdgl:
$(foreach dir,$(shell ls srcsv), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(datadir)/pkgconfig/gtkdgl-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/gtkdgl-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKDGL)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDGL)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDGL).$(SO_VERSION)
......@@ -345,7 +368,7 @@ uninstall-gtkdgl:
uninstall-gtkdsv:
$(foreach dir,$(shell ls srcgl), rm -rf $(DESTDIR)$(prefix)/include/d/$(dir))
rm -f $(DESTDIR)$(datadir)/pkgconfig/gtkdsv-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/gtkdsv-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKDSV)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDSV)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDSV).$(SO_VERSION)
......@@ -353,7 +376,7 @@ uninstall-gtkdsv:
uninstall-gstreamer:
$(foreach dir,$(shell ls srcgstreamer), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(datadir)/pkgconfig/gstreamerd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/gstreamerd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GSTREAMERD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GSTREAMERD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GSTREAMERD).$(SO_VERSION)
......@@ -361,18 +384,27 @@ uninstall-gstreamer:
uninstall-vte:
$(foreach dir,$(shell ls srcvte), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(datadir)/pkgconfig/vted-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/vted-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_VTED)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_VTED)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_VTED).$(SO_VERSION)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_VTED).$(SO_VERSION).$(MINOR).$(BUGFIX)
uninstall-peas:
$(foreach dir,$(shell ls srcpeas), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(datadir)/pkgconfig/peasd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_PEASD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD).$(SO_VERSION)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD).$(SO_VERSION).$(MINOR).$(BUGFIX)
clean:
-rm -f $(LIBNAME_GTKD) $(SONAME_GTKD) gtkd-$(MAJOR).pc $(OBJECTS_GTKD) $(PICOBJECTS_GTKD)
-rm -f $(LIBNAME_GTKDGL) $(SONAME_GTKDGL) gtkdgl-$(MAJOR).pc $(OBJECTS_GTKDGL) $(PICOBJECTS_GTKDGL)
-rm -f $(LIBNAME_GTKDSV) $(SONAME_GTKDSV) gtkdsv-$(MAJOR).pc $(OBJECTS_GTKDSV) $(PICOBJECTS_GTKDSV)
-rm -f $(LIBNAME_GSTREAMERD) $(SONAME_GSTREAMERD) gstreamerd-$(MAJOR).pc $(OBJECTS_GSTREAMERD) $(PICOBJECTS_GSTREAMERD)
-rm -f $(LIBNAME_VTED) $(SONAME_VTED) vted-$(MAJOR).pc $(OBJECTS_VTED) $(PICOBJECTS_VTED)
-rm -f $(LIBNAME_PEASD) $(SONAME_PEASD) peasd-$(MAJOR).pc $(OBJECTS_PEASD) $(PICOBJECTS_PEASD)
-rm -f $(BINNAME_DEMO) $(OBJECTS_DEMO) $(SONAME_GTKD).$(SO_VERSION)
#######################################################################
......@@ -385,6 +417,7 @@ endef
define make-shared-lib
#Remove this line when phobos #1280 is merged.
$(if $(findstring "dmd","$(DC)"),$(eval LDFLAGS+=-defaultlib=:libphobos2.so))
$(if $(findstring "gdc","$(DC)"),$(eval LDFLAGS+=-shared-libphobos))
$(DC) -shared $(output) $(LDFLAGS) $(LINKERFLAG)-soname=$@.$(SO_VERSION) $^
endef
......
......@@ -43,12 +43,19 @@ Optionaly these options are available:
* [shared-]gda = build gda.
* [shared-]gstreamer = build gstreamer.
* shared = build gtkd and gtkd-sourceview as shared libraries.
This currently only works with LDC.
* install and uninstall options are also available for the options
mentioned above.
Or you can use one of the build options also available for Windows.
OSX:
----
The build options are the same as for Linux.
If on OSX GtkD is unable to find the GTK libraries.
Some environment variables can be set to override the search path.
"GTK_BASEPATH" and "HOMEBREW_ROOT". GTK_BASEPATH takes precedence over HOMEBREW_ROOT.
Windows:
--------
To build on Windows you can use the build script in combination with rdmd.
......@@ -76,15 +83,15 @@ the -m32 or -m64 flag to rdmd.
Wraped Versions:
----------------
GtkD wraps Gtk+ 3.18 the versions of the associated libraries are:
Gtk+ 3.20
Gdk 3.20
Glib 2.48
GObject 2.48
Gio 2.48
Pango 1.39
Gdk-pixbuf 2.34
GtkD wraps Gtk+ 3.22 the versions of the associated libraries are:
Gtk+ 3.22
Gdk 3.22
Glib 2.50
GObject 2.50
Gio 2.50
Pango 1.40
Gdk-pixbuf 2.36
Cairo 1.12.2
GtksourceView 3.20
GStreamer 1.8
Vte3 0.43
GtksourceView 3.22
GStreamer 1.10
Vte3 0.46
......@@ -9,7 +9,7 @@ import gtk.Window;
import gobject.Type;
import std.stdio;
import std.c.process;
import core.stdc.stdlib;
/**
......
{
"name": "buildertest",
"description": "A Gtk Builder demo",
"targetType": "executable",
"targetName": "BuilderTest",
"sourceFiles": ["builderTest.d"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../" }
}
}
{
"name": "cairo_clock",
"description": "A Cairo demo",
"targetType": "executable",
"sourceFiles": ["main.d", "clock.d"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../../" }
}
}
{
"name": "text_image",
"description": "A Cairo demo",
"targetType": "executable",
"sourceFiles": ["text_image.d"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../../" }
}
}
......@@ -219,7 +219,7 @@ uint compileShader(int type, string source)
float[16] getIdentityMatrix() pure
{
float mat[4 * 4];
float[4 * 4] mat;
// identity matrix
for(int x=0;x < 4;++x)
......
{
"name": "coregl",
"description": "A OpenGL demo",
"targetType": "executable",
"sourceFiles": ["CoreGL.d", "glcore.d"],
"libs": ["GL"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../../" }
}
}
{
"name": "shapes",
"description": "A OpenGL demo",
"targetType": "executable",
"sourceFiles": ["ShapesGL.d", "DrawGL.d", "TrackBall.d"],
"libs": ["GL", "GLU"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../../" },
"gtk-d:gtkdgl": {"path": "../../../" }
}
}
{
"name": "shapes",
"description": "A OpenGL demo",
"targetType": "executable",
"sourceFiles": ["SimpleGL.d"],
"libs": ["GL", "GLU"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../../" },
"gtk-d:gtkdgl": {"path": "../../../" }
}
}
{
"name": "gstreamer_helloworld",
"description": "A GStreamer demo",
"targetType": "executable",
"sourceFiles": ["gstreamer_helloworld.d"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../../" },
"gtk-d:gstreamer": {"path": "../../../" }
}
}
......@@ -46,12 +46,10 @@ public:
switch( msg.type )
{
case GstMessageType.UNKNOWN:
version(Tango) Trace.formatln("Unknown message type.");
else writefln("Unknown message type.");
writefln("Unknown message type.");
break;
case GstMessageType.EOS:
version(Tango) Trace.formatln("End-of-stream.");
else writefln("End-of-stream.");
writefln("End-of-stream.");
Main.quit();
break;
......@@ -106,16 +104,8 @@ public:
pipeline.getBus().addWatch( &busCall );
// put all elements in a bin
//shouldbe, but doesn't work yet:
//pipeline.addMany( source, parser, decoder, conv, sink );
//TODO, add variable number of arguments (...) support to GtkWrapper
pipeline.add( source );
pipeline.add( parser );
pipeline.add( decoder );
pipeline.add( conv );
pipeline.add( sink );
pipeline.addMany( source, parser, decoder, conv, sink );
// link together - note that we cannot link the parser and
// decoder yet, because the parser uses dynamic pads. For that,
// we set a pad-added signal handler.
......
{
"name": "gst_mediaplayer",
"description": "A GStreamer demo",
"targetType": "executable",
"sourceFiles": ["gst_mediaplayer.d"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../../" },
"gtk-d:gstreamer": {"path": "../../../" }
}
}
File mode changed from 100644 to 100755
{
"name": "demos",
"description": "GtkD demos",
"targetType": "none",
"subPackages": [
{
"name": "hello_world",
"targetType": "executable",
"sourceFiles": ["HelloWorld.d"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../" },
},
},
{
"name": "other_tests",
"targetType": "executable",
"sourceFiles": ["OtherTests.d"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../" },
},
},
{
"name": "popup_menu",
"targetType": "executable",
"sourceFiles": ["PopupMenu.d"],
"dependencies": {
"gtk-d:gtkd": {"path": "../../" },
},
},
{
"name": "spawn_tests",
"targetType": "executable",
"sourceFiles": ["SpawnTests.d"],