%ifos darwin %define __cpa %{__cp} -RPp %else %define __cpa %{__cp} -a %endif %define dist hepx Name: xerces-c31 Version: 3.1.4 Release: 13%{?dist}1a Summary: XML parsers Group: Development/Tools License: Apache License URL: http://www.apache.org %ifos darwin BuildArch: fat %endif Source0: http://ftp.jaist.ac.jp/pub/apache/xerces/c/3/sources/xerces-c-%{version}.tar.gz 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 xerces-c-%{version} %else %setup -q -n xerces-c-%{version} %endif %ifos darwin cp -a CREDITS INSTALL KEYS LICENSE NOTICE README doc .. popd mv xerces-c-%{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]) \ ./configure --prefix=%{prefix} --datadir=%{prefix}/share/xerces-c \ --docdir=%{_prefix}/share/doc/%{name}-%{version} --mandir=%{prefix}/share/man \ CC=clang CXX=clang++ arch -arch $(echo ${chip} | tr [A-Z] [a-z]) \ make %{?_smp_mflags} popd done %else export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --datadir=%{prefix}/share/xerces-c \ --docdir=%{_prefix}/share/doc/%{name}-%{version} --mandir=%{prefix}/share/man make %{?_smp_mflags} %endif %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} %ifos darwin # start chip loop for chip in ARM64 X86_64; do mkdir ${chip}-root pushd ${chip} arch -arch $(echo ${chip} | tr [A-Z] [a-z]) \ make install DESTDIR=$RPM_BUILD_DIR/xerces-c31-%{version}/${chip}-root popd done %else make install DESTDIR=$RPM_BUILD_ROOT %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.1.4-13hepx2a - 2nd build and release of v3.1.4 on MacOS 13 - compatibility package "xerces-c31" for those packages using 3.1 - now provided as fat - built on OSXWS 13 and clang * Fri Nov 3 2023 Keisuke Fujii - 3.1.4-13hepx1a - 1st build and release of v3.1.4 on MacOS 13 - compatibility package "xerces-c31" for those packages using 3.1 - built on OSXWS 13 and clang * Sat Feb 26 2022 Keisuke Fujii - 3.1.4-13hepx1a - 1st build and release of v3.1.4 on MacOS 13 - compatibility package "xerces-c31" for those packages using 3.1 - built on MacOSX WS 13 * Sat Feb 26 2022 Keisuke Fujii - 3.1.4-12hepx1b - 2nd build and release of v3.1.4 on MacOS 12 for M1 Macs - compatibility package "xerces-c31" for those packages using 3.1 - built on MacOSX WS 12beta * Fri Feb 4 2022 Keisuke Fujii - 3.1.4-12hepx1a - 1st build and release of v3.1.4 on MacOS 12 for M1 Macs - compatibility package "xerces-c31" for those packages using 3.1 - built on MacOSX WS 11 * Thu Jan 23 2020 Keisuke Fujii - 3.1.4-10.15hepx1a - 1st build and release of v3.1.4 on MacOSX 10.15 - compatibility package "xerces-c31" for those packages using 3.1 - built on MacOSX WS 10.15 * Thu Dec 19 2019 Keisuke Fujii - 3.1.4-10.14hepx1b - 2nd build and release of v3.1.4 on MacOSX 10.14 - compatibility package "xerces-c31" for those packages using 3.1 - built on MacOSX WS 10.14 * Mon Dec 24 2018 Keisuke Fujii - 3.1.4-10.14hepx1a - 1st build and release of v3.1.4 on MacOSX 10.14 - compatibility package "xerces-c31" for those packages using 3.1 - built on MacOSX WS 10.13 * Sat Apr 07 2018 Keisuke Fujii - 3.1.4-10.13hepx1a - 1st build and release of v3.1.5 on MacOSX 10.13 - compatibility package "xerces-c31" for those packages using 3.1 * Mon Apr 02 2018 Keisuke Fujii - 3.1.4-10.13hepx1a - 1st build and release of v3.1.5 on MacOSX 10.13 * 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