Subject: [bug#39197] [PATCH core-updates 4/4] gnu: Deprecate the 'libjpeg' variable.

From: Marius Bakke <[email-masked]>
Date: Mon, 20 Jan 2020 00:20:06 +0100

* gnu/packages/image.scm (libjpeg, libjpeg-8): Rename to ...
(ijg-libjpeg, ijg-libjpeg-8): ... this.
(libjpeg): Define as deprecated by LIBJPEG-TURBO.
* gnu/packages/emulators.scm (mame)[inputs]: Change from LIBJPEG-8 to
IJG-LIBJPEG-8.
* gnu/packages/games.scm (stepmania)[inputs]: Likewise.
* gnu/packages/qt.scm (qt-4)[inputs]: Likewise.
---
 gnu/packages/emulators.scm | 2 +-
 gnu/packages/games.scm     | 2 +-
 gnu/packages/image.scm     | 9 ++++++---
 gnu/packages/qt.scm        | 2 +-
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index ffcdc65265..aba5ce4ff4 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1425,7 +1425,7 @@ play them on systems for which they were never designed!")
        ("flac" ,flac)
        ("fontconfig" ,fontconfig)
        ("glm" ,glm)
-       ("libjpeg" ,libjpeg-8)    ;jpeg_read_header argument error in libjpeg-9
+       ("libjpeg" ,ijg-libjpeg-8) ;jpeg_read_header argument error in libjpeg-9
        ("libxi" ,libxi)
        ("libxinerama" ,libxinerama)
        ("lua" ,lua)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index e3b3a5f6e5..ae97f05b0d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -6566,7 +6566,7 @@ civilized than your own.")
        ("gtk+" ,gtk+-2)
        ("jsoncpp" ,jsoncpp)
        ("libpng" ,libpng)
-       ("libjpeg" ,libjpeg-8)
+       ("libjpeg" ,ijg-libjpeg-8)
        ("libmad" ,libmad)
        ("libogg" ,libogg)
        ("libva" ,libva)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 65acf7638f..a7e207e07a 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -82,6 +82,7 @@
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (guix build-system scons)
+  #:use-module (guix deprecation)
   #:use-module (srfi srfi-1))
 
 (define-public libpng
@@ -363,7 +364,7 @@ Features:
 @end enumerate")
     (license license:gpl3+)))
 
-(define-public libjpeg
+(define-public ijg-libjpeg
   (package
    (name "libjpeg")
    (version "9c")
@@ -392,8 +393,8 @@ lossless JPEG manipulations such as rotation, scaling or cropping:
    (license license:ijg)
    (home-page "https://www.ijg.org/")))
 
-(define-public libjpeg-8
-  (package (inherit libjpeg)
+(define-public ijg-libjpeg-8
+  (package (inherit ijg-libjpeg)
    (version "8d")
    (source (origin
             (method url-fetch)
@@ -1522,6 +1523,8 @@ and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
                    license:ijg          ;the libjpeg library and associated tools
                    license:zlib))))     ;the libjpeg-turbo SIMD extensions
 
+(define-deprecated libjpeg libjpeg-turbo)
+
 (define-public niftilib
   (package
     (name "niftilib")
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4011970643..a105ba9c1f 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -215,7 +215,7 @@ system, and the core design of Django is reused in Grantlee.")
        ("xcb-util-renderutil" ,xcb-util-renderutil)
        ("xcb-util-wm" ,xcb-util-wm)
        ("zlib" ,zlib)
-       ("libjpeg" ,libjpeg-8)
+       ("libjpeg" ,ijg-libjpeg-8)
        ("libsm" ,libsm)
        ("openssl" ,openssl-1.0)))
     (native-inputs
-- 
2.24.1