%ifos darwin %define __cpa %{__cp} -RPp %else %define __cpa %{__cp} -a %endif %define dist hepx Name: xerces-c Version: 3.2.4 Release: 13%{?dist}6a Summary: XML parsers Group: Development/Tools License: Apache Software License, Version 2.0 BuildArch: fat URL: http://www.apache.org Source0: http://ftp.jaist.ac.jp/pub/apache/xerces/c/3/sources/xerces-c-%{version}.tar.bz2 Patch0: https://issues.apache.org/jira/secure/attachment/12913843/0001-Explicitly-export-ArrayJanitor-templates.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: rpm Prefix: /opt/xercesc/%{version} %description Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, manipulating, and validating XML documents. Xerces-C++ is faithful to the XML 1.0 and 1.1 recommendations and many associated standards. The parser provides high performance, modularity, and scalability. Source code, samples and API documentation are provided with the parser. For portability, care has been taken to make minimal use of templates, no RTTI, and minimal use of #ifdefs. %prep %ifos darwin %setup -q -c -n %{name}-%{version} pushd %{name}-%{version} %else %setup -q %endif #%patch0 -p1 -b .janitor %ifos darwin cp -a CREDITS INSTALL KEYS LICENSE NOTICE README doc .. popd mv %{name}-%{version} ARM64 cp -a ARM64 X86_64 %endif %build %ifos darwin for chip in ARM64 X86_64; do pushd ${chip} arch -arch $(echo ${chip} | tr [A-Z] [a-z]) \ aclocal arch -arch $(echo ${chip} | tr [A-Z] [a-z]) \ autoconf arch -arch $(echo ${chip} | tr [A-Z] [a-z]) \ %else export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" aclocal autoconf %endif ./configure --prefix=%{prefix} \ --datadir=%{prefix}/share/%{name} \ --docdir=%{_prefix}/share/doc/%{name}-%{version} \ --mandir=%{prefix}/share/man \ CXX=clang++ CC=clang %ifos darwin arch -arch $(echo ${chip} | tr [A-Z] [a-z]) \ %endif automake %ifos darwin arch -arch $(echo ${chip} | tr [A-Z] [a-z]) \ %endif make %{?_smp_mflags} %ifos darwin popd done %endif %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} %ifos darwin # start chip loop for chip in ARM64 X86_64; do mkdir ${chip}-root pushd ${chip} %endif %ifos darwin arch -arch $(echo ${chip} | tr [A-Z] [a-z]) \ make install DESTDIR=${RPM_BUILD_DIR}/%{name}-%{version}/${chip}-root %else make install DESTDIR=$RPM_BUILD_ROOT %endif %ifos darwin popd done # end chip loop %endif %ifos darwin ## Make Universal Binaries filelist=$(find ./ARM64-root -type f | xargs file | sed -e 's,^\./ARM64-root/,,g' | \ grep -E \(Mach-O\)\|\(ar\ archive\) |sed -e 's,:.*,,g' -e '/\for\ architecture/d') mkdir -p tmp_for_lipo for i in $filelist do /usr/bin/lipo -create ARM64-root/$i X86_64-root/$i -output tmp_for_lipo/`basename $i` && \ (cp -f tmp_for_lipo/`basename $i` ARM64-root/$i) || : done # check header files for i in `find ARM64-root -name "*.h" -type f` do TARGET=`echo $i | sed -e "s,.*ARM64-root,,"` TEMP=`diff -u ARM64-root/$TARGET X86_64-root/$TARGET > /dev/null || echo different` if [ -n "$TEMP" ]; then mv X86_64-root/$TARGET ARM64-root/${TARGET%.*}-x86_64.h mv ARM64-root/$TARGET ARM64-root/${TARGET%.*}-arm64.h FILE=${TARGET##*/} FILE=${FILE%.*} cat < ARM64-root/$TARGET #if defined (__arm64__) #include "${FILE}-arm64.h" #elif defined( __x86_64__ ) #include "${FILE}-x86_64.h" #endif EOF fi done # install mkdir -p %{buildroot} tar cf - -C ARM64-root . | tar xpf - -C %{buildroot} %endif # remove unpackaged files from the buildroot rm -rf $RPM_BUILD_ROOT%{prefix}/share/info/dir rm -f $RPM_BUILD_ROOT%{prefix}/lib/*.la %clean rm -rf $RPM_BUILD_ROOT %files %ifos darwin %defattr(-,root,wheel,-) %else %defattr(-,root,root,-) %endif %doc CREDITS INSTALL KEYS LICENSE NOTICE README doc %{prefix}/bin/* %{prefix}/include/* %{prefix}/lib/* %changelog * Wed Nov 22 2023 Keisuke Fujii - 3.2.4-13hepx6a - 2nd build and release on MacOS 13 - now provided as fat - built with OSXWS 13 and clang * Fri Nov 3 2023 Keisuke Fujii - 3.2.4-13hepx5a - 1st build and release of v3.2.4 on MacOS 13 - built with MacOSX WS 13 and clang * Sat Feb 26 2022 Keisuke Fujii - 3.2.2-12hepx5b - 34d build and release of v3.2.2 on MacOSX 12 - aclocal before automake - built with MacOSX WS 12beta and clang * Wed Feb 23 2022 Keisuke Fujii - 3.2.2-12hepx5a - 2nd build and release of v3.2.2 on MacOSX 12 - aclocal before automake - built with MacOSX WS 11 and clang * Sun Feb 13 2022 Keisuke Fujii - 3.2.2-12hepx4a - 1st build and release of v3.2.2 on MacOSX 12 - aclocal before automake - built with MacOSX WS 11 and gcc * Thu Jan 23 2020 Keisuke Fujii - 3.2.2-10.15hepx3a - 1st build and release of v3.2.1 on MacOSX 10.15 - built with MacOSX WS 10.15 * Thu Dec 19 2019 Keisuke Fujii - 3.2.2-10.14hepx3a - 1st build and release of v3.2.1 on MacOSX 10.14 - built with MacOSX WS 10.14 * Mon Dec 24 2018 Keisuke Fujii - 3.2.1-10.14hepx3a - 1st build and release of v3.2.1 on MacOSX 10.14 - moved the installation destination to /opt/xerces/%{version} - built with MacOSX WS 10.13 * Sat Apr 07 2018 Keisuke Fujii - 3.2.1-10.13hepx3a - 2nd build and release of v3.2.1 on MacOSX 10.13 - moved the installation destination to /opt/xerces/%{version} * Thu Apr 05 2018 Keisuke Fujii - 3.2.1-10.13hepx2a - 1st build and release of v3.2.1 on MacOSX 10.13 - added jenitor patch to fix duplicate symbol problems - use autoconf and automake to activate the patch * Thu Jan 26 2017 Keisuke Fujii - 3.1.4-10.12hepx1a - 1st build and release of v3.1.5 on MacOSX 10.12 * Mon Dec 26 2016 Keisuke Fujii - 3.1.3-10.12hepx1b - 2nd build and release of v3.1.3 on MacOSX 10.12 - built with OSXWS 10.12 * Sun Dec 18 2016 Keisuke Fujii - 3.1.3-10.12hepx1a - 1st build and release of v3.1.3 on MacOSX 10.12 - built with OSXWS 10.11 * Wed Apr 27 2016 Keisuke Fujii - 3.1.3-10.11hepx1a - 1st build and release of v3.1.3 on MacOSX 10.11 * Mon Feb 08 2016 Keisuke Fujii - 3.1.1-10.11hepx1a - 1st build and release on MacOSX 10.11 * Wed Dec 24 2014 Keisuke Fujii - 3.1.1-10.10hepx1a - 1st build and release on MacOSX 10.10 * Wed Aug 06 2014 Keisuke Fujii - 3.1.1-10.9hepx1b - 2nd build and release on MacOSX 10.9 * Tue Nov 19 2013 Keisuke Fujii - 3.1.1-10.9hepx1a - 1st build and release on MacOSX 10.9 * Thu May 3 2012 Keisuke Fujii - 3.1.1-10.7hepx1a - 1st build on MacOSX 10.7 - now for x86_64 * Wed Apr 4 2012 Keisuke Fujii - 3.1.1-10.6hepx1a - 1st build on MacOSX