Accepting request 1191239 from home:rhabacker:branches:windows:mingw:win64:KF5103

- Update version to 20240801
- Add missing man language ca@valencia required by KDE Frameworks 5.103

OBS-URL: https://build.opensuse.org/request/show/1191239
OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=163
This commit is contained in:
Ralf Habacker 2024-08-03 06:29:35 +00:00 committed by Git OBS Bridge
commit 5b4ffe767f
22 changed files with 2028 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

339
COPYING Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU 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 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.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

131
languages Normal file
View File

@ -0,0 +1,131 @@
ar
as
ast
be
be@latin
bg
bn
bn_IN
bs
ca
ca@valencia
cs
cs_CZ
da
de
de_AT
de_CH
de_DE
dz
el
el_GR
en
en@IPA
en@boldquot
en@quot
en@shaw
en_AU
en_CA
en_GB
en_NZ
en_US
eo
es
es_AR
es_CL
es_CO
es_CR
es_DO
es_EC
es_ES
es_GT
es_HN
es_MX
es_NI
es_PA
es_PE
es_PR
es_SV
es_UY
es_VE
et
et_EE
eu
fa
fi
fi_FI
fr
fr_CA
fr_CH
fr_FR
ga
gl
gu
he
hi
hr
hu
ia
id
is
it
it_CH
it_IT
ja
ja_JP.EUC
ja_JP.SJIS
ja_JP.eucJP
kk
km
kn
ko
lt
lv
mai
mk
ml
mr
nb
nb_NO
nds
nds_DE
ne
nl
nl_BE
nn
nn_NO
or
pa
pl
pl_PL
pt
pt_BR
pt_PT
ro
ru
ru_RU
ru_UA.koi8u
sk
sl
sl_SI
sq
sr
sr@ije
sr@ijekavian
sr@ijekavianlatin1
sr@latin
sv
ta
te
th
tr
tr_TR
ug
uk
uk_UA
vi
wa
zh
zh_CN
zh_HK
zh_TW

24
languages.man Normal file
View File

@ -0,0 +1,24 @@
ca
ca@valencia
cs
da
de
el
eo
es
fr
hu
id
it
ja
nl
pl
pt
pt_BR
ru
sk
sv
uk
zh
zh_CN
zh_TW

229
macros.mingw64 Normal file
View File

