From f74a57f3b2ffcc46ab4865dc9e186987ddc102c8e1d5d189f55818b6f1ae4bd2 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 16 Dec 2009 10:46:30 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=17 --- mingw64-filesystem.spec | 39 +-------------------------------------- mingw64-find-requires.sh | 40 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 41 deletions(-) diff --git a/mingw64-filesystem.spec b/mingw64-filesystem.spec index 7f661ba..d52f418 100644 --- a/mingw64-filesystem.spec +++ b/mingw64-filesystem.spec @@ -24,47 +24,10 @@ Source8: mingw64-install-post.sh Requires: rpm #!BuildIgnore: post-build-checks -# Note about 'Provides: mingw64(foo.dll)' -# ------------------------------------------------------------ -# -# We want to be able to build & install mingw64 libraries without -# necessarily needing to install wine. (And certainly not needing to -# install Windows!) There is no requirement to have wine installed in -# order to use the mingw toolchain to develop software (ie. to -# compile more stuff on top of it), so why require that? -# -# So for expediency, this base package provides the "missing" DLLs -# from Windows. Another way to do it would be to exclude these -# proprietary DLLs in our find-requires checking script - essentially -# it comes out the same either way. -# -Provides: mingw64(advapi32.dll) -Provides: mingw64(comctl32.dll) -Provides: mingw64(comdlg32.dll) -Provides: mingw64(dnsapi.dll) -Provides: mingw64(gdi32.dll) -Provides: mingw64(glu32.dll) -Provides: mingw64(glut32.dll) -Provides: mingw64(imm32.dll) -Provides: mingw64(kernel32.dll) -Provides: mingw64(mscms.dll) -Provides: mingw64(mscoree.dll) -Provides: mingw64(msimg32.dll) -Provides: mingw64(msvcrt.dll) -Provides: mingw64(mswsock.dll) -Provides: mingw64(ole32.dll) -Provides: mingw64(oleaut32.dll) -Provides: mingw64(opengl32.dll) -Provides: mingw64(shell32.dll) -Provides: mingw64(shlwapi.dll) -Provides: mingw64(user32.dll) -Provides: mingw64(winmm.dll) -Provides: mingw64(wldap32.dll) -Provides: mingw64(ws2_32.dll) %description This package contains the base filesystem layout, RPM macros and -environment for all Fedora MinGW packages. +environment for all MinGW packages. This environment is maintained by the Fedora MinGW SIG at: diff --git a/mingw64-find-requires.sh b/mingw64-find-requires.sh index 3f92e87..2de3a4e 100644 --- a/mingw64-find-requires.sh +++ b/mingw64-find-requires.sh @@ -14,13 +14,47 @@ fi filelist=`sed "s/['\"]/\\\&/g"` -# Everything requires mingw64-filesystem of at least the current version. -echo 'mingw64-filesystem >= @VERSION@' +dlls_to_exclude=" + advapi32.dll + comctl32.dll + comdlg32.dll + dnsapi.dll + gdi32.dll + glu32.dll + glut32.dll + imm32.dll + kernel32.dll + mscms.dll + mscoree.dll + msimg32.dll + msvcrt.dll + mswsock.dll + ole32.dll + oleaut32.dll + opengl32.dll + shell32.dll + shlwapi.dll + user32.dll + winmm.dll + wldap32.dll + ws2_32.dll +" + +exclude_pattern="" +for i in $dlls_to_exclude; do + if test "$exclude_pattern" == ""; then + exclude_pattern=$i; + else + exclude_pattern=$exclude_pattern"|"$i; + fi +done + dlls=$(echo $filelist | tr [:blank:] '\n' | grep -Ei '\.(dll|exe)$') for f in $dlls; do $OBJDUMP -p $f | grep 'DLL Name' | tr [:upper:] [:lower:] | grep -Eo '[-._\+[:alnum:]]+\.dll' | - sed 's/\(.*\)/mingw64(\1)/' + grep -Ev "$exclude_pattern" | + sed 's/\(.*\)/mingw64(\1)/' done | sort -u