Source: gtkgl2
Severity: wishlist
Tags: patch

Hello.
The attached patches update the packaging and fix various issues.
I hope that they will help packaging latest upstream version and
eventually support gtk-3.
>From eb0b04d9a3747175d9fbe7ad0985f622443951c5 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 00:47:21 +0100
Subject: [PATCH 01/15] Switch to source format 3.0 (quilt). Acknowledge NMU
 from Gregor Hermann closing #713708 (FTBFS: ld: zktor.o: undefined reference
 to symbol 'atan2@@GLIBC_2.2.5').

---
 debian/changelog                      | 11 +++++++++++
 debian/patches/libm_underlinkage.diff | 26 ++++++++++++++++++++++++++
 debian/patches/series                 |  1 +
 debian/source/format                  |  1 +
 4 files changed, 39 insertions(+)
 create mode 100644 debian/patches/libm_underlinkage.diff
 create mode 100644 debian/patches/series
 create mode 100644 debian/source/format

diff --git a/debian/changelog b/debian/changelog
index f31b270..4584808 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+gtkgl2 (2.0.1-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "FTBFS: ld: zktor.o: undefined reference to symbol
+    'atan2@@GLIBC_2.2.5'":
+    take patch libm_underlinkage.patch from Ubuntu / Daniel T Chen, apply it
+    directly since there is no patch system / appropriate source format.
+    (Closes: #713708)
+
+ -- gregor herrmann <[email protected]>  Wed, 06 Nov 2013 17:33:34 +0100
+
 gtkgl2 (2.0.1-2) unstable; urgency=low
 
   * debian/compat: switch to debhelper 8.
diff --git a/debian/patches/libm_underlinkage.diff b/debian/patches/libm_underlinkage.diff
new file mode 100644
index 0000000..85b3f8a
--- /dev/null
+++ b/debian/patches/libm_underlinkage.diff
@@ -0,0 +1,26 @@
+Description: Fix "FTBFS: ld: zktor.o: undefined reference to symbol 'atan2@@GLIBC_2.2.5'":
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713708
+Origin: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/gtkgl2/saucy/revision/9?start_revid=9&remember=9
+
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -9,7 +9,7 @@
+ noinst_PROGRAMS = simple zktor viewlw glpixmap gdkfont $(shader_programs) gtkglarea_demo
+ 
+ INCLUDES = -I$(top_srcdir)
+-LDADD = $(top_builddir)/gtkgl/libgtkgl-2.0.la $(GTK_LIBS) $(GL_LIBS)
++LDADD = $(top_builddir)/gtkgl/libgtkgl-2.0.la $(GTK_LIBS) $(GL_LIBS) -lm
+ 
+ simple_SOURCES   = simple.c
+ zktor_SOURCES    = zktor.c
+--- a/examples/Makefile.in
++++ b/examples/Makefile.in
+@@ -228,7 +228,7 @@
+ EXTRA_DIST = README penguin.lwo alien.lwo makefile.mingw makefile.mingw.in
+ @HAVE_SHADERS_TRUE@shader_programs = shaders
+ INCLUDES = -I$(top_srcdir)
+-LDADD = $(top_builddir)/gtkgl/libgtkgl-2.0.la $(GTK_LIBS) $(GL_LIBS)
++LDADD = $(top_builddir)/gtkgl/libgtkgl-2.0.la $(GTK_LIBS) $(GL_LIBS) -lm
+ simple_SOURCES = simple.c
+ zktor_SOURCES = zktor.c
+ glpixmap_SOURCES = glpixmap.c
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..193258f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+libm_underlinkage.diff
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
-- 
2.7.0

>From f8896851fa51f14052d4e86c8af9969f8f111825 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Mon, 8 Feb 2016 19:00:44 +0100
Subject: [PATCH 02/15] Acknowledge NMU from Wookey closing #729613 (Use
 dh-autoreconf to update configure for new architectures).

---
 debian/changelog | 8 ++++++++
 debian/control   | 2 +-
 debian/rules     | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 4584808..7f02a43 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+gtkgl2 (2.0.1-2.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Use dh-autoreconf to update configure for new architectures
+    (Closes: #729613)
+
+ -- Wookey <[email protected]>  Fri, 18 Jul 2014 16:29:01 +0000
+
 gtkgl2 (2.0.1-2.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff --git a/debian/control b/debian/control
index 773577c..d8d6043 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: devel
 Priority: optional
 Maintainer: Sam Hocevar <[email protected]>
 Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 8.0), libgtk2.0-dev (>= 2.0.6), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev
+Build-Depends: debhelper (>= 8.0), dh-autoreconf, libgtk2.0-dev (>= 2.0.6), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev
 Vcs-Svn: svn://svn.debian.org/sam-hocevar/pkg-misc/unstable/gtkgl2
 Vcs-Browser: http://svn.debian.org/wsvn/sam-hocevar/pkg-misc/unstable/gtkgl2/
 Homepage: http://www.mono-project.com/GtkGLArea
diff --git a/debian/rules b/debian/rules
index 5e22f8f..d6610d1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,7 @@
 build: build-stamp
 build-stamp:
 	dh_testdir
+	dh_autoreconf
 	./configure --prefix=/usr --with-lib-GL
 	$(MAKE) LIBS+=-lX11
 	touch $@
@@ -15,6 +16,7 @@ clean:
 	dh_testroot
 	rm -f build-stamp
 	[ ! -f Makefile ] || $(MAKE) distclean
+	dh_autoreconf_clean
 	dh_clean
 
 # Build architecture-independent files here.
-- 
2.7.0

>From 24549c127098998c1832f1726bd4853625c6bf95 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Mon, 8 Feb 2016 19:09:32 +0100
Subject: [PATCH 03/15] Backport patches/string_format_specifier.diff from
 Ubuntu.

---
 debian/patches/series                       |  1 +
 debian/patches/string_format_specifier.diff | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 debian/patches/string_format_specifier.diff

diff --git a/debian/patches/series b/debian/patches/series
index 193258f..85d48d5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 libm_underlinkage.diff
+string_format_specifier.diff
diff --git a/debian/patches/string_format_specifier.diff b/debian/patches/string_format_specifier.diff
new file mode 100644
index 0000000..fed9797
--- /dev/null
+++ b/debian/patches/string_format_specifier.diff
@@ -0,0 +1,25 @@
+Description: compile with -Wformat hardening flags
+Origin: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/gtkgl2/saucy/revision/9?start_revid=9&remember=9
+
+--- a/examples/shaders.c
++++ b/examples/shaders.c
+@@ -149,7 +149,7 @@
+      glGetShaderiv(shader_id, GL_INFO_LOG_LENGTH, &infologLength);
+      infoLog = malloc(sizeof(GLchar) * infologLength);
+      glGetShaderInfoLog(shader_id, infologLength, &charsWritten, infoLog);
+-     g_print(infoLog);
++     g_print("%s", infoLog);
+      free(infoLog);
+    }
+ }
+--- a/examples/simple.c
++++ b/examples/simple.c
+@@ -157,7 +157,7 @@
+ 
+   /* vendor dependent version info string */
+   info_str = gdk_gl_get_info();
+-  g_print(info_str);
++  g_print("%s", info_str);
+   g_free(info_str);
+ 
+   gtk_main();
-- 
2.7.0

>From a7e4083b0891f1a697ccded5ed31b90287786480 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 00:36:15 +0100
Subject: [PATCH 04/15] Switch to debhelper 9's dh driver. Some paths now
 include a multiarch component.

---
 debian/compat                  |  2 +-
 debian/control                 |  2 +-
 debian/libgtkgl2.0-1.install   |  2 +-
 debian/libgtkgl2.0-dev.install |  8 +++---
 debian/rules                   | 60 +++++-------------------------------------
 5 files changed, 14 insertions(+), 60 deletions(-)

diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index d8d6043..dc2593b 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: devel
 Priority: optional
 Maintainer: Sam Hocevar <[email protected]>
 Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 8.0), dh-autoreconf, libgtk2.0-dev (>= 2.0.6), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev
