Fix build on EPEL.
This commit is contained in:
parent
3d05313476
commit
f24b297724
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/tinyxml2-1.0.11-0323851.tar.gz
|
/tinyxml2-1.0.11-0323851.tar.gz
|
||||||
|
/GNUInstallDirs.cmake
|
||||||
|
1
sources
1
sources
@ -1 +1,2 @@
|
|||||||
10655584c11180916c1f4febd57bae4c tinyxml2-1.0.11-0323851.tar.gz
|
10655584c11180916c1f4febd57bae4c tinyxml2-1.0.11-0323851.tar.gz
|
||||||
|
fd9602db874aa96abcb81fa752f052e5 GNUInstallDirs.cmake
|
||||||
|
11
tinyxml2-epelbuild.patch
Normal file
11
tinyxml2-epelbuild.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -up tinyxml2-03238517b3718f0c977bb061747faa8ebfc4fb44/CMakeLists.txt.orig tinyxml2-03238517b3718f0c977bb061747faa8ebfc4fb44/CMakeLists.txt
|
||||||
|
--- tinyxml2-03238517b3718f0c977bb061747faa8ebfc4fb44/CMakeLists.txt.orig 2013-08-05 23:04:27.000000000 +0300
|
||||||
|
+++ tinyxml2-03238517b3718f0c977bb061747faa8ebfc4fb44/CMakeLists.txt 2013-10-14 11:17:45.403298279 +0300
|
||||||
|
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.6 FATAL
|
||||||
|
cmake_policy(VERSION 2.6)
|
||||||
|
|
||||||
|
project(tinyxml2)
|
||||||
|
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH})
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
#enable_testing()
|
||||||
|
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
Name: tinyxml2
|
Name: tinyxml2
|
||||||
Version: 1.0.11
|
Version: 1.0.11
|
||||||
Release: 3%{gitversion}%{?dist}
|
Release: 4%{gitversion}%{?dist}
|
||||||
Summary: Simple, small and efficient C++ XML parser
|
Summary: Simple, small and efficient C++ XML parser
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -18,6 +18,11 @@ License: zlib
|
|||||||
URL: https://github.com/%{githubparent}/%{name}
|
URL: https://github.com/%{githubparent}/%{name}
|
||||||
Source0: https://github.com/%{githubparent}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
|
Source0: https://github.com/%{githubparent}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
|
||||||
|
|
||||||
|
# EPEL has a too old CMake which is missing GNUInstallDirs (copied from Fedora 19 CMake)
|
||||||
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||||
|
Source1: GNUInstallDirs.cmake
|
||||||
|
Patch0: tinyxml2-epelbuild.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -45,6 +50,10 @@ for writing applications with the %{name} library.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{commit}
|
%setup -q -n %{name}-%{commit}
|
||||||
chmod -c -x *.cpp *.h
|
chmod -c -x *.cpp *.h
|
||||||
|
%if 0%{?rhel} == 5 || 0%{?rhel} == 6
|
||||||
|
%patch0 -p1 -b .epel
|
||||||
|
cp -p %{SOURCE1} .
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir objdir
|
mkdir objdir
|
||||||
@ -55,11 +64,16 @@ make %{?_smp_mflags}
|
|||||||
%check
|
%check
|
||||||
cd objdir
|
cd objdir
|
||||||
make test
|
make test
|
||||||
|
export LD_LIBRARY_PATH=`pwd`
|
||||||
./test
|
./test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
rm -rf %{buildroot}
|
||||||
cd objdir
|
cd objdir
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -76,6 +90,9 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
|||||||
%{_libdir}/pkgconfig/%{name}.pc
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 14 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.0.11-4.20130805git0323851
|
||||||
|
- Patch to build in EPEL branches.
|
||||||
|
|
||||||
* Mon Aug 12 2013 François Cami <fcami@fedoraproject.org> - 1.0.11-3.20130805git0323851
|
* Mon Aug 12 2013 François Cami <fcami@fedoraproject.org> - 1.0.11-3.20130805git0323851
|
||||||
- Fixes by Susi Lehtola: build in a separate directory and don't build anything static.
|
- Fixes by Susi Lehtola: build in a separate directory and don't build anything static.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user