Sisyphus repository
Last update: 19 january 2021 | SRPMs: 17773 | Visits: 20080250
en ru br
ALT Linux repos
5.0: 2.4.0-alt3

Group :: System/Libraries
RPM: libfreeglut

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%def_disable snapshot
%define _name freeglut
%define sover 3
%def_enable replace_glut
%def_disable wayland
%def_disable check

%define glut_version 5:8.0.1
%define glut_release alt3

Name: lib%_name
Version: 3.2.1
Release: alt3

Summary: A freely licensed alternative to the GLUT library
License: MIT
Group: System/Libraries

%if_disabled snapshot
# VCS:
Source: %_name-%version.tar
Patch1: libfreeglut-alt-fix-visibility-hidden.patch
Patch2: libfreeglut-alt-enable-visibility-hidden.patch
# b9998bbc1e1c329f6bf69c24606a2be7a4973b8c
Patch3: freeglut-3.2.1-up-gcc10.patch

Provides: libglut = %version %_name = %version
Obsoletes: libglut < %version %_name < %version

Obsoletes: libGLUT <= %glut_version-%glut_release
Provides: libGLUT = %glut_version-alt4
Conflicts: libmesaglut

BuildRequires: ccmake ctest gcc-c++ libGLU-devel libXcomposite-devel libXcursor-devel libXdamage-devel
BuildRequires: libXdmcp-devel libXft-devel libXinerama-devel libXmu-devel libXpm-devel libXrandr-devel
BuildRequires: libXtst-devel libXv-devel libXxf86misc-devel libXxf86vm-devel libxkbfile-devel
%{?_enable_wayland:BuildRequires: libwayland-client-devel libwayland-cursor-devel libwayland-egl-devel libEGL-devel libxkbcommon-devel}

%_name is a completely open source alternative to the OpenGL Utility Toolkit
(GLUT) library with an OSI approved free software license. GLUT was originally
written by Mark Kilgard to support the sample programs in the second edition
OpenGL 'RedBook'. Since then, GLUT has been used in a wide variety of practical
applications because it is simple, universally available and highly portable.

%_name allows the user to create and manage windows containing OpenGL
contexts on a wide range of platforms and also read the mouse, keyboard and
joystick functions.

%package devel
Summary: Freeglut developmental libraries and header files
Group: Development/C
Requires: %name = %version-%release
# due to freeglut_std.h
Requires: libGL-devel libGLU-devel
Obsoletes: libGLUT-devel <= %glut_version-%glut_release
Provides: libGLUT-devel = %glut_version-alt4
Conflicts: libmesaglut-devel
Provides: libglut-devel = %version %_name-devel = %version
Obsoletes: libglut-devel < %version %_name-devel < %version

%description devel
Developmental libraries and header files required for developing or compiling
software which links to the freeglut library, which is an open source
alternative to the popular GLUT library, with an OSI approved free software

%setup -n %_name-%version
%patch1 -p3
%patch2 -p3
%patch3 -p3

%add_optflags -D_FILE_OFFSET_BITS=64
%cmake \
      -DCMAKE_BUILD_TYPE="Release" \
      %{?_enable_replace_glut:-DFREEGLUT_REPLACE_GLUT:BOOL=ON} \
      %{?_disable_replace_glut:-DFREEGLUT_REPLACE_GLUT:BOOL=OFF} \

# always install glut.h and freeglut.pc
install -m644 include/GL/glut.h %buildroot%_includedir/GL
ln -s glut.pc %buildroot%_pkgconfigdir/%_name.pc
%if_disabled replace_glut
# compatibility symlinks
ln -s %_name.pc %buildroot%_pkgconfigdir/glut.pc
ln -s %buildroot%_libdir/

%make -C BUILD test

%if_enabled replace_glut

%files devel
%if_enabled replace_glut


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin