This is an automated email from the git hooks/post-receive script.

bmarc pushed a commit to branch master
in repository 7kaa.

commit a1933dbad8b07c892a2089381f8d9061d6cc11ce
Author: Bertrand Marc <bm...@debian.org>
Date:   Sun Sep 18 18:32:43 2016 +0200

    Use system libuiid:
    + Add a patch to replace every occurrence of guuid and misc.uuid.
    + Exclude src/common/misc_uuid.cpp,include/misc_uuid.h and COPYING.uuid in 
debian/copyright.
    + Build-depends on uuid-dev.
    + Add dversionmangle to debian/watch.
---
 debian/control                          |   3 +-
 debian/copyright                        |   1 +
 debian/patches/series                   |   1 +
 debian/patches/use_system_libuuid.patch | 444 ++++++++++++++++++++++++++++++++
 debian/watch                            |   2 +-
 5 files changed, 449 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index b373efb..b4ed447 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,8 @@ Build-Depends:
  dh-autoreconf,
  libopenal-dev,
  libenet-dev,
- libsdl2-dev
+ libsdl2-dev,
+ uuid-dev
 Standards-Version: 3.9.6
 Homepage: http://www.7kfans.com/
 Vcs-Git: https://anonscm.debian.org/git/pkg-games/7kaa.git
diff --git a/debian/copyright b/debian/copyright
index ac61fee..f2cfeb3 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,6 +2,7 @@ Format: 
http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: 7kaa
 Source: http://www.7kfans.com/wiki/index.php/Download
 Upstream-Contact: Jesse Allen <the3dfxd...@gmail.com>
+Files-Excluded: src/common/misc_uuid.cpp include/misc_uuid.h COPYING.uuid
 
 Files: *
 Copyright: 1997,1998, Enlight Software Ltd.
