openjpeg - Open-source JPEG 2000 codec written in C ChangeLog

HOWTO


# OpenJPEG 2.5.0
# ==============
# Slackware 14.2: openjpeg 2.1.0
# Slackware 15.0: openjpeg 2.4.0

# If you ever want to uninstall OpenJPEG or remove files from an old version
# before installing this one, skip down to the bottom

# Prerequisites:
# CMake
# zlib
# libpng
# libtiff
# lcms
# pkg-config
# doxygen (for 'make doc')

# OpenJPEG 2.5.0 released
# GitHub OpenJPEG 2.5.0 release page
# 2.5.0 NEWS
# 2.5.0 ChangeLog

# Get the tarball
cd
test -f installed/openjpeg-2.5.0.tar.gz &&
mv installed/openjpeg-2.5.0.tar.gz .
test ! -f openjpeg-2.5.0.tar.gz &&
wget https://github.com/uclouvain/openjpeg/archive/refs/tags/\
v2.5.0.tar.gz -O openjpeg-2.5.0.tar.gz

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

# Build everything in a sub-directory
mkdir build
cd build

# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
cmake -DCMAKE_INSTALL_PREFIX=/usr -DOPENJPEG_INSTALL_LIB_DIR=/usr/lib64 ..

# Configure the build for anything else
test $(uname -m) != 'x86_64' && cmake ..

# Build it
make

# Become root to install it
su

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg openjpeg

# Remove old library files if you're sure they are not in use
rm -f /usr/lib*/libopenjpeg.* /usr/local/lib*/libopenjpeg.*

# Install it
make install
ldconfig

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Become yourself again
exit

# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/openjpeg_*.tar.* installed/openjpeg-*.tar.*
mv openjpeg-2.5.0.tar.gz installed/


# If you ever want to uninstall OpenJPEG, this should do it:
su
cd ~/src/openjpeg-*/build
cat install_manifest.txt | xargs rm
for pfx in /usr /usr/local;
do
  cd $pfx
  ( cd bin
    rm -f image_to_j2k j2k_dump j2k_to_image obj_compress obj_decompress \
     obj_dump )
  find ./doc -type d -maxdepth 1 -name "openjpeg-*" -exec rm -r {} \;
  find ./include -type d -maxdepth 1 -name "openjpeg-*" \
   -exec rm -r {} \;
  for libdir in ${pfx}/lib ${pfx}/lib64;
  do
    find $libdir -maxdepth 1 -type d -name "openjpeg-*" -exec rm -r {} \;
    ( cd ${libdir}/pkgconfig
      rm -f libopenjp2.pc libopenjpeg1.pc )
  done
  ( cd man/man1 ; image_to_j2k.1 j2k_dump.1 j2k_to_image.1 )
  rm -f include/openjpeg.h man/man3/libopenjpeg.3
done
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "OpenJPEG_*" -exec rm -r {} \;
find ~/src -maxdepth 1 -type d -name "openjpeg-*" -exec rm -r {} \;
rm -f ~/installed/openjpeg_*.tar.* installed/openjpeg-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2023-10-16 7:37pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]