Difference between revisions of "NSPR"

From CBLFS
Jump to navigationJump to search
 
(17 intermediate revisions by 3 users not shown)
Line 7: Line 7:
 
----
 
----
  
{{Blank-Package-Introduction}}
+
{{Package-Introduction|Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions. The API is used in the Mozilla clients and many of Red Hat's, Sun's, and other software offerings.|http://www.mozilla.org/projects/nspr/}}
  
 
== Dependencies ==
 
== Dependencies ==
Line 25: Line 25:
  
 
  ../mozilla/nsprpub/configure --prefix=/usr \
 
  ../mozilla/nsprpub/configure --prefix=/usr \
    --infodir=/usr/share/info \
+
  --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man \
    --mandir=/usr/share/man &&
+
  --disable-debug --disable-ipv6 --enable-system-sqlite &&
 
  make
 
  make
  
Line 32: Line 32:
  
 
  make install &&
 
  make install &&
  install -v -m755 config/nspr-config /usr/bin &&
+
  chmod 644 /usr/lib/lib{nspr4,plc4,plds4}.a &&
install -v -d /usr/include/nspr &&
+
  rm -fv /usr/bin/{compile-et.pl,prerr.properties}
install -v -m755 dist/lib/*.so /usr/lib &&
 
install -v -m644 dist/lib/*.a /usr/lib &&
 
  cp -RL dist/include/nspr/* /usr/include/nspr/
 
  
 
Create the pkg-config file:
 
Create the pkg-config file:
Line 42: Line 39:
 
  cat > /usr/lib/pkgconfig/nspr.pc << "EOF"
 
  cat > /usr/lib/pkgconfig/nspr.pc << "EOF"
 
  prefix=/usr
 
  prefix=/usr
  exec_prefix=/usr
+
  exec_prefix=/usr/bin
 
  libdir=/usr/lib
 
  libdir=/usr/lib
 
  includedir=/usr/include/nspr
 
  includedir=/usr/include/nspr
Line 48: Line 45:
 
  Name: NSPR
 
  Name: NSPR
 
  Description: The Netscape Portable Runtime
 
  Description: The Netscape Portable Runtime
  Version: {{NSPR-Version}}
+
  Version: %NSPR_VERSION%
  Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,-R${libdir}
+
  Libs: %FULL_NSPR_LIBS%
  Cflags: -I${includedir}
+
  Cflags: %FULL_NSPR_CFLAGS%
 
  EOF
 
  EOF
 +
 +
sed -i -e "s@%NSPR_VERSION%@$(./config/nspr-config --version)@" \
 +
        -e "s@%FULL_NSPR_LIBS%@$(./config/nspr-config --libs)@" \
 +
        -e "s@%FULL_NSPR_CFLAGS%@$(./config/nspr-config --cflags)@" \
 +
    /usr/lib/pkgconfig/nspr.pc
 +
 +
chmod 644 /usr/lib/pkgconfig/nspr.pc
 +
ln -sf nspr.pc /usr/lib/pkgconfig/mozilla-nspr.pc
  
 
== Multilib ==
 
== Multilib ==
Line 64: Line 69:
 
Compile the package:
 
Compile the package:
  
  CC="gcc ${BUILD32}" \
+
  CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" USE_ARCH=32 \
 
  ../mozilla/nsprpub/configure --prefix=/usr \
 
  ../mozilla/nsprpub/configure --prefix=/usr \
    --infodir=/usr/share/info \
+
  --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man \
    --mandir=/usr/share/man &&
+
  --disable-debug --disable-ipv6 --enable-system-sqlite &&
 
  make
 
  make
  
Line 73: Line 78:
  
 
  make install &&
 
  make install &&
  install -v -m755 config/nspr-config /usr/bin/nspr-config-32 &&
+
  chmod 644 /usr/lib/lib{nspr4,plc4,plds4}.a &&
  install -v -d /usr/include/nspr &&
+
  rm -fv /usr/bin/{compile-et.pl,prerr.properties} &&
install -v -m755 dist/lib/*.so /usr/lib &&
+
  mv -v /usr/bin/nspr-config{,-32}
  install -v -m644 dist/lib/*.a /usr/lib &&
 
cp -RL dist/include/nspr/* /usr/include/nspr/
 
  
 
Create the pkg-config file:
 
Create the pkg-config file:
Line 83: Line 86:
 
  cat > /usr/lib/pkgconfig/nspr.pc << "EOF"
 
  cat > /usr/lib/pkgconfig/nspr.pc << "EOF"
 
  prefix=/usr
 
  prefix=/usr
  exec_prefix=/usr
+
  exec_prefix=/usr/bin
 
  libdir=/usr/lib
 
  libdir=/usr/lib
 
  includedir=/usr/include/nspr
 
  includedir=/usr/include/nspr
Line 89: Line 92:
 
  Name: NSPR
 
  Name: NSPR
 
  Description: The Netscape Portable Runtime
 
  Description: The Netscape Portable Runtime
  Version: {{NSPR-Version}}
+
  Version: %NSPR_VERSION%
  Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,-R${libdir}
+
  Libs: %FULL_NSPR_LIBS%
  Cflags: -I${includedir}
+
  Cflags: %FULL_NSPR_CFLAGS%
 
  EOF
 
  EOF
 +
 +
sed -i -e "s@%NSPR_VERSION%@$(./config/nspr-config --version)@" \
 +
        -e "s@%FULL_NSPR_LIBS%@$(./config/nspr-config --libs)@" \
 +
        -e "s@%FULL_NSPR_CFLAGS%@$(./config/nspr-config --cflags)@" \
 +
    /usr/lib/pkgconfig/nspr.pc
 +
 +
chmod 644 /usr/lib/pkgconfig/nspr.pc
 +
ln -sf nspr.pc /usr/lib/pkgconfig/mozilla-nspr.pc
  
 
=== N32 ===
 
=== N32 ===
Line 103: Line 114:
 
Compile the package:
 
Compile the package:
  
  CC="gcc ${BUILDN32}" \
+
  CC="gcc ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" USE_ARCH=N32 \
 
  ../mozilla/nsprpub/configure --prefix=/usr \
 
  ../mozilla/nsprpub/configure --prefix=/usr \
    --infodir=/usr/share/info --libdir=/usr/lib32 \
+
  --libdir=/usr/lib32 --infodir=/usr/share/info --mandir=/usr/share/man \
    --mandir=/usr/share/man --enable-n32 &&
+
  --disable-debug --disable-ipv6 --enable-system-sqlite &&
 
  make
 
  make
  
Line 112: Line 123:
  
 
  make install &&
 
  make install &&
  install -v -m755 config/nspr-config /usr/bin/nspr-config-n32 &&
+
  chmod 644 /usr/lib32/lib{nspr4,plc4,plds4}.a &&
  install -v -d /usr/include/nspr &&
+
  rm -fv /usr/bin/{compile-et.pl,prerr.properties} &&
install -v -m755 dist/lib/*.so /usr/lib32 &&
+
  mv -v /usr/bin/nspr-config{,-n32}
  install -v -m644 dist/lib/*.a /usr/lib32 &&
 
cp -RL dist/include/nspr/* /usr/include/nspr/
 
  
 
Create the pkg-config file:
 
Create the pkg-config file:
Line 122: Line 131:
 
  cat > /usr/lib32/pkgconfig/nspr.pc << "EOF"
 
  cat > /usr/lib32/pkgconfig/nspr.pc << "EOF"
 
  prefix=/usr
 
  prefix=/usr
  exec_prefix=/usr
+
  exec_prefix=/usr/bin
 
  libdir=/usr/lib32
 
  libdir=/usr/lib32
 
  includedir=/usr/include/nspr
 
  includedir=/usr/include/nspr
Line 128: Line 137:
 
  Name: NSPR
 
  Name: NSPR
 
  Description: The Netscape Portable Runtime
 
  Description: The Netscape Portable Runtime
  Version: {{NSPR-Version}}
+
  Version: %NSPR_VERSION%
  Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,-R${libdir}
+
  Libs: %FULL_NSPR_LIBS%
  Cflags: -I${includedir}
+
  Cflags: %FULL_NSPR_CFLAGS%
 
  EOF
 
  EOF
 +
 +
sed -i -e "s@%NSPR_VERSION%@$(./config/nspr-config --version)@" \
 +
        -e "s@%FULL_NSPR_LIBS%@$(./config/nspr-config --libs)@" \
 +
        -e "s@%FULL_NSPR_CFLAGS%@$(./config/nspr-config --cflags)@" \
 +
    /usr/lib32/pkgconfig/nspr.pc
 +
 +
chmod 644 /usr/lib32/pkgconfig/nspr.pc
 +
ln -sf nspr.pc /usr/lib32/pkgconfig/mozilla-nspr.pc
  
 
=== 64Bit ===
 
=== 64Bit ===
Line 142: Line 159:
 
Compile the package:
 
Compile the package:
  
  CC="gcc ${BUILD64}" \
+
  CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" USE_ARCH=64 \
 
  ../mozilla/nsprpub/configure --prefix=/usr \
 
  ../mozilla/nsprpub/configure --prefix=/usr \
    --infodir=/usr/share/info --libdir=/usr/lib64 \
+
  --libdir=/usr/lib64 --infodir=/usr/share/info --mandir=/usr/share/man \
    --mandir=/usr/share/man --enable-64bit &&
+
  --disable-debug --disable-ipv6 --enable-system-sqlite --enable-64bit &&
 
  make
 
  make
  
Line 151: Line 168:
  
 
  make install &&
 
  make install &&
  install -v -m755 config/nspr-config /usr/bin/nspr-config-64 &&
+
  chmod 644 /usr/lib64/lib{nspr4,plc4,plds4}.a &&
  ln -sfv multiarch_wrapper /usr/bin/nspr-config &&
+
  rm -fv /usr/bin/{compile-et.pl,prerr.properties} &&
  install -v -d /usr/include/nspr &&
+
  mv -v /usr/bin/nspr-config{,-64} &&
install -v -m755 dist/lib/*.so /usr/lib64 &&
+
  ln -sfv multiarch_wrapper /usr/bin/nspr-config
  install -v -m644 dist/lib/*.a /usr/lib64 &&
 
cp -RL dist/include/nspr/* /usr/include/nspr/
 
  
 
Create the pkg-config file:
 
Create the pkg-config file:
Line 162: Line 177:
 
  cat > /usr/lib64/pkgconfig/nspr.pc << "EOF"
 
  cat > /usr/lib64/pkgconfig/nspr.pc << "EOF"
 
  prefix=/usr
 
  prefix=/usr
  exec_prefix=/usr
+
  exec_prefix=/usr/bin
 
  libdir=/usr/lib64
 
  libdir=/usr/lib64
 
  includedir=/usr/include/nspr
 
  includedir=/usr/include/nspr
Line 168: Line 183:
 
  Name: NSPR
 
  Name: NSPR
 
  Description: The Netscape Portable Runtime
 
  Description: The Netscape Portable Runtime
  Version: {{NSPR-Version}}
+
  Version: %NSPR_VERSION%
  Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,-R${libdir}
+
  Libs: %FULL_NSPR_LIBS%
  Cflags: -I${includedir}
+
  Cflags: %FULL_NSPR_CFLAGS%
 
  EOF
 
  EOF
  
= Contents =
+
sed -i -e "s@%NSPR_VERSION%@$(./config/nspr-config --version)@" \
 +
        -e "s@%FULL_NSPR_LIBS%@$(./config/nspr-config --libs)@" \
 +
        -e "s@%FULL_NSPR_CFLAGS%@$(./config/nspr-config --cflags)@" \
 +
    /usr/lib64/pkgconfig/nspr.pc
  
{| style="text-align: left;"
+
chmod 644 /usr/lib64/pkgconfig/nspr.pc
|-
+
ln -sf nspr.pc /usr/lib64/pkgconfig/mozilla-nspr.pc
! Installed Programs:
+
| ???
+
[[Category:Security]]
|-
 
! Installed Libraries:
 
| ???
 
|-
 
! Installed Directory:
 
| ???
 
|}
 
 
 
=== Short Descriptions ===
 
 
 
{| style="text-align: left;"
 
|-
 
! program1
 
| ???
 
|-
 
! program2
 
| ???
 
|}
 

Latest revision as of 17:34, 1 January 2010

Download Source: http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.9.4/src/nspr-4.9.4.tar.gz

Introduction to NSPR

Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions. The API is used in the Mozilla clients and many of Red Hat's, Sun's, and other software offerings.

Project Homepage: http://www.mozilla.org/projects/nspr/

Dependencies

Non-Multilib

Create a build directory:

mkdir -v build &&
cd build

If building on pure64 (x86_64 at least perhaps others) add this to the configure line below:

--enable-64bit

Compile the package:

../mozilla/nsprpub/configure --prefix=/usr \
 --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man \
 --disable-debug --disable-ipv6 --enable-system-sqlite &&
make

Install the package

make install &&
chmod 644 /usr/lib/lib{nspr4,plc4,plds4}.a &&
rm -fv /usr/bin/{compile-et.pl,prerr.properties}

Create the pkg-config file:

cat > /usr/lib/pkgconfig/nspr.pc << "EOF"
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib
includedir=/usr/include/nspr

Name: NSPR
Description: The Netscape Portable Runtime
Version: %NSPR_VERSION%
Libs: %FULL_NSPR_LIBS%
Cflags: %FULL_NSPR_CFLAGS%
EOF
sed -i -e "s@%NSPR_VERSION%@$(./config/nspr-config --version)@" \
       -e "s@%FULL_NSPR_LIBS%@$(./config/nspr-config --libs)@" \
       -e "s@%FULL_NSPR_CFLAGS%@$(./config/nspr-config --cflags)@" \
    /usr/lib/pkgconfig/nspr.pc
chmod 644 /usr/lib/pkgconfig/nspr.pc
ln -sf nspr.pc /usr/lib/pkgconfig/mozilla-nspr.pc

Multilib

32Bit

Create a build directory:

mkdir -v build &&
cd build

Compile the package:

CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" USE_ARCH=32 \
../mozilla/nsprpub/configure --prefix=/usr \
 --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man \
 --disable-debug --disable-ipv6 --enable-system-sqlite &&
make

Install the package

make install &&
chmod 644 /usr/lib/lib{nspr4,plc4,plds4}.a &&
rm -fv /usr/bin/{compile-et.pl,prerr.properties} &&
mv -v /usr/bin/nspr-config{,-32}

Create the pkg-config file:

cat > /usr/lib/pkgconfig/nspr.pc << "EOF"
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib
includedir=/usr/include/nspr

Name: NSPR
Description: The Netscape Portable Runtime
Version: %NSPR_VERSION%
Libs: %FULL_NSPR_LIBS%
Cflags: %FULL_NSPR_CFLAGS%
EOF
sed -i -e "s@%NSPR_VERSION%@$(./config/nspr-config --version)@" \
       -e "s@%FULL_NSPR_LIBS%@$(./config/nspr-config --libs)@" \
       -e "s@%FULL_NSPR_CFLAGS%@$(./config/nspr-config --cflags)@" \
    /usr/lib/pkgconfig/nspr.pc
chmod 644 /usr/lib/pkgconfig/nspr.pc
ln -sf nspr.pc /usr/lib/pkgconfig/mozilla-nspr.pc

N32

Create a build directory:

mkdir -v build &&
cd build

Compile the package:

CC="gcc ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" USE_ARCH=N32 \
../mozilla/nsprpub/configure --prefix=/usr \
 --libdir=/usr/lib32 --infodir=/usr/share/info --mandir=/usr/share/man \
 --disable-debug --disable-ipv6 --enable-system-sqlite &&
make

Install the package

make install &&
chmod 644 /usr/lib32/lib{nspr4,plc4,plds4}.a &&
rm -fv /usr/bin/{compile-et.pl,prerr.properties} &&
mv -v /usr/bin/nspr-config{,-n32}

Create the pkg-config file:

cat > /usr/lib32/pkgconfig/nspr.pc << "EOF"
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib32
includedir=/usr/include/nspr

Name: NSPR
Description: The Netscape Portable Runtime
Version: %NSPR_VERSION%
Libs: %FULL_NSPR_LIBS%
Cflags: %FULL_NSPR_CFLAGS%
EOF
sed -i -e "s@%NSPR_VERSION%@$(./config/nspr-config --version)@" \
       -e "s@%FULL_NSPR_LIBS%@$(./config/nspr-config --libs)@" \
       -e "s@%FULL_NSPR_CFLAGS%@$(./config/nspr-config --cflags)@" \
    /usr/lib32/pkgconfig/nspr.pc
chmod 644 /usr/lib32/pkgconfig/nspr.pc
ln -sf nspr.pc /usr/lib32/pkgconfig/mozilla-nspr.pc

64Bit

Create a build directory:

mkdir -v build &&
cd build

Compile the package:

CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" USE_ARCH=64 \
../mozilla/nsprpub/configure --prefix=/usr \
 --libdir=/usr/lib64 --infodir=/usr/share/info --mandir=/usr/share/man \
 --disable-debug --disable-ipv6 --enable-system-sqlite --enable-64bit &&
make

Install the package

make install &&
chmod 644 /usr/lib64/lib{nspr4,plc4,plds4}.a &&
rm -fv /usr/bin/{compile-et.pl,prerr.properties} &&
mv -v /usr/bin/nspr-config{,-64} &&
ln -sfv multiarch_wrapper /usr/bin/nspr-config

Create the pkg-config file:

cat > /usr/lib64/pkgconfig/nspr.pc << "EOF"
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib64
includedir=/usr/include/nspr

Name: NSPR
Description: The Netscape Portable Runtime
Version: %NSPR_VERSION%
Libs: %FULL_NSPR_LIBS%
Cflags: %FULL_NSPR_CFLAGS%
EOF
sed -i -e "s@%NSPR_VERSION%@$(./config/nspr-config --version)@" \
       -e "s@%FULL_NSPR_LIBS%@$(./config/nspr-config --libs)@" \
       -e "s@%FULL_NSPR_CFLAGS%@$(./config/nspr-config --cflags)@" \
    /usr/lib64/pkgconfig/nspr.pc
chmod 644 /usr/lib64/pkgconfig/nspr.pc
ln -sf nspr.pc /usr/lib64/pkgconfig/mozilla-nspr.pc
Retrieved from "?title=NSPR&oldid=19753"