diff options
author | François Andriot <albator78@libertysurf.fr> | 2021-10-03 11:22:49 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2021-11-01 21:47:21 +0100 |
commit | dea854090033ffc5dd31a1f3f3afa1df586b0366 (patch) | |
tree | 29f405debcf65e4571026034f508bf08430f80fd | |
parent | 105f6898695a283f26466e092f2ed4324023f0d5 (diff) | |
download | tde-packaging-dea854090033ffc5dd31a1f3f3afa1df586b0366.tar.gz tde-packaging-dea854090033ffc5dd31a1f3f3afa1df586b0366.zip |
RPM: switch libkdcraw to cmake
Signed-off-by: François Andriot <albator78@libertysurf.fr>
-rw-r--r-- | redhat/libraries/libkdcraw/libkdcraw.spec | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/redhat/libraries/libkdcraw/libkdcraw.spec b/redhat/libraries/libkdcraw/libkdcraw.spec index e5576a13c..d7bdc7d62 100644 --- a/redhat/libraries/libkdcraw/libkdcraw.spec +++ b/redhat/libraries/libkdcraw/libkdcraw.spec @@ -59,7 +59,7 @@ Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz BuildRequires: trinity-tdelibs-devel >= %{tde_version} BuildRequires: trinity-filesystem >= %{tde_version} -BuildRequires: automake autoconf libtool +BuildRequires: cmake libtool BuildRequires: gcc-c++ BuildRequires: desktop-file-utils BuildRequires: pkgconfig @@ -161,38 +161,48 @@ library documentation is available on kdcraw.h header file. %prep %setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}} -%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in" -%__cp -f "/usr/share/libtool/"*"/ltmain.sh" "admin/ltmain.sh" || %__cp -f "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh" -%__make -f "admin/Makefile.common" - %build unset QTDIR QTINC QTLIB export PATH="%{tde_bindir}:${PATH}" - -# Warning: gcc-hidden-visibility causes FTBFS in digikam ! -%configure \ - --prefix=%{tde_prefix} \ - --exec-prefix=%{tde_prefix} \ - --datadir=%{tde_datadir} \ - --libdir=%{tde_libdir} \ - --includedir=%{tde_tdeincludedir} \ +export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig" + +if ! rpm -E %%cmake|grep -q "cd build"; then + %__mkdir_p build + cd build +fi + +%cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \ + -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \ + -DCMAKE_SKIP_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}" \ + -DLIB_INSTALL_DIR="%{tde_libdir}" \ + -DINCLUDE_INSTALL_DIR=%{tde_tdeincludedir} \ + -DPLUGIN_INSTALL_DIR="%{tde_tdelibdir}" \ + \ + -DWITH_ALL_OPTIONS=ON \ + -DWITH_GCC_VISIBILITY=ON \ + \ + -DBUILD_ALL=ON \ + -DBUILD_DOC=ON \ + -DBUILD_TRANSLATIONS=ON \ \ - --disable-dependency-tracking \ - --disable-debug \ - --enable-new-ldflags \ - --enable-final \ - --enable-closure \ - --enable-rpath \ - --disable-gcc-hidden-visibility + .. -%__make %{?_smp_mflags} +%__make %{?_smp_mflags} || %__make %install export PATH="%{tde_bindir}:${PATH}" %__rm -rf %{buildroot} -%__make install DESTDIR=%{buildroot} +%__make install DESTDIR=%{buildroot} -C build %find_lang %{tde_pkg} |