From e65fe1f7e1b662dc97fb60b3376d59e72c4f23e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=B0=91=E5=AE=81?= Date: Tue, 18 Feb 2025 06:32:38 +0000 Subject: [PATCH] Add sw_64 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张少宁 --- ocaml-csexp.spec | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ocaml-csexp.spec b/ocaml-csexp.spec index ba4d3c0..0186521 100644 --- a/ocaml-csexp.spec +++ b/ocaml-csexp.spec @@ -1,4 +1,4 @@ -%ifnarch %{ocaml_native_compiler} +%ifarch sw_64 %global debug_package %{nil} %endif @@ -6,7 +6,7 @@ Name: ocaml-csexp Version: 1.5.2 -Release: 1 +Release: 2 Summary: Parsing and printing of S-expressions in canonical form License: MIT @@ -45,7 +45,7 @@ OCFLAGS="$OFLAGS -bin-annot" cd src ocamlc $OCFLAGS -output-obj csexp.mli ocamlc $OCFLAGS -a -o csexp.cma csexp.ml -%ifarch %{ocaml_native_compiler} +%ifnarch sw_64 ocamlopt $OFLAGS -ccopt "%{build_cflags}" -cclib "%{build_ldflags}" -a \ -o csexp.cmxa csexp.ml ocamlopt $OFLAGS -ccopt "%{build_cflags}" -cclib "%{build_ldflags}" -shared \ @@ -66,7 +66,7 @@ rm -fr %{buildroot}%{_prefix}/doc %else mkdir -p %{buildroot}%{_libdir}/ocaml/csexp cp -p src/csexp.{cma,cmi,cmt,cmti,mli} %{buildroot}%{_libdir}/ocaml/csexp -%ifarch %{ocaml_native_compiler} +%ifnarch sw_64 cp -p src/csexp.{a,cmx,cmxa,cmxs} %{buildroot}%{_libdir}/ocaml/csexp %endif cp -p csexp.opam %{buildroot}%{_libdir}/ocaml/csexp/opam @@ -75,11 +75,11 @@ cat >> %{buildroot}%{_libdir}/ocaml/csexp/META << EOF version = "%{version}" description = "Parsing and printing of S-expressions in canonical form" archive(byte) = "csexp.cma" -%ifarch %{ocaml_native_compiler} +%ifnarch sw_64 archive(native) = "csexp.cmxa" %endif plugin(byte) = "csexp.cma" -%ifarch %{ocaml_native_compiler} +%ifnarch sw_64 plugin(native) = "csexp.cmxs" %endif EOF @@ -91,7 +91,7 @@ cat >> %{buildroot}%{_libdir}/ocaml/csexp/dune-package << EOF (library (name csexp) (kind normal) -%ifarch %{ocaml_native_compiler} +%ifnarch sw_64 (archives (byte csexp.cma) (native csexp.cmxa)) (plugins (byte csexp.cma) (native csexp.cmxs)) (native_archives csexp.a) @@ -100,7 +100,7 @@ cat >> %{buildroot}%{_libdir}/ocaml/csexp/dune-package << EOF (plugins (byte csexp.cma)) %endif (main_module_name Csexp) -%ifarch %{ocaml_native_compiler} +%ifnarch sw_64 (modes byte native) %else (modes byte) @@ -118,14 +118,14 @@ EOF %{_libdir}/ocaml/csexp/META %{_libdir}/ocaml/csexp/*.cma %{_libdir}/ocaml/csexp/*.cmi -%ifarch %{ocaml_native_compiler} +%ifnarch sw_64 %{_libdir}/ocaml/csexp/*.cmxs %endif %files devel %{_libdir}/ocaml/csexp/dune-package %{_libdir}/ocaml/csexp/opam -%ifarch %{ocaml_native_compiler} +%ifnarch sw_64 %{_libdir}/ocaml/csexp/*.a %{_libdir}/ocaml/csexp/*.cmx %{_libdir}/ocaml/csexp/*.cmxa @@ -135,6 +135,9 @@ EOF %{_libdir}/ocaml/csexp/*.mli %changelog +* Tue Feb 18 2025 zhangshaoning - 1.5.2-2 +- Add sw_64 support + * Mon Jul 17 2023 niuyaru - 1.5.2-1 - Update package to version 1.5.2 -- Gitee