代码拉取完成,页面将自动刷新
同步操作将从 OpenCloudOS Stream/swig 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%bcond_with build_ccache_swig
%global guile 0
%ifarch aarch64 ppc64le
%global javalang 0
%else
%global javalang 1
%endif
Summary: Connects C/C++/Objective C to some high-level programming languages
Name: swig
Version: 4.1.1
Release: 6%{?dist}
License: GPLv3+ and BSD
URL: http://swig.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz
Source1: description.h2m
%if %{with build_ccache_swig}
Source2: description-ccache.h2m
Source3: ccache-swig.sh
Source4: ccache-swig.csh
%endif
BuildRequires: gcc-c++ make
BuildRequires: coreutils findutils sed help2man
BuildRequires: perl-interpreter, pcre2-devel
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: autoconf, automake, gawk, dos2unix bison
BuildRequires: perl-devel perl(base) perl(Config) perl(Devel::Peek)
BuildRequires: perl(ExtUtils::MakeMaker) perl(fields) perl(Math::BigInt)
BuildRequires: perl(strict) perl(Test::More) perl(vars) perl(warnings)
BuildRequires: boost-devel tcl-devel lua-devel ruby-devel
%if %{javalang}
BuildRequires: java, java-devel
%endif
%if %{guile}
BuildRequires: guile-devel
%endif
%description
SWIG is a software development tool that connects programs written in C
and C++ with a variety of high-level programming languages. SWIG is used
with different types of target languages including common scripting languages
such as Javascript, Perl, PHP, Python, Tcl and Ruby. The list of supported
languages also includes non-scripting languages such as C#, D, Go language,
Java including Android, Lua, OCaml, Octave, Scilab and R. Also several interpreted
and compiled Scheme implementations (Guile, MzScheme/Racket) are supported. SWIG
is most commonly used to create high-level interpreted or compiled programming
environments, user interfaces, and as a tool for testing and prototyping C/C++
software. SWIG is typically used to parse C/C++ interfaces and generate the
'glue code' required for the above target languages to call into the C/C++ code.
SWIG can also export its parse tree in the form of XML. SWIG is free software and
the code that SWIG generates is compatible with both commercial and non-commercial projects.
%if %{with build_ccache_swig}
%package -n ccache-swig
Summary: Fast compiler cache
License: GPLv2+
Requires: swig
%description -n ccache-swig
ccache-swig is a compiler cache. It speeds up re-compilation of C/C++/SWIG
code by caching previous compiles and detecting when the same compile is
being done again. ccache-swig is ccache plus support for SWIG.
%endif
%package gdb
Summary: Commands for easier debugging of SWIG
License: BSD
Requires: swig
%description gdb
This package contains file with commands for easier debugging of SWIG
in gdb.
%prep
%autosetup -p1
%build
./autogen.sh
%configure \
--without-ocaml \
--with-python3=python3 \
--with-2to3=2to3 \
--without-php \
%if ! %{javalang}
--without-java \
%endif
%if ! %{guile}
--without-guile \
%endif
--without-r \
%if %{without build_ccache_swig}
--disable-ccache \
%endif
--without-go
%{make_build}
%install
%{make_install}
echo "Options:" >help_swig
%{buildroot}%{_bindir}/swig --help >>help_swig
sed -i -e 's/^\(\s\+-[^-]\+\)- \(.*\)$/\1 \2/' help_swig
sed -i -e 's/^\(\s\+-\w\+-[^-]*\)- \(.*\)$/\1 \2/' help_swig
cat >h2m_helper_swig <<'EOF'
#!/bin/bash
[ "$1" == "--version" ] && echo "" || cat help_swig
EOF
chmod a+x h2m_helper_swig
help2man -N --section 1 ./h2m_helper_swig --include %{SOURCE1} -o %{name}.1
%if %{with build_ccache_swig}
%{buildroot}%{_bindir}/ccache-swig -h >>help_ccache
sed -i -e '/compiler cache/ d' help_ccache
sed -i -e '/Copyright/ d' help_ccache
sed -i -e 's/^Usage:/[synopsis]/' help_ccache
sed -i -e 's/^Options:/[options]/' help_ccache
sed -i -e 's/^\s\+/ /' help_ccache
sed -i -e 's/^\(-[^- ] <\w\+>\s\+\) \(\w.\+\)$/ \1 \2/' help_ccache
sed -i -e 's/^\(-[^- ]\s\+\) \(\w.\+\)$/ \1 \2/' help_ccache
cat >h2m_helper_ccache <<'EOF'
#!/bin/bash
[ "$1" == "--version" ] && echo ""
[ "$1" == "--help" ] && echo "" || echo ""
EOF
chmod a+x h2m_helper_ccache
cat %{SOURCE2} >>help_ccache
sed -i -e 's#@DOCDIR@#%{_docdir}#' help_ccache
help2man -N --section 1 ./h2m_helper_ccache --include help_ccache -o ccache-swig.1
%endif
mkdir -p %{buildroot}%{_mandir}/man1/
install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1/
%if %{with build_ccache_swig}
install -p -m 0644 ccache-swig.1 %{buildroot}%{_mandir}/man1/
%endif
rm -f %{buildroot}%{_datadir}/%name/%{version}/octave/std_carray.i
%if %{with build_ccache_swig}
mkdir -p %{buildroot}%{_sysconfdir}/profile.d/
install -dm 755 %{buildroot}%{_sysconfdir}/profile.d
install -pm 644 %{SOURCE3} %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d
%endif
mkdir -p %{buildroot}%{_datadir}/%{name}/gdb
install -pm 644 Tools/swig.gdb %{buildroot}%{_datadir}/%{name}/gdb
%check
# skip ruby test-suite import_fragments
sed -i "/import_fragments/d" Examples/test-suite/common.mk
make check PY3=1
%files
%license LICENSE LICENSE-GPL LICENSE-UNIVERSITIES
%doc ANNOUNCE CHANGES CHANGES.current
%doc COPYRIGHT README TODO
%doc Doc Examples
%{_bindir}/%{name}
%{_datadir}/%{name}
%exclude %{_datadir}/%{name}/gdb
%{_mandir}/man1/swig.1*
%if %{with build_ccache_swig}
%files -n ccache-swig
%{_bindir}/ccache-swig
%config(noreplace) %{_sysconfdir}/profile.d/ccache-swig.*sh
%{_mandir}/man1/ccache-swig.1*
%endif
%files gdb
%{_datadir}/%{name}/gdb
%changelog
* Tue Sep 3 2024 Ze Zhang <bbrucezhang@tencent.com> - 4.1.1-6
- [Type] other
- [DESC] Disable guile and skip test-suite import_fragments
* Fri Aug 16 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 4.1.1-5
- Rebuilt for loongarch release
* Fri Sep 08 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 4.1.1-4
- Rebuilt for OpenCloudOS Stream 23.09
* Thu Aug 03 2023 cunshunxia <cunshunxia@tencent.com> - 4.1.1-3
- Rebuilt for tcl 8.6.13
* Tue Aug 01 2023 rockerzhu <rockerzhu@tencent.com> - 4.1.1-2
- Rebuilt for boost 1.82.0
* Thu May 4 2023 cunshunxia <cunshunxia@tencent.com> - 4.1.1-1
- upgrade to 4.1.1.
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 4.0.2-3
- Rebuilt for OpenCloudOS Stream 23.05
* Fri Mar 31 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 4.0.2-2
- Rebuilt for OpenCloudOS Stream 23
* Wed Feb 15 2023 cunshunxia <cunshunxia@tencent.com> - 4.0.2-1
- initial build
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。