Package libstdc++9: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | %global _unpackaged_files_terminate_build 1 # I'm putting here the GCC version this lib is based on # (and the corresponding lcc is claimed to be compatible with; # as printed by gcc --version): %global compat_gcc_branch 9 %global compat_gcc_version %compat_gcc_branch.3 %global lcc_branch 1.26 %global sover 6 %global soverfull 6.0.28 %global llcs_ver 1.26.16 Name: libstdc++%compat_gcc_branch Version: %lcc_branch.16 Release: alt1.E2K.1 Summary: Standard C++ libraries License: GPLv3+ with GCC-exception-3.1 Group: Development/C++ Url: http://www.mcst.ru/ Source: libstdc++-v3.tar BuildRequires: gcc-c++ libgcc-devel lcc-libs-common-source = %llcs_ver ExclusiveArch: %e2k # This (and the dir for the devel *.so) probably can be whatever place you like, # because it is not to be used directly, but rather by g++ (lcc) via internal symlinks. #define gxx_include_dir %%_prefix/include/c++/g++-v3 %define gxx_include_dir %_includedir/c++/g++-v3 %package -n libstdc++%sover Summary: Standard C++ libraries for lcc Group: Development/C++ %package devel Summary: Standard C++ libraries and headers for C++ development Group: Development/C++ # (">=" would work # if we packaged libstdc++%%sover from another srpm with a different version): Requires: libstdc++%sover >= %EVR %package devel-static Summary: Static standard C++ libraries for C++ development Group: Development/C++ # Headers are needed: Requires: %name-devel = %EVR %global desc The GNU implementation of the standard C++ libraries tweaked for\ use with lcc. It includes a rewritten implementation of STL. %description %desc %description -n libstdc++%sover %desc %description devel %desc This package includes libraries and headers needed for C++\ development. %name-devel and g++ (from lcc*-c++) are not really useful without each other, but their sources are different. %description devel-static %desc This package includes static libraries needed for C++\ development. %prep %setup -n libstdc++-v3 tar xf /usr/src/lcc-libs-common-source/%llcs_ver/gcc-%{compat_gcc_branch}.tar --one-top-level=.. %build #=============================================================================== # Инициализация %define install_dir_include %_includedir/c++/g++-v3 # К CFLAGS принудительно добавляем -fvisibility=protected (см. bug #81005) # Причём добавляем спереди, чтобы можно было перебить опцией -fvisibility=default # (если вдруг понадобится) %add_optflags -fvisibility=protected # Из-за системы контроля версий даты изменения файлов нарушаются, и при # запуске make может быть осуществлена попытка пересоздать "устаревшие" # компоненты сборки с помощью autotools. Если следующие переменные окружения # установлены, для переконфигурации будут использованы именно они. # Устанавливаем их в пустые команды, поскольку реально файлы изменены не были. export AUTOCONF=: export AUTOHEADER=: export AUTOMAKE=: export ACLOCAL=: #=============================================================================== # Конфигурация # CXX и CXXFLAGS устанавливаем так, как это делает GCC. %global __cxx %__cxx -nostdinc++ -shared-libgcc %add_optflags -D_GNU_SOURCE # See how these vars are set in GCC's toplevel configure.ac # and passed down in Makefile.in (but not necessarily used there). export AR=%__ar export AS=%__as export NM=%__nm export STRIP=%__strip export RANLIB=%__ranlib export CXXFILT=c++filt export OBJDUMP=%__objdump export LDFLAGS='%optflags' # gthr*.h headers are provided by libgcc-devel in /usr/include sed -i 's|${toplevel_srcdir}/libgcc|/usr/include|g' include/Makefile.{am,in} # Параметры конфигурации. # --disable-multilib # Отключаем multilib. Не поддерживаются необходимые опции компилятора. # --disable-nls # Отключаем многоязыковую поддержку. Она включает в себя перевод пары строк # на французский и немецкий языки. Нам оно ни к чему. # --disable-libstdcxx-pch # Отключаем попытки сборки с использованием PCH. У нас не поддерживается. # --enable-shared, --disable-shared # Подаются в зависимости от того, нужна ли динамеческая версия библиотеки. # --with-target-subdir is required for config-ml.in to be found properly %configure \ --with-gxx-include-dir=%gxx_include_dir \ --disable-multilib \ --disable-nls \ --disable-libstdcxx-pch \ --enable-shared \ --with-target-subdir="." #=============================================================================== # Сборка %make_build %install #=============================================================================== # Установка %global ptrmode 64 %global ml_subdir /ptr%ptrmode # Имитируем включение multilib'a, чтобы установка архитектурно-зависимых # заголовочных файлов прошла в $gxx_include_dir/$host_alias$ml_subdir/bits. # Подробнее в config-ml.in и libstdc++-v3/include/Makefile.am sed -i 's:^MULTISUBDIR[ \t]*=.*$:MULTISUBDIR = %ml_subdir:' \ include/Makefile # --no-finish подаётся в libtool, чтобы после установки библиотек # не вызывалась утилита ldconfig. %makeinstall_std LIBTOOLFLAGS=--no-finish # Создаём фиксированную ссылку на архитектурно-зависимый каталог. Костыль. # Ссылка создаём относительную, не абсолютную. ln -sv %_configure_platform%ml_subdir -T %buildroot%gxx_include_dir/tdep.ptr%ptrmode cd %buildroot%_libdir ln -sf libstdc++.so.%sover libstdc++.so cd .. %files -n libstdc++%sover %_libdir/libstdc++.so.%{sover}* %files devel %gxx_include_dir %_libdir/libsupc++.a %_libdir/libstdc++fs.a %_libdir/libstdc++.so %files devel-static %_libdir/libstdc++.a %changelog * Sun Mar 05 2023 Michael Shigorin <mike@altlinux.org> 1.26.16-alt1.E2K.1 - 1.26.16 * Fri Nov 26 2021 Andrew Savchenko <bircoph@altlinux.org> 1.25.20-alt1.E2K.1 - Update to 1.25.20 * Sat May 01 2021 Andrew Savchenko <bircoph@altlinux.org> 1.25.08-alt1.E2K.2 - Add Obsoletes for gcc compat branch 5. * Wed Sep 09 2020 Andrew Savchenko <bircoph@altlinux.org> 1.25.08-alt1.E2K.1 - Update to 1.25.08 * Tue Jul 28 2020 Andrew Savchenko <bircoph@altlinux.org> 1.25.06-alt1.E2K.1 - Update to 1.25.06 * Tue Jun 16 2020 Andrew Savchenko <bircoph@altlinux.org> 1.24.11-alt1.E2K.1 - Update to 1.24.11 - libstdc++fs.a is now provided * Mon May 25 2020 Andrew Savchenko <bircoph@altlinux.org> 1.24.07-alt1.E2K.2 - Add -D_GNU_SOURCE to flags: it affects some code. * Fri May 22 2020 Andrew Savchenko <bircoph@altlinux.org> 1.24.07-alt1.E2K.1 - Update to 1.24.07, source build. * Wed Apr 10 2019 Andrew Savchenko <bircoph@altlinux.org> 1.23.12-alt2.E2K.2 - Do not remove <future> header as reported by a user. * Wed Feb 13 2019 Andrew Savchenko <bircoph@altlinux.org> 1.23.12-alt2.E2K.1 - Use so -> soname instead of so -> sofull. * Sat Jan 19 2019 Andrey Savchenko <bircoph@altlinux.org> 1.23.12-alt2.E2K.0 - Build 1.23.12 from source. * Sat Nov 17 2018 Andrey Savchenko <bircoph@altlinux.org> 1.23.12-alt1.E2K.0 - Update for 1.23.12 binary version. * Fri Nov 16 2018 Andrey Savchenko <bircoph@altlinux.org> 1.21.24-alt5.E2K.1 - Build lcc-1.21 compat libs for 1.23 environment. * Tue Jul 24 2018 Ivan Zakharyaschev <imz@altlinux.org> 1.21.24-alt5.E2K.0 - export LDFLAGS='%%optflags' (to pass some flags when making the lib with -shared). * Wed Jul 04 2018 Ivan Zakharyaschev <imz@altlinux.org> 1.21.24-alt4.E2K.0 - With the goal of separating GPL'd files from non-GPL lcc: + Prepared the *-devel{,-static} subpkgs + Obsoletes: lcc1.21-libstdc++-devel < 1.21.24-alt8 * Mon Jun 25 2018 Ivan Zakharyaschev <imz@altlinux.org> 1.21.24-alt3.E2K.0 - Build from source (thx MCST's build.sh and modifications). (TODO: package the *-devel{,-static} files.) * Mon May 14 2018 Ivan Zakharyaschev <imz@altlinux.org> 1.21.24-alt2.E2K.0 - The *-devel Provides dropped (in favor of the separate pkg). - Rename according to Shared Libs Policy. * Fri Apr 06 2018 Andrew Savchenko <bircoph@altlinux.org> 1.21.24-alt1.E2K.0 Initial release |