mingw64-filesystem/macros.mingw64
Ralf Habacker 49fa538ad7 Accepting request 1036609 from home:rhabacker:branches:windows:mingw:win64:issue-1204985-3
- 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)
------------------------------------------------------------------
- Fix generating invalid source file path when scanning binaries
  (boo#1202865) 
  
- Update to 20220826
- Speed up objdump scanning binaries for source files (boo#1202431)
- Drop dependency on breakpad, since we now have our own
  mingw-objdump-srcfiles.
- 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/1036609
OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=151
2022-11-21 09:20:31 +00:00

226 lines
9.0 KiB
Plaintext

%_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
# used 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
# setup rpmbuild hooks
#
# 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
#
# 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
#
%_mingw64_findprovides /usr/lib/rpm/mingw64-find-provides.sh
%_mingw64_findrequires /usr/lib/rpm/mingw64-find-requires.sh %{?_mingw64_find_requires_exclude:--exclude "%_mingw64_find_requires_exclude"} %{?_mingw64_find_requires_scan_implibs:--scan-implibs}
%_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 debug 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 _use_internal_dependency_generator 0 \
%global __find_requires %{_mingw64_findrequires} \
%global __find_provides %{_mingw64_findprovides} \
%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 _use_internal_dependency_generator 0 \
%global __find_requires %{_mingw64_findrequires} \
%global __find_provides %{_mingw64_findprovides} \
%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 %_mingw64_make_install
# requires installed packaged wine and mingw64-gdb
%_mingw64_gdb %{_mingw64_env} ; \
wineconsole %{_mingw64_bindir}/gdb.exe