Skip to content

Commit

Permalink
libtiff: update version: 3.9.4 -> 4.0.3; update config.* scripts
Browse files Browse the repository at this point in the history
Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
  • Loading branch information
David Abdurachmanov authored and David Abdurachmanov committed Dec 15, 2015
1 parent a2e11c6 commit 4e84fed
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions libtiff.spec
@@ -1,38 +1,42 @@
### RPM external libtiff 3.9.4
### RPM external libtiff 4.0.3
Source: http://download.osgeo.org/libtiff/tiff-%{realversion}.zip
%define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac)

Requires: libjpg
%if "%online" != "true"
Requires: zlib
%endif
Requires: libjpeg-turbo zlib

%if "%{?cms_cxx:set}" != "set"
%define cms_cxx g++
%endif

%if "%{?cms_cxxflags:set}" != "set"
%define cms_cxxflags -std=c++0x -O2
%define cms_cxxflags -std=c++11 -O2
%endif

%prep
%setup -n tiff-%{realversion}

# Update to detect aarch64 and ppc64le
rm -f ./config/config.{sub,guess}
curl -L -k -s -o ./config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
curl -L -k -s -o ./config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
chmod +x ./config/config.{sub,guess}

%build
./configure --prefix=%{i} --disable-static \
--with-zlib-lib-dir=$ZLIB_ROOT/lib \
--with-zlib-include-dir=$ZLIB_ROOT/include \
--with-jpeg-lib-dir=$LIBJPG_ROOT/lib \
--with-jpeg-include-dir=$LIBJPG_ROOT/include \
--with-zlib-lib-dir=${ZLIB_ROOT}/lib \
--with-zlib-include-dir=${ZLIB_ROOT}/include \
--with-jpeg-lib-dir=${LIBJPEG_TURBO_ROOT}/lib \
--with-jpeg-include-dir=${LIBJPEG_TURBO_ROOT}/include \
--disable-dependency-tracking \
--without-x \
CXX="%cms_cxx" CXXFLAGS="%cms_cxxflags"

make %makeprocesses
make %{makeprocesses}

%install
make install
# Strip libraries / executables, we are not going to debug them.
%define strip_files %i/{lib,bin}
%define strip_files %{i}/{lib,bin}
# Remove documentation, get it online.
%define drop_files %i/share
%define drop_files %{i}/share
# Don't need archive libraries.
rm -f %i/lib/*.{l,}a
rm -f %{i}/lib/*.{l,}a

0 comments on commit 4e84fed

Please sign in to comment.