diff --git a/redhat/libraries/libksquirrel/libksquirrel.spec b/redhat/libraries/libksquirrel/libksquirrel.spec index 7571cfccf..793027459 100644 --- a/redhat/libraries/libksquirrel/libksquirrel.spec +++ b/redhat/libraries/libksquirrel/libksquirrel.spec @@ -71,8 +71,8 @@ BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: pkgconfig -# AUTOTOOLS -BuildRequires: automake autoconf libtool +# CMAKE +BuildRequires: cmake libtool %if 0%{?mgaversion} || 0%{?mdkversion} BuildRequires: %{_lib}ltdl-devel %endif @@ -244,6 +244,8 @@ This package contains the runtime libraries for KSquirrel. %{tde_libdir}/ksquirrel-libs/libkls_mdl.so.0.8.0 %{tde_libdir}/ksquirrel-libs/libkls_mng.so.0 %{tde_libdir}/ksquirrel-libs/libkls_mng.so.0.8.0 +%{tde_libdir}/ksquirrel-libs/libkls_msp.so.0 +%{tde_libdir}/ksquirrel-libs/libkls_msp.so.0.8.0 %{tde_libdir}/ksquirrel-libs/libkls_mtv.so.0 %{tde_libdir}/ksquirrel-libs/libkls_mtv.so.0.8.0 %{tde_libdir}/ksquirrel-libs/libkls_neo.so.0 @@ -311,7 +313,7 @@ This package contains the runtime libraries for KSquirrel. %{tde_libdir}/ksquirrel-libs/libkls_xwd.so.0 %{tde_libdir}/ksquirrel-libs/libkls_xwd.so.0.8.0 %{tde_libdir}/libksquirrel-libs-png.so.0 -%{tde_libdir}/libksquirrel-libs-png.so.0.0.0 +%{tde_libdir}/libksquirrel-libs-png.so.0.8.0 %{tde_libdir}/libksquirrel-libs.so.0 %{tde_libdir}/libksquirrel-libs.so.0.8.0 %dir %{tde_datadir}/ksquirrel-libs @@ -418,6 +420,8 @@ This package contains the development libraries for KSquirrel. %{tde_libdir}/ksquirrel-libs/libkls_mdl.so %{tde_libdir}/ksquirrel-libs/libkls_mng.la %{tde_libdir}/ksquirrel-libs/libkls_mng.so +%{tde_libdir}/ksquirrel-libs/libkls_msp.la +%{tde_libdir}/ksquirrel-libs/libkls_msp.so %{tde_libdir}/ksquirrel-libs/libkls_mtv.la %{tde_libdir}/ksquirrel-libs/libkls_mtv.so %{tde_libdir}/ksquirrel-libs/libkls_neo.la @@ -544,44 +548,46 @@ if [ -r /usr/include/freetype2/ftbitmap.h ]; then %__sed -i "kernel/kls_ttf/ttf2pnm.cpp" -e "s|freetype/config/|freetype2/config/|" fi -%__cp "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in" -%__cp "/usr/share/libtool/"*"/ltmain.sh" "admin/ltmain.sh" || %__cp "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh" -%__make -f "admin/Makefile.common" - %build unset QTDIR QTINC QTLIB export PATH="%{tde_bindir}:${PATH}" +export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig" -%if 0%{?suse_version} >= 1550 || 0%{?mgaversion} >= 8 || 0%{?fedora} >= 34 -CXXFLAGS="${CXXFLAGS} -std=c++11" -%endif +if ! rpm -E %%cmake|grep -q "cd build"; then + %__mkdir_p build + cd build +fi -%configure \ - --prefix=%{tde_prefix} \ - --exec-prefix=%{tde_prefix} \ - --bindir=%{tde_bindir} \ - --datadir=%{tde_datadir} \ - --libdir=%{tde_libdir} \ - --includedir=%{tde_includedir} \ +%cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \ + -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \ + -DCMAKE_SKIP_RPATH=OFF \ + -DCMAKE_SKIP_INSTALL_RPATH=OFF \ + -DCMAKE_INSTALL_RPATH="%{tde_libdir}" \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DWITH_GCC_VISIBILITY=OFF \ + \ + -DCMAKE_INSTALL_PREFIX="%{tde_prefix}" \ + -DSHARE_INSTALL_PREFIX="%{tde_datadir}" \ + -DINCLUDE_INSTALL_DIR="%{tde_includedir}" \ + -DLIB_INSTALL_DIR="%{tde_libdir}" \ \ - --disable-dependency-tracking \ - --disable-debug \ - --enable-new-ldflags \ - --enable-final \ - --enable-closure \ - --enable-rpath \ - --disable-gcc-hidden-visibility \ + -DWITH_ALL_OPTIONS=ON \ + -DWITH_GCC_VISIBILITY=ON \ \ - %{?with_djvu:--enable-djvu} + -DBUILD_ALL=ON \ + -DBUILD_PICT=OFF \ + .. -%__make %{?_smp_mflags} +%__make %{?_smp_mflags} || %__make %install export PATH="%{tde_bindir}:${PATH}" %__rm -rf %{buildroot} -%__make install DESTDIR=%{buildroot} +%__make -C build install DESTDIR=%{buildroot} %clean