@ -0,0 +1,229 @@
%_mingw64_cpu x86_64
%_mingw64_vendor w64
%_mingw64_os mingw32
%_mingw64_target %{_mingw64_cpu}-%{_mingw64_vendor}-%{_mingw64_os}
# Paths.
%_mingw64_sysroot %{_prefix}/%{_mingw64_target}/sys-root
%_mingw64_prefix %{_mingw64_sysroot}/mingw
%_mingw64_exec_prefix %{_mingw64_prefix}
%_mingw64_bindir %{_mingw64_exec_prefix}/bin
%_mingw64_sbindir %{_mingw64_exec_prefix}/sbin
%_mingw64_libexecdir %{_mingw64_exec_prefix}/libexec
%_mingw64_libdir %{_mingw64_exec_prefix}/lib
%_mingw64_datadir %{_mingw64_prefix}/share
%_mingw64_docdir %{_mingw64_prefix}/share/doc
%_mingw64_infodir %{_mingw64_prefix}/share/info
%_mingw64_mandir %{_mingw64_prefix}/share/man
%_mingw64_sysconfdir %{_mingw64_prefix}/etc
%_mingw64_sharedstatedir %{_mingw64_prefix}/com
%_mingw64_localstatedir %{_mingw64_prefix}/var
%_mingw64_includedir %{_mingw64_prefix}/include
# Build macros.
%_mingw64_host %{_mingw64_target}
%_mingw64_cflags -O2 -g -pipe -Wall -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
%_mingw64_cxxflags %{_mingw64_cflags}
%_mingw64_ldflags_base -Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a -Wl,--no-keep-memory
# for bootstrap packages
%_mingw64_ldflags_bootstrap %{_mingw64_ldflags_base}
# for normal packages
%_mingw64_ldflags %{_mingw64_ldflags_base} -fstack-protector
%_mingw64_classpath %{_mingw64_datadir}/java/libgcj.jar:%{_mingw64_datadir}/java/libgcj-tools.jar
%_mingw64_cc %{_mingw64_target}-gcc
%_mingw64_cxx %{_mingw64_target}-g++
%_mingw64_cpp %{_mingw64_target}-gcc -E
%_mingw64_addr2line %{_mingw64_target}-addr2line
%_mingw64_ar %{_mingw64_target}-ar
%_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
%_mingw64_nm %{_mingw64_target}-nm
%_mingw64_objcopy %{_mingw64_target}-objcopy
%_mingw64_objdump %{_mingw64_target}-objdump
%_mingw64_ranlib %{_mingw64_target}-ranlib
%_mingw64_readelf %{_mingw64_target}-readelf
%_mingw64_size %{_mingw64_target}-size
%_mingw64_strings %{_mingw64_target}-strings
%_mingw64_strip %{_mingw64_target}-strip
%_mingw64_windmc %{_mingw64_target}-windmc
%_mingw64_windres %{_mingw64_target}-windres
%_mingw64_gcj %{_mingw64_target}-gcj
%_mingw64_cache mingw64-config.cache
#
# Experimental import library scanning support:
#
# To provide project wide import library scanning add this to project config
# Macros:
# %_mingw64_find_requires_scan_implibs 1
# :Macros
# for a single package add
# %global _mingw64_find_requires_scan_implibs 1
# to the related spec file
#
#
# Support to exclude shared libraries from generating runtime dependencies
#
# To exclude project wide shared library requirements add this to project config
# Macros:
# %_mingw64_find_requires_exclude d3d12 ... [%{nil}]
# :Macros
# for a single package add
# %global _mingw64_find_requires_exclude d3d12 ... [%{nil}]
# to the related spec file
#
# see mingw64_*.attr for details
#
# setup rpmbuild hooks
#
%_mingw64_install_post /usr/lib/rpm/mingw64-install-post.sh
%_mingw64_find_lang /usr/lib/rpm/mingw64-find-lang.sh %{buildroot}
%_mingw64_debug_install_post \
/usr/lib/rpm/mingw64-find-debuginfo.sh %{_builddir} 1\
%{nil}
# Template for combined debuginfo and debugsource sub-package.
%_mingw64_debug_package(n:) \
%package %{-n:-n %{-n*}-}debug \
Summary: Debug information for package %{name} \
Group: Development/Sources \
BuildArch: noarch \
%description %{-n:-n %{-n*}-}debug \
This package provides debug information for package %{name}.\
Debug information is useful when developing applications that use this\
package or when debugging this package.\
%files %{-n:-n %{-n*}-}debug -f %{_builddir}/mingw64-debugfiles.list\
%defattr(-,root,root)\
%{nil}
#
# create shell wrapper for associated rpm macro
#
# The shell wrapper makes a macro defined in a mingw64 macro file
# (e.g. /etc/rpm/macros.mingw64) accessible to a shell for example
# the rpm macro '%_mingw64_gdb' is available on a shell as executable file
# 'mingw64-gdb'
#
%_mingw64_create_macro_links() \
mkdir -p %{buildroot}%{_bindir}; \
pushd %{buildroot}%{_bindir}; \
for i in %*; do \
ln -s %{_libexecdir}/mingw64-scripts $i; \
done; \
popd \
%{nil}
%_mingw64_env HOST_CC=gcc; export HOST_CC; \
PKG_CONFIG_PATH="%{_mingw64_libdir}/pkgconfig:%{_mingw64_datadir}/pkgconfig"; export PKG_CONFIG_PATH; \
CLASSPATH="$CLASSPATH:${MINGW64_CLASSPATH:-%_mingw64_classpath}"; export CLASSPATH; \
_PREFIX="%{_bindir}/%{_mingw64_target}-"; \
for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do \
x=`echo $i|sed "s,${_PREFIX},,"|sed "s,\\.awk*,,"|tr [:lower:] [:upper:] | tr "+-" "X_" | sed "s,\\.,,g"`; \
declare -x $x="$i" ; export $x; \
done; \
unset _PREFIX; \
CC="${MINGW64_CC:-%_mingw64_cc}"; export CC; \
CFLAGS="${MINGW64_CFLAGS:-%_mingw64_cflags}"; export CFLAGS; \
LDFLAGS="${MINGW64_LDFLAGS:-%_mingw64_ldflags}"; export LDFLAGS; \
if [ -x "%{_bindir}/%{_mingw64_cxx}" ]; then \
CXX="${MINGW64_CXX:-%_mingw64_cxx}"; export CXX; \
CXXFLAGS="${MINGW64_CXXFLAGS:-%_mingw64_cxxflags}"; export CXXFLAGS; \
else \
CXX=; export CXX; \
ac_cv_prog_CXX=no; export ac_cv_prog_CXX; \
CXXFLAGS=; export CXXFLAGS; \
fi; \
for i in `ls %{_mingw64_bindir}/*|grep -- "-config\$"` ; do \
x=`basename $i|tr [:lower:] [:upper:] | tr "+-" "X_" | sed "s,\\.,,g"`; \
declare -x $x="$i" ; export $x; \
done; \
unset x i
%_mingw64_package_header \
%global __strip %{_mingw64_strip} \
%global __objdump %{_mingw64_objdump} \
%global __os_install_post %{_mingw64_install_post}
# this macro also disables the default debug package
%_mingw64_package_header_debug \
%global debug_package %{nil} \
%global __strip %{_mingw64_strip} \
%global __objdump %{_mingw64_objdump} \
%global __os_install_post %{_mingw64_debug_install_post} \\\
%{_mingw64_install_post}
%_mingw64_configure %{_mingw64_env} ; \
__mingw64_topdir=.; if ! test -x configure; then __mingw64_topdir=..; fi; \\\
$__mingw64_topdir/configure --cache-file=%{_mingw64_cache} \\\
--host=%{_mingw64_host} \\\
--build=%_build \\\
--target=%{_mingw64_target} \\\
--prefix=%{_mingw64_prefix} \\\
--exec-prefix=%{_mingw64_exec_prefix} \\\
--bindir=%{_mingw64_bindir} \\\
--sbindir=%{_mingw64_sbindir} \\\
--sysconfdir=%{_mingw64_sysconfdir} \\\
--datadir=%{_mingw64_datadir} \\\
--includedir=%{_mingw64_includedir} \\\
--libdir=%{_mingw64_libdir} \\\
--libexecdir=%{_mingw64_libexecdir} \\\
--localstatedir=%{_mingw64_localstatedir} \\\
--sharedstatedir=%{_mingw64_sharedstatedir} \\\
--mandir=%{_mingw64_mandir} \\\
--infodir=%{_mingw64_infodir}
%_mingw64_make %{_mingw64_env} ; \
make \\\
prefix=%{_mingw64_prefix} \\\
exec_prefix=%{_mingw64_exec_prefix} \\\
bindir=%{_mingw64_bindir} \\\
sbindir=%{_mingw64_sbindir} \\\
sysconfdir=%{_mingw64_sysconfdir} \\\
datadir=%{_mingw64_datadir} \\\
includedir=%{_mingw64_includedir} \\\
libdir=%{_mingw64_libdir} \\\
libexecdir=%{_mingw64_libexecdir} \\\
localstatedir=%{_mingw64_localstatedir} \\\
sharedstatedir=%{_mingw64_sharedstatedir} \\\
mandir=%{_mingw64_mandir} \\\
infodir=%{_mingw64_infodir}
%_mingw64_make_install %{_mingw64_env} ; \
make \\\
prefix=%{?buildroot:%{buildroot}}%{_mingw64_prefix} \\\
exec_prefix=%{?buildroot:%{buildroot}}%{_mingw64_exec_prefix} \\\
bindir=%{?buildroot:%{buildroot}}%{_mingw64_bindir} \\\
sbindir=%{?buildroot:%{buildroot}}%{_mingw64_sbindir} \\\
sysconfdir=%{?buildroot:%{buildroot}}%{_mingw64_sysconfdir} \\\
datadir=%{?buildroot:%{buildroot}}%{_mingw64_datadir} \\\
includedir=%{?buildroot:%{buildroot}}%{_mingw64_includedir} \\\
libdir=%{?buildroot:%{buildroot}}%{_mingw64_libdir} \\\
libexecdir=%{?buildroot:%{buildroot}}%{_mingw64_libexecdir} \\\
localstatedir=%{?buildroot:%{buildroot}}%{_mingw64_localstatedir} \\\
sharedstatedir=%{?buildroot:%{buildroot}}%{_mingw64_sharedstatedir} \\\
mandir=%{?buildroot:%{buildroot}}%{_mingw64_mandir} \\\
infodir=%{?buildroot:%{buildroot}}%{_mingw64_infodir} \\\
install
# deprecated, use _mingw64_make_install (unix variant is named %make_install)
%_mingw64_makeinstall \
echo "Deprecated %%_mingw64_makeinstall macro used, please use %%_mingw64_make_install" \
%_mingw64_make_install
# requires installed packages wine and mingw64-gdb
%_mingw64_gdb %{_mingw64_env} ; \
wineconsole %{_mingw64_bindir}/gdb.exe