+Build-Depends: debhelper (>= 9), dh-autoreconf, libgtk2.0-dev (>= 2.0.6), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev
 Vcs-Svn: svn://svn.debian.org/sam-hocevar/pkg-misc/unstable/gtkgl2
 Vcs-Browser: http://svn.debian.org/wsvn/sam-hocevar/pkg-misc/unstable/gtkgl2/
 Homepage: http://www.mono-project.com/GtkGLArea
diff --git a/debian/libgtkgl2.0-1.install b/debian/libgtkgl2.0-1.install
index 79bbe2f..e5e5fe1 100644
--- a/debian/libgtkgl2.0-1.install
+++ b/debian/libgtkgl2.0-1.install
@@ -1 +1 @@
-debian/tmp/usr/lib/*.so.*
+usr/lib/*/libgtkgl*.so.*
diff --git a/debian/libgtkgl2.0-dev.install b/debian/libgtkgl2.0-dev.install
index 648affb..b88baa4 100644
--- a/debian/libgtkgl2.0-dev.install
+++ b/debian/libgtkgl2.0-dev.install
@@ -1,4 +1,4 @@
-debian/tmp/usr/include
-debian/tmp/usr/lib/*.a
-debian/tmp/usr/lib/*.so
-debian/tmp/usr/lib/pkgconfig
+usr/include
+usr/lib/*/libgtkgl-*.a
+usr/lib/*/libgtkgl-*.so
+usr/lib/*/pkgconfig
diff --git a/debian/rules b/debian/rules
index d6610d1..fa4c834 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,57 +1,11 @@
 #!/usr/bin/make -f
