]> git.pld-linux.org Git - packages/libopenraw.git/commitdiff
- added cargo patch, setup cargo target on x32 master auto/th/libopenraw-0.2.3-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 18 Oct 2020 19:40:53 +0000 (21:40 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 18 Oct 2020 19:40:53 +0000 (21:40 +0200)
libopenraw-cargo.patch [new file with mode: 0644]
libopenraw.spec

diff --git a/libopenraw-cargo.patch b/libopenraw-cargo.patch
new file mode 100644 (file)
index 0000000..b2cde03
--- /dev/null
@@ -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
index 82ffc815c9abd996b889cb15cb3e6d7ae00be8d7..fe2a5ebde5d2204de0d5e500819e3108f5fd5057 100644 (file)
@@ -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
This page took 0.055766 seconds and 4 git commands to generate.