33
mingw-objdump-srcfiles Normal file
View File

@ -0,0 +1,33 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2022 Jan Engelhardt <jengelh@inai.de>
# SPDX-FileCopyrightText: 2022 Ralf Habacker <ralf.habacker@freenet.de>
# SPDX-License-Identifier: GPL-2.0-or-later
# get source filenames from dwarf debug sections
gawk '
BEGIN { state = 0 }
state == 1 && $2 ~ /DW_AT_name/ {
atname = $NF
}
state == 1 && $2 ~ /DW_AT_comp_dir/ {
atdir = $NF
# atname is absolute
if (atname ~ /^\//) {
print atname
state = 0
} else if (atdir != "" && atname != "") {
print atdir "/" atname
state = 0
}
}
state == 0 && $0 ~ /DW_TAG_compile_unit/ {
state = 1
atdir = ""
atname = ""
}
'

View File

@ -0,0 +1,5 @@
addFilter("^mingw64-.*filelist-forbidden-fhs23")
addFilter("^mingw64-.*filelist-forbidden-opt")
addFilter("^mingw64-.*non-conffile-in-etc")
# positive false on tumbleweed, does not work as expected
addFilter("^mingw64-.*unused-rpmlintrc-filter")

274
mingw64-filesystem.changes Normal file
View File

