Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/sci
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20226/main/finkinfo/sci
Modified Files:
zhu3d.info
Added Files:
zhu3d.patch
Log Message:
Welcome to the working version of zhu3d 4.1.6
Index: zhu3d.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/sci/zhu3d.info,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- zhu3d.info 24 Nov 2008 08:22:12 -0000 1.29
+++ zhu3d.info 4 Dec 2008 01:22:28 -0000 1.30
@@ -1,5 +1,5 @@
Package: zhu3d
-Version: 4.1.4
+Version: 4.1.6
Revision: 1002
Source: mirror:sourceforge:%n/%n-%v.tar.gz
Depends: glib2-shlibs, libgettext3-shlibs, qt4-x11-core-shlibs (>= 4.3-1),
qt4-x11-gui-shlibs (>= 4.3-1), libiconv, libpng3-shlibs, x11, x11-shlibs
@@ -9,9 +9,10 @@
License: GPL
Description: Functions viewer/animator, uses Qt4 and OpenGL
GCC: 4.0
-Source-MD5: 26104367ed12b1f63e8edf9dfa9bd9b4
+Source-MD5: 56a3f572335922b69dd33fe53cdf18d4
SourceDirectory: %n-%v
PatchScript: <<
+ cp %a/%n.patch src/cpuinfo.h
cp -pr %p/lib/qt4-x11/plugins/imageform* .
%p/lib/qt4-x11/bin/qmake zhu3d.pro
perl -pi -e "s/-prebind/-undefined dynamic_lookup/" Makefile
--- NEW FILE: zhu3d.patch ---
/** *************************************************************************
**
** Copyright (C) 2008 Heinz van Saanen
**
** This file is part of the function viewer Zhu3D.
**
** This file may be used under the terms of the GNU General Public
** License version 3 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of
** this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#ifndef _CPUINFO_H_
#define _CPUINFO_H_
/** Timer stuff */
#include "timers.h"
#include "tsc.h"
/** Include stuff for misc OS's */
#if defined(Q_WS_MAC)
#include <sys/types.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#elif defined(Q_WS_WIN)
#include <windows.h>
#elif (defined(Q_OS_LINUX) || defined(sgi))
#include <unistd.h>
#endif
/** Counting cores, checking frequency and endianess */
class CPUINFO {
public:
CPUINFO() {}
~CPUINFO() {}
/** Returns core-number on success, 0 otherwise */
static int cores() {
int tmp=0;
/** Apple Mac OS */
#if defined(Q_WS_MAC)
int mib[2]={ CTL_HW, HW_NCPUINFO };
int cpus;
size_t size=sizeof(cpus);
if(0==sysctl(mib, 2, &cpus, &size, NULL, 0))
tmp=cpus;
/** Microsoft Windows */
#elif defined(Q_WS_WIN)
SYSTEM_INFO si;
GetSystemInfo(&si);
tmp=si.dwNumberOfProcessors;
/** Linux/Unix */
#elif defined(Q_OS_LINUX)
#if defined(_SC_NPROCESSORS_ONLN)
tmp=sysconf(_SC_NPROCESSORS_ONLN);
#endif
/** SGI/Irix */
#elif defined(sgi)
#if defined(_SC_NPROC_ONLN)
tmp=sysconf(_SC_NPROC_ONLN);
#endif
#endif
return tmp;
}
/** Returns frequency in MHz units. Average some 50 ms measurements */
static double MHz() {
double tmp=0.0;
TIMERS tim;
TSC tsc;
tsc.start(); tim.uwait(50000); tmp+=tsc.stop();
tsc.start(); tim.uwait(50000); tmp+=tsc.stop();
tsc.start(); tim.uwait(50000); tmp+=tsc.stop();
return (tmp*0.00002)/3.0;
}
/** Check out endinaness dynamically */
static bool isBigEndian() {
unsigned int i=1;
unsigned char *pt = (unsigned char *) &i;
if(pt[0])
return false;
return true;
}
};
/** _CPUINFO_H_ */
#endif
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs