Ticket #14354: enigma.diff

File enigma.diff, 4.7 KB (added by nox@…, 14 years ago)
  • Portfile

    diff -urN enigma.orig/Portfile enigma/Portfile
    old new  
    2626    sha1 2f9f5aaf3d233c248d818c3a2fd5ea873d34135f \
    2727    rmd160 671971415e8d96bc84e2a823d66359025e158128
    2828
     29patchfiles \
     30    patch-src-lev-ScoreManager.cc.diff
     31
     32post-patch {
     33    reinplace s/-lxerces/-lxerces-c/ ${worksrcpath}/configure
     34
     35    reinplace s/bundle.*/bundle/ ${worksrcpath}/Makefile.in
     36    reinplace -E {/\/Frameworks/d} ${worksrcpath}/src/Makefile.in
     37
     38    reinplace {s/unsigned int/XMLSize_t/} \
     39        ${worksrcpath}/src/Utf8ToXML.cc \
     40        ${worksrcpath}/src/XMLToUtf8.cc
     41}
     42
    2943depends_lib \
    3044    port:gettext \
    3145    port:libpng \
    3246    port:libsdl \
    33     port:libsdl-framework \
    34     port:libsdl_image-framework \
    35     port:libsdl_mixer-framework \
    36     port:libsdl_ttf-framework \
    37     port:xercesc \
     47    port:libsdl \
     48    port:libsdl_image \
     49    port:libsdl_mixer \
     50    port:libsdl_ttf \
     51    port:xercesc3 \
    3852    port:zlib
    3953
     54use_parallel_build      yes
     55
    4056build.target            all macapp
     57
     58destroot {
     59    copy ${worksrcpath}/etc/macfiles/Enigma.app \
     60        ${destroot}${applications_dir}/
     61    xinstall ${worksrcpath}/src/enigma \
     62        ${destroot}${applications_dir}/Enigma.app/Contents/MacOS/Enigma
     63}
     64
     65livecheck.type          regex
     66livecheck.url           ${homepage}download.html
     67livecheck.regex         {Stable Release \(Version (\d+(?:\.\d+)*)\)}
  • files/patch-src-lev-ScoreManager.cc.diff

    diff -urN enigma.orig/files/patch-src-lev-ScoreManager.cc.diff enigma/files/patch-src-lev-ScoreManager.cc.diff
    old new  
     1--- src/lev/ScoreManager.cc.orig        2009-12-28 02:36:23.000000000 +0100
     2+++ src/lev/ScoreManager.cc     2009-12-28 02:44:18.000000000 +0100
     3@@ -65,14 +65,14 @@
     4     class ScoreDomSerFilter : public DOMWriterFilter {
     5 #endif
     6         public:
     7-            virtual short acceptNode(const DOMNode *node) const;
     8+            virtual DOMNodeFilter::FilterAction acceptNode(const DOMNode *node) const;
     9             virtual unsigned long getWhatToShow () const {
     10                 return DOMNodeFilter::SHOW_ALL;
     11             }
     12             virtual void setWhatToShow (unsigned long toShow) {}
     13     };
     14     
     15-    short ScoreDomSerFilter::acceptNode(const DOMNode *node) const {
     16+    DOMNodeFilter::FilterAction ScoreDomSerFilter::acceptNode(const DOMNode *node) const {
     17         if (node->getNodeType () == DOMNode::ELEMENT_NODE &&
     18                  std::string(XMLtoUtf8(node->getNodeName()).c_str()) == "level") {
     19             const DOMElement *e = dynamic_cast<const DOMElement *>(node);
     20@@ -119,7 +119,7 @@
     21         
     22         if (stateUserId.length() == 16 &&
     23                 stateUserId.find_first_not_of("0123456789ABCDEF") == std::string::npos) {
     24-            unsigned i1, i2, i3, i4;
     25+            unsigned long i1, i2, i3, i4;
     26             std::istringstream s1(stateUserId.substr(0, 4));
     27             std::istringstream s2(stateUserId.substr(4, 4));
     28             std::istringstream s3(stateUserId.substr(8, 4));
     29@@ -233,7 +233,7 @@
     30                         hasValidUserId = true;
     31                     } else {
     32                         // create first part of user id based on time stamp
     33-                        unsigned id;
     34+                        unsigned long id;
     35                         if (RAND_MAX > 0x10000) {
     36                             id = std::rand() & 0xFFFFFFFF;
     37                         } else {
     38@@ -319,7 +319,7 @@
     39     }
     40     
     41     void ScoreManager::finishUserId(unsigned id3) {
     42-        unsigned i1, i2, i3, i4;
     43+        unsigned long i1, i2, i3, i4;
     44         std::istringstream s1(userId.substr(0, 4));
     45         std::istringstream s2(userId.substr(4, 4));
     46         s1 >> std::hex >> i1;
     47@@ -334,7 +334,7 @@
     48     
     49     std::string ScoreManager::sec(std::string target) {
     50         int len = target.size();
     51-        unsigned r = 0;
     52+        unsigned long r = 0;
     53         const char *p = target.c_str();
     54         
     55         while (len--)
     56@@ -362,9 +362,9 @@
     57             Log << "ReId Windows 1.00 User Id: " << userId << "\n";
     58             setProperty("UserId1.00", userId);
     59             app.state->setProperty("UserId1.00", userId);
     60-            unsigned id1 = std::rand() & 0xFFFF;
     61+            unsigned long id1 = std::rand() & 0xFFFF;
     62             userId.replace(0, 4, ecl::strf("%.4lX",id1));
     63-            unsigned id2, id3, id4;
     64+            unsigned long id2, id3, id4;
     65             std::istringstream s2(userId.substr(4, 4));
     66             std::istringstream s3(userId.substr(8, 4));
     67             s2 >> std::hex >> id2;