@ -0,0 +1,274 @@
-------------------------------------------------------------------
Wed Jul 31 23:24:10 UTC 2024 - Ralf Habacker <ralf.habacker@freenet.de>
- Update version to 20240801
- Add missing man language ca@valencia required by KDE Frameworks 5.103
-------------------------------------------------------------------
Mon Jun 12 13:16:04 UTC 2023 - Ralf Habacker <ralf.habacker@freenet.de>
- Update to 20230614
* Fix unwanted dump of rpm option when using mingw64-* command
line wrapper (boo#1212239)
-------------------------------------------------------------------
Tue Mar 28 04:05:34 UTC 2023 - Ralf Habacker <ralf.habacker@freenet.de>
- Update to version 20230401
* Drop cmake support files as they are now located in the
mingw64-cross-cmake (boo#1209611)
-------------------------------------------------------------------
Fri Mar 17 08:54:56 UTC 2023 - Ralf Habacker <ralf.habacker@freenet.de>
- In cmake macros, avoid changing the current directory
to avoid build errors in packages that use multiple
build systems such as mingw64-zlib
-------------------------------------------------------------------
Thu Feb 16 12:31:06 UTC 2023 - Ralf Habacker <ralf.habacker@freenet.de>
- Update to version 20230309
* Let cmake macros be based on associated macros from macros.cmake
* Add support to define a custom rpm macro when running mingw64
related shell scripts, see mingw64-scripts.sh for details
* Drop using external dependency generator (boo#1175587)
* Add mingw64_*.attr files to support actual used dependency generator
* Fix bug that rpm does not use attribute file for cmake by renaming
to mingw64_cmake.attr (rpm does not like '-' in those file name
and keys inside)
* Extend mingw64_cmake.attr to find cmake support files in
share subdirectory as required for example by mingw64-dlfcn-win32
* Print deprecated message when using %_mingw64_makeinstall or
%__mingw64_cmake
* Reduce some differences to mingw32 in changes and other files,
which are mostly indentions, hours, trailing '/', variable
definition rows - make it easier to compare
-------------------------------------------------------------------
Mon Nov 14 08:20:48 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- Update to version 20221115
* Fix doc in macros.mingw64 how to define macro _mingw64_find_requires_exclude
* Change dependency to mingw64-cross-binutils-utils and
mingw64-cross-pkgconf-utils to avoid cyclic dependencies (boo#1204985)
-------------------------------------------------------------------
Mon Aug 29 10:17:22 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- Fix generating invalid source file path when scanning binaries
(boo#1202865)
-------------------------------------------------------------------
Fri Aug 26 07:36:18 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- Update to 20220826
- Speed up objdump scanning binaries for source files (boo#1202431)
-------------------------------------------------------------------
Wed Aug 10 12:38:29 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Drop dependency on breakpad, since we now have our own
mingw-objdump-srcfiles.
-------------------------------------------------------------------
Thu Jul 28 15:22:52 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- 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' and other dll's from automatic runtime library
detection required for win_iconv and libqt5 packages
- Fix spelling in *.changes
-------------------------------------------------------------------
Thu Jul 28 09:03:20 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- 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'
-------------------------------------------------------------------
Mon Jul 25 07:21:16 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- Add missing runtime dependencies (boo#1188144)
- Use newer $host-pkgconf
- Fix using undefined STRINGS env variable
-------------------------------------------------------------------
Wed Jul 20 07:11:15 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- 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
-------------------------------------------------------------------
Tue Jul 12 07:18:39 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- Fix finding qm files for KDE Frameworks >= 5.76 (taken from rpm-4.14.1)
-------------------------------------------------------------------
Sun Jun 5 05:03:17 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- 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
-------------------------------------------------------------------
Mon May 23 13:58:15 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- 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
-------------------------------------------------------------------
Thu Dec 2 14:06:40 UTC 2021 - Dominique Leuenberger <dimstar@opensuse.org>
- 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.
-------------------------------------------------------------------
Tue Sep 14 10:20:08 UTC 2021 - Ralf Habacker <ralf.habacker@freenet.de>
- 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
-------------------------------------------------------------------
Tue Sep 14 06:39:03 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Force rpmlint use and avoid using of rpmlint-mini
-------------------------------------------------------------------
Wed Jul 28 06:04:17 UTC 2021 - Ralf Habacker <ralf.habacker@freenet.de>
- Add provides for bcrypt.dll required by mingw64-gdb 10.2
-------------------------------------------------------------------
Mon Jul 12 14:30:26 UTC 2021 - Ralf Habacker <ralf.habacker@freenet.de>
- Add provides for ncrypt.dll required by mingw64-gnutls clients
-------------------------------------------------------------------
Mon Jun 14 10:47:21 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Move RPM macros to %_rpmmacrodir (boo#1185671)
- Move profile.d entries to %_distconfdir
- Use %_fileattrsdir macro
-------------------------------------------------------------------
Thu Nov 5 10:38:47 UTC 2020 - Ralf Habacker <ralf.habacker@freenet.de>
- 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 according to
https://rpm.org/user_doc/macros.htm
-------------------------------------------------------------------
Sat Oct 17 14:32:20 UTC 2020 - Ralf Habacker <ralf.habacker@freenet.de>
- 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
-------------------------------------------------------------------
Fri Aug 28 18:59:36 UTC 2020 - Ralf Habacker <ralf.habacker@freenet.de>
- Fix architecture in generating cmake provides
-------------------------------------------------------------------
Tue Aug 25 19:27:01 UTC 2020 - Ralf Habacker <ralf.habacker@freenet.de>
- 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
-------------------------------------------------------------------
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>
- Process debuginfo in a reproducible way (boo#1041090)
-------------------------------------------------------------------
Wed Dec 18 21:49:04 UTC 2019 - Martin Koegler <martin.koegler@chello.at>
- Revert -lssp
-------------------------------------------------------------------
Tue Dec 17 09:21:43 UTC 2019 - Ralf Habacker <ralf.habacker@freenet.de>
- 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.
-------------------------------------------------------------------
Mon Nov 25 16:31:30 UTC 2019 - Ralf Habacker <ralf.habacker@freenet.de>
- add macro _mingw64_ldflags_bootstrap for bootstrap packages
-------------------------------------------------------------------
Mon Nov 25 05:05:10 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Add -fstack-protector to LDFLAGS
-------------------------------------------------------------------
Sun Nov 24 21:36:08 UTC 2019 - Ralf Habacker <ralf.habacker@freenet.de>
- fix compile errors: undefined reference to `__memcpy_chk`
-------------------------------------------------------------------
Fri Nov 22 10:58:42 UTC 2019 - Ludwig Nussel <lnussel@suse.de>
- disable default debug package only if the mingw debug macro is used
-------------------------------------------------------------------
Wed Nov 20 13:40:31 UTC 2019 - Ludwig Nussel <lnussel@suse.de>
- inital package for Factory submission

229
mingw64-filesystem.spec Normal file
View File

@ -0,0 +1,229 @@
#
# spec file for package mingw64-filesystem
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# Tumbleweed
%if %suse_version >= 1550
%define _rpmlintdir /opt/testing/share/rpmlint
%else
%define _rpmlintdir /opt/testing/share/rpmlint/mini
%endif
%define debug_package %{nil}
%if %{undefined _distconfdir}
%define _distconfdir %{_sysconfdir}
%endif
%if %{undefined _rpmmacrodir}
%define _rpmmacrodir %{_sysconfdir}/rpm
%endif
Name: mingw64-filesystem
Version: 20240801
Release: 0
Summary: MinGW base filesystem and environment
License: GPL-2.0-or-later
Group: Development/Libraries/Other
URL: http://hg.et.redhat.com/misc/fedora-mingw--devel/
Source0: COPYING
Source1: macros.mingw64
Source2: mingw64.sh
Source3: mingw64-find-debuginfo.sh
Source4: mingw64-find-requires.sh
Source5: mingw64-find-provides.sh
Source6: mingw64-scripts.sh
Source7: mingw64-rpmlintrc
Source8: mingw64-install-post.sh
Source9: mingw64-find-lang.sh
Source10: languages
Source11: languages.man
Source15: mingw64-filesystem-rpmlintrc
Source16: mingw-objdump-srcfiles
Source17: mingw64_binaries.attr
Source19: mingw64_config.attr
Source20: mingw64_libs.attr
Source21: mingw64_pkgconfig.attr
# add excluded system libraries to mingw64-find-requires.sh
# TODO: The following provides could be removed after all packages has been rebuild
Provides: mingw64(bcrypt.dll)
Provides: mingw64(dbghelp.dll)
Provides: mingw64(mpr.dll)
Provides: mingw64(odbccp32.dll)
Provides: mingw64(userenv.dll)
Provides: mingw64(uxtheme.dll)
# TODO: The available DLL's can be identified by the
# available import libraries of the mingw64-runtime package.
# needed by mingw64-libqt5-qtbase
Provides: mingw64(d2d1.dll)
Provides: mingw64(d3d11.dll)
Provides: mingw64(d3d12.dll)
Provides: mingw64(dcomp.dll)
Provides: mingw64(dwrite.dll)
Provides: mingw64(dxgi.dll)
Provides: mingw64(ncrypt.dll)
Provides: mingw64(wtsapi32.dll)
Requires: coreutils
Requires: findutils
Requires: gawk
Requires: grep
Requires: mingw64-cross-binutils-utils
Requires: mingw64-cross-pkgconf-utils
Requires: python3
Requires: rpm
Requires: rpmlint-mini
Requires: sed
BuildArch: noarch
#!BuildIgnore: post-build-checks
%description
This package contains the base filesystem layout, RPM macros and
environment for all MinGW packages.
This environment is maintained by the Fedora MinGW SIG at:
http://fedoraproject.org/wiki/SIGs/MinGW
%prep
%setup -q -c -T
cp %{SOURCE0} COPYING
sed 's/@VERSION@/%{version}/' < %{SOURCE4} > mingw64-find-requires.sh
%build
# nothing
%install
mkdir -p %{buildroot}
mkdir -p %{buildroot}%{_prefix}/lib
mkdir -p %{buildroot}%{_libexecdir}
install -m 755 %{SOURCE6} %{buildroot}%{_libexecdir}/mingw64-scripts
# this is already provided by _mingw64_create_macro_links
# but including macros.mingw64 results into an unknown failure
mkdir -p %{buildroot}%{_bindir}
pushd %{buildroot}%{_bindir}
for i in mingw64-configure mingw64-make mingw64-gdb; do
ln -s %{_libexecdir}/mingw64-scripts $i
done
popd
mkdir -p %{buildroot}%{_distconfdir}/profile.d
install -m 644 %{SOURCE2} %{buildroot}%{_distconfdir}/profile.d/
mkdir -p %{buildroot}%{_rpmmacrodir}
install -m 644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.mingw64
mkdir -p %{buildroot}%_rpmlintdir
# tumbleweed
%if %suse_version >= 1550
# convert to toml file format, which seems to be required
sed "s,addFilter *(\", ',g;s#\")#',#g" %{SOURCE7} | gawk 'BEGIN { print "Filters = ["} { print $0 } END { print "]"}' > %{SOURCE7}.toml
install -m 644 %{SOURCE7}.toml %{buildroot}%_rpmlintdir/mingw64.toml
%else
install -m 644 %{SOURCE7} %{buildroot}%_rpmlintdir/mingw64-rpmlint.config
%endif
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32
# GCC requires these directories, even though they contain links
# to binaries which are also installed in /usr/bin etc. These
# contain native binaries.
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/bin
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/lib
# The MinGW system root which will contain Windows native binaries
# and Windows-specific header files, pkgconfig, etc.
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw
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/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/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/share
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%{_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/gconf
(cd %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root && ln -s mingw x86_64-w64-mingw32)
# Let programs locate their plugins relative to the executable without using
# upward movement ("..") in those packages, cf. libdbi, libenchant.
#
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/bin/lib
ln -s ../../lib "%buildroot/%_prefix/x86_64-w64-mingw32/sys-root/mingw/bin/lib/x86_64-pc"
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/doc
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/info
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man/man{1,2,3,4,5,6,7,8,9,n}
# NB. NOT _libdir
mkdir -p %{buildroot}%{_rpmconfigdir}
install -m 0755 %{SOURCE3} %{buildroot}%{_rpmconfigdir}
install -m 0755 %{SOURCE4} %{buildroot}%{_rpmconfigdir}
install -m 0755 %{SOURCE5} %{buildroot}%{_rpmconfigdir}
install -m 0755 %{SOURCE8} %{buildroot}%{_rpmconfigdir}
install -m 0755 %{SOURCE9} %{buildroot}%{_rpmconfigdir}
# dependency generator support
mkdir -p %{buildroot}%{_fileattrsdir}
install -m 0644 %{SOURCE17} %{buildroot}%{_fileattrsdir}
install -m 0644 %{SOURCE19} %{buildroot}%{_fileattrsdir}
install -m 0644 %{SOURCE20} %{buildroot}%{_fileattrsdir}
install -m 0644 %{SOURCE21} %{buildroot}%{_fileattrsdir}
# Create the locale directories:
while read LANG ; do
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/locale/$LANG/LC_MESSAGES
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/help/$LANG
done < %{SOURCE10}
# Create the locale directories for man:
while read LANG ; do
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
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man/$LANG/man$sec
done
done < %{SOURCE11}
install -m 0755 %{SOURCE16} %{buildroot}%{_bindir}/x86_64-w64-mingw32-objdump-srcfiles
%files
%license COPYING
%{_rpmmacrodir}/macros.mingw64
%if %{undefined _distconfdir}
%config %{_sysconfdir}/profile.d/mingw64.sh
%else
%{_distconfdir}/profile.d/mingw64.sh
%endif
%if %suse_version >= 1550
%_rpmlintdir/mingw64.toml
%else
%_rpmlintdir/mingw64-rpmlint.config
%endif
%{_fileattrsdir}/mingw64*.attr
%{_bindir}/mingw64-*
%{_bindir}/x86_64-w64-mingw32-*
%{_libexecdir}/mingw64-scripts
%{_prefix}/x86_64-w64-mingw32/
%{_rpmconfigdir}/mingw64-*
%dir %{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib/cmake
%changelog

102
mingw64-find-debuginfo.sh Normal file
View File

@ -0,0 +1,102 @@
#!/bin/sh
#mingw64-find-debuginfo.sh - automagically generate debug info and file list
#for inclusion in an rpm spec file for mingw64-* packages.
#
# $PWD package dir below $BUILDDIR
target="mingw64"
host="x86_64-w64-mingw32"
# speed up running objdump, see bug https://bugzilla.opensuse.org/show_bug.cgi?id=1202431
export MALLOC_CHECK_=0
export MALLOC_PERTURB_=0
BUILDDIR=.
if [ -n "$1" ]; then
BUILDDIR="$1"
fi
# 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"
SOURCE_DIR="${ROOT_DIR}/src"
DEBUGSOURCE_DIR="${SOURCE_DIR}/debug"
for f in `find $RPM_BUILD_ROOT -type f -name "*.exe" -or -name "*.dll" | sort`
do
case $("$host-objdump" -h "$f" 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
*debuglink*) continue ;;
*debug*) ;;
*gnu.version*)
echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!"
continue
;;
*) continue ;;
esac
echo extracting debug info from $f
# grep all listed source files belonging to this package into temporary source file list.
"$host-objdump" -Wi "$f" | "$host-objdump-srcfiles" | grep $srcdir >>"$SOURCEFILE.tmp"
"$host-objcopy" --only-keep-debug "$f" "$f.debug" || :
pushd `dirname $f`
"$host-objcopy" --add-gnu-debuglink=`basename "$f.debug"` --strip-unneeded `basename "$f"` || :
popd
done
if [ ! -e "$BUILDDIR" ]; then
mkdir -p "$BUILDDIR"
fi
find $RPM_BUILD_ROOT -type f \
-name "*.exe.debug" \
-or -name "*.dll.debug" \
-or -name "*.exe.mdb" \
-or -name "*.dll.mdb" \
| sort \
| sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/$target-debugfiles.list
echo creating debugsource file structure
destdir=${RPM_BUILD_ROOT}${DEBUGSOURCE_DIR}
if [ ! -e "$destdir" ]; then
install -d "$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
install -d "$p"
fi
echo copying $f to $o
install -m 644 $f $o
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

270
mingw64-find-lang.sh Normal file
View File

@ -0,0 +1,270 @@
#!/bin/sh
#mingw64-findlang - automagically generate list of language specific files
#for inclusion in an rpm spec file.
#This does assume that the *.mo files are under .../locale/...
#Run with no arguments gets a usage message.
#mingw64-findlang is copyright (c) 1998 by W. L. Estes <wlestes@uncg.edu>
#Redistribution and use of this software are hereby permitted for any
#purpose as long as this notice and the above copyright notice remain
#in tact and are included with any redistribution of this file or any
#work based on this file.
# 2015-07-03 Ralf Habacker <ralf.habacker@freenet.de>
# * adapted to mingw64
# 2004-06-20 Arkadiusz Miśkiewicz <arekm@pld-linux.org>
# * merge PLD changes, kde, all-name (mkochano,pascalek@PLD)
# 1999-10-19 Artur Frysiak <wiget@pld-linux.org>
# * added support for GNOME help files
# * start support for KDE help files
usage () {
cat <<EOF
Usage: $0 TOP_DIR PACKAGE_NAME [prefix]
where TOP_DIR is
the top of the tree containing the files to be processed--should be
\$RPM_BUILD_ROOT usually. TOP_DIR gets sed'd out of the output list.
PACKAGE_NAME is the %{name} of the package. This should also be
the basename of the .mo files. the output is written to
PACKAGE_NAME.lang unless \$3 is given in which case output is written
to \$3 (note that \$3 is appended to if given).
Additional options:
--without-gnome do not find GNOME help files
--without-kde do not find KDE help files
--with-qt find Qt translation files
--with-man find localized man pages
--all-name match all package/domain names
--without-mo do not find locale files
EOF
exit 1
}
if [ -z "$1" ] ; then usage
elif [ $1 = / ] ; then echo $0: expects non-/ argument for '$1' 1>&2
elif [ ! -d $1 ] ; then
echo $0: $1: no such directory
exit 1
else TOP_DIR="`echo $1|sed -e 's:/$::'`"
fi
shift
if [ -z "$1" ] ; then usage
else NAME=$1
fi
shift
GNOME=
KDE=
QT=#
MAN=#
MO=
MO_NAME=$NAME.lang
ALL_NAME=#
NO_ALL_NAME=
ONLY_C=#
NO_C=#
while test $# -gt 0 ; do
case "${1}" in
--with-gnome )
GNOME=
shift
;;
--with-kde )
KDE=
shift
;;
--without-gnome )
GNOME=#
shift
;;
--without-kde )
KDE=#
shift
;;
--with-qt )
QT=
shift
;;
--with-man )
MAN=
shift
;;
--without-mo )
MO=#
shift
;;
--all-name )
ALL_NAME=
NO_ALL_NAME=#
shift
;;
--with-only-C )
ONLY_C=
shift
;;
--without-C )
NO_C=
shift
;;
* )
MO_NAME=${1}
shift
;;
esac
done
if ! test -s $MO_NAME ; then
echo "%defattr (644, root, root, 755)" > $MO_NAME
fi
MO_NAME_NEW=$MO_NAME.tmp.$$
rm -f $MO_NAME_NEW
# 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
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
echo -n "removing translation $file: "
msgunfmt "$TOP_DIR/$file" | msgfmt --statistics -o /dev/null -
done
rm -rf $TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale/$dir
fi
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
if ! rpm -ql mingw64-filesystem | egrep -q "/share/help/$dir"$; then
echo "removing help translation /share/help/$dir"
rm -rf $TOP_DIR/usr/x86_64-w64-mingw32/sys-root/mingw/share/help/$dir
fi
done
find "$TOP_DIR" -type f -o -type l|sed '
s:'"$TOP_DIR"'::
'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' > $MO_NAME_NEW
find "$TOP_DIR" -type d|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3\4/:
'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/:
s:^\([^%].*\)::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
find "$TOP_DIR" -type d|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%lang(C) %dir %doc \1:
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\)::
'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) %doc \1\2:
'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%lang(C) %dir %doc \1:
'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\)::
'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) %doc \1\2:
s:%lang(.*) .*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+/.*::
s:^\([^%].*\)::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
find "$TOP_DIR" -type d|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1:
'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1:
s:^\([^%].*\)::
/^$/d' >> $MO_NAME_NEW
find "$TOP_DIR" -type f|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1:
'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1:
s:^[^%].*::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null`
if [ x"$KDE3_HTML" != x -a -d "$TOP_DIR$KDE3_HTML" ]; then
find "$TOP_DIR$KDE3_HTML" -type d|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\)::
'"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3:
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
fi
KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null`
if [ x"$KDE4_HTML" != x -a -d "$TOP_DIR$KDE4_HTML" ]; then
find "$TOP_DIR$KDE4_HTML" -type d|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\)::
'"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3:
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
'"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
fi
find "$TOP_DIR" -type f -o -type l|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$QT"'s:\(.*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:\(.*/[^/_]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:\(.*/[^/_]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
s:^[^%].*::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
find "$TOP_DIR" -type d|sed '
s:'"$TOP_DIR"'::
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\)::
'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*:
s:^\([^%].*\)::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
find "$TOP_DIR" -type f -o -type l|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*:
s:^\([^%].*\)::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW
if ! grep -q / $MO_NAME_NEW; then
echo "No translations found for ${NAME} in ${TOP_DIR}"
rm -f $MO_NAME_NEW
exit 1
fi
sort -u $MO_NAME_NEW >> $MO_NAME
rm -f $MO_NAME_NEW
exit 0

