libiconv - Library that handles character set encoding conversion ChangeLog


# GNU libiconv 1.16
# =================
# Modern versions of glibc can do what this library does.  You most likely
# don't need this library unless your libc doesn't have a iconv() or if
# you want a different/better iconv() than the one that comes with glibc.

# NOTE: If you already have a /usr/include/iconv.h, this will replace it
# You could always use the default prefix (/usr/local) to have both
# available...

# The recommended procedure if you don't already have gettext, is to install this,
# then gettext, then this again

# If you ever want to remove libiconv, skip down to the bottom

# If you don't have wget, see the wget HOWTO for alternatives to use
# such as 'curl -O ...' or ncftpget

# If the download method below does not work for you, try these other
# options:

# Prerequisites:
# gawk
# grep
# sed
# gettext
# getenv (if you don't use --disable-nls)

# Get the source
test -f installed/libiconv-1.16.tar.gz && mv installed/libiconv-1.16.tar.gz .
test ! -f libiconv-1.16.tar.gz &&

# Verify tarball w/ sha256sum:
# (this came from my gpg-verified tarball)
echo "e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04  libiconv-1.16.tar.gz" | sha256sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 2E4616C2 > /dev/null 2>&1 || gpg --recv-keys 2E4616C2 ) &&
wget -nc &&
  gpg --verify libiconv-1.16.tar.gz.sig && rm libiconv-1.16.tar.gz.sig

# Extract the source
mkdir -p -m 0700 ~/src
cd src
find -maxdepth 1 -type d -name "libiconv-*" -exec rm -r {} \;
tar xzvf ~/libiconv-1.16.tar.gz
cd libiconv-1.16
test $UID = 0 && chown -R root:root .

# I use --disable-nls because I don't reed or right anything other than
# English (well), though these days the drive space savings are not much of
# a concern

# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --disable-nls --prefix=/usr   --docdir=/usr/doc --libdir=/usr/lib64 --mandir=/usr/man

# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --disable-nls --prefix=/usr   --docdir=/usr/doc --mandir=/usr/man

# Build it

# Become root to install it

# If you're sure you don't need them (check with lsof), remove old library
# files
test -d /usr/lib64 &&
( cd /usr/lib64
   rm -f ./libcharset.* )
test ! -d /usr/lib64 &&
( cd /usr/lib
   rm -f ./libcharset.* )

# Back up the glibc iconv.h just in case, if it's there
test -f /usr/include/iconv.h &&
grep -q "The GNU C Library" /usr/include/iconv.h &&
  cp -a /usr/include/iconv.h /usr/include/iconv.h.glibc

# Install it
make install

# Become yourself again

# Save the source for later
mkdir -p -m 0700 installed
rm -f installed/libiconv-*.tar.gz
mv libiconv-1.16.tar.gz installed/

# Now go to the gettext HOWTO and re-build it

# If you ever want to uninstall libiconv, this should do it
# 'make uninstall' from the source directory as root should do it
# The rest is just in case old files are left over
test -d src/libiconv-* && ( cd src/libiconv-* ; make uninstall )
for pfx in /usr /usr/local;
  test -d ${pfx}/doc/libiconv && rm -f ${pfx}/doc/libiconv
  ( cd ${pfx}/include
    rm -f iconv.h localcharset.h libcharset.h )
  ( cd ${pfx}/lib
    rm -f libcharset.* libiconv.* )
  test -d ${pfx}/lib64 &&
   ( cd ${pfx}/lib
     rm -f libcharset.* libiconv.* )
  ( cd ${pfx}/man/man3
    rm -f iconv.3 iconv_close.3 iconv_open.3 iconv_open_into.3 iconvctl.3 )
  test -d ${pfx}/share/doc/libiconv && rm -f ${pfx}/share/doc/libiconv
  find ${pfx}/share/locale -type f -name
  ( cd ${pfx}/share/man/man3
    rm -f iconv.3 iconv_close.3 iconv_open.3 iconv_open_into.3 iconvctl.3 )
  rm -f ${pfx}/bin/iconv ${pfx}/share/man/man1/iconv.1
find ~/src -maxdepth 1 -type d -name "libiconv-*" -exec rm -r {} \;
rm -f ~/installed/libiconv-*.tar.*

List of HOWTOs

Last updated: 2023-09-09 10:40pm EDT(-0400)
Copyright © 2001-2023 Jason Englander. All Rights reserved.