[packages/libint2] Up to 2.13.1

arekm arekm at pld-linux.org
Sun Mar 15 11:19:21 CET 2026


commit 152c9bb76976d230de3c5655b945d1abd5ddebfe
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Mar 15 11:19:13 2026 +0100

    Up to 2.13.1

 libint2-cmake-build-type.patch | 11 ++++++++++
 libint2-destdir.patch          | 28 ++++++++++++++++++++++++
 libint2-soversion.patch        | 26 +++++++++++++++++++++++
 libint2-verbose.patch          | 26 -----------------------
 libint2.spec                   | 48 +++++++++++++++++++-----------------------
 5 files changed, 87 insertions(+), 52 deletions(-)
---
diff --git a/libint2.spec b/libint2.spec
index 821f078..d339040 100644
--- a/libint2.spec
+++ b/libint2.spec
@@ -1,23 +1,23 @@
 Summary:	Evaluation of certain two-body molecular integrals over Cartesian Gaussian functions
 Summary(pl.UTF-8):	Obliczanie całek dwuelementowych cząsteczek po kartezjańskich funkcjach Gaussa
 Name:		libint2
-Version:	2.3.1
+Version:	2.13.1
 Release:	1
-License:	GPL v3+
+License:	LGPL v3
 Group:		Libraries
 #Source0Download: https://github.com/evaleev/libint/releases
-Source0:	https://github.com/evaleev/libint/archive/v%{version}/libint-%{version}.tar.gz
-# Source0-md5:	34adc4c971372a51b13bb7fd257b7c68
-Patch0:		%{name}-verbose.patch
+Source0:	https://github.com/evaleev/libint/releases/download/v%{version}/libint-%{version}.tgz
+# Source0-md5:	8484e51e11be0d92682b9858c651e33d
+Patch0:		%{name}-cmake-build-type.patch
+Patch1:		%{name}-destdir.patch
+Patch2:		%{name}-soversion.patch
 URL:		http://libint.valeyev.net/
-BuildRequires:	autoconf >= 2.68
-BuildRequires:	automake
 BuildRequires:	boost-devel
+BuildRequires:	cmake >= 3.16
 BuildRequires:	eigen3
-BuildRequires:	gmp-c++-devel
 BuildRequires:	libstdc++-devel >= 6:4.7
-BuildRequires:	libtool >= 2:2
-BuildRequires:	sed >= 4.0
+BuildRequires:	ninja
+BuildRequires:	rpmbuild(macros) >= 1.605
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -73,28 +73,24 @@ Statyczna biblioteka libint.
 %prep
 %setup -q -n libint-%{version}
 %patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal} -I lib/autoconf
-%{__autoconf}
-CPPFLAGS="%{rpmcppflags} -I/usr/include/eigen3"
-%configure \
-	--enable-shared
+%cmake -B build \
+	-G Ninja \
+	-DBUILD_SHARED_LIBS=ON \
+	-DLIBINT2_BUILD_SHARED_AND_STATIC_LIBS=ON
 
-%{__make}
+%ninja_build -C build
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+%ninja_install -C build
 
-# help rpm to find deps
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
-
-# obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libint2.la
+# strip debug info from static library to avoid OOM during debuginfo extraction
+%{__strip} -g $RPM_BUILD_ROOT%{_libdir}/libint2.a
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -104,7 +100,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES CITATION LICENSE README.md
+%doc CITATION LICENSE README.md
 %attr(755,root,root) %{_libdir}/libint2.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libint2.so.2
 %{_datadir}/libint
@@ -115,7 +111,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/libint2
 %{_includedir}/libint2.h
 %{_includedir}/libint2.hpp
-%{_pkgconfigdir}/libint2.pc
+%{_libdir}/cmake/libint2
 
 %files static
 %defattr(644,root,root,755)
