Unbundle zopfli
- We now have libzopfli/zopfli-devel in EPEL9
This commit is contained in:
parent
e4002e09f4
commit
ecfcb6a461
1 changed files with 17 additions and 7 deletions
|
|
@ -39,13 +39,7 @@ BuildRequires: zlib-devel
|
|||
|
||||
# Unbundled downstream
|
||||
BuildRequires: pkgconfig(libdeflate)
|
||||
|
||||
# No libzopfli/zopfli-devel in EPEL9.
|
||||
#
|
||||
# Version number based on HISTORY, which mentions that upstream commit
|
||||
# 6818a0859063b946094fb6f94732836404a0d89a was used from
|
||||
# https://github.com/google/zopfli/.
|
||||
Provides: bundled(zopfli) = 1.0.2^20160527git6818a08
|
||||
BuildRequires: zopfli-devel
|
||||
|
||||
# From 7z/README:
|
||||
#
|
||||
|
|
@ -95,6 +89,19 @@ find . -type f -exec gawk \
|
|||
'{}' '+' |
|
||||
xargs -r -t sed -r -i 's@^([[:blank:]]*#include.*)libdeflate/@\1@'
|
||||
|
||||
# Patch out bundled zopfli
|
||||
rm -rv zopfli
|
||||
sed -r -i \
|
||||
-e '/zopfli[\/_]/d' \
|
||||
-e 's/((\(7z_SOURCES\)|WindowOut\.h).*)[[:blank:]]*\\/\1/' \
|
||||
Makefile.am
|
||||
# Fix up #include paths. The find-then-modify pattern keeps us from discarding
|
||||
# mtimes on any sources that do not need modification.
|
||||
find . -type f -exec gawk \
|
||||
'/^[[:blank:]]*#include.*zopfli/ { print FILENAME; nextfile }' \
|
||||
'{}' '+' |
|
||||
xargs -r -t sed -r -i -e 's@^([[:blank:]]*#include.*)zopfli/@\1@'
|
||||
|
||||
|
||||
%build
|
||||
%set_build_flags
|
||||
|
|
@ -105,6 +112,9 @@ export CFLAGS="$(pkgconf --cflags libdeflate) ${CFLAGS-}"
|
|||
export CXXFLAGS="$(pkgconf --cflags libdeflate) ${CXXFLAGS-}"
|
||||
export LDFLAGS="$(pkgconf --libs libdeflate) ${LDFLAGS-}"
|
||||
|
||||
# Link against system zopfli
|
||||
export LDFLAGS="-lzopfli ${LDFLAGS-}"
|
||||
|
||||
%configure
|
||||
%make_build
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue