summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2021-11-01 10:18:07 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2021-11-01 21:51:37 +0100
commit59e44bf59c02e546d200db1c58e7f839aeef80c1 (patch)
tree8e111c707ccfd25cb0446c37ae4955dca676dc99
parentb127899b038439e8a25d606f1dd03319fac9c370 (diff)
downloadtde-packaging-59e44bf59c02e546d200db1c58e7f839aeef80c1.tar.gz
tde-packaging-59e44bf59c02e546d200db1c58e7f839aeef80c1.zip
RPM: switch kscope to cmake build
Signed-off-by: François Andriot <albator78@libertysurf.fr>
-rw-r--r--redhat/applications/kscope/kscope.spec59
1 files changed, 31 insertions, 28 deletions
diff --git a/redhat/applications/kscope/kscope.spec b/redhat/applications/kscope/kscope.spec
index 72f344031..495f8940a 100644
--- a/redhat/applications/kscope/kscope.spec
+++ b/redhat/applications/kscope/kscope.spec
@@ -63,7 +63,7 @@ BuildRequires: desktop-file-utils
BuildRequires: gettext
Requires: cscope
-BuildRequires: autoconf automake libtool m4
+BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: fdupes
@@ -123,45 +123,47 @@ Main Features:
%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}"
-
-%configure \
- --prefix=%{tde_prefix} \
- --exec-prefix=%{tde_prefix} \
- --bindir=%{tde_bindir} \
- --libdir=%{tde_libdir} \
- --mandir=%{tde_mandir} \
- --datadir=%{tde_datadir} \
- --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
+
+# Warning: GCC visibility causes FTBFS [Bug #1285]
+%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_NO_BUILTIN_CHRPATH=ON \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DWITH_GCC_VISIBILITY=OFF \
+ \
+ -DBIN_INSTALL_DIR=%{tde_bindir} \
+ -DCONFIG_INSTALL_DIR="%{tde_confdir}" \
+ -DINCLUDE_INSTALL_DIR=%{tde_tdeincludedir} \
+ -DLIB_INSTALL_DIR=%{tde_libdir} \
+ -DSHARE_INSTALL_PREFIX=%{tde_datadir} \
\
- --disable-dependency-tracking \
- --disable-debug \
- --enable-new-ldflags \
- --enable-final \
- --enable-closure \
- --enable-rpath \
- --disable-gcc-hidden-visibility
-
-%__make %{?_smp_mflags}
+ -DWITH_ALL_OPTIONS=ON \
+ -DBUILD_ALL=ON \
+ ..
+
+%__make %{?_smp_mflags} || %__make
%install
%__rm -rf $RPM_BUILD_ROOT
-%__make install DESTDIR=$RPM_BUILD_ROOT
+%__make install DESTDIR=$RPM_BUILD_ROOT -C build
%find_lang %{tde_pkg}
-# Move desktop icon to correct location
-%__mkdir_p "%{?buildroot}%{tde_tdeappdir}"
-%__mv -f "%{?buildroot}%{tde_datadir}/applnk/"*"/%{tde_pkg}.desktop" "%{?buildroot}%{tde_tdeappdir}"
-
# Updates applications categories for openSUSE
%if 0%{?suse_version}
%suse_update_desktop_file %{tde_pkg} Development IDE
@@ -181,6 +183,7 @@ export PATH="%{tde_bindir}:${PATH}"
%{tde_tdedocdir}/HTML/en/kscope/
%{tde_datadir}/icons/hicolor/*/apps/kscope.png
%{tde_datadir}/icons/locolor/*/apps/kscope.png
+%{tde_mandir}/man1/kscope.1*
%changelog