diff --git a/libint2-cmake-build-type.patch b/libint2-cmake-build-type.patch
new file mode 100644
index 0000000..0ffef3b
--- /dev/null
+++ b/libint2-cmake-build-type.patch
@@ -0,0 +1,11 @@
+--- libint-2.13.1/cmake/modules/autocmake_safeguards.cmake.orig	2025-02-03 00:00:00.000000000 +0000
++++ libint-2.13.1/cmake/modules/autocmake_safeguards.cmake	2025-02-03 00:00:01.000000000 +0000
+@@ -22,6 +22,7 @@
+ if(NOT cmake_build_type_tolower STREQUAL "debug" AND
+    NOT cmake_build_type_tolower STREQUAL "release" AND
+    NOT cmake_build_type_tolower STREQUAL "minsizerel" AND
+-   NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
++   NOT cmake_build_type_tolower STREQUAL "relwithdebinfo" AND
++   NOT cmake_build_type_tolower STREQUAL "pld")
+     message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, MinSizeRel, RelWithDebInfo (case-insensitive).")
+ endif()
diff --git a/libint2-destdir.patch b/libint2-destdir.patch
new file mode 100644
index 0000000..f45a490
--- /dev/null
+++ b/libint2-destdir.patch
@@ -0,0 +1,28 @@
+--- libint-2.13.1/CMakeLists.txt.orig	2026-03-15 03:05:28.663662645 +0100
++++ libint-2.13.1/CMakeLists.txt	2026-03-15 03:05:28.665253823 +0100
+@@ -122,7 +122,7 @@
+         CACHE PATH "LIBINT2 LIB install directory")
+ set(LIBINT2_INSTALL_DATADIR "share/libint/${LIBINT_VERSION}"
+         CACHE PATH "LIBINT2 DATA install directory")
+-set(LIBINT2_INSTALL_CMAKEDIR "lib/cmake/libint2"
++set(LIBINT2_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/libint2"
+         CACHE PATH "LIBINT2 CMAKE install directory")
+ 
+ 
+@@ -785,9 +785,15 @@
+ install(CODE "
+   set(LIBINT_VERSION \"${LIBINT_VERSION}\")
+   set(LIBINT_DATADIR_ABSOLUTE \"\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/libint/${LIBINT_VERSION}\")
++  set(_dest_dir \"\$ENV{DESTDIR}\")
++  if(IS_ABSOLUTE \"${LIBINT2_INSTALL_INCLUDEDIR}\")
++    set(_inc_dir \"\${_dest_dir}${LIBINT2_INSTALL_INCLUDEDIR}\")
++  else()
++    set(_inc_dir \"\${_dest_dir}\${CMAKE_INSTALL_PREFIX}/${LIBINT2_INSTALL_INCLUDEDIR}\")
++  endif()
+   configure_file(
+     \"${PROJECT_SOURCE_DIR}/include/libint2/basis.h.in\"
+-    \"\${CMAKE_INSTALL_PREFIX}/${LIBINT2_INSTALL_INCLUDEDIR}/libint2/basis.h\"
++    \"\${_inc_dir}/libint2/basis.h\"
+     @ONLY)
+ ")
+ 
diff --git a/libint2-soversion.patch b/libint2-soversion.patch
new file mode 100644
index 0000000..c298526
--- /dev/null
+++ b/libint2-soversion.patch
@@ -0,0 +1,26 @@
+Enable SOVERSION on shared libraries.
+Upstream fixed this in PRs #231/#331 for CMakeLists.txt.export but
+the pre-generated tarball's top-level CMakeLists.txt still has it
+commented out. All distros use SOVERSION 2.
+
+--- libint-2.13.1/CMakeLists.txt.orig	2025-02-03 00:00:00.000000000 +0100
++++ libint-2.13.1/CMakeLists.txt	2025-02-03 00:00:00.000000000 +0100
+@@ -362,6 +362,8 @@
+     set_target_properties(
+       int-shared
+       PROPERTIES
++        VERSION ${LIBINT_VERSION}
++        SOVERSION 2
+         OUTPUT_NAME "int2"
+         Libint2_VERSION "${LIBINT_VERSION}"
+         Libint2_MAX_AM_ERI "${Libint2_MAX_AM_ERI}"
+@@ -442,7 +444,8 @@
+             set_target_properties(
+               int-cxx-shared
+               PROPERTIES
+-                #SOVERSION ${LIBINT_MAJOR_SOVERSION}
++                VERSION ${LIBINT_VERSION}
++                SOVERSION 2
+                 MACOSX_RPATH ON
+                 OUTPUT_NAME "int2-cxx"
+               )
diff --git a/libint2-verbose.patch b/libint2-verbose.patch
deleted file mode 100644
index 9cd6ff8..0000000
--- a/libint2-verbose.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- libint-2.3.1/lib/MakeSuffixRules.orig	2017-05-03 15:11:21.000000000 +0200
-+++ libint-2.3.1/lib/MakeSuffixRules	2017-05-27 17:23:50.878344283 +0200
-@@ -1,19 +1,19 @@
- 
- %.o:: %.c
- 	$(info CC $@)
--	@$(CC) $(CPPFLAGS) $(CFLAGS) -c $< $(OUTPUT_OPTION)
-+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< $(OUTPUT_OPTION)
- 
- %.o:: %.cc
- 	$(info CXX $@)
--	@$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< $(OUTPUT_OPTION)
-+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< $(OUTPUT_OPTION)
- 
- %.lo:: %.cc
- 	$(info CXX $@)
--	@$(LTCOMP) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< $(OUTPUT_OPTION)
-+	$(LTCOMP) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< $(OUTPUT_OPTION)
- 
- %.lo:: %.c
- 	$(info CC $@)
--	@$(LTCOMP) $(CC) $(CPPFLAGS) $(CFLAGS) -c $< $(OUTPUT_OPTION)
-+	$(LTCOMP) $(CC) $(CPPFLAGS) $(CFLAGS) -c $< $(OUTPUT_OPTION)
- 
- ifdef BIBTEX
- ifdef PDFLATEX
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libint2.git/commitdiff/152c9bb76976d230de3c5655b945d1abd5ddebfe



More information about the pld-cvs-commit mailing list