fixes
- bug 1735313 - grass: FTBFS in Fedora rawhide/f31 - bug 1739908 - grass fails to install in Fedora rawhide - bug 1738746 - Please remove dependency on python2-wxpython4
This commit is contained in:
parent
a3a155d422
commit
f6eb39c756
3 changed files with 68 additions and 64 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -8,3 +8,5 @@
|
|||
/grass-7.4.3.tar.gz
|
||||
/grass-7.4.4.tar.gz
|
||||
/grass-7.6.0.tar.gz
|
||||
/grass-7.8.0.tar.gz
|
||||
/grass-7.8.0-buildroot.patch
|
||||
|
|
|
|||
127
grass.spec
127
grass.spec
|
|
@ -2,12 +2,12 @@
|
|||
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
|
||||
%global _python_bytecompile_extra 1
|
||||
|
||||
%global shortver 76
|
||||
%global shortver 78
|
||||
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||
|
||||
Name: grass
|
||||
Version: 7.6.0
|
||||
Release: 6%{?dist}
|
||||
Version: 7.8.0
|
||||
Release: 2%{?dist}
|
||||
Summary: GRASS GIS - Geographic Resources Analysis Support System
|
||||
|
||||
%if 0%{?rhel}
|
||||
|
|
@ -17,6 +17,8 @@ URL: https://grass.osgeo.org
|
|||
Source0: https://grass.osgeo.org/%{name}%{shortver}/source/%{name}-%{version}.tar.gz
|
||||
Source2: %{name}-config.h
|
||||
|
||||
Patch1: grass-7.8.0-buildroot.patch
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: blas-devel
|
||||
BuildRequires: cairo-devel
|
||||
|
|
@ -28,15 +30,12 @@ BuildRequires: flex
|
|||
BuildRequires: freetype-devel
|
||||
%endif
|
||||
BuildRequires: gdal-devel
|
||||
BuildRequires: geos-devel >= 3.7.1
|
||||
BuildRequires: geos-devel
|
||||
BuildRequires: gettext
|
||||
BuildRequires: lapack-devel
|
||||
%if (0%{?rhel} > 6 || 0%{?fedora})
|
||||
BuildRequires: libappstream-glib
|
||||
%endif
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: liblas-devel => 1.8.0-12
|
||||
%endif
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: libXmu-devel
|
||||
|
|
@ -50,32 +49,34 @@ BuildRequires: mysql-devel
|
|||
%if (0%{?rhel} > 6 || 0%{?fedora})
|
||||
BuildRequires: netcdf-devel
|
||||
%endif
|
||||
BuildRequires: python < 3.0
|
||||
BuildRequires: python2-numpy
|
||||
BuildRequires: python3
|
||||
BuildRequires: python3-numpy
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
BuildRequires: postgresql-devel
|
||||
%else
|
||||
BuildRequires: libpq-devel
|
||||
%endif
|
||||
BuildRequires: proj-devel >= 5.2.0
|
||||
BuildRequires: proj-epsg >= 5.2.0
|
||||
BuildRequires: proj-nad >= 5.2.0
|
||||
BuildRequires: proj-devel
|
||||
%if (0%{?fedora} < 30)
|
||||
BuildRequires: proj-epsg
|
||||
BuildRequires: proj-nad
|
||||
%endif
|
||||
%if (0%{?rhel} <= 6 && !0%{?fedora})
|
||||
# argparse is included in python2.7+ but not python2.6
|
||||
BuildRequires: python-argparse
|
||||
%endif
|
||||
BuildRequires: python2-dateutil
|
||||
BuildRequires: python2-devel
|
||||
Requires: python2-matplotlib
|
||||
BuildRequires: python3-dateutil
|
||||
BuildRequires: python3-devel
|
||||
Requires: python3-matplotlib
|
||||
##?
|
||||
#Requires: python2-matplotlib-wx
|
||||
#Requires: python3-matplotlib-wx
|
||||
%if (0%{?rhel} > 6 || 0%{?fedora})
|
||||
%if 0%{?rhel} > 6
|
||||
# EPEL7
|
||||
BuildRequires: python-pillow
|
||||
%else
|
||||
# Fedora
|
||||
BuildRequires: python2-pillow
|
||||
BuildRequires: python3-pillow
|
||||
%endif
|
||||
%else
|
||||
# EPEL6
|
||||
|
|
@ -89,15 +90,17 @@ BuildRequires: zlib-devel
|
|||
BuildRequires: libzstd-devel
|
||||
Requires: libzstd
|
||||
|
||||
Requires: geos >= 3.7.1
|
||||
Requires: proj-epsg >= 5.2.0
|
||||
Requires: proj-nad >= 5.2.0
|
||||
Requires: python2
|
||||
Requires: python2-numpy
|
||||
Requires: geos
|
||||
%if (0%{?fedora} < 30)
|
||||
Requires: proj-epsg
|
||||
Requires: proj-nad
|
||||
%endif
|
||||
Requires: python3
|
||||
Requires: python3-numpy
|
||||
%if 0%{?rhel}
|
||||
Requires: wxPython
|
||||
%else
|
||||
Requires: python2-wxpython4
|
||||
Requires: python3-wxpython4
|
||||
%endif
|
||||
|
||||
|
||||
|
|
@ -140,21 +143,18 @@ GRASS GIS development headers
|
|||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch1 -p1
|
||||
|
||||
# Correct mysql_config query
|
||||
sed -i -e 's/--libmysqld-libs/--libs/g' configure
|
||||
|
||||
# Fixup shebangs
|
||||
# in future python3 will be supported
|
||||
find -type f | xargs sed -i -e 's,#!/usr/bin/env python,#!%{__python2},'
|
||||
sed -i -e 's,python,%{__python2},g' include/Make/Platform.make.in
|
||||
find -name \*.pl | xargs sed -i -e 's,#!/usr/bin/env perl,#!%{__perl},'
|
||||
|
||||
%build
|
||||
# Package is not ready for -Werror=format-security or the C++11 standard
|
||||
CFLAGS="$(echo ${RPM_OPT_FLAGS} | sed -e 's/ -Werror=format-security//')"
|
||||
CXXFLAGS="-std=c++98 ${CFLAGS}"
|
||||
# enforce python2 during build process
|
||||
export GRASS_PYTHON="/usr/bin/python2"
|
||||
%configure \
|
||||
--with-cxx \
|
||||
--with-tiff \
|
||||
|
|
@ -179,9 +179,6 @@ export GRASS_PYTHON="/usr/bin/python2"
|
|||
--with-geos=%{_bindir}/geos-config \
|
||||
%if (0%{?rhel} > 6 || 0%{?fedora})
|
||||
--with-netcdf=%{_bindir}/nc-config \
|
||||
%endif
|
||||
%if 0%{?fedora}
|
||||
--with-liblas=%{_bindir}/liblas-config \
|
||||
%endif
|
||||
--with-mysql-includes=%{_includedir}/mysql \
|
||||
%if (0%{?fedora} >= 27)
|
||||
|
|
@ -195,43 +192,34 @@ export GRASS_PYTHON="/usr/bin/python2"
|
|||
--with-zstd \
|
||||
--with-proj-share=%{_datadir}/proj
|
||||
|
||||
%if (0%{?rhel} > 6 || 0%{?fedora})
|
||||
make %{?_smp_mflags}
|
||||
%else
|
||||
# EPEL6: the HTML parser is too strict in Python 6, hence a few manual pages will not be generated
|
||||
make %{?_smp_mflags} || echo "EPEL6: ignoring failed manual pages"
|
||||
%endif
|
||||
|
||||
# by default, grass will be installed to /usr/grass-%%{version}
|
||||
# this is not FHS compliant: hide grass-%%{version} in %%{libdir}
|
||||
%install
|
||||
%make_install \
|
||||
DESTDIR=%{buildroot}%{_libdir} \
|
||||
prefix=%{buildroot}%{_libdir} \
|
||||
UNIX_BIN=%{buildroot}%{_bindir}
|
||||
UNIX_BIN=%{buildroot}%{_bindir} \
|
||||
GISBASE_RUNTIME=%{_libdir}/%{name}%{shortver}
|
||||
|
||||
# libraries and headers are in GISBASE = %%{_libdir}/%%{name}
|
||||
# keep them in GISBASE
|
||||
|
||||
# fix paths:
|
||||
|
||||
# Change GISBASE in startup script
|
||||
sed -i -e 's|%{buildroot}%{_libdir}/%{name}-%{version}|%{_libdir}/%{name}%{shortver}|g' \
|
||||
%{buildroot}%{_bindir}/%{name}%{shortver}
|
||||
# fix GRASS_HOME and RUN_GISBASE in Platform.make
|
||||
sed -i -e 's|%{buildroot}%{_libdir}/%{name}-%{version}|%{_libdir}/%{name}%{shortver}|g' \
|
||||
%{buildroot}%{_libdir}/%{name}-%{version}/include/Make/Platform.make
|
||||
# fix ARCH_DISTDIR in Grass.make
|
||||
sed -i -e 's|%{buildroot}%{_libdir}/%{name}-%{version}|%{_libdir}/%{name}%{shortver}|g' \
|
||||
%{buildroot}%{_libdir}/%{name}-%{version}/include/Make/Grass.make
|
||||
# fix ARCH_BINDIR in Grass.make
|
||||
sed -i -e 's|%{buildroot}%{_bindir}|%{_bindir}|g' \
|
||||
%{buildroot}%{_libdir}/%{name}-%{version}/include/Make/Grass.make
|
||||
# fix GISDBASE in demolocation
|
||||
sed -i -e 's|%{buildroot}%{_libdir}/%{name}-%{version}|%{_libdir}/%{name}%{shortver}|g' \
|
||||
%{buildroot}%{_libdir}/%{name}-%{version}/demolocation/.grassrc%{shortver}
|
||||
# Correct font path
|
||||
sed -i -e 's|%{buildroot}%{_libdir}/%{name}-%{version}|%{_libdir}/%{name}%{shortver}|' \
|
||||
%{buildroot}%{_libdir}/%{name}-%{version}/etc/fontcap
|
||||
for I in %{buildroot}%{_bindir}/%{name}%{shortver} \
|
||||
%{buildroot}%{_libdir}/%{name}%{shortver}/include/Make/Platform.make \
|
||||
%{buildroot}%{_libdir}/%{name}%{shortver}/include/Make/Grass.make \
|
||||
%{buildroot}%{_libdir}/%{name}%{shortver}/demolocation/.grassrc%{shortver} \
|
||||
%{buildroot}%{_libdir}/%{name}%{shortver}/etc/fontcap; do
|
||||
sed -i \
|
||||
-e 's|%{buildroot}%{_libdir}/%{name}-%{version}|%{_libdir}/%{name}%{shortver}|g' \
|
||||
-e 's|%{buildroot}%{_libdir}/%{name}%{shortver}|%{_libdir}/%{name}%{shortver}|g' \
|
||||
-e 's|%{buildroot}%{_bindir}|%{_bindir}|g' \
|
||||
$I
|
||||
done
|
||||
|
||||
# fix paths in grass.pc
|
||||
sed -i -e 's|%{_prefix}/%{name}-%{version}|%{_libdir}/%{name}%{shortver}|g' \
|
||||
%{name}.pc
|
||||
|
|
@ -240,33 +228,35 @@ mkdir -p %{buildroot}%{_libdir}/pkgconfig
|
|||
install -p -m 644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig
|
||||
|
||||
# Create multilib header
|
||||
mv %{buildroot}%{_libdir}/%{name}-%{version}/include/%{name}/config.h \
|
||||
%{buildroot}%{_libdir}/%{name}-%{version}/include/%{name}/config-%{cpuarch}.h
|
||||
install -p -m 644 %{SOURCE2} %{buildroot}%{_libdir}/%{name}-%{version}/include/%{name}/config.h
|
||||
mv %{buildroot}%{_libdir}/%{name}%{shortver}/include/%{name}/config.h \
|
||||
%{buildroot}%{_libdir}/%{name}%{shortver}/include/%{name}/config-%{cpuarch}.h
|
||||
install -p -m 644 %{SOURCE2} %{buildroot}%{_libdir}/%{name}%{shortver}/include/%{name}/config.h
|
||||
|
||||
# Make man pages available on the system, convert to utf8 and avoid name conflict
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
for man in $(ls %{buildroot}%{_libdir}/%{name}-%{version}/docs/man/man1/*.1)
|
||||
for man in $(ls %{buildroot}%{_libdir}/%{name}%{shortver}/docs/man/man1/*.1)
|
||||
do
|
||||
iconv -f iso8859-1 -t utf8 $man > %{buildroot}%{_mandir}/man1/$(basename $man)"%{name}"
|
||||
done
|
||||
|
||||
# create symlink to unversioned name
|
||||
ln -s %{name}%{shortver} %{buildroot}%{_bindir}/%{name}
|
||||
|
||||
# symlink docs from GISBASE to standard system location
|
||||
mkdir -p %{buildroot}%{_docdir}
|
||||
# append shortver to destination ? man pages are unversioned
|
||||
ln -s %{_libdir}/%{name}%{shortver}/docs %{buildroot}%{_docdir}/%{name}%{shortver}
|
||||
|
||||
# Make desktop, appdata and icon files available on the system
|
||||
mv %{buildroot}%{_libdir}/%{name}-%{version}/share/* %{buildroot}%{_datadir}
|
||||
mv %{buildroot}%{_libdir}/%{name}%{shortver}/share/* %{buildroot}%{_datadir}
|
||||
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
|
||||
# EPEL6 fails on appstream-util
|
||||
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/org.osgeo.%{name}.appdata.xml || echo "Ignoring appstream-util failure"
|
||||
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/org.osgeo.%{name}.appdata.xml
|
||||
|
||||
# Cleanup: nothing to do
|
||||
#rm -rf %%{buildroot}%%{_prefix}/%%{name}-%%{version}
|
||||
|
||||
# Finally move entire tree to shortver subdir
|
||||
mv %{buildroot}%{_libdir}/%{name}-%{version} %{buildroot}%{_libdir}/%{name}%{shortver}
|
||||
#mv %{buildroot}%{_libdir}/%{name}-%{version} %{buildroot}%{_libdir}/%{name}%{shortver}
|
||||
|
||||
# rpm macro for version checking (not from buildroot!)
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{macrosdir}
|
||||
|
|
@ -332,6 +322,17 @@ fi
|
|||
%{_libdir}/%{name}%{shortver}/include
|
||||
|
||||
%changelog
|
||||
* Sat Sep 14 2019 Elliot C. Lee <elliot.c.lee@gmail.com> - 7.8.0-2
|
||||
- patch for upstream package and SPEC file
|
||||
|
||||
* Fri Sep 13 2019 Markus Neteler <neteler@mundialis.de> - 7.8.0-1
|
||||
- new upstream version of GRASS GIS 7.8.0
|
||||
- dropped outdated liblas dependency
|
||||
|
||||
* Wed Aug 14 2019 Markus Neteler <neteler@mundialis.de> - 7.8.0-RC1
|
||||
- test version of GRASS GIS 7.8.0RC1 with Python 3 support
|
||||
- removal of no longer required Python 2/3 shebang update
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.6.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
|||
SHA512 (grass-7.6.0.tar.gz) = ed49fc61649805a39b81db3fa2b70bf56cf29b77f4c9d89c0d64d01e1bd7a4ce0f9e56ebd566fb097736fbf375c0ec9cf4fcbb17981e72008abafcfccda83c88
|
||||
SHA512 (grass-7.8.0.tar.gz) = 2add6a2f5af2931419a9103b46769c11a727ef4ce10f2977171b80bab038371fb5157294d045ccb57ce4d232a47c15b305912486fd3f7ab4a12eded224c06800
|
||||
SHA512 (grass-7.8.0-buildroot.patch) = da860d77ec844848c12fb3dedbf27beb244fc9058aea7eb57ba51ab491c8a9633a345facf42057682141315022c995af5462d9d540e6b860cf551dde86b11fa8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue