summaryrefslogtreecommitdiffstats
path: root/redhat/libraries/libkdcraw
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2021-10-03 11:22:49 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2021-11-01 21:51:10 +0100
commit5fce6455838c5d703747d7e9570fc4457105d120 (patch)
tree3629838a77b853c82656e6c102f725b754efaebc /redhat/libraries/libkdcraw
parente845a75d097b4978e2c48b2ae533f2904c500934 (diff)
downloadtde-packaging-5fce6455838c5d703747d7e9570fc4457105d120.tar.gz
tde-packaging-5fce6455838c5d703747d7e9570fc4457105d120.zip
RPM: switch libkdcraw to cmake
Signed-off-by: François Andriot <albator78@libertysurf.fr>
Diffstat (limited to 'redhat/libraries/libkdcraw')
-rw-r--r--redhat/libraries/libkdcraw/libkdcraw.spec54
1 files changed, 32 insertions, 22 deletions
diff --git a/redhat/libraries/libkdcraw/libkdcraw.spec b/redhat/libraries/libkdcraw/libkdcraw.spec
index 06857a93b..159f01c1d 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}