[packages/lcms] - build fixes, release 7 (libtiff 4.7)

qboosh qboosh at pld-linux.org
Sat Oct 4 21:53:54 CEST 2025


commit a1d3d5d45eaaddd6c3cd012b9730792cc92f241a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 4 21:57:05 2025 +0200

    - build fixes, release 7 (libtiff 4.7)

 lcms-includes.patch | 12 ++++++++++++
 lcms-python.patch   | 14 +++++++++++---
 lcms-types.patch    | 11 +++++++++++
 lcms.spec           | 24 +++++++++++++++---------
 4 files changed, 49 insertions(+), 12 deletions(-)
---
diff --git a/lcms.spec b/lcms.spec
index 71372ee..89e5516 100644
--- a/lcms.spec
+++ b/lcms.spec
@@ -1,18 +1,20 @@
 #
 # Conditional build:
-%bcond_without	python	# don't build python bindings
+%bcond_without	python	# Python bindings
 #
 Summary:	Little CMS - a library to transform between colour profiles
 Summary(pl.UTF-8):	Little CMS - biblioteka do konwersji między profilami kolorów
 Name:		lcms
 Version:	1.19
-Release:	6
+Release:	7
 License:	MIT
 Group:		Libraries
-Source0:	http://downloads.sourceforge.net/lcms/%{name}-%{version}.tar.gz
+Source0:	https://downloads.sourceforge.net/lcms/%{name}-%{version}.tar.gz
 # Source0-md5:	8af94611baf20d9646c7c2c285859818
 Patch0:		%{name}-python.patch
-URL:		http://www.littlecms.com/
+Patch1:		%{name}-includes.patch
+Patch2:		%{name}-types.patch
+URL:		https://www.littlecms.com/
 BuildRequires:	autoconf >= 2.57
 BuildRequires:	automake >= 1:1.7.2
 BuildRequires:	libjpeg-devel
@@ -101,11 +103,13 @@ Moduł Little CMS dla Pythona.
 %setup -q
 %undos configure.ac
 %patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
 
 %build
 # rebuild using newer swig (needed for g++ 4/python 2.5)
 cd python
-rm -f lcms.py lcms_wrap.cxx
+%{__rm} lcms.py lcms_wrap.cxx
 swig -python -c++ -I../include lcms.i
 cd ..
 %{__libtoolize}
@@ -113,7 +117,8 @@ cd ..
 %{__autoconf}
 %{__automake}
 %configure \
-	--with%{!?with_python:out}-python
+	PYTHON=%{__python} \
+	--with-python%{!?with_python:=no}
 
 %{__make}
 
@@ -126,6 +131,8 @@ rm -rf $RPM_BUILD_ROOT
 install samples/{icctrans,wtpt} tifficc/tifficc $RPM_BUILD_ROOT%{_bindir}
 
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{a,la}
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/liblcms.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -137,13 +144,12 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING NEWS README.1ST
 %attr(755,root,root) %{_libdir}/liblcms.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/liblcms.so.1
+%ghost %{_libdir}/liblcms.so.1
 
 %files devel
 %defattr(644,root,root,755)
 %doc doc/*
-%attr(755,root,root) %{_libdir}/liblcms.so
-%{_libdir}/liblcms.la
+%{_libdir}/liblcms.so
 %{_includedir}/icc34.h
 %{_includedir}/lcms.h
 %{_pkgconfigdir}/lcms.pc
diff --git a/lcms-includes.patch b/lcms-includes.patch
new file mode 100644
index 0000000..e447740
--- /dev/null
+++ b/lcms-includes.patch
@@ -0,0 +1,12 @@
+--- lcms-1.19/src/cmsio1.c.orig	2009-11-13 10:02:11.000000000 +0100
++++ lcms-1.19/src/cmsio1.c	2025-10-04 21:25:01.391005903 +0200
+@@ -23,6 +23,9 @@
+ // ICC profile serialization
+ 
+ 
++#define _XOPEN_SOURCE 500
++#include <strings.h>
++#include <unistd.h>
+ #include "lcms.h"
+ 
+ // ----------------------------------------------------------------- Tag Serialization
diff --git a/lcms-python.patch b/lcms-python.patch
index 24a0a49..74228a0 100644
--- a/lcms-python.patch
+++ b/lcms-python.patch
@@ -1,14 +1,22 @@
 --- lcms-1.18/configure.ac.orig	2009-03-20 15:54:17.000000000 +0100
 +++ lcms-1.18/configure.ac	2009-03-26 18:12:35.969151477 +0100
-@@ -96,9 +96,9 @@
+@@ -87,7 +87,6 @@ AC_PROG_LN_S
+ AC_PROG_CXX
+ 
+ # Configure python. AM_PATH_PYTHON is basically braindead 
+-PYTHON=''
+ if test "$with_python" = 'yes'
+ then
+   AM_PATH_PYTHON(2.2,PYTHON_OK='yes',PYTHON_OK='no')  
+@@ -96,9 +95,9 @@
    if test -n "$PYTHON"
    then
  	LCMS_PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"`
 -	LCMS_PYEXECDIR=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1)"`
-+	LCMS_PYEXECDIR=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${prefix}')"`
++	LCMS_PYEXECDIR=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix='${prefix}'))"`
      LCMS_PYINCLUDE=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()"`	
 -	LCMS_PYLIB=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,1)"`
-+	LCMS_PYLIB=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${prefix}')"`
++	LCMS_PYLIB=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix='${prefix}'))"`
  	AC_CHECK_FILE([$LCMS_PYINCLUDE/Python.h],PYTHON_OK='yes',PYTHON_OK='no')
      AC_SUBST(LCMS_PYEXECDIR)
      AC_SUBST(LCMS_PYINCLUDE)
diff --git a/lcms-types.patch b/lcms-types.patch
new file mode 100644
index 0000000..5565338
--- /dev/null
+++ b/lcms-types.patch
@@ -0,0 +1,11 @@
+--- lcms-1.19/jpegicc/jpegicc.c.orig	2009-10-30 16:57:45.000000000 +0100
++++ lcms-1.19/jpegicc/jpegicc.c	2025-10-04 21:41:43.036751125 +0200
+@@ -707,7 +707,7 @@ int TransformImage(char *cDefInpProf, ch
+        DWORD wInput, wOutput;
+        int OutputColorSpace;
+        DWORD dwFlags = 0; 
+-       DWORD EmbedLen;
++       unsigned int EmbedLen;
+        LPBYTE EmbedBuffer;
+ 
+ 	   // Observer adaptation state (only meaningful on absolute colorimetric intent)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lcms.git/commitdiff/a1d3d5d45eaaddd6c3cd012b9730792cc92f241a



More information about the pld-cvs-commit mailing list