Hello community,

here is the log from the commit of package ghc-GLUT for openSUSE:Factory 
checked in at 2017-03-24 02:08:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-GLUT (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-GLUT.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-GLUT"

Fri Mar 24 02:08:01 2017 rev:16 rq:455469 version:2.7.0.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-GLUT/ghc-GLUT.changes        2016-07-21 
08:04:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-GLUT.new/ghc-GLUT.changes   2017-03-24 
02:08:02.855589002 +0100
@@ -1,0 +2,5 @@
+Mon Jan 30 09:35:00 UTC 2017 - [email protected]
+
+- Update to version 2.7.0.11 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  GLUT-2.7.0.10.tar.gz

New:
----
  GLUT-2.7.0.11.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-GLUT.spec ++++++
--- /var/tmp/diff_new_pack.EUVrF0/_old  2017-03-24 02:08:03.527493884 +0100
+++ /var/tmp/diff_new_pack.EUVrF0/_new  2017-03-24 02:08:03.527493884 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-GLUT
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,16 +18,14 @@
 
 %global pkg_name GLUT
 Name:           ghc-%{pkg_name}
-Version:        2.7.0.10
+Version:        2.7.0.11
 Release:        0
 Summary:        A binding for the OpenGL Utility Toolkit
 License:        BSD-3-Clause
-Group:          System/Libraries
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  freeglut-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-OpenGL-devel
 BuildRequires:  ghc-StateVar-devel
 BuildRequires:  ghc-array-devel
@@ -35,8 +33,6 @@
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
-BuildRequires:  ghc-random-devel
 
 %description
 A Haskell binding for the OpenGL Utility Toolkit, a window system independent
@@ -48,8 +44,6 @@
 Summary:        Haskell %{pkg_name} library development files
 Group:          Development/Libraries/Other
 Requires:       %{name} = %{version}-%{release}
-# Begin cabal-rpm deps:
-Requires:       freeglut-devel
 Requires:       ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}
 Requires(postun): ghc-compiler = %{ghc_version}
@@ -60,15 +54,12 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %post devel
 %ghc_pkg_recache
 

++++++ GLUT-2.7.0.10.tar.gz -> GLUT-2.7.0.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/GLUT-2.7.0.10/CHANGELOG.md 
new/GLUT-2.7.0.11/CHANGELOG.md
--- old/GLUT-2.7.0.10/CHANGELOG.md      2016-05-12 18:47:38.000000000 +0200
+++ new/GLUT-2.7.0.11/CHANGELOG.md      2017-01-26 14:36:25.000000000 +0100
@@ -1,3 +1,7 @@
+2.7.0.11
+--------
+* Linux: Try to load versioned GLUT library, too, because the unversioned one 
is often in *-dev packages only.
+
 2.7.0.10
 --------
 * Mac OS X: Search public frameworks first, then system frameworks.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/GLUT-2.7.0.10/GLUT.cabal new/GLUT-2.7.0.11/GLUT.cabal
--- old/GLUT-2.7.0.10/GLUT.cabal        2016-05-12 18:47:38.000000000 +0200
+++ new/GLUT-2.7.0.11/GLUT.cabal        2017-01-26 14:57:38.000000000 +0100
@@ -1,5 +1,5 @@
 name: GLUT
-version: 2.7.0.10
+version: 2.7.0.11
 synopsis: A binding for the OpenGL Utility Toolkit
 description:
   A Haskell binding for the OpenGL Utility Toolkit, a window system independent
@@ -22,7 +22,7 @@
   GHC == 7.6.3
   GHC == 7.8.4
   GHC == 7.10.3
-  GHC == 8.0.1
+  GHC == 8.0.2
   GHC == 8.1
 cabal-version: >= 1.10
 extra-source-files:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/GLUT-2.7.0.10/README.md new/GLUT-2.7.0.11/README.md
