2023-03-07 10:31:41 +01:00
|
|
|
#
|
|
|
|
# spec file for package swipl
|
|
|
|
#
|
2023-07-05 15:31:11 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2023-03-07 10:31:41 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: swipl
|
2024-06-06 11:09:20 +02:00
|
|
|
Version: 9.3.7
|
2023-03-07 10:31:41 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Prolog Compiler
|
|
|
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
|
|
|
URL: https://www.swi-prolog.org
|
2024-03-05 16:44:46 +01:00
|
|
|
Source0: https://www.swi-prolog.org/download/devel/src/swipl-%{version}.tar.gz
|
2023-03-07 10:31:41 +01:00
|
|
|
Source98: swipl-rpmlintrc
|
|
|
|
# For SOURCE_DATE_EPOCH variable- reproducible builds
|
|
|
|
Source99: %{name}.changes
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: db-devel
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: freetype2-devel
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gmp-devel
|
2023-07-05 15:31:11 +02:00
|
|
|
BuildRequires: gperftools-devel
|
2023-03-07 10:31:41 +01:00
|
|
|
BuildRequires: java-devel >= 1.8.0
|
|
|
|
# For %%check
|
|
|
|
BuildRequires: junit
|
|
|
|
BuildRequires: libarchive-devel
|
|
|
|
BuildRequires: libjpeg-devel
|
|
|
|
BuildRequires: libunwind-devel
|
|
|
|
BuildRequires: ncurses-devel
|
2023-07-05 15:31:11 +02:00
|
|
|
BuildRequires: ninja
|
2023-03-07 10:31:41 +01:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: readline-devel
|
|
|
|
BuildRequires: unixODBC-devel
|
|
|
|
BuildRequires: pkgconfig(ice)
|
|
|
|
BuildRequires: pkgconfig(libedit)
|
|
|
|
BuildRequires: pkgconfig(libssl)
|
|
|
|
BuildRequires: pkgconfig(ossp-uuid)
|
|
|
|
BuildRequires: pkgconfig(sm)
|
2023-07-04 16:29:10 +02:00
|
|
|
BuildRequires: pkgconfig(x11)
|
2023-07-05 15:31:11 +02:00
|
|
|
BuildRequires: pkgconfig(xaw6)
|
2023-03-07 10:31:41 +01:00
|
|
|
BuildRequires: pkgconfig(xext)
|
|
|
|
BuildRequires: pkgconfig(xft)
|
|
|
|
BuildRequires: pkgconfig(xinerama)
|
|
|
|
BuildRequires: pkgconfig(xmu)
|
|
|
|
BuildRequires: pkgconfig(xpm)
|
|
|
|
BuildRequires: pkgconfig(xrender)
|
|
|
|
BuildRequires: pkgconfig(xt)
|
|
|
|
BuildRequires: pkgconfig(yaml-0.1)
|
|
|
|
Provides: swi-prolog = %{version}
|
|
|
|
Provides: swi_pl = %{version}
|
|
|
|
Obsoletes: swi-prolog < %{version}
|
|
|
|
Obsoletes: swi_pl < %{version}
|
2024-06-06 11:09:20 +02:00
|
|
|
# Builds on i586 don't seem to work (gh#SWI-Prolog/swipl-devel#1139)
|
|
|
|
ExcludeArch: %ix86
|
2023-03-07 10:31:41 +01:00
|
|
|
|
2023-07-05 15:31:11 +02:00
|
|
|
# jpackage-utils
|
2023-03-07 10:31:41 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Edinburgh-style Prolog compiler including modules, autoload, libraries,
|
|
|
|
Garbage collector, stack expandor, C interface, GNU readline and GNU
|
|
|
|
Emacs interface, a very fast compiler,and an X11 interface using XPCE.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1
|
|
|
|
|
2023-07-05 15:31:11 +02:00
|
|
|
sed -i -e "s|#!%{_bindir}/env swipl|#!%{_bindir}/swipl|" \
|
|
|
|
packages/protobufs/bootstrap/protoc-gen-swipl
|
|
|
|
|
2023-03-07 10:31:41 +01:00
|
|
|
%build
|
|
|
|
export SOURCE_DATE_EPOCH="$(sed -n '/^----/n;s/ - .*$//;p;q' %{SOURCE99} | date -u -f - +%%s)"
|
|
|
|
%define __builder ninja
|
|
|
|
%cmake
|
|
|
|
%cmake_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
# # Fix script
|
|
|
|
# chmod +x %%{buildroot}%%{_libdir}/swipl-%%{version}/library/dialect/sicstus/swipl-lfr.pl
|
|
|
|
# sed -i "s@%%{_bindir}/../swipl.sh@%%{_bindir}/swipl@" %%{buildroot}%%{_docdir}/%%{name}-%%{version}/packages/examples/pldoc/man_server.pl
|
|
|
|
|
|
|
|
# Create common symlink for "pl"
|
|
|
|
ln -s swipl %{buildroot}%{_bindir}/pl
|
|
|
|
|
|
|
|
# Move *.pc file to correct location
|
|
|
|
install -D -m 0644 %{buildroot}%{_datadir}/pkgconfig/swipl.pc \
|
|
|
|
%{buildroot}%{_libdir}/pkgconfig/swipl.pc
|
|
|
|
rm -v %{buildroot}%{_datadir}/pkgconfig/swipl.pc
|
|
|
|
rmdir -v %{buildroot}%{_datadir}/pkgconfig
|
|
|
|
|
2023-07-05 15:31:11 +02:00
|
|
|
%fdupes %{buildroot}/%{_libdir}/%{name}*
|
|
|
|
%fdupes %{buildroot}/%{_prefix}/lib/%{name}*
|
2023-03-07 10:31:41 +01:00
|
|
|
%fdupes %{buildroot}/%{_docdir}/%{name}-%{version}
|
|
|
|
|
|
|
|
%check
|
|
|
|
export LANG="C.utf8"
|
2023-03-07 15:53:39 +01:00
|
|
|
CTEST_OPT_ARGS=""
|
|
|
|
# gh#SWI-Prolog/swipl-devel#1139
|
|
|
|
%ifarch %ix86
|
|
|
|
CTEST_OPT_ARGS+=" --exclude-regex 'swipl:transaction'"
|
|
|
|
%endif
|
|
|
|
%ctest --verbose $CTEST_OPT_ARGS
|
2023-03-07 10:31:41 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE README.md
|
|
|
|
%{_bindir}/pl
|
|
|
|
%{_bindir}/swipl
|
|
|
|
%{_bindir}/swipl-ld
|
|
|
|
# %%{_bindir}/swipl-rc
|
|
|
|
%{_prefix}/lib/swipl
|
|
|
|
%dir %{_prefix}/lib/cmake
|
|
|
|
%{_prefix}/lib/cmake/swipl
|
|
|
|
# %%{_bindir}/xpce-client
|
|
|
|
# %%{_libdir}/%%{name}-%%{version}
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
%{_mandir}/man1/swipl-ld.1%{?ext_man}
|
|
|
|
# %%{_mandir}/man1/swipl-rc.1%%{?ext_man}
|
|
|
|
%{_mandir}/man1/swipl.1%{?ext_man}
|
|
|
|
# %%{_mandir}/man1/xpce-client.1%%{?ext_man}
|
|
|
|
|
|
|
|
%changelog
|