35
mingw64-find-provides.sh Normal file
View File

@ -0,0 +1,35 @@
#!/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"
if [ -n "$1" ]; then
package_name="$1"
fi
[ -z "$OBJDUMP" ] && OBJDUMP="$host-objdump"
filelist=`sed "s/['\"]/\\\&/g"`
dlls=$(echo "$filelist" | grep '\.dll$')
pcs=$(echo "$filelist" | grep '\.pc$')
libs=$(echo "$filelist" | grep '\.a$')
for f in $dlls; do
[ ! -f "$f" ] && continue
basename=`basename "$f" | tr "[:upper:]" "[:lower:]"`
echo "$target($basename)"
done
for g in $pcs; do
[ ! -f "$g" ] && continue
PKG_CONFIG_PATH="${g%/*}" "$host-pkgconf" --print-errors --print-provides "$g" | awk '{ print "'"$target"'(pkg:"$1")", $2, $3 }'
done | sort -u
for h in $libs; do
[ ! -f "$h" ] && continue
libname=`basename "$h" | sed 's#^lib##g' | sed 's#\.dll\.#\.#g' | sed 's#\.a##g'`
echo "$target(lib:$libname)"
done

157
mingw64-find-requires.sh Normal file
View File

@ -0,0 +1,157 @@
#!/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