diff --git a/debian/patches/series b/debian/patches/series
index caca40b..937ab4b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 abs_dir.patch
+use_system_libuuid.patch
diff --git a/debian/patches/use_system_libuuid.patch 
b/debian/patches/use_system_libuuid.patch
new file mode 100644
index 0000000..860eecf
--- /dev/null
+++ b/debian/patches/use_system_libuuid.patch
@@ -0,0 +1,444 @@
+Description: use the system version of libuuid
+Author: Bertrand Marc <bm...@debian.org>
+--- a/include/OMISC.h
++++ b/include/OMISC.h
+@@ -25,7 +25,7 @@
+ #define __MISC_H
+ 
+ #include <stdint.h>
+-#include <misc_uuid.h>
++#include <uuid/uuid.h>
+ 
+ //-------- Define macro constant ---------//
+ 
+@@ -125,19 +125,6 @@
+       void    unlock_seed();
+       int     is_seed_locked();
+ 
+-      // uuid functions
+-      void uuid_clear(guuid_t uu);
+-      int  uuid_compare(const guuid_t uu1, const guuid_t uu2);
+-      void uuid_copy(guuid_t dst, const guuid_t src);
+-      void get_system_random_bytes(void *buf, int nbytes);
+-      void uuid_generate_random(guuid_t out);
+-      int  uuid_is_null(const guuid_t uu);
+-      int  uuid_parse(const char *in, guuid_t uu);
+-      void uuid_unparse_lower(const guuid_t uu, char *out);
+-      void uuid_unparse_upper(const guuid_t uu, char *out);
+-      void uuid_unparse(const guuid_t uu, char *out);
+-
+-
+ private:
+       void    construct_move_around_table();
+ };
+--- a/include/multiplayer.h
++++ b/include/multiplayer.h
+@@ -74,8 +74,8 @@
+ 
+ struct MpMsgUserSessionStatus {
+       uint32_t msg_id;
+-      guuid_t login_id;
+-      guuid_t session_id;
++      uuid_t login_id;
++      uuid_t session_id;
+       uint32_t player_id;
+       uint32_t flags;
+       char session_name[MP_FRIENDLY_NAME_LEN];
+@@ -86,37 +86,37 @@
+ };
+ struct MpMsgLoginId {
+       uint32_t msg_id;
+-      guuid_t login_id;
++      uuid_t login_id;
+ };
+ struct MpMsgReqSessionId {
+       uint32_t msg_id;
+-      guuid_t login_id;
++      uuid_t login_id;
+       char session_name[MP_FRIENDLY_NAME_LEN];
+       char session_password[MP_FRIENDLY_NAME_LEN];
+ };
+ struct MpMsgSessionId {
+       uint32_t msg_id;
+-      guuid_t session_id;
++      uuid_t session_id;
+ };
+ struct MpMsgPollSessions {
+       uint32_t msg_id;
+-      guuid_t login_id;
++      uuid_t login_id;
+ };
+ struct MpMsgSession {
+       uint32_t msg_id;
+-      guuid_t session_id;
++      uuid_t session_id;
+       uint32_t flags;
+       char session_name[MP_FRIENDLY_NAME_LEN];
+ };
+ struct MpMsgReqSessionAddr {
+       uint32_t msg_id;
+-      guuid_t login_id;
+-      guuid_t session_id;
++      uuid_t login_id;
++      uuid_t session_id;
+       char session_password[MP_FRIENDLY_NAME_LEN];
+ };
+ struct MpMsgSessionAddr {
+       uint32_t msg_id;
+-      guuid_t session_id;
++      uuid_t session_id;
+       uint32_t host;
+       uint16_t port;
+       uint16_t reserved0;
+@@ -135,7 +135,7 @@
+ {
+       char session_name[MP_FRIENDLY_NAME_LEN+1];
+       char password[MP_FRIENDLY_NAME_LEN+1];
+-      guuid_t id;
++      uuid_t id;
+       uint32_t flags;
+       int max_players;
+       int player_count;
+@@ -149,7 +149,7 @@
+       SessionDesc(MpMsgSession *m);
+ 
+       char *name_str() { return session_name; };
+-      guuid_t &session_id() { return id; }
++      uuid_t &session_id() { return id; }
+ };
+ 
+ 
+@@ -177,7 +177,7 @@
+ 
+       ENetSocket        session_monitor;
+       ENetAddress       service_provider;
+-      guuid_t            service_login_id;
++      uuid_t            service_login_id;
+ 
+       int update_available;
+ 
+@@ -211,7 +211,7 @@
+       int    close_session();
+       SessionDesc* get_session(int i);
+       SessionDesc* get_session(ENetAddress *address);
+-      SessionDesc* get_session(guuid_t id);
++      SessionDesc* get_session(uuid_t id);
+       SessionDesc* get_current_session();
+ 
+       // -------- functions on player management -------//
+--- a/src/client/OGAMEMP.cpp
++++ b/src/client/OGAMEMP.cpp
+@@ -1538,8 +1538,8 @@
+       int refreshFlag = SSOPTION_ALL;
+       int pollStatus = MP_POLL_NO_UPDATE;
+       int choice = 0;
+-      guuid_t sessionGuid;
+-      misc.uuid_clear(sessionGuid);
++      uuid_t sessionGuid;
++      uuid_clear(sessionGuid);
+ 
+       // ------- initialized button -----------//
+ 
+@@ -1645,7 +1645,7 @@
+                               choice = 0;
+                               for( s = 1; mp_obj.get_session(s); ++s )
+                               {
+-                                      if( misc.uuid_compare(sessionGuid, 
mp_obj.get_session(s)->session_id()) )
++                                      if( uuid_compare(sessionGuid, 
mp_obj.get_session(s)->session_id()) )
+                                               choice = s;
+                               }
+                               if( choice > 0)
+@@ -1756,7 +1756,7 @@
+                                       SESSION_DESC_X2, SESSION_BUTTON_Y1 + 
(b+1)*SESSION_BUTTON_Y_SPACING -1 ) )
+                               {
+                                       choice = s;
+-                                      misc.uuid_copy(sessionGuid, 
mp_obj.get_session(s)->session_id());
++                                      uuid_copy(sessionGuid, 
mp_obj.get_session(s)->session_id());
+                                       refreshFlag |= SSOPTION_DISP_SESSION;
+                                       joinButton.enable();
+ 
+--- a/src/multiplayer/common/multiplayer.cpp
++++ b/src/multiplayer/common/multiplayer.cpp
+@@ -38,7 +38,7 @@
+ 
+ SessionDesc::SessionDesc()
+ {
+-      misc.uuid_clear(id);
++      uuid_clear(id);
+       flags = SESSION_PREGAME;
+       max_players = MAX_NATION;
+       player_count = 1;
+@@ -50,7 +50,7 @@
+ 
+ SessionDesc::SessionDesc(const char *name, const char *pass, ENetAddress 
*address)
+ {
+-      misc.uuid_generate_random(id); // Assume LAN until command line improved
++      uuid_generate_random(id); // Assume LAN until command line improved
+       flags = SESSION_PREGAME;
+       max_players = MAX_NATION;
+       player_count = 1;
+@@ -66,7 +66,7 @@
+ 
+ SessionDesc::SessionDesc(MpMsgUserSessionStatus *m, ENetAddress *address)
+ {
+-      misc.uuid_copy(id, m->session_id);
++      uuid_copy(id, m->session_id);
+       flags = m->flags;
+       max_players = MAX_NATION;
+       player_count = 1;
+@@ -79,7 +79,7 @@
+ 
+ SessionDesc::SessionDesc(MpMsgSession *m)
+ {
+-      misc.uuid_copy(id, m->session_id);
++      uuid_copy(id, m->session_id);
+       flags = m->flags;
+       max_players = MAX_NATION;
+       player_count = 1;
+@@ -92,7 +92,7 @@
+ 
+ SessionDesc::SessionDesc(const SessionDesc &src)
+ {
+-      misc.uuid_copy(id, src.id);
++      uuid_copy(id, src.id);
+       flags = src.flags;
+       max_players = src.max_players;
+       player_count = src.player_count;
+@@ -106,7 +106,7 @@
+ 
+ SessionDesc& SessionDesc::operator= (const SessionDesc &src)
+ {
+-      misc.uuid_copy(id, src.id);
++      uuid_copy(id, src.id);
+       flags = src.flags;
+       max_players = src.max_players;
+       player_count = src.player_count;
+@@ -159,7 +159,7 @@
+       my_player_id = 0;
+       my_player = NULL;
+       service_provider.host = ENET_HOST_ANY;
+-      misc.uuid_clear(service_login_id);
++      uuid_clear(service_login_id);
+       update_available = -1;
+       host = NULL;
+       session_monitor = ENET_SOCKET_NULL;
+@@ -403,12 +403,12 @@
+               case MPMSG_LOGIN_ID: {
+                       MpMsgLoginId *m = (MpMsgLoginId*)recv_buf;
+ 
+-                      if (misc.uuid_is_null(m->login_id)) {
++                      if (uuid_is_null(m->login_id)) {
+                               login_failed = 1;
+                               break;
+                       }
+                       if (a.host == service_provider.host)
+-                              misc.uuid_copy(service_login_id, m->login_id);
++                              uuid_copy(service_login_id, m->login_id);
+ 
+                       break;
+                       }
+@@ -432,7 +432,7 @@
+       }
+ 
+       if (service_provider.host != ENET_HOST_ANY) {
+-              if (misc.uuid_is_null(service_login_id)) {
++              if (uuid_is_null(service_login_id)) {
+                       if (login_failed)
+                               return MP_POLL_LOGIN_FAILED;
+                       send_req_login_id();
+@@ -467,12 +467,12 @@
+       return NULL;
+ }
+ 
+-SessionDesc *MultiPlayer::get_session(guuid_t id)
++SessionDesc *MultiPlayer::get_session(uuid_t id)
+ {
+       int i;
+       for (i = 1; i <= current_sessions.size(); i++) {
+               SessionDesc *p = (SessionDesc *)current_sessions.get(i);
+-              if (p && !misc.uuid_compare(p->id, id))
++              if (p && !uuid_compare(p->id, id))
+                       return p;
+       }
+       return NULL;
+@@ -518,9 +518,9 @@
+       if (joined_session.player_count >= joined_session.max_players)
+               joined_session.flags |= SESSION_FULL;
+       if (service_provider.host != ENET_HOST_ANY)
+-              misc.uuid_clear(joined_session.id); // generated by service
++              uuid_clear(joined_session.id); // generated by service
+       else
+-              misc.uuid_generate_random(joined_session.id); // generated for 
LAN only
++              uuid_generate_random(joined_session.id); // generated for LAN 
only
+       joined_session.address.host = host->address.host;
+       joined_session.address.port = host->address.port;
+ 
+@@ -873,7 +873,7 @@
+                       ENetBuffer b;
+ 
+                       if (joined_session.flags & SESSION_HOSTING) {
+-                              if (misc.uuid_is_null(joined_session.id)) {
++                              if (uuid_is_null(joined_session.id)) {
+                                       send_req_session_id();
+                                       poll_time = 300;
+                                       ret = MP_POLL_LOGIN_PENDING;
+@@ -892,13 +892,13 @@
+                               case MPMSG_LOGIN_ID: {
+                                       MpMsgLoginId *m = 
(MpMsgLoginId*)recv_buf;
+ 
+-                                      if (misc.uuid_is_null(m->login_id)) {
++                                      if (uuid_is_null(m->login_id)) {
+                                               ret = MP_POLL_LOGIN_FAILED;
+                                               break;
+                                       }
+ 
+                                       if (a.host == service_provider.host)
+-                                              
misc.uuid_copy(service_login_id, m->login_id);
++                                              uuid_copy(service_login_id, 
m->login_id);
+ 
+                                       break;
+                                       }
+@@ -908,7 +908,7 @@
+                                       if (a.host != service_provider.host)
+                                               break;
+ 
+-                                      misc.uuid_copy(joined_session.id, 
m->session_id);
++                                      uuid_copy(joined_session.id, 
m->session_id);
+                                       break;
+                                       }
+                               case MPMSG_SESSION_ADDR: {
+@@ -916,13 +916,13 @@
+ 
+                                       if (joined_session.address.host != 
ENET_HOST_ANY)
+                                               break;
+-                                      if (misc.uuid_is_null(m->session_id)) {
++                                      if (uuid_is_null(m->session_id)) {
+                                               ret = MP_POLL_NO_SESSION;
+                                               break;
+                                       }
+                                       if (a.host != service_provider.host)
+                                               break;
+-                                      if 
(misc.uuid_compare(joined_session.id, m->session_id))
++                                      if (uuid_compare(joined_session.id, 
m->session_id))
+                                               break;
+ 
+                                       joined_session.address.host = m->host;
+@@ -934,7 +934,7 @@
+                               }
+                       }
+ 
+-                      if (misc.uuid_is_null(service_login_id)) {
++                      if (uuid_is_null(service_login_id)) {
+                               send_req_login_id();
+                               poll_time = 300;
+                       } else {
+@@ -1129,7 +1129,7 @@
+ 
+       if (!host)
+               return;
+-      if (misc.uuid_is_null(joined_session.id))
++      if (uuid_is_null(joined_session.id))
+               return;
+ 
+       b.data = &m;
+@@ -1137,11 +1137,11 @@
+ 
+       m.msg_id = MPMSG_USER_SESSION_STATUS;
+       if (a->host == service_provider.host) {
+-              misc.uuid_copy(m.login_id, service_login_id);
++              uuid_copy(m.login_id, service_login_id);
+       } else {
+-              misc.uuid_clear(m.login_id);
++              uuid_clear(m.login_id);
+       }
+-      misc.uuid_copy(m.session_id, joined_session.id);
++      uuid_copy(m.session_id, joined_session.id);
+       m.player_id = my_player_id;
+       m.flags = joined_session.flags;
+       strncpy(m.session_name, joined_session.session_name, 
MP_FRIENDLY_NAME_LEN);
+@@ -1172,7 +1172,7 @@
+       b.dataLength = sizeof(MpMsgPollSessions);
+ 
+       m.msg_id = MPMSG_POLL_SESSIONS;
+-      misc.uuid_copy(m.login_id, service_login_id);
++      uuid_copy(m.login_id, service_login_id);
+ 
+       enet_socket_send(session_monitor, &service_provider, &b, 1);
+ }
+@@ -1182,14 +1182,14 @@
+       ENetBuffer b;
+       MpMsgReqSessionId m;
+ 
+-      if (misc.uuid_is_null(service_login_id))
++      if (uuid_is_null(service_login_id))
+               return;
+ 
+       b.data = &m;
+       b.dataLength = sizeof(MpMsgReqSessionId);
+ 
+       m.msg_id = MPMSG_REQ_SESSION_ID;
+-      misc.uuid_copy(m.login_id, service_login_id);
++      uuid_copy(m.login_id, service_login_id);
+       memcpy(m.session_name, joined_session.session_name, 
MP_FRIENDLY_NAME_LEN);
+       memcpy(m.session_password, joined_session.password, 
MP_FRIENDLY_NAME_LEN);
+ 
+@@ -1201,15 +1201,15 @@
+       ENetBuffer b;
+       MpMsgReqSessionAddr m;
+ 
+-      if (misc.uuid_is_null(service_login_id))
++      if (uuid_is_null(service_login_id))
+               return;
+ 
+       b.data = &m;
+       b.dataLength = sizeof(MpMsgReqSessionAddr);
+ 
+       m.msg_id = MPMSG_REQ_SESSION_ADDR;
+-      misc.uuid_copy(m.login_id, service_login_id);
+-      misc.uuid_copy(m.session_id, joined_session.id);
++      uuid_copy(m.login_id, service_login_id);
++      uuid_copy(m.session_id, joined_session.id);
+       memcpy(m.session_password, joined_session.password, 
MP_FRIENDLY_NAME_LEN);
+ 
+       enet_socket_send(session_monitor, &service_provider, &b, 1);
+--- a/src/common/Makefile.am
++++ b/src/common/Makefile.am
+@@ -6,5 +6,4 @@
+       OMEM.cpp \
+       OMISC.cpp \
+       OSTR.cpp \
+-      dbglog.cpp \
+-      misc_uuid.cpp
++      dbglog.cpp
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -170,7 +170,6 @@
+       gettext-gnu.h \
+       input_stream.h \
+       mem_input_stream.h \
+-      misc_uuid.h \
+       mouse_none.h \
+       mouse_sdl.h \
+       multiplayer.h \
+--- a/configure.ac
++++ b/configure.ac
+@@ -201,6 +201,19 @@
+   LIBS="$LIBS $ENET_LIBS"
+ ])
+ 
++PKG_CHECK_MODULES([UUID], [libuuid],, [
++  PKG_CHECK_MODULES([UUID], [uuid],, [
++    SEARCH_LIB_FLAGS([uuid_generate], [-luuid],, [
++      AC_ERROR([uuid not found])
++    ])
++  ])
++])
++
++AS_IF([test "$UUID_CFLAGS" != "" || test "$UUID_LIBS" != ""], [
++  CXXFLAGS="$CXXFLAGS $UUID_CFLAGS"
++  LIBS="$LIBS $UUID_LIBS"
++])
++
+ AS_IF([test "$use_windows" = yes], [
+   LIBS="-lole32 -lmsvcrt -lwinmm $LIBS"
+ 
diff --git a/debian/watch b/debian/watch
index 0716ba0..d87a98e 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,5 +1,5 @@
 version=3
-opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/7kaa-$1\.tar\.gz/ \
+opts=dversionmangle=s/\+dfsg//,filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/7kaa-$1\.tar\.gz/
 \
   https://github.com/the3dfxdude/7kaa/releases .*/v?(\d\S*)\.tar\.gz
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/7kaa.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to