Browse Source

fix Data::UUID to really conform to the UUID standard(s)

Ralf S. Engelschall 22 years ago
parent
commit
983175986b
2 changed files with 89 additions and 2 deletions
  1. 85 0
      perl-crypto/perl-crypto.patch
  2. 4 2
      perl-crypto/perl-crypto.spec

+ 85 - 0
perl-crypto/perl-crypto.patch

@@ -0,0 +1,85 @@
+Index: Data-UUID-0.11/UUID.xs
+--- Data-UUID-0.11/UUID.xs.orig	Wed Aug 27 21:38:35 2003
++++ Data-UUID-0.11/UUID.xs	Sat Jan 10 22:38:01 2004
+@@ -105,11 +105,11 @@
+ }
+ 
+ static void get_system_time(uuid_time_t *uuid_time) {
+-#if defined __CYGWIN__ || __MINGW32__
++#if defined(__CYGWIN__) || defined(__MINGW32__)
+    /* ULARGE_INTEGER time; */
+    LARGE_INTEGER time;
+ 
+-   /* use QeryPerformanceCounter for +ms resolution - as per Paul Stodghill 
++   /* use QueryPerformanceCounter for +ms resolution - as per Paul Stodghill 
+    GetSystemTimeAsFileTime((FILETIME *)&time); */
+    QueryPerformanceCounter(&time);
+    time.QuadPart +=
+@@ -129,7 +129,7 @@
+ 
+ static void get_random_info(unsigned char seed[16]) {
+    MD5_CTX c;
+-#if defined __CYGWIN__ || __MINGW32__
++#if defined(__CYGWIN__) || defined(__MINGW32__)
+    typedef struct {
+       MEMORYSTATUS  m;
+       SYSTEM_INFO   s;
+@@ -150,7 +150,7 @@
+ 
+    MD5Init(&c);
+ 
+-#if defined __CYGWIN__ || __MINGW32__
++#if defined(__CYGWIN__) || defined(__MINGW32__)
+    GlobalMemoryStatus(&r.m);
+    GetSystemInfo(&r.s);
+    GetSystemTimeAsFileTime(&r.t);
+@@ -181,10 +181,10 @@
+       len = sizeof(uuid_t);
+       break;
+    case F_STR:
+-      sprintf(buf, "%8.8X-%4.4X-%4.4X-%2.2X%2.2X-", (unsigned int)u.time_low, u.time_mid,
++      sprintf(buf, "%8.8x-%4.4x-%4.4x-%2.2x%2.2x-", (unsigned int)u.time_low, u.time_mid,
+ 	 u.time_hi_and_version, u.clock_seq_hi_and_reserved, u.clock_seq_low);
+       for(i = 0; i < 6; i++ ) 
+-	 sprintf(buf+strlen(buf), "%2.2X", u.node[i]);
++	 sprintf(buf+strlen(buf), "%2.2x", u.node[i]);
+       len = strlen(buf);
+       break;
+    case F_HEX:
+Index: Data-UUID-0.11/UUID.pm
+--- Data-UUID-0.11/UUID.pm.orig	Wed Aug 27 22:06:06 2003
++++ Data-UUID-0.11/UUID.pm	Sat Jan 10 11:37:46 2004
+@@ -109,7 +109,7 @@
+    $ug->create_from_name_bin(<namespace>, <name>);
+ 
+    # creates UUID string, using conventional UUID string format,
+-   # such as: 4162F712-1DD2-11B2-B17E-C09EFE1DC403
++   # such as: 4162f712-1dd2-11b2-b17e-c09efe1dc403
+    $ug->create_str();
+    $ug->create_from_name_str(<namespace>, <name>);
+ 
+@@ -176,7 +176,7 @@
+  
+ =head1 AUTHOR
+ 
+-Alexander Golomshtok<agolomsh@cpan.org>
++Alexander Golomshtok <agolomsh@cpan.org>
+ 
+ =head1 SEE ALSO
+ 
+Index: Data-UUID-0.11/UUID.h
+--- Data-UUID-0.11/UUID.h.orig	Wed Aug 27 21:38:35 2003
++++ Data-UUID-0.11/UUID.h	Sat Jan 10 22:38:21 2004
+@@ -49,7 +49,11 @@
+ #define UUID_STATE_NV_STORE		_STDIR"/"UUID_STATE
+ #define UUID_NODEID_NV_STORE		_STDIR"/"UUID_NODEID
+ 
+-#define UUIDS_PER_TICK 1024
++#if defined(__CYGWIN__) || defined(__MINGW32__)
++#define UUIDS_PER_TICK 10000
++#else
++#define UUIDS_PER_TICK 10
++#endif
+ #define I64(C) C##LL
+ 
+ #define F_BIN 0

+ 4 - 2
perl-crypto/perl-crypto.spec

@@ -59,8 +59,8 @@ Packager:     The OpenPKG Project
 Distribution: OpenPKG [BASE]
 Group:        Language
 License:      GPL/Artistic
-Version:      20040103
-Release:      20040103
+Version:      20040110
+Release:      20040110
 
 #   list of sources
 Source0:      http://www.cpan.org/modules/by-module/Digest/Digest-%{V_digest}.tar.gz
@@ -88,6 +88,7 @@ Source21:     http://www.cpan.org/modules/by-module/Crypt/Crypt-ECB-%{V_crypt_ec
 Source22:     http://www.cpan.org/modules/by-module/Crypt/Crypt-CBC-%{V_crypt_cbc}.tar.gz
 Source23:     http://www.cpan.org/modules/by-module/Data/Data-UUID-%{V_data_uuid}.tar.gz
 Source24:     http://www.cpan.org/modules/by-module/String/String-CRC32-%{V_string_crc32}.tar.gz
+Patch0:       perl-crypto.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -151,6 +152,7 @@ AutoReqProv:  no
     %setup22 -q -T -D -a 22
     %setup23 -q -T -D -a 23
     %setup24 -q -T -D -a 24
+    %patch -p0
 
 %build