- Update to 20220805 - Fix for generating the source file list for the debug package (boo#1201107). * Added the script 'mingw-objdump-srcfiles' to determine the source files used by the package in question. * The gawk script is based on a perl script from jengelh, which was not adopted due to an additional runtime dependency. * With this change, *.sym files are no longer included in generated debug packages. * The now obsolete runtime dependency to mingw64-cross-breakpad-tools has been removed - Exclude 'mlang.dll' from automatic runtime library detection required for win_iconv package - Fix spelling in *.changes - Add 'arch-independent-package-contains-binary-or-object' filter also for static libraries (boo#1201173) - When scanning libraries exclude non real dll file names e.g. '%s.dll' - Add missing runtime dependencies (boo#1188144) - Use newer $host-pkgconf - Fix using undefined STRINGS env variable - Update to 20220801 - Fetch real used shared library name from import libraries to avoid file name generation errors, for example with mingw64-glib2 - Scan all archives for shared library names as packages may not use the default import library extension - Fix finding qm files for KDE Frameworks >= 5.76 (taken from rpm-4.14.1) - Update to 20220620 - Add more provides required by libqt5 related packages - Add optional support for excluding runtime DLL dependencies to avoid rebuilding the whole project, see macro %_mingw64_find_requires_exclude in macros.mingw64 for details - Update to 20220524 - On finding provides and requirements do not generate temporary files in the global temporary directory (boo#1182356) - Add optional support to add runtime dependencies for import libraries, see macros.mingw64 for details (boo#1194430) - Fix warning 'file format not recognized' in mingw64-find-requires.sh when parsing xxx-config files - Change all version comparisons for Tumbleweed to >= 1550 (instead of == 1550). Anything in Tumbleweed counts for current Tumbleweed plus future CODE branches. Additionally, the Tumbleweed suse_version code is not chiseled in stone. - Fix install path and file format for global rpmlint config file on openSUSE_Tumbleweed (bug boo#1190304, boo#1190438) - Use rpmlint-mini also on Leap 15.x to fix the conflict breakage - Be more verbose when version in generated xxxConfigVersion.cmake files is empty (see https://build.opensuse.org/request/show/915515) - Sync with mingw32 variant - Force rpmlint use and avoid using of rpmlint-mini - Add provides for bcrypt.dll required by mingw64-gdb 10.2 - Add provides for ncrypt.dll required by mingw64-gnutls clients - Move RPM macros to %_rpmmacrodir (boo#1185671) - Move profile.d entries to %_distconfdir - Use %_fileattrsdir macro - Update to 20201105 - Add macro _mingw64_create_macro_links - Add macro _mingw64_gdb and command line wrapper /usr/bin/mingw64-gdb - In mingw64-scripts support rpm macro processing to https://rpm.org/user_doc/macros.htm - Add macro _mingw64_gdb and command line wrapper /usr/bin/mingw64-gdb - Update to 20201017 - Fix bug not keeping quotes in bash arguments provided to mingw64-scripts.sh which is for example required to specify a different cmake generator - Fix architecture in generating cmake provides - Update to 20200825 - Fix * W: non-etc-or-var-file-marked-as-conffile /usr/libexec/rpm/fileattrs/mingw64-cmake.attr * W: non-etc-or-var-file-marked-as-conffile /usr/libexec/rpm/mingw64-cmake.prov * W: script-without-shebang /usr/libexec/rpm/fileattrs/mingw64-cmake.attr * W: non-standard-group Development/Libraries * installing mingw64-scripts on Tumbleweed * not using present rpmlint config for building this package - 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 - Process debuginfo in a reproducible way (boo#1041090) - Revert -lssp - Add -lssp to the link flags, otherwise building of some packages (like mingw64-cairo) will be aborted with the error 'undefined reference to `__memcpy_chk`'. This library seems not be added by gcc 9.2 automatically. - add macro _mingw64_ldflags_bootstrap for bootstrap packages - Add -fstack-protector to LDFLAGS - disable default debug package only if the mingw debug macro is used - inital package for Factory submission OBS-URL: https://build.opensuse.org/request/show/993386 OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=143
158 lines
3.1 KiB
Bash
158 lines
3.1 KiB
Bash
#!/bin/bash
|
|
|
|
# This script reads filenames from STDIN and outputs any relevant provides
|
|
# information that needs to be included in the package.
|
|
target="mingw64"
|
|
host="x86_64-w64-mingw32"
|
|
|
|
scan_implibs=
|
|
if [ "$1" = "--scan-implibs" ]; then
|
|
scan_implibs=1
|
|
shift
|
|
fi
|
|
|
|
libs_to_exclude=
|
|
if [ "$1" = "--exclude" ]; then
|
|
shift
|
|
libs_to_exclude="$1"
|
|
shift
|
|
fi
|
|
|
|
if [ -n "$1" ]; then
|
|
package_name="$1"
|
|
fi
|
|
|
|
[ -z "$OBJDUMP" ] && OBJDUMP="$host-objdump"
|
|
[ -z "$STRINGS" ] && STRINGS="$host-strings"
|
|
|
|
# Get the list of files.
|
|
|
|
filelist=`sed "s/['\"]/\\\&/g"`
|
|
|
|
libs_to_exclude+="
|
|
advapi32
|
|
bcrypt
|
|
cfgmgr32
|
|
comctl32
|
|
comdlg32
|
|
crypt32
|
|
d2d1
|
|
d3d11
|
|
d3d12
|
|
d3d8
|
|
d3d9
|
|
dbghelp
|
|
dcomp
|
|
ddraw
|
|
dnsapi
|
|
dsound
|
|
dwmapi
|
|
dwrite
|
|
dxgi
|
|
dxva2
|
|
evr
|
|
gdi32
|
|
gdiplus
|
|
glu32
|
|
glut32
|
|
imm32
|
|
iphlpapi
|
|
kernel32
|
|
ksuser
|
|
mf
|
|
mfplat
|
|
mlang
|
|
mpr
|
|
mpr
|
|
mscms
|
|
mscoree
|
|
msimg32
|
|
msvcr71
|
|
msvcr80
|
|
msvcr90
|
|
msvcrt
|
|
mswsock
|
|
ncrypt
|
|
netapi32
|
|
odbc32
|
|
odbccp32
|
|
ole32
|
|
oleacc
|
|
oleaut32
|
|
opengl32
|
|
psapi
|
|
rpcrt4
|
|
secur32
|
|
setupapi
|
|
shell32
|
|
shlwapi
|
|
user32
|
|
userenv
|
|
usp10
|
|
uxtheme
|
|
version
|
|
winhttp
|
|
wininet
|
|
winmm
|
|
wldap32
|
|
ws2_32
|
|
wsock32
|
|
wtsapi32
|
|
"
|
|
|
|
exclude_pattern=""
|
|
for i in $libs_to_exclude; do
|
|
if [ -z "$exclude_pattern" ]; then
|
|
exclude_pattern="$i"
|
|
else
|
|
exclude_pattern="$exclude_pattern|$i"
|
|
fi
|
|
done
|
|
|
|
|
|
dlls=$(echo "$filelist" | grep -v 'config$' | xargs file | grep executable | sed 's,:.*$,,g')
|
|
pcs=$(echo "$filelist" | grep '\.pc$')
|
|
configs=$(echo "$filelist" | grep 'config$')
|
|
|
|
for f in $dlls; do
|
|
[ ! -f "$f" ] && continue
|
|
"$OBJDUMP" -p "$f" | grep 'DLL Name' | tr "[:upper:]" "[:lower:]" |
|
|
grep -Eo '[-._\+[:alnum:]]+\.dll' |
|
|
grep -Ev "$exclude_pattern" |
|
|
sed 's/\(.*\)/'"$target"'(\1)/'
|
|
done | sort -u
|
|
|
|
# scan import libraries - all archive files are scanned, not only
|
|
# '.dll.a' as some packages do not use the standard extension
|
|
# for import libraries
|
|
if [ -n "$scan_implibs" ]; then
|
|
implibs=$(echo "$filelist" | grep '\.a$')
|
|
for f in $implibs; do
|
|
[ ! -f "$f" ] && continue
|
|
"$STRINGS" "$f" | grep '\.dll$' | grep -v '[%$&#]' |
|
|
tr "[:upper:]" "[:lower:]" |
|
|
grep -Ev "$exclude_pattern" |
|
|
sed 's/\(.*\)/'"$target"'(\1)/'
|
|
done | sort -u
|
|
fi
|
|
|
|
(
|
|
for g in $pcs; do
|
|
dirname="${g%/*}"
|
|
PKG_CONFIG_PATH="$dirname" "$host-pkgconf" --print-errors --print-requires "$g" | awk '{ print "'"$target"'(pkg:"$1")", $2, $3 }'
|
|
PKG_CONFIG_PATH="$dirname" "$host-pkgconf" --print-errors --print-requires-private "$g" | grep -Ev "$exclude_pattern" | awk '{ print "'"$target"'(pkg:"$1")", $2, $3 }'
|
|
for h in $(PKG_CONFIG_PATH="$dirname" "$host-pkgconf" --libs-only-l "$g" | sed 's#^\-l##g;s# \-l# #g'); do
|
|
echo "$target(lib:$h)"
|
|
done
|
|
done
|
|
for k in $configs; do
|
|
for j in $(PKG_CONFIG="$host-pkgconf" "$k" --libs); do
|
|
case "$j" in
|
|
-l*)
|
|
echo "$j" | sed 's#\-l##g' | grep -Ev "$exclude_pattern" | awk '{ print "'"$target"'(lib:"$1")" }'
|
|
;;
|
|
esac
|
|
done
|
|
done
|
|
) | sort -u
|