94
mingw64-install-post.sh Normal file
View File

@ -0,0 +1,94 @@
#!/bin/bash
# This script does the post install tasks specific for mingw64-*
# packages.
target="mingw64"
host="x86_64-w64-mingw32"
# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
exit 0
fi
LC_ALL=
LANG=
LC_TIME=POSIX
cd "$RPM_BUILD_ROOT"
[ -z "$STRIP" ] && STRIP="$host-strip"
for f in `find . -type f -name "*.exe" -or -name "*.dll"`; do
case $("$host-objdump" -h "$f" 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
*debuglink*) continue ;;
*debug*) ;;
*gnu.version*)
echo "WARNING: "`echo "$f" | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!"
continue
;;
*) continue ;;
esac
"$STRIP" --strip-unneeded "$f"
done
find . -type f -name "*.a" -exec chmod -x "{}" "+"
find . -type f -name "*.la" -delete
if [ -d "$RPM_BUILD_ROOT/usr/$host/sys-root/mingw/share/man" ]; then
pushd "$RPM_BUILD_ROOT/usr/$host/sys-root/mingw/share/man"
for f in `find -type f`; do
case "$f" in
*.Z) gunzip "$f"; b=`echo "$f" | sed -e 's/\.Z$//'`;;
*.gz) gunzip "$f"; b=`echo "$f" | sed -e 's/\.gz$//'`;;
*.bz2) bunzip2 "$f"; b=`echo "$f" | sed -e 's/\.bz2$//'`;;
*) b="$f";;
esac
gzip -9 -n "$b"
done
popd
fi
if [ -d "$RPM_BUILD_ROOT/usr/$host/sys-root/mingw/share/info" ]; then
pushd "$RPM_BUILD_ROOT/usr/$host/sys-root/mingw/share/info"
for f in `find -type f`; do
case "$f" in
*.Z) gunzip "$f"; b=`echo "$f" | sed -e 's/\.Z$//'`;;
*.gz) gunzip "$f"; b=`echo "$f" | sed -e 's/\.gz$//'`;;
*.bz2) bunzip2 "$f"; b=`echo "$f" | sed -e 's/\.bz2$//'`;;
*) b="$f";;
esac
gzip -9 -n "$b"
done
popd
fi
if [ -d "$RPM_BUILD_ROOT/usr/$host/sys-root/mingw/lib/pkgconfig" ]; then
pushd "$RPM_BUILD_ROOT/usr/$host/sys-root/mingw/lib/pkgconfig"
for f in `find . -type f -name "*.pc"`; do
mv "$f" "$f~"
sed \
-e 's#L/usr/'"$host"'/sys-root/mingw/lib#L\${libdir}#g' \
-e 's#I/usr/'"$host"'/sys-root/mingw/include#I\${includedir}#g' \
-e '/original_prefix/!s#/usr/'"$host"'/sys-root/mingw#\${prefix}#g' \
-e 's#^prefix=\${prefix}#prefix=/usr/'"$host"'/sys-root/mingw#g' \
<"$f~" >"$f"
rm -f "$f~"
done
popd
fi
if [ -d "$RPM_BUILD_ROOT/usr/$host/sys-root/mingw/share/pkgconfig" ]; then
pushd "$RPM_BUILD_ROOT/usr/$host/sys-root/mingw/share/pkgconfig"
for f in `find . -type f -name "*.pc"`; do
mv "$f" "$f~"
sed \
-e 's#L/usr/'"$host"'/sys-root/mingw/lib#L\${libdir}#g' \
-e 's#I/usr/'"$host"'/sys-root/mingw/include#I\${includedir}#g' \
-e '/original_prefix/!s#/usr/'"$host"'/sys-root/mingw#\${prefix}#g' \
-e 's#^prefix=\${prefix}#prefix=/usr/'"$host"'/sys-root/mingw#g' \
<"$f~" >"$f"
rm -f "$f~"
done
popd
fi

29
mingw64-rpmlintrc Normal file
View File

@ -0,0 +1,29 @@
# not used on Leap 15.x for linting mingw64-filesystem package
# Unconditionally remove devel-file-in-non-devel rpmlint warning.
addFilter ("^mingw64-.*devel-file-in-non-devel")
# /usr/x86_64-w64-mingw32 is permitted by MinGW packaging guidelines.
addFilter ("^mingw64-.*non-standard-dir-in-usr x86_64-w64-mingw32")
addFilter ("^mingw64-.*filelist-forbidden-fhs23 /usr/x86_64-w64-mingw32")
# GCC and libtool create executable archive files. It's not clear
# why, but we permit this for now.
addFilter ("^mingw64-.*spurious-executable-perm.*\.dll\.a$")
# *.dll.a and *.a files are permitted arch-independent objects.
addFilter ("^mingw64-.*arch-independent-package-contains-binary-or-object.*\.a$")
addFilter ("^mingw64-.*mono-versioned-deps-missing")
addFilter ("^mingw64-.*files-duplicate")
addFilter("debuginfo-without-sources")
# This group is used a lot, so ignore the warning about it.
addFilter ("^mingw64-.*non-standard-group Development/Libraries$")
# using /opt/testing
addFilter("^mingw64-*filelist-forbidden-opt")
addFilter("^mingw64-.*potential-bashisms")

39
mingw64-scripts.sh Normal file
View File

@ -0,0 +1,39 @@
#!/bin/sh -
# mingw64-scripts
# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones.
# Copyright (C) 2008 Levente Farkas
# Copyright (C) 2023 Ralf Habacker
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU 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 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.
# This is a useful command-line script through which one can use the
# macros from mingw64-macros.mingw64 cross-compilation.
#
# It supports the environment variable MINGW64_MACROS=<value> to be
# able to override individual rpm macros. With
#
# MINGW64_MACROS='__cmake ~/bin/cmake' mingw64-cmake
#
# for example, the specified cmake executable is used instead of
# the internal default.
NAME="_`basename $0|tr -- - _`"
if [ "${MINGW64_MACROS+1}" ]; then
eval "`rpm --define="${MINGW64_MACROS}" --eval "%${NAME} $(printf " %q" "${@}")"`"
else
eval "`rpm --eval "%${NAME} $(printf " %q" "${@}")"`"
fi

3
mingw64.sh Normal file
View File

@ -0,0 +1,3 @@
# Environment variables for MinGW.
alias mingw64-env='eval `rpm --eval %{_mingw64_env}`'

3
mingw64_binaries.attr Normal file
View File

@ -0,0 +1,3 @@
%__mingw64_binaries_provides %{_rpmconfigdir}/mingw64-find-provides.sh
%__mingw64_binaries_requires %{_rpmconfigdir}/mingw64-find-requires.sh %{?_mingw64_find_requires_exclude:--exclude "%_mingw64_find_requires_exclude"}
%__mingw64_binaries_magic PE32[+] executable

2
mingw64_config.attr Normal file
View File

@ -0,0 +1,2 @@
%__mingw64_config_requires %{_rpmconfigdir}/mingw64-find-requires.sh %{?_mingw64_find_requires_exclude:--exclude "%_mingw64_find_requires_exclude"}
%__mingw64_config_path ^%{_mingw64_bindir}/.*config$

3
mingw64_libs.attr Normal file
View File

@ -0,0 +1,3 @@
%__mingw64_libs_provides %{_rpmconfigdir}/mingw64-find-provides.sh
%__mingw64_libs_requires %{_rpmconfigdir}/mingw64-find-requires.sh %{?_mingw64_find_requires_exclude:--exclude "%_mingw64_find_requires_exclude"} %{?_mingw64_find_requires_scan_implibs:--scan-implibs}
%__mingw64_libs_path ^(%{_mingw64_libdir}/.*\.a)$

3
mingw64_pkgconfig.attr Normal file
View File

@ -0,0 +1,3 @@
%__mingw64_pkgconfig_provides %{_rpmconfigdir}/mingw64-find-provides.sh
%__mingw64_pkgconfig_requires %{_rpmconfigdir}/mingw64-find-requires.sh %{?_mingw64_find_requires_exclude:--exclude "%_mingw64_find_requires_exclude"}
%__mingw64_pkgconfig_path ^(%{_mingw64_datadir}|%{_mingw64_libdir})/pkgconfig/.*\.pc$