rpms/AntTweakBar/F-12 AntTweakBar-fix-includes.patch, NONE, 1.1 AntTweakBar-makefile.patch, NONE, 1.1 AntTweakBar.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Sean Middleditch elanthis at fedoraproject.org
Tue Oct 27 07:36:46 UTC 2009


Author: elanthis

Update of /cvs/pkgs/rpms/AntTweakBar/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10548

Modified Files:
	.cvsignore sources 
Added Files:
	AntTweakBar-fix-includes.patch AntTweakBar-makefile.patch 
	AntTweakBar.spec 
Log Message:
* Wed Oct 27 2009 Sean Middleditch <sean at middleditch.us> 1.13-5
- Initial import to F-12.


AntTweakBar-fix-includes.patch:
 examples/TwAdvanced1.cpp |    4 ++++
 examples/TwString.cpp    |    4 ++++
 src/TwBar.cpp            |    4 ++++
 src/TwFonts.cpp          |    4 ++++
 src/TwMgr.cpp            |    5 +++++
 src/TwOpenGL.cpp         |    3 +++
 6 files changed, 24 insertions(+)

--- NEW FILE AntTweakBar-fix-includes.patch ---
diff -uNr AntTweakBar/examples/TwAdvanced1.cpp AntTweakBar-Fedora/examples/TwAdvanced1.cpp
--- AntTweakBar/examples/TwAdvanced1.cpp	2009-04-23 13:03:08.000000000 -0700
+++ AntTweakBar-Fedora/examples/TwAdvanced1.cpp	2009-10-21 13:32:07.142268590 -0700
@@ -30,6 +30,10 @@
 #define GLFW_DLL // use GLFW as a dynamically linked library
 #include "glfw.h"
 
+// Fedora patch: missing includes
+#include <cstdlib>
+#include <cstdio>
+
 #include <cmath>
 #include <iostream>
 #if !defined(_WIN32) && !defined(_WIN64)
diff -uNr AntTweakBar/examples/TwString.cpp AntTweakBar-Fedora/examples/TwString.cpp
--- AntTweakBar/examples/TwString.cpp	2009-04-23 13:03:08.000000000 -0700
+++ AntTweakBar-Fedora/examples/TwString.cpp	2009-10-21 13:32:51.538505701 -0700
@@ -27,6 +27,10 @@
 #   define _snprintf snprintf
 #endif
 
+// Fedora patch: missing includes
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
 
 // ---------------------------------------------------------------------------
 // 1) Callback functions for std::string variables
diff -uNr AntTweakBar/src/TwBar.cpp AntTweakBar-Fedora/src/TwBar.cpp
--- AntTweakBar/src/TwBar.cpp	2009-04-23 13:03:08.000000000 -0700
+++ AntTweakBar-Fedora/src/TwBar.cpp	2009-10-21 11:11:14.164153448 -0700
@@ -15,6 +15,10 @@
 #include "TwMgr.h"
 #include "TwBar.h"
 #include "TwColors.h"
+
+// Fedora patch: memset(), free(), and friends
+#include <cstring>
+#include <cstdlib>
   
 using namespace std;
 
diff -uNr AntTweakBar/src/TwFonts.cpp AntTweakBar-Fedora/src/TwFonts.cpp
--- AntTweakBar/src/TwFonts.cpp	2009-04-23 13:03:08.000000000 -0700
+++ AntTweakBar-Fedora/src/TwFonts.cpp	2009-10-21 11:10:27.427520003 -0700
@@ -14,6 +14,10 @@
 #include "TwMgr.h"
 #include "TwFonts.h"
 
+// Fedora patch: memset()
+#include <cstring>
+using std::memset;
+
 
 //  ---------------------------------------------------------------------------
 
diff -uNr AntTweakBar/src/TwMgr.cpp AntTweakBar-Fedora/src/TwMgr.cpp
--- AntTweakBar/src/TwMgr.cpp	2009-04-23 13:03:08.000000000 -0700
+++ AntTweakBar-Fedora/src/TwMgr.cpp	2009-10-21 11:18:54.890146180 -0700
@@ -28,6 +28,11 @@
 #if !defined(ANT_WINDOWS)
 #   define _snprintf snprintf
 #endif  // defined(ANT_WINDOWS)
+
+// Fedora patch: include fix
+#include <cstring>
+#include <cstdlib>
+#include <cmath>
 
 
 using namespace std;
diff -uNr AntTweakBar/src/TwOpenGL.cpp AntTweakBar-Fedora/src/TwOpenGL.cpp
--- AntTweakBar/src/TwOpenGL.cpp	2009-04-23 13:03:08.000000000 -0700
+++ AntTweakBar-Fedora/src/TwOpenGL.cpp	2009-10-21 11:10:07.041520158 -0700
@@ -15,6 +15,9 @@
 #include "TwOpenGL.h"
 #include "TwMgr.h"
 
+// Fedora patch: memset()
+#include <cstring>
+
 using namespace std;
 
 const char *g_ErrCantLoadOGL    = "Cannot load OpenGL library dynamically";

AntTweakBar-makefile.patch:
 Makefile |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

--- NEW FILE AntTweakBar-makefile.patch ---
--- AntTweakBar/src/Makefile	2009-04-23 13:03:08.000000000 -0700
+++ AntTweakBar-Fedora/src/Makefile	2009-10-21 13:13:35.007138035 -0700
@@ -5,15 +5,20 @@
 #SO_EXT		= .dll
 #---- LINUX
 SO_EXT		= .so
+SO_VERSION	= 0
 
 #---- Release
