Package: src:gtkgl2 Followup-For: Bug #814351 These cosmetic patches may be applied after the previous ones. 0017-Remove-README.Debian-GLU-obsolete-GL-handled-by-pkg-.patch 0018-Avoid-explicit-versions-to-ease-upgrades.patch
The following patches package the latest tarball (2.1.0), trivially recompressed without generated files to spare space (with a 4.6 ratio), simplify diffs and directory listing after a build/clean cycle. If you agree to recompress, you may apply the first patch then run uscan. 0019-Repackage-without-libtool-generated-files-update-cop.patch 0020-Workaround-to-link-with-libm-has-been-applied-upstre.patch 0021-Depend-on-GTK-2.22-but-not-anymore-on-GLU.patch This one packages commit 0b865fa84a983c7ffe596f3b5eb09894c05accbb from git://git.gnome.org/gtkglarea. 0022-Rename-to-libgtkgl-3.0-2-dev.patch As upstream maintainer, you may be interested in - debian/patches/string_format_specifier.patch, and - the -lX11 linker argument in debian/rules. - also, an incompatible version may be the occasion to switch to consistent names in many places (package=gtkglarea, object=libgtkgl-2.0, namespace=ggla). In Debian, do you plan to maintain coinstallable packages for the two versions, or drop 2.0? Thanks
>From 3840343477d5b63c568e9752b766b74e64ea7556 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 11 Feb 2016 12:28:01 +0100 Subject: [PATCH 3/8] Remove README.Debian: GLU obsolete, GL handled by pkg-config --- debian/README.Debian | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 debian/README.Debian diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index d214902..0000000 --- a/debian/README.Debian +++ /dev/null @@ -1,9 +0,0 @@ -gtkglarea for Debian --------------------- - - To link an application you would generally use the following flags: - - $(pkg-config --libs gtkgl-2.0) -lGL -lGLU - - This version is linked against GTK+2.0. - -- 2.7.0
>From bf67a3333188e8770290004b570e65c5318ad368 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 11 Feb 2016 15:18:36 +0100 Subject: [PATCH 4/8] Avoid explicit versions to ease upgrades. --- debian/libgtkgl-2.0-1.docs | 1 - debian/libgtkgl-2.0-1.install | 1 - debian/libgtkgl-2.0-dev.docs | 3 --- debian/libgtkgl-2.0-dev.install | 4 ---- debian/rules | 17 +++++++++++++++++ 5 files changed, 17 insertions(+), 9 deletions(-) delete mode 100644 debian/libgtkgl-2.0-1.docs delete mode 100644 debian/libgtkgl-2.0-1.install delete mode 100644 debian/libgtkgl-2.0-dev.docs delete mode 100644 debian/libgtkgl-2.0-dev.install diff --git a/debian/libgtkgl-2.0-1.docs b/debian/libgtkgl-2.0-1.docs deleted file mode 100644 index 62deb04..0000000 --- a/debian/libgtkgl-2.0-1.docs +++ /dev/null @@ -1 +0,0 @@ -AUTHORS diff --git a/debian/libgtkgl-2.0-1.install b/debian/libgtkgl-2.0-1.install deleted file mode 100644 index e5e5fe1..0000000 --- a/debian/libgtkgl-2.0-1.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libgtkgl*.so.* diff --git a/debian/libgtkgl-2.0-dev.docs b/debian/libgtkgl-2.0-dev.docs deleted file mode 100644 index 9e76372..0000000 --- a/debian/libgtkgl-2.0-dev.docs +++ /dev/null @@ -1,3 +0,0 @@ -docs/*.txt -AUTHORS -README diff --git a/debian/libgtkgl-2.0-dev.install b/debian/libgtkgl-2.0-dev.install deleted file mode 100644 index b88baa4..0000000 --- a/debian/libgtkgl-2.0-dev.install +++ /dev/null @@ -1,4 +0,0 @@ -usr/include -usr/lib/*/libgtkgl-*.a -usr/lib/*/libgtkgl-*.so -usr/lib/*/pkgconfig diff --git a/debian/rules b/debian/rules index ae12d1c..3d07548 100755 --- a/debian/rules +++ b/debian/rules @@ -20,3 +20,20 @@ ${POLICY_TARGETS}: .PHONY: override_dh_autoreconf override_dh_autoreconf: dh_autoreconf --as-needed + +# Avoid any explicit version or multiarch triplet, here or in the name +# of separate debhelper files. +LIB_PKG := $(shell sed -n '/^Package: \(lib.*[0-9]\)$$/{s//\1/;p;q}' \ + debian/control) +DEV_PKG := $(shell echo ${LIB_PKG} | sed 's/-\?[0-9]\+$$/-dev/') +.PHONY: override_dh_install +override_dh_install: + dh_install --package=${LIB_PKG} usr/lib/*/*[0-9] + dh_install --package=${DEV_PKG} usr/include + dh_install --package=${DEV_PKG} usr/lib/*/*[a-z] + dh_install --remaining-packages +.PHONY: override_dh_installdocs +override_dh_installdocs: + dh_installdocs --package=${LIB_PKG} AUTHORS + dh_installdocs --package=${DEV_PKG} docs/*.txt AUTHORS README + dh_installdocs --remaining-packages -- 2.7.0
>From 68e650d25898310af3431d9e2a396171a09a38de Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 11 Feb 2016 09:19:15 +0100 Subject: [PATCH 5/8] Repackage without libtool generated files, update copyrights --- debian/copyright | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/debian/copyright b/debian/copyright index 840c557..a5ce725 100644 --- a/debian/copyright +++ b/debian/copyright @@ -7,10 +7,21 @@ Source: http://www.mono-project.com/GtkGLArea http://www.student.oulu.fi/~jlof/gtkglarea/download/ Version 2.0.0 was downloaded from svn://svn.gnome.org/svn/gtkglarea/trunk +Files-Excluded: + */Makefile.in + */makefile.mingw + .auto + INSTALL + aclocal.m4 + config.h.in + configure +Comment: Libtool files would have to be regenerated anyways, pollute + all diffs, and make the package four times larger. Files: * Copyright: 2007-2016 Sam Hocevar <[email protected]> - 2006-2016 C.J. Adams-Collier <[email protected]> + 2006-2016 C.J. Adams-Collier <[email protected]> + 2016 Javier Jardón <[email protected]> 2002 Xavier Ordoquy <[email protected]> (retired) 1997-2001 Janne Löf <[email protected]> (retired) 1999 Karl Nelson <[email protected]> (autoconf) -- 2.7.0
>From 6a51720614475b366989136db97521a486e22bd2 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 11 Feb 2016 09:20:27 +0100 Subject: [PATCH 6/8] Workaround to link with libm has been applied upstream. --- debian/rules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 3d07548..43f9c3c 100755 --- a/debian/rules +++ b/debian/rules @@ -2,8 +2,7 @@ #export DH_VERBOSE=1 # Link with libX11 because the code calls XFree(). -# Link with libm: #713708. -export LIBS := -lX11 -lm +export LIBS := -lX11 # --as-needed: only link with used libraries (whether a procedure is # implemented by libm depends on the architecture). # -z defs: fail if the order is not compatible with --as-needed. -- 2.7.0
>From 0da145474d04e5c9682d30249c9bc31990c5218e Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 11 Feb 2016 09:21:32 +0100 Subject: [PATCH 7/8] Depend on GTK >= 2.22, but not anymore on GLU. --- debian/control | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index cb5da74..d7fe08e 100644 --- a/debian/control +++ b/debian/control @@ -4,9 +4,8 @@ Priority: optional Maintainer: Sam Hocevar <[email protected]> Standards-Version: 3.9.6 Build-Depends: debhelper (>= 9), dh-autoreconf - , libgtk2.0-dev (>= 2.0.6) + , libgtk2.0-dev (>= 2.22) , libgl1-mesa-dev - , libglu1-mesa-dev Vcs-Svn: svn://anonscm.debian.org/sam-hocevar/pkg-misc/unstable/gtkgl2/ Vcs-Browser: https://anonscm.debian.org/viewvc/sam-hocevar/pkg-misc/unstable/gtkgl2/ Homepage: http://www.mono-project.com/GtkGLArea @@ -17,9 +16,8 @@ Architecture: any Multi-Arch: same Depends: ${misc:Depends} , libgtkgl-2.0-1 (= ${binary:Version}) - , libgtk2.0-dev (>= 2.0.6) + , libgtk2.0-dev (>= 2.22) , libgl1-mesa-dev - , libglu1-mesa-dev Provides: gtkgl-dev Conflicts: gtkgl-dev Suggests: pkg-config -- 2.7.0
>From a64f4871471f12bff688eab46994442f2f2b588c Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 11 Feb 2016 15:47:47 +0100 Subject: [PATCH 8/8] Rename to libgtkgl-3.0-[2|dev]. Depend: gtk-3, glib-2.22. Update package descriptions, patches and test. --- debian/control | 26 +++++++++++++------------- debian/patches/string_format_specifier.diff | 6 +++--- debian/tests/link-basic-example | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/debian/control b/debian/control index d7fe08e..f443bbd 100644 --- a/debian/control +++ b/debian/control @@ -4,40 +4,40 @@ Priority: optional Maintainer: Sam Hocevar <[email protected]> Standards-Version: 3.9.6 Build-Depends: debhelper (>= 9), dh-autoreconf - , libgtk2.0-dev (>= 2.22) + , libgtk-3-dev + , libglib2.0-dev (>= 2.22) , libgl1-mesa-dev Vcs-Svn: svn://anonscm.debian.org/sam-hocevar/pkg-misc/unstable/gtkgl2/ Vcs-Browser: https://anonscm.debian.org/viewvc/sam-hocevar/pkg-misc/unstable/gtkgl2/ Homepage: http://www.mono-project.com/GtkGLArea -Package: libgtkgl-2.0-dev +Package: libgtkgl-3.0-dev Section: libdevel Architecture: any Multi-Arch: same Depends: ${misc:Depends} - , libgtkgl-2.0-1 (= ${binary:Version}) - , libgtk2.0-dev (>= 2.22) + , libgtkgl-3.0-2 (= ${binary:Version}) + , libgtk-3-dev + , libglib2.0-dev (>= 2.22) , libgl1-mesa-dev Provides: gtkgl-dev Conflicts: gtkgl-dev Suggests: pkg-config Description: OpenGL context support for GTK+ (development files) - The gtkgl library provides GtkGLArea (a GTK+ widget containing an OpenGL - context for fast 2D and 3D graphics), GdkGLPixmap (an off-screen rendering - context) and GdkGLContext (an OpenGL extension for virtually any drawable - widget). + The gtkgl library provides GglaArea (a GTK+ widget containing an + OpenGL context for fast 2D and 3D graphics), and GglaContext (an + OpenGL extension for virtually any drawable widget). . This package contains the headers and static library. -Package: libgtkgl-2.0-1 +Package: libgtkgl-3.0-2 Section: libs Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends} Description: OpenGL context support for GTK+ (shared libraries) - The gtkgl library provides GtkGLArea (a GTK+ widget containing an OpenGL - context for fast 2D and 3D graphics), GdkGLPixmap (an off-screen rendering - context) and GdkGLContext (an OpenGL extension for virtually any drawable - widget). + The gtkgl library provides GglaArea (a GTK+ widget containing an + OpenGL context for fast 2D and 3D graphics), and GglaContext (an + OpenGL extension for virtually any drawable widget). . This package contains the shared library. diff --git a/debian/patches/string_format_specifier.diff b/debian/patches/string_format_specifier.diff index fed9797..b6085de 100644 --- a/debian/patches/string_format_specifier.diff +++ b/debian/patches/string_format_specifier.diff @@ -3,7 +3,7 @@ Origin: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/gtkgl2/saucy/r --- a/examples/shaders.c +++ b/examples/shaders.c -@@ -149,7 +149,7 @@ +@@ -147,7 +147,7 @@ glGetShaderiv(shader_id, GL_INFO_LOG_LENGTH, &infologLength); infoLog = malloc(sizeof(GLchar) * infologLength); glGetShaderInfoLog(shader_id, infologLength, &charsWritten, infoLog); @@ -14,10 +14,10 @@ Origin: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/gtkgl2/saucy/r } --- a/examples/simple.c +++ b/examples/simple.c -@@ -157,7 +157,7 @@ +@@ -146,7 +146,7 @@ /* vendor dependent version info string */ - info_str = gdk_gl_get_info(); + info_str = ggla_get_info(); - g_print(info_str); + g_print("%s", info_str); g_free(info_str); diff --git a/debian/tests/link-basic-example b/debian/tests/link-basic-example index 35d98f6..5ca4814 100644 --- a/debian/tests/link-basic-example +++ b/debian/tests/link-basic-example @@ -3,5 +3,5 @@ set -C -e -f -u # Do not start main loop waiting for X input. sed 's/gtk_main();//' examples/simple.c > "$ADTTMP/m.c" -cc -o "$ADTTMP/m" "$ADTTMP/m.c" `pkg-config --cflags --libs gtkgl-2.0` +cc -o "$ADTTMP/m" "$ADTTMP/m.c" `pkg-config --cflags --libs gtkgl-3.0` xvfb-run "$ADTTMP/m" -- 2.7.0

