[packages/libopenraw] - added cargo patch, setup cargo target on x32

qboosh qboosh at pld-linux.org
Sun Oct 18 21:40:49 CEST 2020


commit 59709f9e51dd19901a283e744a22bf70605b198e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Oct 18 21:40:53 2020 +0200

    - added cargo patch, setup cargo target on x32

 libopenraw-cargo.patch | 11 +++++++++++
 libopenraw.spec        | 14 ++++++++++++--
 2 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/libopenraw.spec b/libopenraw.spec
index 82ffc81..fe2a5eb 100644
--- a/libopenraw.spec
+++ b/libopenraw.spec
@@ -15,6 +15,7 @@ Source1:	%{name}-%{version}-vendor.tar.xz
 # Source1-md5:	1d51cd2d97ab62335d92f82c21a54f35
 Patch0:		%{name}-pc.patch
 Patch1:		%{name}-link.patch
+Patch2:		%{name}-cargo.patch
 URL:		https://libopenraw.freedesktop.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -128,6 +129,7 @@ Statyczna biblioteka libopenrawgnome.
 %setup -q -b1
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 install -d .cargo
 cat >.cargo/config <<EOF
@@ -149,13 +151,21 @@ export CARGO_HOME="$(pwd)/.cargo"
 %configure \
 	--disable-silent-rules
 
-%{__make}
+%{__make} \
+%ifarch x32
+	CARGO_RELEASE_ARGS="--release --target x86_64-unknown-linux-gnux32" \
+	CARGO_TARGET_SUBDIR=x86_64-unknown-linux-gnux32/release
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+	DESTDIR=$RPM_BUILD_ROOT \
+%ifarch x32
+	CARGO_RELEASE_ARGS="--release --target x86_64-unknown-linux-gnux32" \
+	CARGO_TARGET_SUBDIR=x86_64-unknown-linux-gnux32/release
+%endif
 
 # obsoleted by pkg-config
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libopenraw*.la
diff --git a/libopenraw-cargo.patch b/libopenraw-cargo.patch
new file mode 100644
index 0000000..b2cde03
--- /dev/null
+++ b/libopenraw-cargo.patch
@@ -0,0 +1,11 @@
+--- libopenraw-0.2.3/lib/Makefile.am.orig	2020-10-18 21:09:21.948671716 +0200
++++ libopenraw-0.2.3/lib/Makefile.am	2020-10-18 21:26:10.797676347 +0200
+@@ -89,7 +89,7 @@
+ endif
+ 
+ CARGO_TARGET_DIR=@abs_top_builddir@/lib/mp4/target
+-RUST_PATH=$(CARGO_TARGET_DIR)/@CARGO_TARGET_SUBDIR@
++RUST_PATH=$(CARGO_TARGET_DIR)/$(CARGO_TARGET_SUBDIR)
+ RUST_LIB=$(RUST_PATH)/libmp4.a
+ RUST_LIBADD=-L$(RUST_PATH) -lmp4
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libopenraw.git/commitdiff/59709f9e51dd19901a283e744a22bf70605b198e



More information about the pld-cvs-commit mailing list