--- old/GLUT-2.7.0.10/README.md 2015-01-18 13:44:06.000000000 +0100
+++ new/GLUT-2.7.0.11/README.md 2016-08-28 18:21:17.000000000 +0200
@@ -1 +1,4 @@
-[![Hackage](https://img.shields.io/hackage/v/GLUT.svg)](https://hackage.haskell.org/package/GLUT)
 [![Build 
Status](https://travis-ci.org/haskell-opengl/GLUT.png)](https://travis-ci.org/haskell-opengl/GLUT)
+[![Hackage](https://img.shields.io/hackage/v/GLUT.svg)](https://hackage.haskell.org/package/GLUT)
+[![Stackage 
LTS](https://www.stackage.org/package/GLUT/badge/lts)](https://www.stackage.org/lts/package/GLUT)
+[![Stackage 
nightly](https://www.stackage.org/package/GLUT/badge/nightly)](https://www.stackage.org/nightly/package/GLUT)
+[![Build 
Status](https://img.shields.io/travis/haskell-opengl/GLUT/master.svg)](https://travis-ci.org/haskell-opengl/GLUT)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/GLUT-2.7.0.10/cbits/HsGLUT.c 
new/GLUT-2.7.0.11/cbits/HsGLUT.c
--- old/GLUT-2.7.0.10/cbits/HsGLUT.c    2016-05-12 18:47:38.000000000 +0200
+++ new/GLUT-2.7.0.11/cbits/HsGLUT.c    2017-01-26 14:32:01.000000000 +0100
@@ -15,6 +15,16 @@
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
+static LPCTSTR libNames[] = {
+  /* Try to load freeglut first, it has a few extra features compared to 
classic
+     GLUT. */
+  TEXT("freeglut"),
+  /* The MinGW-w64 version of freeglut prefixes "lib" onto the DLL name. */
+  TEXT("libfreeglut"),
+  /* If no freeglut version is found, try plain old glut32 instead. */
+  TEXT("glut32")
+};
+
 void*
 hs_GLUT_getProcAddress(const char *name)
 {
@@ -22,20 +32,10 @@
   static HMODULE handle = NULL;
 
   if (firstTime) {
+    int i, numNames = (int)(sizeof(libNames) / sizeof(libNames[0]));
     firstTime = 0;
-
-    /* Try to load freeglut first, it has a few extra features compared to
-       classic GLUT. */
-    handle = LoadLibrary(TEXT("freeglut"));
-
-    /* The MinGW-w64 version of freeglut prefixes "lib" onto the DLL name. */
-    if (!handle) {
-      handle = LoadLibrary(TEXT("libfreeglut"));
-    }
-
-    /* If no freeglut version is found, try plain old glut32 instead. */
-    if (!handle) {
-      handle = LoadLibrary(TEXT("glut32"));
+    for (i = 0;   (!handle) && (i < numNames);   ++i) {
+      handle = LoadLibrary(libNames[i]);
     }
   }
 
@@ -48,6 +48,17 @@
 #include <stdlib.h>
 #include <dlfcn.h>
 
+static const char* libNames[] = {
+#ifdef __APPLE__
+  /* Try public framework path first. */
+  "/Library/Frameworks/GLUT.framework/GLUT",
+  /* If the public path failed, try the system framework path. */
+  "/System/Library/Frameworks/GLUT.framework/GLUT"
+#else
+  "libglut.so", "libglut.so.3"
+#endif
+};
+
 void*
 hs_GLUT_getProcAddress(const char *name)
 {
@@ -55,19 +66,11 @@
   static void *handle = NULL;
 
   if (firstTime) {
+    int i, numNames = (int)(sizeof(libNames) / sizeof(libNames[0]));
     firstTime = 0;
-
-#ifdef __APPLE__
-    /* Try public framework path first. */
-    handle = dlopen("/Library/Frameworks/GLUT.framework/GLUT", RTLD_LAZY | 
RTLD_GLOBAL);
-
-    /* If the public path failed, try the system framework path. */
-    if (!handle) {
-      handle = dlopen("/System/Library/Frameworks/GLUT.framework/GLUT", 
RTLD_LAZY | RTLD_GLOBAL);
+    for (i = 0;   (!handle) && (i < numNames);   ++i) {
+      handle = dlopen(libNames[i], RTLD_LAZY | RTLD_GLOBAL);
     }
-#else
-    handle = dlopen("libglut.so", RTLD_LAZY | RTLD_GLOBAL);
-#endif
   }
 
   return handle ? dlsym(handle, name) : NULL;


Reply via email to