commit 5b8cf0ba86bedefb25c565bc86c0445be57ee5f6
Author: Paul Howarth <paul(a)city-fan.org>
Date: Thu Feb 17 08:53:40 2022 +0000
Honour LDFLAGS if present in the environment
xv-3.10a-LDFLAGS.patch | 35 +++++++++++++++++++++++++++++++++++
xv.spec | 13 +++++++++----
2 files changed, 44 insertions(+), 4 deletions(-)
---
diff --git a/xv-3.10a-LDFLAGS.patch b/xv-3.10a-LDFLAGS.patch
new file mode 100644
index 0000000..fb7c489
--- /dev/null
+++ b/xv-3.10a-LDFLAGS.patch
@@ -0,0 +1,35 @@
+commit 1d2a937e2bee6be10e09ed69394ea2ed6faff0b5
+Author: Paul Howarth <paul(a)city-fan.org>
+Date: Tue Feb 15 13:37:02 2022 +0000
+
+ Makefile: honour LDFLAGS if it's set in the environment
+
+diff --git a/src/Makefile b/src/Makefile
+index 6a4e1cc..1dee788 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -370,19 +370,19 @@ all: xv bggen vdcomp xcmap xvpictoppm
+
+ #xv: $(OBJS) $(JPEGLIB) $(TIFFLIB)
+ xv: $(OBJS)
+- $(CC) -o xv $(CFLAGS) $(OBJS) $(LIBS)
++ $(CC) -o xv $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
+
+ bggen: bggen.c
+- $(CC) $(CFLAGS) -o bggen bggen.c $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o bggen bggen.c $(LIBS)
+
+ vdcomp: vdcomp.c
+- $(CC) $(CFLAGS) -o vdcomp vdcomp.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o vdcomp vdcomp.c
+
+ xcmap: xcmap.c
+- $(CC) $(CFLAGS) -o xcmap xcmap.c $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o xcmap xcmap.c $(LIBS)
+
+ xvpictoppm: xvpictoppm.c
+- $(CC) $(CFLAGS) -o xvpictoppm xvpictoppm.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o xvpictoppm xvpictoppm.c
+
+
+
diff --git a/xv.spec b/xv.spec
index f3eeebc..727eeb9 100644
--- a/xv.spec
+++ b/xv.spec
@@ -38,6 +38,7 @@ Patch12: xv-3.10a-gcc10.patch
Patch13: xv-3.10a-20220127-jasper.patch
Patch14: xv-3.10a-c99isms.patch
Patch15: xv-3.10a-utf8-docs.patch
+Patch16: xv-3.10a-LDFLAGS.patch
BuildRequires: gcc
BuildRequires: libtiff-devel
@@ -170,12 +171,15 @@ rm ../%{name}-%{vprog}-jumbo-fix-enh-patch-%{vjumbo}.txt
# Fix some C99-isms introduced in previous patch, breaks build with older compilers
%patch14 -p2
-# Fix compiler options, install directories; enable JPEG 2000 support
-%patch0 -p1
-
# Recode docs as UTF-8
%patch15 -p2
+# Honour LDFLAGS if present in the environment
+%patch16 -p2
+
+# Fix compiler options, install directories; enable JPEG 2000 support
+%patch0 -p1
+
# Include permission to distribute
install -m 0644 -p %{SOURCE2} .
@@ -198,7 +202,7 @@ for doc in docs/manuals/xv*.ps; do
mv -f ${doc}.unix ${doc}
done
-# Fix directory location of X libs
+# Fix directory location of X libs and link with libXt
sed -i -e 's@-L/usr/X11R6/lib[[:space:]]@-L%{_libdir} -lXt @' Makefile
%build
@@ -281,6 +285,7 @@ done
- Fix Jasper support to use proper library APIs (patch from Michael Adams,
Jasper upstream maintainer)
- Use a patch rather than iconv to fix documentation encoding
+- Honour LDFLAGS if present in the environment
* Thu Feb 10 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
3.10a.jumbopatch.20070520-38
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild