Accepting request 828163 from windows:mingw:win64:snapshots
- Add missing Fortran case into macros.mingw64* (boo#1173990) - Fix warning about non standard group (boo#1173189) - Make cmake package support to be more in sync with native package * Add mingw64-cmake.prov and mingw64-cmake.attr ported from native cmake package to support generating mingw64(cmake:xxx) dependencies required by newer KDE Frameworks 5 and other packages. * Move out cmake related macros from macros.mingw64 into macros.mingw64-cmake * Define macro _mingw64_cmake_build * Fix deprecated call to %make_jobs CMake support may be better located in a package named mingw64-cross-cmake but need to be used here until the deprecated dependency generator provided by this package is converted to sets of *.attr/*.prov files. - Add additional man languages 'id' and 'uk' used by KDE Frameworks5 packages OBS-URL: https://build.opensuse.org/request/show/828163 OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=115
This commit is contained in:
parent
a5b7474fb1
commit
d5dd5b403b
@ -7,6 +7,7 @@ eo
|
||||
es
|
||||
fr
|
||||
hu
|
||||
id
|
||||
it
|
||||
ja
|
||||
nl
|
||||
@ -16,6 +17,7 @@ pt_BR
|
||||
ru
|
||||
sk
|
||||
sv
|
||||
uk
|
||||
zh
|
||||
zh_CN
|
||||
zh_TW
|
||||
|
@ -43,6 +43,7 @@
|
||||
%_mingw64_as %{_mingw64_target}-as
|
||||
%_mingw64_dlltool %{_mingw64_target}-dlltool
|
||||
%_mingw64_dllwrap %{_mingw64_target}-dllwrap
|
||||
%_mingw64_fc %{_mingw64_target}-gfortran
|
||||
%_mingw64_gcov %{_mingw64_target}-gcov
|
||||
%_mingw64_gprof %{_mingw64_target}-gprof
|
||||
%_mingw64_ld %{_mingw64_target}-ld
|
||||
@ -73,7 +74,7 @@
|
||||
%_mingw64_debug_package(n:) \
|
||||
%package %{-n:-n %{-n*}-}debug \
|
||||
Summary: Debug information for package %{name} \
|
||||
Group: Development/Debug \
|
||||
Group: Development/Sources \
|
||||
BuildArch: noarch \
|
||||
%description %{-n:-n %{-n*}-}debug \
|
||||
This package provides debug information for package %{name}.\
|
||||
@ -183,32 +184,3 @@ package or when debugging this package.\
|
||||
|
||||
# deprecated, use _mingw64_make_install (unix variant is named %make_install)
|
||||
%_mingw64_makeinstall %_mingw64_make_install
|
||||
|
||||
# internal macro used by related filesystem packages
|
||||
%__mingw64_cmake %{_mingw64_env} ; \
|
||||
cmake \\\
|
||||
-DCMAKE_SYSTEM_NAME="Windows" \\\
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \\\
|
||||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \\\
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_mingw64_prefix} \\\
|
||||
-DCMAKE_INSTALL_LIBDIR:PATH=%{_mingw64_libdir} \\\
|
||||
-DBIN_INSTALL_DIR=%{_mingw64_bindir} \\\
|
||||
-DINCLUDE_INSTALL_DIR:PATH=%{_mingw64_includedir} \\\
|
||||
-DLIB_INSTALL_DIR:PATH=%{_mingw64_libdir} \\\
|
||||
-DSHARE_INSTALL_DIR:PATH=%{_mingw64_datadir} \\\
|
||||
-DSYSCONF_INSTALL_DIR:PATH=%{_mingw64_sysconfdir} \\\
|
||||
-DSHARE_INSTALL_PREFIX:PATH=%{_mingw64_datadir} \\\
|
||||
-DBUILD_SHARED_LIBS:BOOL=ON \\\
|
||||
-DCMAKE_C_COMPILER="%{_bindir}/%{_mingw64_cc}" \\\
|
||||
-DCMAKE_CXX_COMPILER="%{_bindir}/%{_mingw64_cxx}" \\\
|
||||
-DCMAKE_RC_COMPILER="%{_bindir}/%{_mingw64_windres}" \\\
|
||||
-DCMAKE_FIND_ROOT_PATH="%{_mingw64_prefix}" \\\
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \\\
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \\\
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
|
||||
|
||||
# cmake > 3.13.1 requires setting source dir
|
||||
%_mingw64_cmake %{__mingw64_cmake} .
|
||||
|
||||
%_mingw64_cmake_install %{_mingw64_env} ; \
|
||||
make VERBOSE=1 DESTDIR=%{buildroot} install/fast
|
||||
|
31
macros.mingw64-cmake
Normal file
31
macros.mingw64-cmake
Normal file
@ -0,0 +1,31 @@
|
||||
# internal macro used by related filesystem packages
|
||||
%__mingw64_cmake %{_mingw64_env} ; \
|
||||
cmake \\\
|
||||
-DCMAKE_SYSTEM_NAME="Windows" \\\
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \\\
|
||||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \\\
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_mingw64_prefix} \\\
|
||||
-DCMAKE_INSTALL_LIBDIR:PATH=%{_mingw64_libdir} \\\
|
||||
-DBIN_INSTALL_DIR=%{_mingw64_bindir} \\\
|
||||
-DINCLUDE_INSTALL_DIR:PATH=%{_mingw64_includedir} \\\
|
||||
-DLIB_INSTALL_DIR:PATH=%{_mingw64_libdir} \\\
|
||||
-DSHARE_INSTALL_DIR:PATH=%{_mingw64_datadir} \\\
|
||||
-DSYSCONF_INSTALL_DIR:PATH=%{_mingw64_sysconfdir} \\\
|
||||
-DSHARE_INSTALL_PREFIX:PATH=%{_mingw64_datadir} \\\
|
||||
-DBUILD_SHARED_LIBS:BOOL=ON \\\
|
||||
-DCMAKE_C_COMPILER="%{_bindir}/%{_mingw64_cc}" \\\
|
||||
-DCMAKE_CXX_COMPILER="%{_bindir}/%{_mingw64_cxx}" \\\
|
||||
-DCMAKE_Fortran_COMPILER="%{_bindir}/%{_mingw64_fc}" \\\
|
||||
-DCMAKE_RC_COMPILER="%{_bindir}/%{_mingw64_windres}" \\\
|
||||
-DCMAKE_FIND_ROOT_PATH="%{_mingw64_prefix}" \\\
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \\\
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \\\
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
|
||||
|
||||
# cmake > 3.13.1 requires setting source dir
|
||||
%_mingw64_cmake %{__mingw64_cmake} .
|
||||
|
||||
%_mingw64_cmake_build %cmake_build
|
||||
|
||||
%_mingw64_cmake_install %{_mingw64_env} ; \
|
||||
make VERBOSE=1 DESTDIR=%{buildroot} install/fast
|
2
mingw64-cmake.attr
Normal file
2
mingw64-cmake.attr
Normal file
@ -0,0 +1,2 @@
|
||||
%__mingw64_cmake_provides %{_rpmconfigdir}/mingw64-cmake.prov
|
||||
%__mingw64_cmake_path ^/usr/x86_64-w64-mingw32/sys-root/mingw/lib/cmake/.*/.*(Config\.cmake|-config\.cmake)$
|
77
mingw64-cmake.prov
Normal file
77
mingw64-cmake.prov
Normal file
@ -0,0 +1,77 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- coding:utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2015 Daniel Vrátil <dvratil@redhat.com>
|
||||
#
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Library General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
import sys
|
||||
import re
|
||||
import glob
|
||||
|
||||
class CMakeParser:
|
||||
def __init__(self, filelist = None):
|
||||
if filelist == None:
|
||||
filelist = sys.stdin
|
||||
|
||||
paths = map(lambda x: x.rstrip(), filelist.readlines())
|
||||
for path in paths:
|
||||
for (modulePath, cmakeModule, lowercase) in self.parseCmakeModuleConfig(path):
|
||||
version = self.resolveCMakeModuleVersion(modulePath, cmakeModule, lowercase)
|
||||
|
||||
if version:
|
||||
print("mingw32(cmake:%s) = %s" % (cmakeModule, version))
|
||||
else:
|
||||
print("mingw32(cmake:%s)" % cmakeModule)
|
||||
|
||||
def parseCmakeModuleConfig(self, configFile):
|
||||
paths = configFile.rsplit("/", 3)
|
||||
|
||||
modulePath = "%s/cmake/%s" % (paths[0], paths[2])
|
||||
|
||||
result = []
|
||||
for configFile in glob.glob("%s/*Config.cmake" % modulePath):
|
||||
moduleName = configFile[len(modulePath) + 1:-len("Config.cmake")]
|
||||
result.append( (modulePath, moduleName, False) )
|
||||
|
||||
for configFile in glob.glob("%s/*-config.cmake" % modulePath):
|
||||
moduleName = configFile[len(modulePath) + 1:-len("-config.cmake")]
|
||||
if (modulePath, moduleName, False) not in result:
|
||||
result.append( (modulePath, moduleName, True) )
|
||||
|
||||
return result
|
||||
|
||||
def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase):
|
||||
versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule)
|
||||
try:
|
||||
f = open(versionFile, 'r')
|
||||
except:
|
||||
return None
|
||||
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
|
||||
# set(PACKAGE_VERSION <version>)
|
||||
version = re.match(r"^set[\ ]*\([\ ]*PACKAGE_VERSION[\ ]+[\"]*([0-9\.]+)[\"]*[\ ]*[.]*\)", line)
|
||||
if version:
|
||||
return version.groups(1)[0]
|
||||
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = CMakeParser()
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 20 12:06:28 UTC 2020 - Ralf Habacker <ralf.habacker@freenet.de>
|
||||
|
||||
- Add missing Fortran case into macros.mingw64* (boo#1173990)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Aug 16 04:26:24 UTC 2020 - Ralf Habacker <ralf.habacker@freenet.de>
|
||||
|
||||
- Fix warning about non standard group (boo#1173189)
|
||||
- Make cmake package support to be more in sync with native package
|
||||
* Add mingw64-cmake.prov and mingw64-cmake.attr ported from native
|
||||
cmake package to support generating mingw64(cmake:xxx) dependencies
|
||||
required by newer KDE Frameworks 5 and other packages.
|
||||
* Move out cmake related macros from macros.mingw64 into macros.mingw64-cmake
|
||||
* Define macro _mingw64_cmake_build
|
||||
* Fix deprecated call to %make_jobs
|
||||
CMake support may be better located in a package named mingw64-cross-cmake
|
||||
but need to be used here until the deprecated dependency generator provided
|
||||
by this package is converted to sets of *.attr/*.prov files.
|
||||
- Add additional man languages 'id' and 'uk' used by KDE Frameworks5 packages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 19 17:39:26 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package mingw64-filesystem
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,18 +12,18 @@
|
||||
# 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/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define debug_package %{nil}
|
||||
Name: mingw64-filesystem
|
||||
Version: 20191217
|
||||
Version: 20200816
|
||||
Release: 0
|
||||
Summary: MinGW base filesystem and environment
|
||||
License: GPL-2.0+
|
||||
License: GPL-2.0-or-later
|
||||
Group: Development/Libraries
|
||||
Url: http://hg.et.redhat.com/misc/fedora-mingw--devel/
|
||||
URL: http://hg.et.redhat.com/misc/fedora-mingw--devel/
|
||||
Source0: COPYING
|
||||
Source1: macros.mingw64
|
||||
Source2: mingw64.sh
|
||||
@ -36,6 +36,9 @@ Source8: mingw64-install-post.sh
|
||||
Source9: mingw64-find-lang.sh
|
||||
Source10: languages
|
||||
Source11: languages.man
|
||||
Source12: mingw64-cmake.prov
|
||||
Source13: mingw64-cmake.attr
|
||||
Source14: macros.mingw64-cmake
|
||||
Provides: mingw64(dbghelp.dll)
|
||||
Provides: mingw64(mpr.dll)
|
||||
Provides: mingw64(odbccp32.dll)
|
||||
@ -48,6 +51,7 @@ Provides: mingw64(d2d1.dll)
|
||||
Provides: mingw64(d3d11.dll)
|
||||
Provides: mingw64(dwrite.dll)
|
||||
Requires: mingw64-cross-breakpad-tools
|
||||
Requires: python3
|
||||
Requires: rpm
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
@ -87,6 +91,7 @@ install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
||||
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.mingw64
|
||||
install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/rpm/macros.mingw64-cmake
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rpmlint
|
||||
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/rpmlint/
|
||||
@ -138,6 +143,12 @@ install -m 0755 %{SOURCE5} %{buildroot}%{_libexecdir}/rpm
|
||||
install -m 0755 %{SOURCE8} %{buildroot}%{_libexecdir}/rpm
|
||||
install -m 0755 %{SOURCE9} %{buildroot}%{_libexecdir}/rpm
|
||||
|
||||
# cmake support
|
||||
mkdir -p %{buildroot}%{_libexecdir}/rpm
|
||||
install -m 0755 %{SOURCE12} %{buildroot}%{_libexecdir}/rpm
|
||||
mkdir -p %{buildroot}%{_libexecdir}/rpm/fileattrs
|
||||
install -m 0755 %{SOURCE13} %{buildroot}%{_libexecdir}/rpm/fileattrs
|
||||
|
||||
# Create the locale directories:
|
||||
while read LANG ; do
|
||||
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/locale/$LANG/LC_MESSAGES
|
||||
@ -155,8 +166,11 @@ done < %{SOURCE11}
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING
|
||||
%config %{_sysconfdir}/rpm/macros.mingw64
|
||||
%config %{_sysconfdir}/rpm/macros.mingw64-cmake
|
||||
%config %{_sysconfdir}/profile.d/mingw64.sh
|
||||
%config %{_sysconfdir}/rpmlint/mingw64-rpmlint.config
|
||||
%config %{_libexecdir}/rpm/mingw64-cmake.prov
|
||||
%config %{_libexecdir}/rpm/fileattrs/mingw64-cmake.attr
|
||||
%{_bindir}/mingw64-*
|
||||
%{_libexecdir}/mingw64-scripts
|
||||
%{_prefix}/x86_64-w64-mingw32/
|
||||
|
@ -17,6 +17,7 @@ sed "s/['\"]/\\\&/g" >"$filelist"
|
||||
dlls=$(grep '\.dll$' "$filelist")
|
||||
pcs=$(grep '\.pc$' "$filelist")
|
||||
libs=$(grep '\.a$' "$filelist")
|
||||
cmakes=$(grep '[cC]onfig.cmake$' "$filelist")
|
||||
|
||||
for f in $dlls; do
|
||||
[ ! -f "$f" ] && continue
|
||||
@ -35,4 +36,9 @@ for h in $libs; do
|
||||
echo "$target(lib:$libname)"
|
||||
done
|
||||
|
||||
for h in $cmakes; do
|
||||
[ ! -f "$h" ] && continue
|
||||
echo $h | /usr/lib/rpm/mingw64-cmake.prov
|
||||
done
|
||||
|
||||
rm "$filelist"
|
||||
|
Loading…
x
Reference in New Issue
Block a user