-# Made with the aid of dh_make, by Craig Small
 #export DH_VERBOSE=1
-#export DH_COMPAT=4
 
-build: build-stamp
-build-stamp:
-	dh_testdir
-	dh_autoreconf
-	./configure --prefix=/usr --with-lib-GL
-	$(MAKE) LIBS+=-lX11
-	touch $@
+# Link with libX11 because the code calls XFree().
+export LIBS := -lX11
 
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp
-	[ ! -f Makefile ] || $(MAKE) distclean
-	dh_autoreconf_clean
-	dh_clean
-
-# Build architecture-independent files here.
-binary-indep: build
-# Nothing to do?
-
-binary-arch: DH_OPTIONS=-a
-binary-arch: build
-	#dh_testversion
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-	$(MAKE) DESTDIR=`pwd`/debian/tmp install
-	dh_install
-	dh_installdocs
-	#dh_installmenu
-	#dh_installinit
-	#dh_installcron
-	#dh_installmanpages
-	#dh_undocumented
-	dh_installchangelogs ChangeLog
-	dh_strip
-	dh_compress
-	dh_fixperms
-	#dh_suidregister
-	dh_makeshlibs
-	dh_shlibdeps
-	dh_installdeb
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-source diff:                                                                  
-	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary
+POLICY_TARGETS := binary binary-arch binary-indep build build-arch \
+  build-indep clean
+.PHONY: ${POLICY_TARGETS}
+${POLICY_TARGETS}:
+	dh $@ --with autoreconf
-- 
2.7.0

>From 7448d7059d98ac3746159d7f15af84d813db4405 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 01:17:04 +0100
Subject: [PATCH 05/15] Upstream build system allows to set LIBS without a
 patch.

---
 debian/patches/libm_underlinkage.diff | 26 --------------------------
 debian/patches/series                 |  1 -
 debian/rules                          |  3 ++-
 3 files changed, 2 insertions(+), 28 deletions(-)
 delete mode 100644 debian/patches/libm_underlinkage.diff

diff --git a/debian/patches/libm_underlinkage.diff b/debian/patches/libm_underlinkage.diff
deleted file mode 100644
index 85b3f8a..0000000
--- a/debian/patches/libm_underlinkage.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-Description: Fix "FTBFS: ld: zktor.o: undefined reference to symbol 'atan2@@GLIBC_2.2.5'":
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713708
-Origin: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/gtkgl2/saucy/revision/9?start_revid=9&remember=9
-
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -9,7 +9,7 @@
- noinst_PROGRAMS = simple zktor viewlw glpixmap gdkfont $(shader_programs) gtkglarea_demo
- 
- INCLUDES = -I$(top_srcdir)
--LDADD = $(top_builddir)/gtkgl/libgtkgl-2.0.la $(GTK_LIBS) $(GL_LIBS)
-+LDADD = $(top_builddir)/gtkgl/libgtkgl-2.0.la $(GTK_LIBS) $(GL_LIBS) -lm
- 
- simple_SOURCES   = simple.c
- zktor_SOURCES    = zktor.c
---- a/examples/Makefile.in
-+++ b/examples/Makefile.in
-@@ -228,7 +228,7 @@
- EXTRA_DIST = README penguin.lwo alien.lwo makefile.mingw makefile.mingw.in
- @HAVE_SHADERS_TRUE@shader_programs = shaders
- INCLUDES = -I$(top_srcdir)
--LDADD = $(top_builddir)/gtkgl/libgtkgl-2.0.la $(GTK_LIBS) $(GL_LIBS)
-+LDADD = $(top_builddir)/gtkgl/libgtkgl-2.0.la $(GTK_LIBS) $(GL_LIBS) -lm
- simple_SOURCES = simple.c
- zktor_SOURCES = zktor.c
- glpixmap_SOURCES = glpixmap.c
diff --git a/debian/patches/series b/debian/patches/series
index 85d48d5..06ee939 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
-libm_underlinkage.diff
 string_format_specifier.diff
diff --git a/debian/rules b/debian/rules
index fa4c834..75adfd4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,8 @@
 #export DH_VERBOSE=1
 
 # Link with libX11 because the code calls XFree().
-export LIBS := -lX11
+# Link with libm: #713708.
+export LIBS := -lX11 -lm
 
 POLICY_TARGETS := binary binary-arch binary-indep build build-arch \
   build-indep clean
-- 
2.7.0

>From ba89717d395a66db9bdb3416c69d80efcd0d01d3 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 01:21:18 +0100
Subject: [PATCH 06/15] Link with --as-needed (removes -lm when not required)
 and -z defs (report some failure exposed  by --as-needed).

---
 debian/rules | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/debian/rules b/debian/rules
index 75adfd4..1bcb3ec 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,10 @@
 # Link with libX11 because the code calls XFree().
 # Link with libm: #713708.
 export LIBS := -lX11 -lm
+# --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.
+export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed -Wl,-z,defs
 
 POLICY_TARGETS := binary binary-arch binary-indep build build-arch \
   build-indep clean
-- 
2.7.0

>From 4ca1ecac2f211b91970287b59eff21a690ad9375 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 01:38:03 +0100
Subject: [PATCH 07/15] Build-Depend and let -dev Depend on concrete GL
 libraries. Closes: #720991.

---
 debian/control | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index dc2593b..59086f4 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,10 @@ Section: devel
 Priority: optional
 Maintainer: Sam Hocevar <[email protected]>
 Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 9), dh-autoreconf, libgtk2.0-dev (>= 2.0.6), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev
+Build-Depends: debhelper (>= 9), dh-autoreconf
+ , libgtk2.0-dev (>= 2.0.6)
+ , libgl1-mesa-dev
+ , libglu1-mesa-dev
 Vcs-Svn: svn://svn.debian.org/sam-hocevar/pkg-misc/unstable/gtkgl2
 Vcs-Browser: http://svn.debian.org/wsvn/sam-hocevar/pkg-misc/unstable/gtkgl2/
 Homepage: http://www.mono-project.com/GtkGLArea
@@ -11,7 +14,11 @@ Homepage: http://www.mono-project.com/GtkGLArea
 Package: libgtkgl2.0-dev
 Section: libdevel
 Architecture: any
-Depends: libgtkgl2.0-1, libgtk2.0-dev, ${misc:Depends}
+Depends: ${misc:Depends}
+ , libgtkgl2.0-1,
+ , libgtk2.0-dev (>= 2.0.6)
+ , libgl1-mesa-dev
+ , libglu1-mesa-dev
 Provides: gtkgl-dev
 Conflicts: gtkgl-dev
 Description: OpenGL context support for GTK+ (development files)
-- 
2.7.0

>From bd14f04cb69a932ba1e1c1489a815da179207d12 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 02:00:00 +0100
Subject: [PATCH 08/15] Switch to copyright format 1.0. Update home page and
 some date ranges.

---
 debian/copyright | 42 ++++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/debian/copyright b/debian/copyright
index 35e2ead..03f20e4 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,32 +1,38 @@
-This package was debianized by Drake Diedrich <[email protected]> on
-Thu, 24 Sep 1998 16:47:45 +1000.
-
-It was originally downloaded from 
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: GtkGLArea
+Source: http://www.mono-project.com/GtkGLArea
+ This package was originally downloaded from
    http://www.ece.ucdavis.edu/~kenelson/gtk-glarea/
