Curl

From CBLFS
Revision as of 10:19, 9 September 2012 by Kb0iic (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Download Source: http://curl.haxx.se/download/curl-7.29.0.tar.lzma

Introduction to Curl

Project Homepage: http://curl.haxx.se/

Dependencies

Optional

Optional (For The Testsuite)

Non-Multilib

Configure and compile the package:

./configure --prefix=/usr &&
make

Install the package:

make install &&
find docs -name "Makefile*" -o -name "*.1" -o -name "*.3" | xargs rm &&
install -v -d -m755 /usr/share/doc/curl-7.29.0 &&
cp -v -R docs/* /usr/share/doc/curl-7.29.0

Multilib

32Bit

Configure and compile the package:

CC="gcc ${BUILD32}" USE_ARCH=32 PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
./configure --prefix=/usr &&
make

Install the package:

make install &&
mv -v /usr/bin/curl-config{,-32} &&
mv -v /usr/include/curl/curlbuild{,-32}.h

N32

Configure and compile the package:

CC="gcc ${BUILDN32}" USE_ARCH=n32 PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \
./configure --prefix=/usr --libdir=/usr/lib32 &&
make

Install the package:

make install &&
mv -v /usr/bin/curl-config{,-n32} &&
mv -v /usr/include/curl/curlbuild{,-n32}.h

64Bit

Configure and compile the package:

CC="gcc ${BUILD64}" USE_ARCH=64 PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
./configure --prefix=/usr --libdir=/usr/lib64 &&
make

Install the package:

make install &&
mv -v /usr/bin/curl-config{,-64} &&
ln -sfv multiarch_wrapper /usr/bin/curl-config &&
mv -v /usr/include/curl/curlbuild{,-64}.h &&
find docs -name "Makefile*" -o -name "*.1" -o -name "*.3" | xargs rm &&
install -v -d -m755 /usr/share/doc/curl-7.29.0 &&
cp -v -R docs/* /usr/share/doc/curl-7.29.0

Creating a Stub Header (Multilib Only)

Creating a Generic Stub Header

cat > /usr/include/curl/curlbuild.h << "EOF"
/* curlbuild.h - Stub Header  */
#ifndef __STUB__CURLBUILD_H__
#define __STUB__CURLBUILD_H__

#if defined(__x86_64__) || \
    defined(__sparc64__) || \
    defined(__arch64__) || \
    defined(__powerpc64__) || \
    defined (__s390x__)
# include "curlbuild-64.h"
#else
# include "curlbuild-32.h"
#endif

#endif /* __STUB__CURLBUILD_H__ */
EOF

Creating a Stub Header For Mips

cat > /usr/include/curl/curlbuild.h << "EOF"
/* curlbuild.h - Stub Header  */
#ifndef __STUB__CURLBUILD_H__
#define __STUB__CURLBUILD_H__

#include <sgidefs.h>

#if (_MIPS_SIM == _ABIO32)
# include "curlbuild-32.h"
#elif (_MIPS_SIM == _ABIN32)
# include "curlbuild-n32.h"
#elif (_MIPS_SIM == _ABI64)
# include "curlbuild-64.h"
#endif

#endif /* __STUB__CURLBUILD_H__ */
EOF
Retrieved from "?title=Curl&oldid=21369"