-CXXCFG   	= -O3
-LFLAGS		= -Wl,-s
-OUT_DIR		= ../lib
+#CXXCFG   	= -O3
+#LFLAGS		= -Wl,-s
+#OUT_DIR		= ../lib
 #---- Debug
 #CXXCFG   	= -g -D_DEBUG
 #LFLAGS		= 
 #OUT_DIR	= ../lib/debug
+#---- Fedora Build
+CXXCFG   	= $(FEDORA_CXXFLAGS)
+LFLAGS		= 
+OUT_DIR		= ../lib
 
 
 CXX      	= gcc
@@ -67,7 +72,7 @@
 
 $(TARGET): $(OBJS)
 	@echo "===== Link $@ ====="
-	$(LINK) $(LFLAGS) -shared -Wl,-soname,lib$(TARGET)$(SO_EXT)  -o $(OUT_DIR)/lib$(TARGET)$(SO_EXT) $(OBJS) $(LIBS)
+	$(LINK) $(LFLAGS) -shared -Wl,-soname,lib$(TARGET)$(SO_EXT).$(SO_VERSION)  -o $(OUT_DIR)/lib$(TARGET)$(SO_EXT) $(OBJS) $(LIBS)
 
 .cpp.o:
 	@echo "===== Compile $< ====="


--- NEW FILE AntTweakBar.spec ---
Name:		AntTweakBar
Version:	1.13
Release:	5%{?dist}
Summary:	GUI library for videogame property editing UIs

Group:		Applications/Internet
License:	zlib
URL:		http://www.antisphere.com/Wiki/tools:anttweakbar
Source0:	http://www.antisphere.com/Tools/AntTweakBar/AntTweakBar_113.zip
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: libX11-devel
BuildRequires: xorg-x11-proto-devel

# upstream has missing includes for standard libc functions
# patch sent to upstream author via email.
Patch0:		AntTweakBar-fix-includes.patch

# allow overriding CXXFLAGS with Fedora preferred build options,
# and attach a proper soname to the shared library generated.
# patch sent to upstream author via email.
Patch1:		AntTweakBar-makefile.patch

# DOS mode file in upstream source makes this necessary
%global _default_patch_fuzz 2

%description
Library for easily creating and using tweakable properties in an OpenGL
or SDL application, designed primarily for professional game developers.

%package devel
Summary: Header files for AntTweakBar
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
Header files for developing applications making use of AntTweakBar.

%prep
%setup -q -n AntTweakBar
%patch0 -p1
%patch1 -p1

# fix encoding in license file
iconv --from=iso-8859-1 --to=utf8 ./License.txt > ./License.txt.utf8
touch -r ./License.txt ./License.txt.utf8
mv ./License.txt.utf8 ./License.txt

# fix DOS newlines in one of our examples
sed "s|\r||g" ./examples/TwSimpleGLUT.c > ./TwSimpleGLUT.c
touch -r ./examples/TwSimpleGLUT.c ./TwSimpleGLUT.c
mv ./TwSimpleGLUT.c ./examples/TwSimpleGLUT.c

# fix file permissions (unzip makes everything executable)
# not doing this causes spurious executable bit warnings in
# rpmlint on the debuginfo package and on the doc files
find Readme.txt License.txt src examples include -type f -print0 | xargs -0 chmod 0644

%build
cd src
make %{?_smp_mflags} FEDORA_CXXFLAGS="%{optflags}"

%install
rm -rf "%{buildroot}"
install -m 644 -D include/AntTweakBar.h "%{buildroot}/%{_includedir}/AntTweakBar.h"
install -m 755 -D lib/libAntTweakBar.so "%{buildroot}/%{_libdir}/libAntTweakBar.so.0.0.0"
ln -s "%{_libdir}/libAntTweakBar.so.0.0.0" "%{buildroot}/%{_libdir}/libAntTweakBar.so.0"
ln -s "%{_libdir}/libAntTweakBar.so.0.0.0" "%{buildroot}/%{_libdir}/libAntTweakBar.so"

%clean
rm -rf "%{buildroot}"

%files
%defattr(-,root,root,-)
%doc Readme.txt
%doc License.txt
%{_libdir}/libAntTweakBar.so.0.0.0
%{_libdir}/libAntTweakBar.so.0

%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/libAntTweakBar.so
%doc examples/TwAdvanced1.cpp
%doc examples/TwSimpleGLFW.c
%doc examples/TwSimpleGLUT.c
%doc examples/TwSimpleSDL.c
%doc examples/TwString.cpp

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%changelog
* Wed Oct 23 2009 Sean Middleditch <sean at middleditch.us> 1.13-5
- Correct accidental macro expansion in changelog text.

* Wed Oct 23 2009 Sean Middleditch <sean at middleditch.us> 1.13-4
- Use %%global instead of %%define.
- Note that patches have been sent to upstream.

* Wed Oct 23 2009 Sean Middleditch <sean at middleditch.us> 1.13-3
- Preserve timestamp on License.txt.
- Renamed patches to comply with naming policy.
- Included Linux-relevant examples in documentation for -devel package.

* Wed Oct 22 2009 Sean Middleditch <sean at middleditch.us> 1.13-2
- Fix shared library soname and ld links.

* Wed Oct 21 2009 Sean Middleditch <sean at middleditch.us> 1.13-1
- Initial RPM release.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/AntTweakBar/F-12/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	26 Oct 2009 20:15:06 -0000	1.1
+++ .cvsignore	27 Oct 2009 07:36:45 -0000	1.2
@@ -0,0 +1 @@
+AntTweakBar_113.zip


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/AntTweakBar/F-12/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	26 Oct 2009 20:15:06 -0000	1.1
+++ sources	27 Oct 2009 07:36:46 -0000	1.2
@@ -0,0 +1 @@
+2c02dd71d0f86c62f022eed7e0bcb5b8  AntTweakBar_113.zip




More information about the fedora-extras-commits mailing list