-Version 1:0.6 was downloaded from
+ Version 1:0.6 was downloaded from
    http://www.student.oulu.fi/~jlof/gtkglarea/download/
-Version 2.0.0 was downloaded from
+ Version 2.0.0 was downloaded from
    svn://svn.gnome.org/svn/gtkglarea/trunk
 
-Copyright (c) 2006 C.J. Adams-Collier <[email protected]>
-          (c) 2002 Xavier Ordoquy <[email protected]> (retired)
-          (c) 1997-2001 Janne Löf <[email protected]> (retired)
-          (c) 1999 Karl Nelson <[email protected]> (autoconf)
-          (c) Jussi Löf <[email protected]> (Lightwave objects)
+Files: *
+Copyright: 2007-2016 Sam Hocevar <[email protected]>
+           2006-2016 C.J. Adams-Collier <[email protected]>
+           2002      Xavier Ordoquy <[email protected]> (retired)
+           1997-2001 Janne Löf <[email protected]> (retired)
+           1999      Karl Nelson <[email protected]> (autoconf)
+                     Jussi Löf <[email protected]> (Lightwave objects)
+Licence: LGPL-2+
 
-License:
+Files: debian/*
+Copyright: 2007-2011 Sam Hocevar <[email protected]>
+           2000-2003 Marcelo E. Magallon <[email protected]>
+           1998-2000 Drake Diedrich <[email protected]>
+Licence: LGPL-2+
 
+Licence: LGPL-2+
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 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
    Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this library; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
+ .
+ On Debian GNU/Linux systems, the complete text of the GNU Library
+ General Public License can be found in /usr/share/common-licenses/LGPL-2.
-- 
2.7.0

>From 1491e0c073f1fccc2ab1cfbcb66230ad647e63b2 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 03:00:34 +0100
Subject: [PATCH 09/15] Run time test checking static and dynamic linking with
 pkg-config.

---
 debian/tests/control            |  2 ++
 debian/tests/link-basic-example | 16 ++++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 debian/tests/control
 create mode 100644 debian/tests/link-basic-example

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..c16ed91
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: link-basic-example
+Depends: @, pkg-config
diff --git a/debian/tests/link-basic-example b/debian/tests/link-basic-example
new file mode 100644
index 0000000..abfb594
--- /dev/null
+++ b/debian/tests/link-basic-example
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -C -e -f -u
+cd "$ADTTMP"
+
+cat > m.c <<EOF
+#include <gtkgl/gdkgl.h>
+int main (int argc, char **argv) {
+  return gdk_gl_query () == TRUE;
+}
+EOF
+
+gcc m.c `pkg-config --cflags --libs gtkada --static`
+./m
+
+gcc m.c `pkg-config --cflags --libs gtkada`
+./m
-- 
2.7.0

>From d6745ae8199ebb5a019968a1ffcdf98fdd1f0b5e Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 03:01:09 +0100
Subject: [PATCH 10/15] Add watch file (only valid for 2.1 versions for now).

---
 debian/watch | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 debian/watch

diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..6dd71e1
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+# The URL will require an update to detect version 2.2.
+# For the moment, it will at least warn about 2.1.*.
+version=3
+http://ftp.gnome.org/pub/GNOME/sources/gtkglarea/2.1/gtkglarea-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
-- 
2.7.0

>From 0a0e7afa5c8dbf567f69f830390bb553465b73c4 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 03:02:30 +0100
Subject: [PATCH 11/15] Declare library and -dev package Multi-Arch: same.
 Tighten dependency from -dev to library package with binary:Version. Let -dev
 package Suggest: pkg-config. Switch to canonical URLs for VCS fields, update
 Standards-Version.

---
 debian/control | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/debian/control b/debian/control
index 59086f4..968b5c7 100644
--- a/debian/control
+++ b/debian/control
@@ -2,25 +2,27 @@ Source: gtkgl2
 Section: devel
 Priority: optional
 Maintainer: Sam Hocevar <[email protected]>
-Standards-Version: 3.9.2
+Standards-Version: 3.9.6
 Build-Depends: debhelper (>= 9), dh-autoreconf
  , libgtk2.0-dev (>= 2.0.6)
  , libgl1-mesa-dev
  , libglu1-mesa-dev
-Vcs-Svn: svn://svn.debian.org/sam-hocevar/pkg-misc/unstable/gtkgl2
-Vcs-Browser: http://svn.debian.org/wsvn/sam-hocevar/pkg-misc/unstable/gtkgl2/
+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: libgtkgl2.0-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
 Depends: ${misc:Depends}
- , libgtkgl2.0-1,
+ , libgtkgl2.0-1 (= ${binary:Version})
  , libgtk2.0-dev (>= 2.0.6)
  , libgl1-mesa-dev
  , libglu1-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
@@ -32,6 +34,7 @@ Description: OpenGL context support for GTK+ (development files)
 Package: libgtkgl2.0-1
 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
@@ -40,4 +43,3 @@ Description: OpenGL context support for GTK+ (shared libraries)
  widget).
  .
  This package contains the shared library.
-
-- 
2.7.0

>From 67b7b6cd6a6a77d182c8be1b3a2ece83bf98ec3f Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 9 Feb 2016 04:52:23 +0100
Subject: [PATCH 12/15] Help libtool to support --as-needed (#347650).

---
 debian/rules | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debian/rules b/debian/rules
index 1bcb3ec..ae12d1c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,3 +14,9 @@ POLICY_TARGETS := binary binary-arch binary-indep build build-arch \
 .PHONY: ${POLICY_TARGETS}
 ${POLICY_TARGETS}:
 	dh $@ --with autoreconf
+
+# Help libtool to support --as-needed (#347650).
+# This does not seem to prevent pthread being linked.
+.PHONY: override_dh_autoreconf
+override_dh_autoreconf:
+	dh_autoreconf --as-needed
-- 
2.7.0

>From df3e13f62d4f9af38486e06b20c642b89af79dc1 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Wed, 10 Feb 2016 15:54:18 +0100
Subject: [PATCH 13/15] Test: typos, no static link (glib-2.0 privately depends
 on ffi and selinux)

---
 debian/tests/link-basic-example | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/debian/tests/link-basic-example b/debian/tests/link-basic-example
index abfb594..2e0cd95 100644
--- a/debian/tests/link-basic-example
+++ b/debian/tests/link-basic-example
@@ -8,9 +8,5 @@ int main (int argc, char **argv) {
   return gdk_gl_query () == TRUE;
 }
 EOF
-
-gcc m.c `pkg-config --cflags --libs gtkada --static`
-./m
-
-gcc m.c `pkg-config --cflags --libs gtkada`
+cc -o m m.c `pkg-config --cflags --libs gtkgl-2.0`
 ./m
-- 
2.7.0

>From 058601fe5d446fb90669cdc7656df872d017f461 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Wed, 10 Feb 2016 16:33:27 +0100
Subject: [PATCH 14/15] Rename binary packages according to actual Shared
 Object Name.

---
 debian/control                  | 6 +++---
 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/libgtkgl2.0-1.docs       | 1 -
 debian/libgtkgl2.0-1.install    | 1 -
 debian/libgtkgl2.0-dev.docs     | 3 ---
 debian/libgtkgl2.0-dev.install  | 4 ----
 9 files changed, 12 insertions(+), 12 deletions(-)
 create mode 100644 debian/libgtkgl-2.0-1.docs
 create mode 100644 debian/libgtkgl-2.0-1.install
 create mode 100644 debian/libgtkgl-2.0-dev.docs
 create mode 100644 debian/libgtkgl-2.0-dev.install
 delete mode 100644 debian/libgtkgl2.0-1.docs
 delete mode 100644 debian/libgtkgl2.0-1.install
 delete mode 100644 debian/libgtkgl2.0-dev.docs
 delete mode 100644 debian/libgtkgl2.0-dev.install

diff --git a/debian/control b/debian/control
index 968b5c7..cb5da74 100644
--- a/debian/control
+++ b/debian/control
@@ -11,12 +11,12 @@ 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: libgtkgl2.0-dev
+Package: libgtkgl-2.0-dev
 Section: libdevel
 Architecture: any
 Multi-Arch: same
 Depends: ${misc:Depends}
- , libgtkgl2.0-1 (= ${binary:Version})
+ , libgtkgl-2.0-1 (= ${binary:Version})
  , libgtk2.0-dev (>= 2.0.6)
  , libgl1-mesa-dev
  , libglu1-mesa-dev
@@ -31,7 +31,7 @@ Description: OpenGL context support for GTK+ (development files)
  .
  This package contains the headers and static library.
 
-Package: libgtkgl2.0-1
+Package: libgtkgl-2.0-1
 Section: libs
 Architecture: any
 Multi-Arch: same
diff --git a/debian/libgtkgl-2.0-1.docs b/debian/libgtkgl-2.0-1.docs
new file mode 100644
index 0000000..62deb04
--- /dev/null
+++ b/debian/libgtkgl-2.0-1.docs
@@ -0,0 +1 @@
+AUTHORS
diff --git a/debian/libgtkgl-2.0-1.install b/debian/libgtkgl-2.0-1.install
new file mode 100644
index 0000000..e5e5fe1
--- /dev/null
+++ b/debian/libgtkgl-2.0-1.install
@@ -0,0 +1 @@
+usr/lib/*/libgtkgl*.so.*
diff --git a/debian/libgtkgl-2.0-dev.docs b/debian/libgtkgl-2.0-dev.docs
new file mode 100644
index 0000000..9e76372
--- /dev/null
+++ b/debian/libgtkgl-2.0-dev.docs
@@ -0,0 +1,3 @@
+docs/*.txt
+AUTHORS
+README
diff --git a/debian/libgtkgl-2.0-dev.install b/debian/libgtkgl-2.0-dev.install
new file mode 100644
index 0000000..b88baa4
--- /dev/null
+++ b/debian/libgtkgl-2.0-dev.install
@@ -0,0 +1,4 @@
+usr/include
+usr/lib/*/libgtkgl-*.a
+usr/lib/*/libgtkgl-*.so
+usr/lib/*/pkgconfig
diff --git a/debian/libgtkgl2.0-1.docs b/debian/libgtkgl2.0-1.docs
deleted file mode 100644
index 62deb04..0000000
--- a/debian/libgtkgl2.0-1.docs
+++ /dev/null
@@ -1 +0,0 @@
-AUTHORS
diff --git a/debian/libgtkgl2.0-1.install b/debian/libgtkgl2.0-1.install
deleted file mode 100644
index e5e5fe1..0000000
--- a/debian/libgtkgl2.0-1.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/libgtkgl*.so.*
diff --git a/debian/libgtkgl2.0-dev.docs b/debian/libgtkgl2.0-dev.docs
deleted file mode 100644
index 9e76372..0000000
--- a/debian/libgtkgl2.0-dev.docs
+++ /dev/null
@@ -1,3 +0,0 @@
-docs/*.txt
-AUTHORS
-README
diff --git a/debian/libgtkgl2.0-dev.install b/debian/libgtkgl2.0-dev.install
deleted file mode 100644
index b88baa4..0000000
--- a/debian/libgtkgl2.0-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/include
-usr/lib/*/libgtkgl-*.a
-usr/lib/*/libgtkgl-*.so
-usr/lib/*/pkgconfig
-- 
2.7.0

>From 6bd1b307bce81915215d8aad53ce7bacf7659644 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Wed, 10 Feb 2016 17:05:42 +0100
Subject: [PATCH 15/15] copyright: typo

---
 debian/copyright | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/copyright b/debian/copyright
index 03f20e4..840c557 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -15,15 +15,15 @@ Copyright: 2007-2016 Sam Hocevar <[email protected]>
            1997-2001 Janne Löf <[email protected]> (retired)
            1999      Karl Nelson <[email protected]> (autoconf)
                      Jussi Löf <[email protected]> (Lightwave objects)
-Licence: LGPL-2+
+License: LGPL-2+
 
 Files: debian/*
 Copyright: 2007-2011 Sam Hocevar <[email protected]>
            2000-2003 Marcelo E. Magallon <[email protected]>
            1998-2000 Drake Diedrich <[email protected]>
-Licence: LGPL-2+
+License: LGPL-2+
 
-Licence: LGPL-2+
+License: LGPL-2+
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
-- 
2.7.0

Reply via email to