diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..940aafd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/glu-9.0.0.tar.bz2 diff --git a/0001-glu-initialize-PriorityQ-order-field-to-NULL-in-pqNe.patch b/0001-glu-initialize-PriorityQ-order-field-to-NULL-in-pqNe.patch new file mode 100644 index 0000000..aa43a7f --- /dev/null +++ b/0001-glu-initialize-PriorityQ-order-field-to-NULL-in-pqNe.patch @@ -0,0 +1,33 @@ +From bfdf99d6ff64b9c2d840e8a5767eaa57e4363c79 Mon Sep 17 00:00:00 2001 +From: Mike Gorchak +Date: Wed, 2 Jan 2013 13:39:50 -0700 +Subject: [PATCH 1/2] glu: initialize PriorityQ::order field to NULL in + pqNewPriorityQ() + +pqNewPriorityQ() function creates and setups PriorityQ structure, all +except for the field "order". It is filled later in function +pqInit(). Depending on vertices of polygon which must be tesselated +there possible following situation, pqDeletePriorityQ() is called +right after pqNewPriorityQ() function. pqNewPriorityQ() tries to free +memory using pq->order as pointer, which is unitialized at this point. + +Signed-off-by: Brian Paul +--- + src/libtess/priorityq.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/libtess/priorityq.c b/src/libtess/priorityq.c +index c6b99cc..db7cd59 100644 +--- a/src/libtess/priorityq.c ++++ b/src/libtess/priorityq.c +@@ -65,6 +65,7 @@ PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) ) + return NULL; + } + ++ pq->order = NULL; + pq->size = 0; + pq->max = INIT_SIZE; + pq->initialized = FALSE; +-- +1.8.3.1 + diff --git a/0002-Add-D-N-DEBUG-to-CFLAGS-dependent-on-enable-debug.patch b/0002-Add-D-N-DEBUG-to-CFLAGS-dependent-on-enable-debug.patch new file mode 100644 index 0000000..0c73f39 --- /dev/null +++ b/0002-Add-D-N-DEBUG-to-CFLAGS-dependent-on-enable-debug.patch @@ -0,0 +1,35 @@ +From 069211570c32a8d5848e127975a2943e9d8fc6b9 Mon Sep 17 00:00:00 2001 +From: Matt Turner +Date: Thu, 21 Feb 2013 20:40:31 -0800 +Subject: [PATCH 2/2] Add -D(N)DEBUG to CFLAGS dependent on --enable-debug +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Tested-by: Blaž Hrastnik +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61003 +--- + configure.ac | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index cbfd047..45abf17 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,9 +42,10 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [Enable debugging information]), +- [CFLAGS="$CFLAGS -g -O0" +- CXXFLAGS="$CXXFLAGS -g -O0"], +- []) ++ [CFLAGS="$CFLAGS -g -O0 -DDEBUG" ++ CXXFLAGS="$CXXFLAGS -g -O0 -DDEBUG"], ++ [CFLAGS="$CFLAGS -DNDEBUG" ++ CXXFLAGS="$CXXFLAGS -DNDEBUG"]) + + dnl Make sure the pkg-config macros are defined + m4_ifndef([PKG_PROG_PKG_CONFIG], +-- +1.8.3.1 + diff --git a/EMPTY b/EMPTY deleted file mode 100644 index 0519ecb..0000000 --- a/EMPTY +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh new file mode 100755 index 0000000..bfdfc6f --- /dev/null +++ b/make-git-snapshot.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Usage: ./make-git-snapshot.sh [COMMIT] +# +# to make a snapshot of the given tag/branch. Defaults to HEAD. +# Point env var REF to a local mesa repo to reduce clone time. + +DIRNAME=glu-$( date +%Y%m%d ) + +echo REF ${REF:+--reference $REF} +echo DIRNAME $DIRNAME +echo HEAD ${1:-HEAD} + +rm -rf $DIRNAME + +git clone ${REF:+--reference $REF} \ + git://git.freedesktop.org/git/mesa/glu $DIRNAME + +GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \ + | xz > $DIRNAME.tar.xz + +# rm -rf $DIRNAME diff --git a/mesa-libGLU.spec b/mesa-libGLU.spec new file mode 100644 index 0000000..44d9a4a --- /dev/null +++ b/mesa-libGLU.spec @@ -0,0 +1,114 @@ +#define gitdate 20120904 + +Name: mesa-libGLU +Version: 9.0.0 +Release: 15%{?dist} +Summary: Mesa libGLU library + +License: MIT +URL: http://mesa3d.org/ +Source0: ftp://ftp.freedesktop.org/pub/mesa/glu/glu-%{version}.tar.bz2 +Source2: make-git-snapshot.sh + +Patch1: 0001-glu-initialize-PriorityQ-order-field-to-NULL-in-pqNe.patch +Patch2: 0002-Add-D-N-DEBUG-to-CFLAGS-dependent-on-enable-debug.patch + +BuildRequires: autoconf automake libtool +BuildRequires: mesa-libGL-devel +#Requires: +Provides: libGLU + +%description +Mesa implementation of the standard GLU OpenGL utility API. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: gl-manpages +Provides: libGLU-devel + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%setup -q -n glu-%{?gitdate:%{gitdate}}%{?!gitdate:%{version}} +%patch1 -p1 +%patch2 -p1 + +%build +autoreconf -v -i -f +%configure --disable-static +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +rm -rf $RPM_BUILD_ROOT%{_datadir}/man/man3/gl[A-Z]* + +%ldconfig_post + +%ldconfig_postun + +%files +%{_libdir}/libGLU.so.1 +%{_libdir}/libGLU.so.1.3.* + +%files devel +%{_includedir}/GL/glu*.h +%{_libdir}/libGLU.so +%{_libdir}/pkgconfig/glu.pc + +%changelog +* Fri Jun 29 2018 Adam Jackson - 9.0.0-15 +- Use ldconfig scriptlet macros + +* Thu Feb 08 2018 Fedora Release Engineering - 9.0.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 9.0.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 9.0.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 9.0.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 9.0.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 9.0.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 9.0.0-8 +- Rebuilt for GCC 5 C++11 ABI change + +* Sun Aug 17 2014 Fedora Release Engineering - 9.0.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 9.0.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 21 2014 Adam Jackson 9.0.0-5 +- Always autoreconf to pick up patch changes (#1070602) + +* Mon Dec 09 2013 Adam Jackson 9.0.0-4 +- Sync with git (#1011823) + +* Sat Aug 03 2013 Fedora Release Engineering - 9.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 9.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Sep 18 2012 Adam Jackson 9.0.0-1 +- libGLU 9.0 + +* Mon Sep 10 2012 Dave Airlie 9.0-0.2 +- add back libGLU provides for now + +* Tue Sep 04 2012 Adam Jackson 9.0-0.1 +- Initial packaging for split libGLU + diff --git a/sources b/sources new file mode 100644 index 0000000..c5b2dfc --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (glu-9.0.0.tar.bz2) = ff920e3fbca739794e1432a92fdd8517aa732110fea71ed724185425042f83ce18e9866c16f95c6e10f6993f0814a90fac9636e2b3d8ca2084d1ac0a860f61c8