On Mon, 2007-09-03 at 20:57 -0400, Jean-Philippe Barrette-LaPierre
wrote:
> On 3-Sep-07, at 3:52 PM, Jeff Ye wrote:
> 
> > Thanks! This is the feature I have been looking for for centuries. :-)
> >
> > However, while try to put it together with my project, I got an error
> > saying Types.hpp need global.h, which was missing.
> 
> It seems that it's included in the distribution, but it's not within  
> the pkginclude
> variable. I just changed it. I'll wait 2-3 days to see if there's not  
> an another
> mistake like this to release a very minor version. However, for now  
> you can
> just copy the curlpp/global.h within the installed include dir.
> 
> >

The problem I have is if use the global.h comes with dist, it will
include the config.h, which is the standard define file of GNU autoconf.
The macro defined inside will conflict with another GNU autoconf project
using cURLpp. 

For example, after include curlpp's header, a VERSION macro will be
defined, then when I include my config.h, the compiler will complain
VERSION macro has been defined already.

My temporary fix is using my version of global.h (attachment) which just
define HAVE_BOOST macro.

BTW, I also attached my spec file, which has been modified a little bit
to fix the include folders permission problem.

Thanks.

Jeff

#ifndef _CURLPP_GLOBAL_H_
#define _CURLPP_GLOBAL_H_

#ifndef HAVE_BOOST
#define HAVE_BOOST
#endif

#endif // _CURLPP_GLOBAL_H_
Summary: cURLpp is a libcurl C++ wrapper
Name: cURLpp
Version: 0.7.1
Release: 1
License: MIT
Group: Development/Libraries
URL: http://rrette.com/curlpp.html
Source0: curlpp-%{version}.tar.gz
BuildRoot: %{_tmppath}/curlpp-buildroot
Requires: curl >= 7.10.0


%package        devel
Summary:        The includes and libs to develop with cURLpp
Group:          Development/Libraries
Requires:       curl >= 7.10.0
Provides:       curlpp-devel

%description
cURLpp is a libcurl C++ wrapper. There is the libcurl description: "libcurl is 
a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, 
HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl supports HTTPS 
certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based 
upload, proxies, cookies, user+password authentication, file transfer resume, 
http proxy tunneling and more!

libcurl is highly portable, it builds and works identically on numerous 
platforms, including Solaris, Net/Free/Open BSD, Darwin, HPUX, IRIX, AIX, 
Tru64, Linux, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC 
OS and more... "

%description devel
This packages contains all the libs and headers to develop applications using 
cURLpp.


%prep
%setup -qn curlpp-%{version}


%build
%configure
make 

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
make DESTDIR=%{buildroot} install

%clean
rm -rf %{buildroot}

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files 
%defattr(-,root,root)
%{_libdir}/libcurlpp.so*


%files devel
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/curlpp-config
%dir %{_includedir}/curlpp
%{_includedir}/curlpp/*.hpp
%{_includedir}/curlpp/*.inl
%{_includedir}/curlpp/*.h
%dir %{_includedir}/curlpp/utilspp
%dir %{_includedir}/curlpp/utilspp/singleton
%{_includedir}/curlpp/utilspp/singleton/*.hpp
%{_includedir}/curlpp/utilspp/singleton/*.inl
%dir %{_includedir}/utilspp
%{_includedir}/utilspp/*.hpp
%{_includedir}/utilspp/*.inl
%dir %{_includedir}/utilspp/functor
%{_includedir}/utilspp/functor/*.hpp
%{_libdir}/libcurlpp.la
%{_libdir}/libcurlpp.a
%{_libdir}/pkgconfig/curlpp.pc
%dir 


%changelog

* Sun Jul 17 2005 Jean-Philippe Barrette-LaPierre <[EMAIL PROTECTED]> - 0.5.1-1
- removed {%name} use

* Wed Jan  5 2005 Jean-Philippe Barrette-LaPierre <[EMAIL PROTECTED]> - 
0.3.2-rc1-1
- Version depends now on configure script

* Thu Sep 30 2004 Jean-Philippe Barrette-LaPierre <[EMAIL PROTECTED]> 0.3.1-1
- Removed any utilspp reference. (Not used anymore)

* Thu Jun 17 2004 Jean-Philippe Barrette-LaPierre <[EMAIL PROTECTED]> 0.3.1-1
- Removed the unusefull BuildRequires

* Mon Oct 20 2003 Jean-Philippe Barrette-LaPierre <[EMAIL PROTECTED]> - 0.3.0-2
- Added the devel package

* Wed Oct 15 2003 Jean-Philippe Barrette-LaPierre <[EMAIL PROTECTED]> - 0.3.0-1
- Initial build.


_______________________________________________
cURLpp mailing list
[email protected]
http://www.rrette.com/mailman/listinfo/curlpp

Reply via email to