rpms/bzflag/devel bzflag-2.0.4-lookup.patch, NONE, 1.1 bzflag.spec, 1.16, 1.17 bzflag-2.0.2-lookup.patch, 1.1, NONE
Nils Philippsen (nphilipp)
fedora-extras-commits at redhat.com
Fri Nov 25 10:57:57 UTC 2005
Author: nphilipp
Update of /cvs/extras/rpms/bzflag/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10745
Modified Files:
bzflag.spec
Added Files:
bzflag-2.0.4-lookup.patch
Removed Files:
bzflag-2.0.2-lookup.patch
Log Message:
version 2.0.4
update lookup patch
build require c-ares-devel instead of adns-devel
add newly introduced libs and includes (but exclude headers and static libs, courtesy of Matthias Saou)
bzflag-2.0.4-lookup.patch:
--- NEW FILE bzflag-2.0.4-lookup.patch ---
--- bzflag-2.0.4.20050930/src/net/Address.cxx.lookup 2005-09-07 23:57:38.000000000 +0200
+++ bzflag-2.0.4.20050930/src/net/Address.cxx 2005-11-21 16:49:23.000000000 +0100
@@ -136,6 +136,8 @@
int j;
struct hostent* hent;
+ struct hostent myhostent;
+
if (hname == "") { // local address
char hostname[MAXHOSTNAMELEN+1];
if (gethostname(hostname, sizeof(hostname)) >= 0)
@@ -147,7 +149,21 @@
a.addr.push_back(tempAddr);
return a;
} else { // non-local address
- hent = gethostbyname(hname.c_str());
+ // hent = gethostbyname(hname.c_str());
+ {
+ const char *hn = hname.c_str() ;
+ char buf[1024] ;
+ int my_herrno = 0;
+
+ memset(&myhostent, 0, sizeof(myhostent)) ;
+ hent = 0 ;
+
+ if(gethostbyname2_r (hn, AF_INET, &myhostent, buf,sizeof(buf),
+ &hent, &my_herrno) != 0) {
+ sprintf(buf,"gethostbyname2_r failed %d", my_herrno) ;
+ printError(buf) ;
+ }
+ }
}
if (!hent) {
Index: bzflag.spec
===================================================================
RCS file: /cvs/extras/rpms/bzflag/devel/bzflag.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- bzflag.spec 17 Nov 2005 14:13:59 -0000 1.16
+++ bzflag.spec 25 Nov 2005 10:57:54 -0000 1.17
@@ -1,18 +1,19 @@
-%define _modular_X %{?modular_X:%modular_X}%{?!modular_X:1}
+# Use --without modular_X to rebuild withour modular X deps
+%define _modular_X 0%{!?_without_modular_x:1}
%define desktop_vendor fedora
-%define date 20050318
+%define date 20050930
Summary: 3D multi-player tank battle game
Name: bzflag
-Version: 2.0.2
-Release: 5
+Version: 2.0.4
+Release: 1
License: GPL
Group: Amusements/Games
URL: http://bzflag.org
Source0: http://ftp.bzflag.org/bzflag/bzflag-%{version}%{?date:.%{date}}.tar.bz2
Source1: bzflag.desktop
-Patch0: bzflag-2.0.2-lookup.patch
+Patch0: bzflag-2.0.4-lookup.patch
Patch1: bzflag-2.0.2-isoc++.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
%if %_modular_X
@@ -32,7 +33,7 @@
BuildRequires: SDL-devel
BuildRequires: ncurses-devel
BuildRequires: curl-devel
-BuildRequires: adns-devel
+BuildRequires: c-ares-devel
# for curl version checking in configure. ugh.
BuildRequires: bc
@@ -47,24 +48,28 @@
%prep
%setup -q -n %{name}-%{version}%{?date:.%{date}}
-%patch0 -p1 -b .lookup
-%patch1 -p1 -b .isoc++
+%patch0 -p1 -b .isoc++
%build
# Use PIE because bzflag/bzfs are networked server applications
-CFLAGS='-fPIE -pie %optflags -fno-strict-aliasing'
-CXXFLAGS='-fPIE -pie %optflags -fno-strict-aliasing'
-%configure
+CFLAGS='-fPIE -pie %{optflags} -fno-strict-aliasing'
+CXXFLAGS='-fPIE -pie %{optflags} -fno-strict-aliasing'
+%configure \
+ --libdir=%{_libdir}/bzflag \
+ --includedir=%{_includedir}/bzflag
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
-%makeinstall
+%makeinstall \
+ libdir=%{buildroot}%{_libdir}/bzflag \
+ includedir=%{buildroot}%{_includedir}/bzflag
install -D -m 644 package/rpm/bzflag-m.xpm \
%{buildroot}%{_datadir}/pixmaps/bzflag.xpm
mkdir -p %{buildroot}%{_datadir}/applications
-desktop-file-install --vendor %{desktop_vendor} --dir %{buildroot}%{_datadir}/applications \
+desktop-file-install --vendor %{desktop_vendor} \
+ --dir %{buildroot}%{_datadir}/applications \
%{SOURCE1}
%clean
@@ -75,14 +80,25 @@
%doc AUTHORS BUGS COPYING ChangeLog NEWS README README.Linux
%{_bindir}/bzadmin
%{_bindir}/bzflag
-#%{_bindir}/bzfrelay
%{_bindir}/bzfs
+%exclude %{_includedir}/bzflag/
+%dir %{_libdir}/bzflag/
+%exclude %{_libdir}/bzflag/*.a
+%exclude %{_libdir}/bzflag/*.la
+%{_libdir}/bzflag/*.so
%{_datadir}/applications/%{desktop_vendor}-%{name}.desktop
%{_datadir}/bzflag
%{_datadir}/pixmaps/bzflag.xpm
%{_mandir}/man*/*
%changelog
+* Mon Nov 21 2005 Nils Philippsen <nphilipp at redhat.com> 2.0.4-1
+- version 2.0.4
+- update lookup patch
+- build require c-ares-devel instead of adns-devel
+- add newly introduced libs and includes (but exclude headers and static libs,
+ courtesy of Matthias Saou)
+
* Thu Nov 17 2005 Nils Philippsen <nphilipp at redhat.com> 2.0.2-5
- rebuild to pick up new openssl version
- prepare for modular X
--- bzflag-2.0.2-lookup.patch DELETED ---
More information about the scm-commits
mailing list