1548546 - jbigkit: Partial Fedora build flags injection

This commit is contained in:
Zdenek Dohnal 2018-03-02 15:32:16 +01:00
parent dca9abaf6c
commit eb502b1c28
2 changed files with 59 additions and 3 deletions

51
jbigkit-ldflags.patch Normal file
View File

@ -0,0 +1,51 @@
diff -up jbigkit-2.1/libjbig/Makefile.ldflags jbigkit-2.1/libjbig/Makefile
--- jbigkit-2.1/libjbig/Makefile.ldflags 2018-02-27 17:50:15.786038149 +0100
+++ jbigkit-2.1/libjbig/Makefile 2018-02-27 17:55:44.042093437 +0100
@@ -10,19 +10,19 @@ PICFLAGS := -fPIC -DPIC
all: libjbig.so.$(VERSION) tstcodec tstcodec85
tstcodec: tstcodec.o libjbig.so
- $(CC) $(CFLAGS) -o tstcodec $< -L. -ljbig
+ $(CC) $(CFLAGS) -o tstcodec $< -L. -ljbig $(LDFLAGS)
tstcodec85: tstcodec85.o libjbig85.so
- $(CC) $(CFLAGS) -o tstcodec85 $^ -L. -ljbig
+ $(CC) $(CFLAGS) -o tstcodec85 $^ -L. -ljbig $(LDFLAGS)
%.so: %.so.$(VERSION)
ln -sf $< $@
libjbig.so.$(VERSION): jbig.o jbig_ar.o
- $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^
libjbig85.so.$(VERSION): jbig85.o jbig_ar.o
- $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^
jbig.o jbig85.o jbig_ar.o: CFLAGS += $(PICFLAGS)
diff -up jbigkit-2.1/pbmtools/Makefile.ldflags jbigkit-2.1/pbmtools/Makefile
--- jbigkit-2.1/pbmtools/Makefile.ldflags 2018-02-27 17:50:35.902857687 +0100
+++ jbigkit-2.1/pbmtools/Makefile 2018-02-27 17:57:09.296328639 +0100
@@ -15,16 +15,16 @@ all: pbmtojbg jbgtopbm pbmtojbg85 jbgtop
txt: pbmtojbg.txt jbgtopbm.txt pbm.txt pgm.txt
pbmtojbg: pbmtojbg.o ../libjbig/libjbig.so
- $(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
+ $(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig $(LDFLAGS)
jbgtopbm: jbgtopbm.o ../libjbig/libjbig.so
- $(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig
+ $(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig $(LDFLAGS)
pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.so
- $(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85
+ $(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85 $(LDFLAGS)
jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.so
- $(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
+ $(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85 $(LDFLAGS)
jbgtopbm.o: jbgtopbm.c ../libjbig/jbig.h
pbmtojbg.o: pbmtojbg.c ../libjbig/jbig.h

View File

@ -8,6 +8,7 @@ URL: http://www.cl.cam.ac.uk/~mgk25/jbigkit/
Source0: http://www.cl.cam.ac.uk/~mgk25/download/jbigkit-%{version}.tar.gz
Patch0: jbigkit-2.1-shlib.patch
Patch1: jbigkit-2.0-warnings.patch
Patch2: jbigkit-ldflags.patch
# gcc is no longer in buildroot by default
# gcc needed for libjbig library and several filters - jbigtopbm, pbmtojbig e.g.
@ -49,9 +50,13 @@ formats.
%setup -q -n jbigkit-2.1
%patch0 -p1 -b .shlib
%patch1 -p1 -b .warnings
# jbigkit: Partial Fedora build flags injection (bug #1548546)
%patch2 -p1 -b .ldflags
%build
make %{?_smp_mflags}
# get the correct redhat build flags
%set_build_flags
%make_build
%install
mkdir -p $RPM_BUILD_ROOT%{_libdir}
@ -93,8 +98,8 @@ make test
%{_includedir}/jbig*.h
%changelog
* Mon Feb 19 2018 Zdenek Dohnal <zdohnal@redhat.com> - 2.1-11
- rebuilt
* Tue Feb 27 2018 Zdenek Dohnal <zdohnal@redhat.com> - 2.1-11
- 1548546 - jbigkit: Partial Fedora build flags injection
* Fri Feb 09 2018 Zdenek Dohnal <zdohnal@redhat.com> - 2.1-10
- remove old stuff