Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jul 2023 10:38:24 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: bef73eea18b0 - main - games/xray_re-tools: try harder to fix the port's build on -CURRENT
Message-ID:  <202307201038.36KAcOPD024971@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bef73eea18b070ccf8a9de2093764c041772a980

commit bef73eea18b070ccf8a9de2093764c041772a980
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-07-20 10:37:26 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-07-20 10:37:26 +0000

    games/xray_re-tools: try harder to fix the port's build on -CURRENT
    
    Commit 7cb3d96ec56d (n624509) was incomplete as it had only addressed
    the writer part, not the reader.  While here, reduce the differences
    between both counterparts and make the T::* pointer a private member.
    
    Reported by:    pkg-fallout
---
 .../files/patch-sources_xray__re_xr__reader.h            | 16 ++++++++++++++++
 .../files/patch-sources_xray__re_xr__writer.h            | 11 ++++++-----
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/games/xray_re-tools/files/patch-sources_xray__re_xr__reader.h b/games/xray_re-tools/files/patch-sources_xray__re_xr__reader.h
new file mode 100644
index 000000000000..f99ccdaed150
--- /dev/null
+++ b/games/xray_re-tools/files/patch-sources_xray__re_xr__reader.h
@@ -0,0 +1,16 @@
+--- sources/xray_re/xr_reader.h.orig	2018-09-02 12:42:44 UTC
++++ sources/xray_re/xr_reader.h
+@@ -79,11 +79,10 @@ class xr_reader { (public)
+ 	void		r_sdir(fvector3& v);
+ 	void		r_packet(xr_packet& packet, size_t size);
+ 
+-	template<typename T> struct f_r: public std::binary_function<T, xr_reader, void> {};
+-	struct f_r_sz: public f_r<std::string> {
++	struct f_r_sz {
+ 		void operator()(std::string& s, xr_reader& r) { r.r_sz(s); }
+ 	};
+-	template<typename T> struct f_r_new: public f_r<T> {
++	template<typename T> struct f_r_new {
+ 		explicit f_r_new(void (T::*_pmf)(xr_reader& r)): pmf(_pmf) {}
+ 		void operator()(T*& p, xr_reader& r) { T* _p = new T; (_p->*pmf)(r); p = _p; }
+ 	private:
diff --git a/games/xray_re-tools/files/patch-sources_xray__re_xr__writer.h b/games/xray_re-tools/files/patch-sources_xray__re_xr__writer.h
index 687f268be452..bc96f3174bbf 100644
--- a/games/xray_re-tools/files/patch-sources_xray__re_xr__writer.h
+++ b/games/xray_re-tools/files/patch-sources_xray__re_xr__writer.h
@@ -1,6 +1,6 @@
 --- sources/xray_re/xr_writer.h.orig	2018-09-02 12:42:44 UTC
 +++ sources/xray_re/xr_writer.h
-@@ -68,12 +68,13 @@ class xr_writer { (public)
+@@ -68,12 +68,14 @@ class xr_writer { (public)
  
  	void		w_packet(const xr_packet& packet);
  
@@ -12,13 +12,14 @@
 -	template<typename T> struct f_w_const: public std::const_mem_fun1_t<void, T, xr_writer&> {
 -		explicit f_w_const(void (T::*_pmf)(xr_writer& w) const): std::const_mem_fun1_t<void, T, xr_writer&>(_pmf) {}
 +	template<typename T> struct f_w_const {
-+		void (T::*_m_f)(xr_writer&) const;
-+		explicit f_w_const(void (T::*_pmf)(xr_writer& w) const): _m_f(_pmf) {}
-+		void operator()(const T* t, xr_writer& w) const { (t->*_m_f)(w); }
++		explicit f_w_const(void (T::*_pmf)(xr_writer& w) const): pmf(_pmf) {}
++		void operator()(const T* p, xr_writer& w) const { (p->*pmf)(w); }
++	private:
++		void (T::*pmf)(xr_writer& w) const;
  	};
  
  private:
-@@ -268,9 +269,9 @@ template<typename T, typename F> inline void xr_ini_wr
+@@ -268,9 +270,9 @@ template<typename T, typename F> inline void xr_ini_wr
  template<typename T, typename F> inline void xr_ini_writer::w_ini_seq(const T& container, F write, const char* prefix)
  {
  	char buf[1024];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307201038.36KAcOPD024971>