remove dependency on the_silver_searcher (ag)
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/libbobcat?expand=0&rev=13
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 19 08:46:47 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- remove dependency on the_silver_searcher (ag)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 28 11:22:22 UTC 2023 - pgajdos@suse.com
|
||||
|
||||
- do not build documentation with yodl, it can be reached here:
|
||||
https://fbb-git.gitlab.io/bobcat/manhtml/bobcat.7.html
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 1 00:11:54 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 6.02.02:
|
||||
* Accidentally the ArgConfig header file included ../arg/arg instead of
|
||||
<bobcat/arg> causing compilation failures of files including
|
||||
<bobcat/argconfig>. Fixed in this release.
|
||||
* The singleton classes Arg, ArgConfig, ReadLineHistory, and Signal now
|
||||
return their allocated memory when programs using them end.
|
||||
* Rewrote ReadLineHistory.
|
||||
* Repaired the linking option specifications in the ReadLine* man-pages.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 3 13:11:56 UTC 2022 - Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
|
||||
- Remove unecessary Provides
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 2 09:48:48 UTC 2022 - Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
|
||||
- specfile:
|
||||
* remove build dependencies for libbobcat-light
|
||||
* comment unused build dependencies for libbobcat
|
||||
* adjust permission static library file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 27 14:52:25 UTC 2022 - Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
|
||||
- initialbobcatlib
|
||||
* Parse headers and replace internal include by files content
|
||||
* Remove all unecessary patches
|
||||
* [ - protect-headers-f-file-with-pragma-once.patch, - update-dependencies-required-classes.patch]
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 26 09:38:37 UTC 2022 - Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
|
||||
- Update to 6.02.00
|
||||
- Add subpackage "bobcat-light" to build icmake without required it
|
||||
* [initialbobcatlib] - script to build libbobcat with g++ command
|
||||
* [protect-headers-f-file-with-pragma-once.patch, update-dependencies-required-classes.patch]
|
||||
- specfile - remove hardcoded library version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 19 16:08:11 UTC 2022 - Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
|
||||
- specfile
|
||||
* Move static libraries to new libbobcat-devel-static package
|
||||
* Fix obs error giving executable mode to library
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 28 15:36:56 UTC 2022 - Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
|
||||
- bobcat 5.11.01
|
||||
* Create package libbocat which install shared libraries
|
||||
* Create package libbobcat-devel which install all headers and static library
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
#
|
||||
# spec file for package libbobcat
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
%global _name bobcat
|
||||
%global _lib_name lib%{_name}
|
||||
%global _lib_version 6
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "light"
|
||||
%global psuffix -light
|
||||
%else
|
||||
%global psuffix %{nil}
|
||||
%endif
|
||||
|
||||
Name: %{_lib_name}%{?psuffix}
|
||||
Version: 6.02.02
|
||||
Release: 0
|
||||
Summary: Shared library implementing C++ classes that are frequently used
|
||||
License: GPL-3.0-only
|
||||
Group: Development/Tools/Building
|
||||
URL: https://gitlab.com/fbb-git/bobcat
|
||||
Source0: https://gitlab.com/fbb-git/bobcat/-/archive/%{version}/bobcat-%{version}.tar.gz
|
||||
Source1: initialbobcatlib
|
||||
#BuildRequires: libX11-devel
|
||||
#BuildRequires: libopenssl-1_1-devel
|
||||
#BuildRequires: readline-devel
|
||||
#BuildRequires: sendmail-devel
|
||||
%if "%{name}" == "%{_lib_name}"
|
||||
BuildRequires: icmake
|
||||
%endif
|
||||
BuildRequires: gcc-c++
|
||||
|
||||
%package devel-static
|
||||
Summary: Bobcat static library
|
||||
Group: Development/Libraries/C and C++
|
||||
%if "%{name}" == "%{_lib_name}-light"
|
||||
Conflicts: %{_lib_name}-devel
|
||||
Conflicts: %{_lib_name}-devel-static
|
||||
%endif
|
||||
|
||||
%if "%{name}" == "%{_lib_name}"
|
||||
Requires: %{_lib_name}-devel = %{version}
|
||||
|
||||
%description
|
||||
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. It is a
|
||||
shared library implementing C++ classes that are frequently used in software
|
||||
developed by Frank Brokken. All of Frank's C++ programs hosted at GitLab
|
||||
depend on `bobcat'.
|
||||
|
||||
%package -n %{_lib_name}%{_lib_version}
|
||||
Summary: Shared library implementing C++ classes that are frequently used
|
||||
Group: Development/Tools/Building
|
||||
Provides: %{_lib_name} = %{version}
|
||||
Obsoletes: %{_lib_name} < %{version}
|
||||
|
||||
%description -n %{_lib_name}%{_lib_version}
|
||||
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. It is a
|
||||
shared library implementing C++ classes that are frequently used in software
|
||||
developed by Frank Brokken. All of Frank's C++ programs hosted at GitLab
|
||||
depend on `bobcat'.
|
||||
|
||||
%package devel
|
||||
Summary: Headers and documentation for the Bobcat library
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{_lib_name}%{_lib_version} = %{version}
|
||||
|
||||
%description devel
|
||||
Headers and documentation of classes defined in the Bobcat library.
|
||||
|
||||
%endif
|
||||
|
||||
%description devel-static
|
||||
Bobcat static library
|
||||
|
||||
%prep
|
||||
%setup -q -n %{_name}-%{version}
|
||||
|
||||
%if "%{name}" == "%{_lib_name}"
|
||||
|
||||
%build
|
||||
# Incase we have to use specific version of gcc:
|
||||
export CXXFLAGS="%{optflags} --std=c++2a -Werror -fdiagnostics-color=never -ffat-lto-objects"
|
||||
export CXX="g++"
|
||||
sed -i 's/^#define CXX/\/\/ #define CXX/g' %{_name}/INSTALL.im
|
||||
sed -i 's/^#define CXXFLAGS/\/\/ #define CXXFLAGS/g' %{_name}/INSTALL.im
|
||||
sed -i 's/^#define DOC/\/\/ #define DOC/g' %{_name}/INSTALL.im
|
||||
sed -i 's/^#define HDR/\/\/ #define HDR/g' %{_name}/INSTALL.im
|
||||
sed -i 's/^#define LIB/\/\/ #define LIB/g' %{_name}/INSTALL.im
|
||||
echo "/* created during rpmbuild */" >> %{_name}/INSTALL.im
|
||||
echo "#define CXX \"${CXX}\"" >> %{_name}/INSTALL.im
|
||||
echo "#define CXXFLAGS \"${CXXFLAGS}\"" >> %{_name}/INSTALL.im
|
||||
echo "#define DOC \"%{_docdir}/%{_lib_name}%{_lib_version}-devel\"" >> %{_name}/INSTALL.im
|
||||
echo "#define HDR \"%{_includedir}/%{_name}\"" >> %{_name}/INSTALL.im
|
||||
echo "#define LIB \"%{_libdir}\"" >> %{_name}/INSTALL.im
|
||||
pushd %{_name}
|
||||
./build dep
|
||||
./build light
|
||||
#echo -e "y\nn\ny\ny\n" | ./build libraries
|
||||
popd
|
||||
|
||||
%install
|
||||
pushd %{_name}
|
||||
./build install hl %{buildroot}
|
||||
popd
|
||||
|
||||
%post -n %{_lib_name}%{_lib_version} -p /sbin/ldconfig
|
||||
%postun -n%{_lib_name}%{_lib_version} -p /sbin/ldconfig
|
||||
|
||||
%files -n %{_lib_name}%{_lib_version}
|
||||
%doc README
|
||||
%{_libdir}/%{_lib_name}.so.%{_lib_version}
|
||||
%attr(755, -, -) %{_libdir}/%{_lib_name}.so.%{version}
|
||||
|
||||
%files devel
|
||||
%{_libdir}/%{_lib_name}.so
|
||||
%{_includedir}/%{_name}/
|
||||
|
||||
%files devel-static
|
||||
|
||||
%else
|
||||
cp -a %{SOURCE1} ./bobcat/
|
||||
|
||||
%description
|
||||
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. This is the light library
|
||||
would be use to build icmake without required it.
|
||||
|
||||
%build
|
||||
export CXXFLAGS="%{optflags} --std=c++2a -Werror -fdiagnostics-color=never -ffat-lto-objects"
|
||||
export CXX="g++"
|
||||
|
||||
pushd %{_name}
|
||||
bash ./$(basename %{SOURCE1})
|
||||
popd
|
||||
|
||||
%install
|
||||
pushd %{_name}
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
install -m 644 tmp/%{_lib_name}.a %{buildroot}%{_libdir}/
|
||||
mkdir -p %{buildroot}%{_includedir}/%{_name}
|
||||
install -m 644 tmp/%{_name}/* %{buildroot}%{_includedir}/%{_name}/
|
||||
popd
|
||||
|
||||
%files devel-static
|
||||
%{_includedir}/%{_name}/
|
||||
%endif
|
||||
|
||||
%{_libdir}/%{_lib_name}.a
|
||||
|
||||
%changelog
|
||||
@@ -0,0 +1,15 @@
|
||||
<constraints>
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>i586</arch>
|
||||
<arch>ppc64</arch>
|
||||
<arch>ppc64le</arch>
|
||||
<package>libbobcat</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">10</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
</constraints>
|
||||
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>light</package>
|
||||
</multibuild>
|
||||
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -0,0 +1 @@
|
||||
.osc
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6f05b97a96c0ebb317dbd4384b51a4156512633f5b58073f2d66d1ba0f09726e
|
||||
size 1238907
|
||||
@@ -0,0 +1,134 @@
|
||||
#!/bin/bash
|
||||
|
||||
##############################################################################
|
||||
# This script must be run as root
|
||||
#
|
||||
# If icmake and the bobcat library haven't yet been installed on your system
|
||||
# execute the folllowing steps to install them.
|
||||
# Once the following steps have been executed they don't need to be executed
|
||||
# again as from that point onward icmake and the bobcat library are available
|
||||
# on your system, and new versions can be constructed using the available
|
||||
# icmake and bobcat versions.
|
||||
#
|
||||
# 1. extract the bobcat tar to its construction directory
|
||||
# 2. copy this file to that directory
|
||||
# 3. chdir to bobcat's construction directory
|
||||
# 4. call ./initialbobcatlib
|
||||
# this constructs /usr/lib/libicmake.a
|
||||
# and installs the bobcat header files in
|
||||
# /usr/include/bobcat
|
||||
# 5. chdir to icmake's construction directory
|
||||
# 6. run ./icm_prepare ./icm_bootstrap, and ./icm_install as described in
|
||||
# icmake's QUICKINSTALL
|
||||
#
|
||||
# Following this, icmake is available, using its dedicated bobcat library
|
||||
# Next construct and install the bobcat (shared) library as described in
|
||||
# bobcat's INSTALL file
|
||||
# When the full library is installed, rebuild icmake so it'll use the
|
||||
# shared bobcat library by executing, in icmake's construction directory:
|
||||
# ./build distclean
|
||||
# ./icm_prepare /
|
||||
# ./build (uses icmake, or use ./icm_bootstrap x)
|
||||
# ./icm_install strip all
|
||||
# as described in icmake's QUICKINSTALL file
|
||||
#
|
||||
# These steps only have to be performed once. Thereafter, with new versions of
|
||||
# either bobcat or icmake, the then available versions of bobcat and icmake
|
||||
# can be used.
|
||||
##############################################################################
|
||||
|
||||
[[ -z "${CXX}" ]] && CXX="g++"
|
||||
[[ -z "${CXXFLAGS}" ]] && CXXFLAGS="-O2 -Wall"
|
||||
|
||||
tools_list="ar cat grep g++"
|
||||
tools_missing=""
|
||||
for tool in $tools_list; do
|
||||
$tool --version > /dev/null 2>&1
|
||||
[[ $? -ne 0 ]] && tools_missing+="$tool"
|
||||
done
|
||||
if [ "$tools_missing" ]; then
|
||||
echo "tools missing: $tools_missing"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if used tools are installed
|
||||
|
||||
if [ ! -e /usr/bin/find ]; then
|
||||
echo -e "You need to install find"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
dirs="arg glob level log mstream onekey exception pattern selector stat \
|
||||
string tempstream datetime fork gs ifdbuf iostream log logbuf mbuf \
|
||||
ofdbuf pipe processenums signal eoibuf fswap iobuf eoi \
|
||||
iuo redirector process"
|
||||
|
||||
if [ -e /usr/lib/libbobcat.a -o -e /usr/include/bobcat ] ; then
|
||||
echo '
|
||||
/usr/lib/libbobcat.a and/or /usr/include/bobcat are already available
|
||||
executing this script should not be required.
|
||||
'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# construction destination directory
|
||||
mkdir -p tmp/bobcat
|
||||
|
||||
# copy all necessary headers and replace all #include "file.h"
|
||||
for dir in $dirs
|
||||
do
|
||||
if [ -e $dir/$dir ]; then
|
||||
cp $dir/$dir tmp/bobcat
|
||||
_f_files=$(grep -o "#include \".*.f\"" tmp/bobcat/$dir | cut -d\" -f2)
|
||||
while [ "$_f_files" != "" ]; do
|
||||
for file in $_f_files
|
||||
do
|
||||
if [ -e $dir/$file ]; then
|
||||
_contents_file=$(<$dir/$file)
|
||||
_contents_header=$(<tmp/bobcat/$dir)
|
||||
echo "${_contents_header//#include \"$file\"/"${_contents_file}"}" > tmp/bobcat/$dir
|
||||
fi
|
||||
done
|
||||
_f_files=$(grep -o "#include \".*.f\"" tmp/bobcat/$dir | cut -d\" -f2)
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
#for dir in $dirs
|
||||
#do
|
||||
# cp $dir/$dir tmp/bobcat
|
||||
#done
|
||||
|
||||
count=0 # use o-file numbers to avoid name collisions
|
||||
# all directories to process
|
||||
for dir in $dirs
|
||||
do
|
||||
cd $dir
|
||||
|
||||
echo -e "\ncompiling files in $dir, count = $count"
|
||||
|
||||
for file in *.cc # compile all .cc files in $dir
|
||||
do
|
||||
# define the object file's name
|
||||
object=../tmp/$count`basename $file .cc`.o
|
||||
|
||||
if [ $file -nt $object ] ; then #compile new(er) files
|
||||
gcc_options="-isystem ../tmp"
|
||||
# check classes required for specific classe
|
||||
#deps=$(cat ../dependencies/required.classes | grep "^$dir ")
|
||||
#for dep in $deps
|
||||
#do
|
||||
# [[ "$dep" != "$dir" ]] && gcc_options+=" -iquote ../$dep"
|
||||
#done
|
||||
echo "$CXX $CXXFLAGS $gcc_options -o $object -c $file"
|
||||
$CXX $CXXFLAGS $gcc_options -o $object -c $file || exit 1
|
||||
compiled=1
|
||||
fi
|
||||
done
|
||||
let count=$count+1 # next directory nr.
|
||||
|
||||
cd ..
|
||||
done
|
||||
|
||||
echo -e "\nar cr tmp/libbobcat.a \*.o > /tmp/ar.list"
|
||||
ar cr tmp/libbobcat.a tmp/*.o > tmp/ar.list || exit 1
|
||||
Reference in New Issue
Block a user