Accepting request 511456 from home:rhabacker:branches:windows:mingw:win64

- fix errors in mingw64-find-lang.sh
- add missing pathes to path layout
- add macro _mingw64_cmake_install
- add sources to <packages>-debug packages to support source level debugging to gdb
- disabled native debuginfo/debugsource which confuses more than it does helps 
- fix language (forgot this fix to keep in sync with mingw32)

OBS-URL: https://build.opensuse.org/request/show/511456
OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=98
This commit is contained in:
Fridrich Strba 2017-07-20 11:19:10 +00:00 committed by Git OBS Bridge
parent 0b639864e5
commit 82ef15158a
5 changed files with 79 additions and 12 deletions

View File

@ -112,7 +112,7 @@ sq
sr sr
sr@ije sr@ije
sr@ijekavian sr@ijekavian
sr@ijekavianlatin sr@ijekavianlatin1
sr@latin sr@latin
sv sv
ta ta

View File

@ -61,9 +61,12 @@
%_mingw64_find_lang /usr/lib/rpm/mingw64-find-lang.sh %{buildroot} %_mingw64_find_lang /usr/lib/rpm/mingw64-find-lang.sh %{buildroot}
%_mingw64_debug_install_post \ %_mingw64_debug_install_post \
/usr/lib/rpm/mingw64-find-debuginfo.sh %{_builddir}\ /usr/lib/rpm/mingw64-find-debuginfo.sh %{_builddir} 1\
%{nil} %{nil}
# disable default debug package
%debug_package %{nil}
# Template for debug sub-package. # Template for debug sub-package.
%_mingw64_debug_package(n:) \ %_mingw64_debug_package(n:) \
%package %{-n:-n %{-n*}-}debug \ %package %{-n:-n %{-n*}-}debug \
@ -74,9 +77,9 @@ BuildArch: noarch \
This package provides debug information for package %{name}.\ This package provides debug information for package %{name}.\
Debug information is useful when developing applications that use this\ Debug information is useful when developing applications that use this\
package or when debugging this package.\ package or when debugging this package.\
%files %{-n:-n %{-n*}-}debug -f %_builddir/mingw64-debugfiles.list\ %files %{-n:-n %{-n*}-}debug -f %{_builddir}/mingw64-debugfiles.list\
%defattr(-,root,root)\ %defattr(-,root,root)\
%{nil}
%_mingw64_env HOST_CC=gcc; export HOST_CC; \ %_mingw64_env HOST_CC=gcc; export HOST_CC; \
PKG_CONFIG_PATH="%{_mingw64_libdir}/pkgconfig:%{_mingw64_datadir}/pkgconfig"; export PKG_CONFIG_PATH; \ PKG_CONFIG_PATH="%{_mingw64_libdir}/pkgconfig:%{_mingw64_datadir}/pkgconfig"; export PKG_CONFIG_PATH; \
@ -196,3 +199,5 @@ package or when debugging this package.\
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \\\ -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \\\
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
%_mingw64_cmake_install %{_mingw64_env} ; \
make VERBOSE=1 DESTDIR=%{buildroot} install/fast

View File

@ -18,7 +18,7 @@
%define debug_package %{nil} %define debug_package %{nil}
Name: mingw64-filesystem Name: mingw64-filesystem
Version: 20150401 Version: 20170717
Release: 0 Release: 0
Summary: MinGW base filesystem and environment Summary: MinGW base filesystem and environment
License: GPL-2.0+ License: GPL-2.0+
@ -39,6 +39,7 @@ Source11: languages.man
Provides: mingw64(dbghelp.dll) Provides: mingw64(dbghelp.dll)
Provides: mingw64(mpr.dll) Provides: mingw64(mpr.dll)
Provides: mingw64(userenv.dll) Provides: mingw64(userenv.dll)
Provides: mingw64(uxtheme.dll)
Requires: mingw64-cross-breakpad-tools Requires: mingw64-cross-breakpad-tools
Requires: rpm Requires: rpm
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -98,10 +99,11 @@ mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/bin
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/include mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/include
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/include/sys mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/include/sys
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib/cmake
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/aclocal mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/aclocal
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/var mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/var
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw%{_localstatedir}/lib mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw%{_localstatedir}/lib
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw%{_localstatedir}/lib/rpm-state mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw%{_localstatedir}/lib/rpm-state
@ -138,7 +140,7 @@ done < %{SOURCE10}
while read LANG ; do while read LANG ; do
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man/$LANG mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man/$LANG
for sec in 1 2 3 4 5 6 7 8 9 n; do for sec in 1 2 3 4 5 6 7 8 9 n; do
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man/$LANG/man$sec mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man/$LANG/man$sec
done done
done < %{SOURCE11} done < %{SOURCE11}
@ -152,5 +154,6 @@ done < %{SOURCE11}
%{_libexecdir}/mingw64-scripts %{_libexecdir}/mingw64-scripts
%{_prefix}/x86_64-w64-mingw32/ %{_prefix}/x86_64-w64-mingw32/
%{_libexecdir}/rpm/mingw64-* %{_libexecdir}/rpm/mingw64-*
%dir %{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib/cmake
%changelog %changelog

View File

@ -9,7 +9,23 @@ if [ -n "$1" ]; then
BUILDDIR="$1" BUILDDIR="$1"
fi fi
SYMBOL_DIR="/usr/$host/sys-root/mingw/symbols" # generate separate debuginfo and debugsource or single debug package combining both
if [ -n "$2" ]; then
SINGLE_DEBUG_PACKAGE=1
else
SINGLE_DEBUG_PACKAGE=0
fi
SOURCEFILE="$BUILDDIR/$target-debugsources.list"
> "$SOURCEFILE"
> $SOURCEFILE.tmp
srcdir=`realpath $PWD`
ROOT_DIR="/usr/$host/sys-root/mingw"
SYMBOL_DIR="${ROOT_DIR}/symbols"
SOURCE_DIR="${ROOT_DIR}/src"
DEBUGSOURCE_DIR="${SOURCE_DIR}/debug"
for f in `find $RPM_BUILD_ROOT -type f -name "*.exe" -or -name "*.dll"` for f in `find $RPM_BUILD_ROOT -type f -name "*.exe" -or -name "*.dll"`
do do
@ -26,7 +42,13 @@ do
echo extracting debug info from $f echo extracting debug info from $f
# breakpad symbols # breakpad symbols
"$host-gen_sym_files" "$f" "$RPM_BUILD_ROOT$SYMBOL_DIR" symfile=`"$host-gen_sym_files" "$f" "$RPM_BUILD_ROOT$SYMBOL_DIR"`
echo $symfile
# grep all listed source files belonging to this package into temporary source file list
cat $symfile | grep "FILE" | cut -d' ' -f3 | grep $srcdir >> $SOURCEFILE.tmp
# remap file path in symbol file to src debug location
# we remap all files to make finding src files from other packages possible
sed -i "s,$BUILDDIR,$DEBUGSOURCE_DIR,g" $symfile
"$host-objcopy" --only-keep-debug "$f" "$f.debug" || : "$host-objcopy" --only-keep-debug "$f" "$f.debug" || :
pushd `dirname $f` pushd `dirname $f`
@ -47,3 +69,40 @@ find $RPM_BUILD_ROOT -type f \
if [ -e "$RPM_BUILD_ROOT/$SYMBOL_DIR" ]; then if [ -e "$RPM_BUILD_ROOT/$SYMBOL_DIR" ]; then
echo "$SYMBOL_DIR" >>"$BUILDDIR/$target-debugfiles.list" echo "$SYMBOL_DIR" >>"$BUILDDIR/$target-debugfiles.list"
fi fi
echo creating debugsource file structure
destdir=${RPM_BUILD_ROOT}${DEBUGSOURCE_DIR}
if [ ! -e "$destdir" ]; then
mkdir -p "$destdir"
fi
for f in `cat $SOURCEFILE.tmp | sort | uniq`
do
if ! test -f "$f"; then
echo "excluded not present file '$f"
continue
fi
o=`echo $f | sed "s,$BUILDDIR,$destdir,g"`
p=`dirname $o`
if [ ! -e "$p" ]; then
mkdir -p "$p"
fi
echo copying $f to $o
cp $f $o
# create debugsource.list
# we do not add each single file, see below
# echo $o | sed "s,${RPM_BUILD_ROOT},,g" >> $SOURCEFILE
done
rm $SOURCEFILE.tmp
# add package source directory to list of files
if [ -e "$RPM_BUILD_ROOT/$DEBUGSOURCE_DIR" ]; then
echo "%dir $SOURCE_DIR" >> $SOURCEFILE
echo "$DEBUGSOURCE_DIR" >> $SOURCEFILE
fi
if test "$SINGLE_DEBUG_PACKAGE" -eq 1; then
cat $SOURCEFILE >> $BUILDDIR/$target-debugfiles.list
rm $SOURCEFILE*
fi

View File

@ -12,7 +12,7 @@
#work based on this file. #work based on this file.
# 2015-07-03 Ralf Habacker <ralf.habacker@freenet.de> # 2015-07-03 Ralf Habacker <ralf.habacker@freenet.de>
# * adapted to mingw32 # * adapted to mingw64
# 2004-06-20 Arkadiusz Miśkiewicz <arekm@pld-linux.org> # 2004-06-20 Arkadiusz Miśkiewicz <arekm@pld-linux.org>
# * merge PLD changes, kde, all-name (mkochano,pascalek@PLD) # * merge PLD changes, kde, all-name (mkochano,pascalek@PLD)
# 1999-10-19 Artur Frysiak <wiget@pld-linux.org> # 1999-10-19 Artur Frysiak <wiget@pld-linux.org>
@ -125,7 +125,7 @@ rm -f $MO_NAME_NEW
# remove languages we do not yet support - but give out statistics # remove languages we do not yet support - but give out statistics
find "$TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/" -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/'::; /^$/d' | while read dir; do find "$TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/" -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/'::; /^$/d' | while read dir; do
if ! rpm -ql mingw32-filesystem | egrep -q "/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/$dir"$; then if ! rpm -ql mingw64-filesystem | egrep -q "/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/$dir"$; then
find $TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/$dir -name *.mo | sed 's:'"$TOP_DIR"'::' | while read file; do find $TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/$dir -name *.mo | sed 's:'"$TOP_DIR"'::' | while read file; do
echo -n "removing translation $file: " echo -n "removing translation $file: "
msgunfmt "$TOP_DIR/$file" | msgfmt --statistics -o /dev/null - msgunfmt "$TOP_DIR/$file" | msgfmt --statistics -o /dev/null -
@ -134,7 +134,7 @@ find "$TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/" -maxdepth 1
fi fi
done done
find $TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/help/ -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/x86_64-w64-mingw32/sys-root/mingw/share/help/'::; /^$/d' | while read dir; do find $TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/help/ -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/x86_64-w64-mingw32/sys-root/mingw/share/help/'::; /^$/d' | while read dir; do
if ! rpm -ql mingw32-filesystem | egrep -q "/share/help/$dir"$; then if ! rpm -ql mingw64-filesystem | egrep -q "/share/help/$dir"$; then
echo "removing help translation /share/help/$dir" echo "removing help translation /share/help/$dir"
rm -rf $TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/help/$dir rm -rf $TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/help/$dir
fi fi