File mingw32-kdevplatform4.spec of Package mingw32-kdevplatform4

#
# spec file for package kdevplatform4
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define _name kdevplatform4
Name:           mingw32-%{_name}
Version:        1.7.3
Release:        0
%define rname kdevplatform
%define kdevelop_version 4.7.3
%define libkdev_major 8
Summary:        Base Package for Integrated Development Environments
License:        GPL-2.0-or-later
Group:          Development/Tools/IDE
Url:            http://www.kdevelop.org
Source0:        http://download.kde.org/stable/kdevelop/%{kdevelop_version}/src/%{rname}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM fix-for-null-pointer-dereference-with-gcc6.patch kde#360707
Patch1:         fix-for-null-pointer-dereference-with-gcc6.patch
BuildRequires:  fdupes
BuildRequires:  mingw32-cross-cmake
BuildRequires:  mingw32-boost-devel
#BuildRequires:  mingw32-db-devel
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-cross-kde4-tools >= 4.7
BuildRequires:  mingw32-grantlee-devel
BuildRequires:  mingw32-libqjson-devel
BuildRequires:  mingw32-libqt4-tools
BuildRequires:  mingw32-libkde4-devel >= 4.7
BuildRequires:  mingw32-kde4-filesystem
#BuildRequires:  mingw32-kdewin-devel
BuildRequires:  mingw32-libqt4-devel >= 4.8.0
BuildRequires:  mingw32-libqt4-tools-devel >= 4.8.0
#BuildRequires:  mingw32-subversion-devel
BuildRequires:  gettext
BuildRequires:  mingw32-libintl-devel
BuildRequires:  xz
BuildRequires:  zip
#BuildRequires:  kompare - currently disabled upstream, see toplevel CMakeLists.txt
Requires:       %{name}-lang = %{version}
Requires:       mingw32-libkdevplatform%{libkdev_major} = %{version}
BuildArch:      noarch
%_mingw32_package_header_debug
%_mingw32_kde4_runtime_requires

%description
This package contains the common plugins for integrated developments
environment based on the KDevelop framework.

%_mingw32_debug_package

%lang_package
%prep
%setup -q -n %{rname}-%{version}
%if 0%{?suse_version} > 1320
%patch -P 1 -p1
%endif
# fix build with older cmake versions (i.e. on 13.2 and below) by
# readding "cmake_policy(SET CMP0002 OLD)" to po/CMakeLists.txt
# (was in there before but has been removed in 1.7.3)
sed -i -e "1s/^/cmake_policy(SET CMP0002 OLD)\n/" po/CMakeLists.txt
sed -i -e "s,KDEVPLATFORMLANGUAGE_EXPORT AbstractType::Ptr,AbstractType::Ptr,g" language/duchain/types/typeutils.h
# fix fatal error: ui_newclass.h: No such file or directory
sed -i -e "s,main.cpp,main.cpp templatepreviewtoolview.ui ui/licensechooser.ui ui/newclass.ui ui/outputlocation.ui ui/overridevirtuals.ui ui/templateselection.ui ui/testcases.ui,g" plugins/filetemplates/CMakeLists.txt


%build
  %_mingw32_cmake_kde4 -d build -- -DGETTEXT_MSGMERGE_EXECUTABLE=/usr/bin/msgmerge -DGETTEXT_MSGFMT_EXECUTABLE=/usr/bin/msgfmt
  %_mingw32_cmake_build

%install
  %_mingw32_kde4_makeinstall -C build
  %_mingw32_kde4_post_install
  %fdupes %{buildroot}%{_datadir}/locale

  %_mingw32_find_lang kdevappwizard %{rname}.lang
  %_mingw32_find_lang kdevclassbrowser %{rname}.lang
  %_mingw32_find_lang kdevcodeutils %{rname}.lang
  %_mingw32_find_lang kdevcontextbrowser %{rname}.lang
  %_mingw32_find_lang kdevcvs %{rname}.lang
  %_mingw32_find_lang kdevdocumentswitcher %{rname}.lang
  %_mingw32_find_lang kdevdocumentview %{rname}.lang
  %_mingw32_find_lang kdevexecute %{rname}.lang
  %_mingw32_find_lang kdevexecutescript %{rname}.lang
  %_mingw32_find_lang kdevexternalscript %{rname}.lang
  %_mingw32_find_lang kdevfilemanager %{rname}.lang
  %_mingw32_find_lang kdevfiletemplates %{rname}.lang
  %_mingw32_find_lang kdevgenericprojectmanager %{rname}.lang
  %_mingw32_find_lang kdevgit %{rname}.lang
  %_mingw32_find_lang kdevgrepview %{rname}.lang
  %_mingw32_find_lang kdevkonsole %{rname}.lang
  %_mingw32_find_lang kdevopenwith %{rname}.lang
  %_mingw32_find_lang kdevpastebin %{rname}.lang
  %_mingw32_find_lang kdevpatchreview %{rname}.lang
  %_mingw32_find_lang kdevplatform %{rname}.lang
  %_mingw32_find_lang kdevproblemreporter %{rname}.lang
  %_mingw32_find_lang kdevprojectdashboard %{rname}.lang
  %_mingw32_find_lang kdevprojectfilter %{rname}.lang
  %_mingw32_find_lang kdevprojectmanagerview %{rname}.lang
  %_mingw32_find_lang kdevquickopen %{rname}.lang
  %_mingw32_find_lang kdevreviewboard %{rname}.lang
  %_mingw32_find_lang kdevsnippet %{rname}.lang
  %_mingw32_find_lang kdevstandardoutputview %{rname}.lang
  %_mingw32_find_lang kdevsubversion %{rname}.lang
  %_mingw32_find_lang kdevswitchtobuddy %{rname}.lang
  %_mingw32_find_lang kdevtemplates_config %{rname}.lang
  %_mingw32_find_lang kdevtestview %{rname}.lang
  %_mingw32_find_lang kdevvcsprojectintegration %{rname}.lang

%files lang -f %{rname}.lang

%package -n mingw32-libkdevplatform4-devel
Summary:        Base Package for Integrated Development Environments: Build Environment
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       mingw32-libkdevplatform%{libkdev_major} = %{version}

%description -n mingw32-libkdevplatform4-devel
This package contains the development files for building integrated
developments environments based on the KDevelop framework.

%files -n mingw32-libkdevplatform4-devel
%defattr(-,root,root)
%{_mingw32_kde4_includedir}/kdevplatform
%{_mingw32_kde4_libdir}/libkdevplatformdebugger.dll.a
%{_mingw32_kde4_libdir}/libkdevplatformdocumentation.dll.a
%{_mingw32_kde4_libdir}/libkdevplatformjsontests.dll.a
%{_mingw32_kde4_libdir}/libkdevplatforminterfaces.dll.a
%{_mingw32_kde4_libdir}/libkdevplatformlanguage.dll.a
%{_mingw32_kde4_libdir}/libkdevplatformoutputview.dll.a
%{_mingw32_kde4_libdir}/libkdevplatformproject.dll.a
%{_mingw32_kde4_libdir}/libkdevplatformshell.dll.a
%{_mingw32_kde4_libdir}/libkdevplatformtests.dll.a
%{_mingw32_kde4_libdir}/libkdevplatformutil.dll.a
%{_mingw32_kde4_libdir}/libkdevplatformvcs.dll.a
%{_mingw32_kde4_libdir}/libsublime.dll.a
%{_mingw32_kde4_modulesdir}/imports/org/kde/kdevplatform/*.dll.a
%{_mingw32_kde4_libdir}/cmake

%package -n mingw32-libkdevplatform%{libkdev_major}
Summary:        Libraries for Integrated Development Environments
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Obsoletes:      mingw32-libkdevplatform0

%description -n mingw32-libkdevplatform%{libkdev_major}
This package contains the libraries for integrated development
environments based on the KDevelop framework.

%files -n mingw32-libkdevplatform%{libkdev_major}
%defattr(-,root,root)
%{_mingw32_kde4_bindir}/libkdevplatformdebugger.dll
%{_mingw32_kde4_bindir}/libkdevplatformdocumentation.dll
%{_mingw32_kde4_bindir}/libkdevplatformjsontests.dll
%{_mingw32_kde4_bindir}/libkdevplatforminterfaces.dll
%{_mingw32_kde4_bindir}/libkdevplatformlanguage.dll
%{_mingw32_kde4_bindir}/libkdevplatformoutputview.dll
%{_mingw32_kde4_bindir}/libkdevplatformproject.dll
%{_mingw32_kde4_bindir}/libkdevplatformshell.dll
%{_mingw32_kde4_bindir}/libkdevplatformtests.dll
%{_mingw32_kde4_bindir}/libkdevplatformutil.dll
%{_mingw32_kde4_bindir}/libkdevplatformvcs.dll
%{_mingw32_kde4_bindir}/libsublime.dll

%files
%defattr(-,root,root)
%doc COPYING* README
%dir %{_mingw32_kde4_appsdir}/kdevsession
%dir %{_mingw32_kde4_modulesdir}/plugins/grantlee/
%dir %{_mingw32_kde4_modulesdir}/plugins/grantlee/0.?/
%{_mingw32_kde4_appsdir}/kdevappwizard/
%{_mingw32_kde4_appsdir}/kdevclassbrowser/
%{_mingw32_kde4_appsdir}/kdevcodegen/
%{_mingw32_kde4_appsdir}/kdevcodeutils/
%{_mingw32_kde4_appsdir}/kdevcontextbrowser/
%{_mingw32_kde4_appsdir}/kdevcvs/
%{_mingw32_kde4_appsdir}/kdevdebugger/
%{_mingw32_kde4_appsdir}/kdevdocumentswitcher/
%{_mingw32_kde4_appsdir}/kdevdocumentview/
%{_mingw32_kde4_appsdir}/kdevexternalscript/
%{_mingw32_kde4_appsdir}/kdevelop/
%{_mingw32_kde4_appsdir}/kdevfilemanager/
%{_mingw32_kde4_appsdir}/kdevfiletemplates/
%{_mingw32_kde4_appsdir}/kdevgrepview/
%{_mingw32_kde4_appsdir}/kdevpatchreview/
%{_mingw32_kde4_appsdir}/kdevproblemreporter/
%{_mingw32_kde4_appsdir}/kdevprojectmanagerview/
%{_mingw32_kde4_appsdir}/kdevquickopen/
%{_mingw32_kde4_appsdir}/kdevsession/
%{_mingw32_kde4_appsdir}/kdevsnippet/
%{_mingw32_kde4_appsdir}/kdevsourceformatter/
%{_mingw32_kde4_appsdir}/kdevstandardoutputview/
%{_mingw32_kde4_appsdir}/kdevtestview/
%{_mingw32_kde4_appsdir}/plasma/
%{_mingw32_kde4_configdir}/kdevappwizard.knsrc
%{_mingw32_kde4_configdir}/kdevfiletemplates.knsrc
%{_mingw32_kde4_iconsdir}/hicolor/*/*/*.png
%{_mingw32_kde4_modulesdir}/plugins/grantlee/*/kdev_filters.dll
%{_mingw32_kde4_modulesdir}/*kdev*.dll
%dir %{_mingw32_kde4_modulesdir}/imports
%dir %{_mingw32_kde4_modulesdir}/imports/org
%dir %{_mingw32_kde4_modulesdir}/imports/org/kde
%dir %{_mingw32_kde4_modulesdir}/imports/org/kde/kdevplatform
%{_mingw32_kde4_modulesdir}/imports/org/kde/kdevplatform/*.dll
%{_mingw32_kde4_modulesdir}/imports/org/kde/kdevplatform/qmldir
%{_mingw32_kde4_servicesdir}/kcm_kdev*.desktop
%{_mingw32_kde4_servicesdir}/kdev*.desktop
%{_mingw32_kde4_servicetypesdir}/kdevelopplugin.desktop
# should be in libexec?
%{_mingw32_kde4_bindir}/kdev_format_source
%{_mingw32_kde4_bindir}/kdevplatform_shell_environment.sh

%changelog
openSUSE Build Service is sponsored by