Accepting request 109739 from graphics

- updated to 3.5.25:
  * Removed the deprecated djview3 code.
  * Removed the deprecated cothreads code.
  * Removed the unmaintained japanese man pages.
  * Added ddjvu option to skip corrupted pages.
  * Miniexp API is now reentrant.
  * Bug fixes all around.

- Add djvulibre-gcc47.patch: Fix build with gcc 4.7.

- fix build for factory (define $QTDIR)

OBS-URL: https://build.opensuse.org/request/show/109739
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/djvulibre?expand=0&rev=27
This commit is contained in:
Stephan Kulow 2012-03-22 12:45:52 +00:00 committed by Git OBS Bridge
commit a7032ec4ed
7 changed files with 42 additions and 150 deletions

View File

@ -1,69 +0,0 @@
--- djvulibre-3.5.23/libdjvu/GSmartPointer.h~ 2011-03-29 12:35:05.000000000 +0400
+++ djvulibre-3.5.23/libdjvu/GSmartPointer.h 2011-03-29 12:35:25.000000000 +0400
@@ -58,6 +58,9 @@
#ifndef _GSMARTPOINTER_H_
#define _GSMARTPOINTER_H_
+
+#include <cstring>
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/libdjvu/MMX.cpp b/libdjvu/MMX.cpp
index 528dab6..e70fdd8 100644
--- a/libdjvu/MMX.cpp
+++ b/libdjvu/MMX.cpp
@@ -167,8 +167,23 @@ MMXControl::enable_mmx()
: "=m" (cpuflags) :
: "eax","ecx","edx");
#endif
+#if defined(MMX) && defined(__GNUC__) && defined(__x86_64__)
+ // Detection of MMX for GCC
+ __asm__ volatile (// Check that CR0:EM is clear
+ "xorl %%edx,%%edx\n\t"
+ "smsw %%ax\n\t"
+ "andl $4,%%eax\n\t"
+ "jnz 1f\n\t"
+ // Execute CPUID
+ "movl $1,%%eax\n\t"
+ "cpuid\n"
+ // Finish
+ "1:\tmovl %%edx, %0"
+ : "=m" (cpuflags) :
+ : "eax","ebx","ecx","edx");
+#endif
#if defined(MMX) && defined(_MSC_VER) && defined(_M_IX86)
- // Detection of MMX for MSVC
+ // Detection of MMX for MSVC 32 bits
__asm { pushfd
pop ecx
xor edx,edx
diff --git a/libdjvu/MMX.h b/libdjvu/MMX.h
index b0af5e5..f8780af 100644
--- a/libdjvu/MMX.h
+++ b/libdjvu/MMX.h
@@ -143,17 +143,18 @@ class MMXControl
#ifndef NO_MMX
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+typedef struct{ char c[8]; } MMX_t;
#define MMXemms \
__asm__ volatile("emms" : : : "memory" )
#define MMXrr(op,src,dst) \
- __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory")
+ __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory" )
#define MMXir(op,imm,dst) \
- __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory")
+ __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory" )
#define MMXar(op,addr,dst) \
- __asm__ volatile( #op " %0,%%" #dst : : "m" (*(addr)) : "memory")
+ __asm__ volatile( #op " %0,%%" #dst : : "m" (*(MMX_t*)(addr)) : "memory" )
#define MMXra(op,src,addr) \
- __asm__ volatile( #op " %%" #src ",%0" : : "m" (*(addr)) : "memory")
+ __asm__ volatile( #op " %%" #src ",%0" : "=m" (*(MMX_t*)(addr)) : : "memory")
#define MMX 1
#endif

View File

@ -1,11 +0,0 @@
--- gui/nsdejavu/Makefile.in 2003-01-06 15:09:56.000000000 +0100
+++ gui/nsdejavu/Makefile.in 2003-09-30 12:24:14.000000000 +0200
@@ -25,7 +25,7 @@
datadir = @datadir@
libdir = @libdir@
mandir = @mandir@
-plugindir = ${libdir}/netscape/plugins
+plugindir = ${libdir}/browser-plugins
CC = @CC@
CXX = @CXX@

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:761b799084bd7095f2e6d9fc3c35ec45e0977373a8b9f3e405e5dd8aa89e95ed
size 2695962

3
djvulibre-3.5.25.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:497e5823660139775780fa6339c57b33b46df8d606c815e4e6edae57d35e7f0c
size 2335628

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Fri Mar 16 15:31:13 UTC 2012 - pgajdos@suse.com
- updated to 3.5.25:
* Removed the deprecated djview3 code.
* Removed the deprecated cothreads code.
* Removed the unmaintained japanese man pages.
* Added ddjvu option to skip corrupted pages.
* Miniexp API is now reentrant.
* Bug fixes all around.
-------------------------------------------------------------------
Thu Mar 15 19:59:47 UTC 2012 - dimstar@opensuse.org
- Add djvulibre-gcc47.patch: Fix build with gcc 4.7.
-------------------------------------------------------------------
Tue Mar 13 15:21:34 UTC 2012 - pgajdos@suse.com
- fix build for factory (define $QTDIR)
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package djvulibre # spec file for package djvulibre
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -18,18 +18,18 @@
Name: djvulibre Name: djvulibre
BuildRequires: fdupes libdrm-devel libjpeg-devel libtiff-devel qt3-devel qt3-devel-tools update-desktop-files xorg-x11-devel BuildRequires: fdupes
License: GPL-2.0+ BuildRequires: gcc-c++
Group: Productivity/Graphics/Other BuildRequires: libjpeg-devel
Version: 3.5.24 BuildRequires: libtiff-devel
Release: 5 Version: 3.5.25
Release: 0
Url: http://djvu.sourceforge.net Url: http://djvu.sourceforge.net
Summary: An Open Source Implementation of DjVu Summary: An Open Source Implementation of DjVu
License: GPL-2.0+
Group: Productivity/Graphics/Other
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Patch1: %{name}-%{version}-nsdejavu.patch Patch0: %{name}-filepath.patch
Patch2: %{name}-%{version}-filepath.patch
# PATCH-FIX-UPSTREAM djvulibre-3.5.23-gcc46.patch idoenmez@suse.de -- Fix gcc 4.6 compilation, upstream bug #3256513
Patch3: djvulibre-3.5.23-gcc46.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -45,19 +45,7 @@ be smoothly zoomed and panned with no lengthy rerendering. DjVu is used
by hundreds of academic, commercial, governmental, and noncommercial by hundreds of academic, commercial, governmental, and noncommercial
Web sites around the world. Web sites around the world.
%package djview3
License: GPL-2.0+
Summary: DjView3 is a portable DjVu Qt3 based viewer and browser plugin
Group: Productivity/Graphics/Other
Requires: djvulibre = %{version}
Conflicts: djvulibre-djview4
%description djview3
DjView3 is a viewer and browser plugin for DjVu documents, based on the
DjVuLibre-3.5 library and the Qt3 toolkit.
%package -n libdjvulibre21 %package -n libdjvulibre21
License: GPL-2.0+
Summary: Libraries of Open Source Implementation of DjVu - djvulibre Summary: Libraries of Open Source Implementation of DjVu - djvulibre
Group: Productivity/Graphics/Other Group: Productivity/Graphics/Other
@ -65,16 +53,15 @@ Group: Productivity/Graphics/Other
Libraries of Open Source Implementation of DjVu - djvulibre. Libraries of Open Source Implementation of DjVu - djvulibre.
%package -n libdjvulibre-devel %package -n libdjvulibre-devel
License: GPL-2.0+
Summary: Libraries of Open Source Implementation of DjVu - djvulibre Summary: Libraries of Open Source Implementation of DjVu - djvulibre
Group: Development/Libraries/Other Group: Development/Libraries/Other
Requires: libdjvulibre21 = %{version}, libjpeg-devel Requires: libdjvulibre21 = %{version}
Requires: libjpeg-devel
%description -n libdjvulibre-devel %description -n libdjvulibre-devel
Libraries of Open Source Implementation of DjVu - djvulibre. Libraries of Open Source Implementation of DjVu - djvulibre.
%package doc %package doc
License: GPL-2.0+
Summary: Documentation for the the DjVu - djvulibre Summary: Documentation for the the DjVu - djvulibre
Group: Productivity/Graphics/Other Group: Productivity/Graphics/Other
@ -83,27 +70,18 @@ This package contains the documentation for the DjVu - djvulibre
%prep %prep
%setup %setup
%patch1 %patch0
%patch2
%patch3 -p1
# removing cvsignore files in version 3.5.19
rm -rf doc/minilisp/.cvsignore
%build %build
# specifying --x-libraries and -includes is needed due to new paths in X.org 7.x # specifying --x-libraries and -includes is needed due to new paths in X.org 7.x
# delete them if builds against X.org 6.9 or lower # delete them if builds against X.org 6.9 or lower
CFLAGS="$RPM_OPT_FLAGS -I$QTDIR/include -Wall" \ CFLAGS="$RPM_OPT_FLAGS" \
CXXFLAGS="$RPM_OPT_FLAGS -I$QTDIR/include -Wall -fmessage-length=0 -fno-strict-aliasing" \ CXXFLAGS="$RPM_OPT_FLAGS" \
QT_LIBS="-L/usr/%_lib/qt3/%{_lib} -lqt-mt" \
./configure \ ./configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--libdir=%{_libdir} \ --libdir=%{_libdir} \
--mandir=%{_mandir} \ --mandir=%{_mandir}
--x-includes=/usr/include/ \ make OPTS="$RPM_OPT_FLAGS -DNO_DEBUG" %{?_smp_mflags}
--x-libraries=/usr/%{_lib}/ \
--with-qt=/usr/%_lib/qt3 \
--enable-djview
make OPTS="$RPM_OPT_FLAGS -Wall -fmessage-length=0 -DNO_DEBUG" %{?_smp_mflags}
%install %install
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
@ -117,12 +95,6 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
install -m 644 desktopfiles/hi22-djvu.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/22x22/mimetypes/djvu.png install -m 644 desktopfiles/hi22-djvu.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/22x22/mimetypes/djvu.png
install -m 644 desktopfiles/hi32-djvu.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/32x32/mimetypes/djvu.png install -m 644 desktopfiles/hi32-djvu.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/32x32/mimetypes/djvu.png
install -m 644 desktopfiles/hi48-djvu.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/mimetypes/djvu.png install -m 644 desktopfiles/hi48-djvu.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/mimetypes/djvu.png
install -m 644 desktopfiles/hi32-djview3.png $RPM_BUILD_ROOT/usr/share/pixmaps/djvulibre-djview3.png
#fix wrong permissions
%__chmod 644 desktopfiles/djvulibre-djview3.desktop
#delete shebank from desktop file
%__sed -i '/#!\/usr\/bin\/env xdg-open/d' desktopfiles/djvulibre-djview3.desktop
%suse_update_desktop_file -r -i djvulibre-djview3 Graphics Viewer
%fdupes $RPM_BUILD_ROOT %fdupes $RPM_BUILD_ROOT
%post -n libdjvulibre21 -p /sbin/ldconfig %post -n libdjvulibre21 -p /sbin/ldconfig
@ -131,9 +103,8 @@ install -m 644 desktopfiles/hi32-djview3.png $RPM_BUILD_ROOT/usr/share/pixmaps/d
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING COPYRIGHT INSTALL NEWS README TODO %doc COPYING COPYRIGHT INSTALL NEWS README
%doc %{_mandir}/man1/* %doc %{_mandir}/man1/*
%doc %{_mandir}/ja/*
%{_datadir}/djvu %{_datadir}/djvu
%{_bindir}/* %{_bindir}/*
%dir %{_prefix}/share/icons/hicolor %dir %{_prefix}/share/icons/hicolor
@ -146,26 +117,6 @@ install -m 644 desktopfiles/hi32-djview3.png $RPM_BUILD_ROOT/usr/share/pixmaps/d
%{_prefix}/share/icons/hicolor/22x22/mimetypes/djvu.png %{_prefix}/share/icons/hicolor/22x22/mimetypes/djvu.png
%{_prefix}/share/icons/hicolor/32x32/mimetypes/djvu.png %{_prefix}/share/icons/hicolor/32x32/mimetypes/djvu.png
%{_prefix}/share/icons/hicolor/48x48/mimetypes/djvu.png %{_prefix}/share/icons/hicolor/48x48/mimetypes/djvu.png
# these go to djview3 subpackage
%exclude %{_prefix}/share/pixmaps/djvulibre-djview3.png
%exclude %{_libdir}/browser-plugins/nsdejavu.so
%exclude %{_datadir}/djvu/djview3
%exclude %{_bindir}/djview*
%exclude %doc %{_mandir}/man1/djview*
%exclude %doc %{_mandir}/ja/man1/djview*
%exclude %doc %{_mandir}/man1/nsdejavu*
%exclude %doc %{_mandir}/ja/man1/nsdejavu*
%files djview3
%defattr(-,root,root)
%doc %{_mandir}/man1/djview*
%doc %{_mandir}/ja/man1/djview*
%doc %{_mandir}/man1/nsdejavu*
%doc %{_mandir}/ja/man1/nsdejav*
%{_prefix}/share/pixmaps/djvulibre-djview3.png
%{_libdir}/browser-plugins/nsdejavu.so
%{_bindir}/djview*
%{_prefix}/share/applications/djvulibre-djview3.desktop
%files -n libdjvulibre21 %files -n libdjvulibre21
%defattr(-,root,root) %defattr(-,root,root)