packages: libprojectM/libprojectM.spec, libprojectM/01-change-texture-size....
glen
glen at pld-linux.org
Mon Sep 6 13:13:55 CEST 2010
Author: glen Date: Mon Sep 6 11:13:55 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- add patches from clementine 0.5; rel 4
---- Files affected:
packages/libprojectM:
libprojectM.spec (1.16 -> 1.17) , 01-change-texture-size.patch (NONE -> 1.1) (NEW), 04-change-preset-duration.patch (NONE -> 1.1) (NEW), 06-fix-numeric-locale.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/libprojectM/libprojectM.spec
diff -u packages/libprojectM/libprojectM.spec:1.16 packages/libprojectM/libprojectM.spec:1.17
--- packages/libprojectM/libprojectM.spec:1.16 Thu Jul 8 16:44:17 2010
+++ packages/libprojectM/libprojectM.spec Mon Sep 6 13:13:50 2010
@@ -17,7 +17,7 @@
Summary(pl.UTF-8): Imponujący wizualizator muzyki
Name: libprojectM
Version: 2.0.1
-Release: 3
+Release: 4
Epoch: 1
License: LGPL
Group: Libraries
@@ -28,12 +28,15 @@
Patch2: %{name}-static.patch
Patch3: as-needed.patch
Patch4: %{name}-pkgconfig.patch
+Patch5: 01-change-texture-size.patch
+Patch6: 04-change-preset-duration.patch
+Patch7: 06-fix-numeric-locale.patch
URL: http://projectm.sourceforge.net/
BuildRequires: cmake
BuildRequires: ftgl-devel >= 2.1.3
BuildRequires: glew-devel
BuildRequires: pkgconfig
-BuildRequires: rpmbuild(macros) >= 1.566
+BuildRequires: rpmbuild(macros) >= 1.577
BuildRequires: sed >= 4.0
Requires: fonts-TTF-bitstream-vera
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -83,22 +86,22 @@
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p0
+%patch6 -p0
+%patch7 -p0
%build
+install -d build
+cd build
%cmake \
- -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_LIB_DIR=%{_libdir} \
-DBUILD_PROJECTM_STATIC=yes \
-%if "%{_lib}" == "lib64"
- -DLIB_SUFFIX=64 \
-%endif
- .
+ ../
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-
-%{__make} install \
+%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
%clean
@@ -137,6 +140,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.17 2010/09/06 11:13:50 glen
+- add patches from clementine 0.5; rel 4
+
Revision 1.16 2010/07/08 14:44:17 lisu
- force pkgconfig to use -L/usr/lib or -L/usr/lib64 (avoid situations when pkg-config --libs libprojectM returns "-L-libprojectM")
- rel 3
================================================================
Index: packages/libprojectM/01-change-texture-size.patch
diff -u /dev/null packages/libprojectM/01-change-texture-size.patch:1.1
--- /dev/null Mon Sep 6 13:13:55 2010
+++ packages/libprojectM/01-change-texture-size.patch Mon Sep 6 13:13:50 2010
@@ -0,0 +1,33 @@
+Index: projectM.cpp
+===================================================================
+--- projectM.cpp (revision 1048)
++++ projectM.cpp (revision 1049)
+@@ -907,3 +907,13 @@
+ }
+
+
++void projectM::changeTextureSize(int size) {
++ _settings.textureSize = size;
++
++ delete renderer;
++ renderer = new Renderer(_settings.windowWidth, _settings.windowHeight,
++ _settings.meshX, _settings.meshY,
++ _settings.textureSize, beatDetect, _settings.presetURL,
++ _settings.titleFontURL, _settings.menuFontURL);
++}
++
+Index: projectM.hpp
+===================================================================
+--- projectM.hpp (revision 1048)
++++ projectM.hpp (revision 1049)
+@@ -153,9 +153,9 @@
+ virtual ~projectM();
+
+
++ void changeTextureSize(int size);
+
+
+-
+ const Settings & settings() const {
+ return _settings;
+ }
================================================================
Index: packages/libprojectM/04-change-preset-duration.patch
diff -u /dev/null packages/libprojectM/04-change-preset-duration.patch:1.1
--- /dev/null Mon Sep 6 13:13:55 2010
+++ packages/libprojectM/04-change-preset-duration.patch Mon Sep 6 13:13:50 2010
@@ -0,0 +1,37 @@
+Index: TimeKeeper.hpp
+===================================================================
+--- TimeKeeper.hpp (revision 1063)
++++ TimeKeeper.hpp (revision 1064)
+@@ -37,6 +37,8 @@
+
+ double sampledPresetDuration();
+
++ void ChangePresetDuration(int seconds) { _presetDuration = seconds; }
++
+ #ifndef WIN32
+ /* The first ticks value of the application */
+ struct timeval startTime;
+Index: projectM.cpp
+===================================================================
+--- projectM.cpp (revision 1063)
++++ projectM.cpp (revision 1064)
+@@ -917,3 +917,7 @@
+ _settings.titleFontURL, _settings.menuFontURL);
+ }
+
++void projectM::changePresetDuration(int seconds) {
++ timeKeeper->ChangePresetDuration(seconds);
++}
++
+Index: projectM.hpp
+===================================================================
+--- projectM.hpp (revision 1063)
++++ projectM.hpp (revision 1064)
+@@ -154,6 +154,7 @@
+
+
+ void changeTextureSize(int size);
++ void changePresetDuration(int seconds);
+
+
+ const Settings & settings() const {
================================================================
Index: packages/libprojectM/06-fix-numeric-locale.patch
diff -u /dev/null packages/libprojectM/06-fix-numeric-locale.patch:1.1
--- /dev/null Mon Sep 6 13:13:55 2010
+++ packages/libprojectM/06-fix-numeric-locale.patch Mon Sep 6 13:13:50 2010
@@ -0,0 +1,81 @@
+Index: MilkdropPresetFactory/Parser.cpp
+===================================================================
+--- MilkdropPresetFactory/Parser.cpp (revision 1510)
++++ MilkdropPresetFactory/Parser.cpp (working copy)
+@@ -1269,28 +1269,13 @@
+ /* Parses a floating point number */
+ int Parser::string_to_float(char * string, float * float_ptr)
+ {
++ std::istringstream stream(string);
++ stream >> *float_ptr;
+
+- char ** error_ptr;
+-
+- if (*string == 0)
++ if (stream.fail())
+ return PROJECTM_PARSE_ERROR;
+
+- error_ptr = (char**)wipemalloc(sizeof(char**));
+-
+- (*float_ptr) = strtod(string, error_ptr);
+-
+- /* These imply a succesful parse of the string */
+- if ((**error_ptr == '\0') || (**error_ptr == '\r'))
+- {
+- free(error_ptr);
+- error_ptr = NULL;
+- return PROJECTM_SUCCESS;
+- }
+-
+- (*float_ptr) = 0;
+- free(error_ptr);
+- error_ptr = NULL;
+- return PROJECTM_PARSE_ERROR;
++ return PROJECTM_SUCCESS;
+ }
+
+ /* Parses a floating point number */
+@@ -1298,11 +1283,9 @@
+ {
+
+ char string[MAX_TOKEN_SIZE];
+- char ** error_ptr;
+ token_t token;
+ int sign;
+
+- error_ptr =(char**) wipemalloc(sizeof(char**));
+
+ token = parseToken(fs, string);
+
+@@ -1322,28 +1305,13 @@
+
+ if (string[0] == 0)
+ {
+- free(error_ptr);
+- error_ptr = NULL;
+ return PROJECTM_PARSE_ERROR;
+ }
+
+- (*float_ptr) = sign*strtod(string, error_ptr);
++ std::istringstream stream(string);
++ stream >> *float_ptr;
+
+- /* No conversion was performed */
+- if ((**error_ptr == '\0') || (**error_ptr == '\r'))
+- {
+- free(error_ptr);
+- error_ptr = NULL;
+- return PROJECTM_SUCCESS;
+- }
+-
+- if (PARSE_DEBUG) printf("parse_float: float conversion failed for string \"%s\"\n", string);
+-
+- (*float_ptr) = 0;
+- free(error_ptr);
+- error_ptr = NULL;
+- return PROJECTM_PARSE_ERROR;
+-
++ return PROJECTM_SUCCESS;
+ }
+
+ /* Parses a per frame equation. That is, interprets a stream of data as a per frame equation */
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/libprojectM/libprojectM.spec?r1=1.16&r2=1.17&f=u
More information about the pld-cvs-commit
mailing list