1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
# -*- ruby -*-
#
# Copyright (C) 2012-2015 Ruby-GNOME2 Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
$LOAD_PATH.unshift("./../glib2/lib")
require "gnome2/rake/package-task"
package_task = GNOME2::Rake::PackageTask.new do |package|
package.summary = "Ruby/Clutter is a Ruby binding of Clutter."
package.description = "Ruby/Clutter is a Ruby binding of Clutter."
package.dependency.gem.runtime = [
"cairo-gobject",
"gobject-introspection",
"pango"
]
package.windows.packages = []
package.windows.dependencies = []
package.windows.build_dependencies = [
"glib2",
"atk",
"pango",
"gdk_pixbuf2",
"gobject-introspection",
]
package.windows.gobject_introspection_dependencies = [
"atk",
"pango",
]
package.external_packages = [
# Build note:
# We need to modify /usr/i686-w64-mingw32/include/GL/ directory because
# MinGW w64 bundles old OpenGL headers. Here are changes to build Cogl:
#
# (1) Put the latest glext.h that can be downloaded from
# https://www.opengl.org/registry/api/GL/glext.h into
# /usr/share/mingw-w64/include/GL/ directory:
#
# % wget https://www.opengl.org/registry/api/GL/glext.h
# % sudo install glext.h /usr/share/mingw-w64/include/GL/
#
# (2) Add missing declarations and includes to
# /usr/share/mingw-w64/include/GL/gl.h:
#
# Before:
# ...
# typedef double GLdouble;
# typedef double GLclampd;
# typedef void GLvoid;
#
# #define GL_VERSION_1_1 1
# ...
#
# After
# ...
# typedef double GLdouble;
# typedef double GLclampd;
# typedef void GLvoid;
#
# typedef ptrdiff_t GLintptr;
# typedef ptrdiff_t GLsizeiptr;
# typedef char GLchar;
# #include <GL/glext.h>
#
# #define GL_VERSION_1_1 1
# ...
{
:name => "cogl",
:download_site => :gnome,
:label => "Cogl",
:version => "1.22.2",
:compression_method => "xz",
:windows => {
:configure_args => [
"--disable-glibtest",
"--enable-introspection",
],
:built_file => "bin/libcogl-20.dll",
},
},
{
:name => "json-glib",
:download_site => :gnome,
:label => "JSON-GLib",
:version => "1.2.2",
:compression_method => "xz",
:windows => {
:configure_args => [
"--enable-introspection",
],
:patches => [
# "json-glib-1.0.2-add-missing-config-h.diff",
],
:need_autoreconf => true,
:built_file => "bin/libjson-glib-1.0-0.dll",
},
},
{
:name => "clutter",
:download_site => :gnome,
:label => "Clutter",
:version => "1.26.0",
:compression_method => "xz",
:windows => {
:configure_args => [
"--enable-introspection",
],
:build_concurrently => false,
:built_file => "bin/libclutter-1.0-0.dll",
},
}
]
package.cross_compiling do |spec|
if /mingw|mswin/ =~ spec.platform.to_s
spec.add_runtime_dependency("atk", "= #{package.version}")
spec.add_runtime_dependency("gdk_pixbuf2", "= #{package.version}")
end
end
end
package_task.define
if Rake::Task.task_defined?("native:clutter:i386-mingw32")
Rake::Task["native:clutter:i386-mingw32"].prerequisites.clear
end
namespace :dependency do
desc "Install depenencies"
task :install do
# TODO: Install gir1.2-clutter-1.0 on Debian.
end
end
task :build => "dependency:install"
|