Bug 196409

Summary: [PATCH] graphics/djview4: Improvements for 4.9 version
Product: Ports & Packages Reporter: lightside <lightside>
Component: Individual Port(s)Assignee: Ruslan Makhmatkhanov <rm>
Status: Closed FIXED    
Severity: Affects Some People CC: rm
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 198087, 198088    
Attachments:
Description Flags
Proposed patch (since 370129 revision)
none
The poudriere testport log (FreeBSD 10 amd64)
none
Proposed patch (since 370129 revision)
none
Proposed patch (since 370129 revision)
none
The poudriere testport log (FreeBSD 10 amd64)
none
Proposed patch (since 370129 revision)
none
Proposed patch (since 398050 revision) none

Description lightside 2015-01-01 01:03:38 UTC
Created attachment 151170 [details]
Proposed patch (since 370129 revision)

There are some improvements for graphics/djview4 port to make it usable on desktop.
For example, while there is a need to use register-djview-menu shell script (on post-install stage, which is not available currently) to setup the djview4 menu entries and icons, it is possible to install them manually, as described in ${WRKSRC}/desktopfiles/README file. Also this application is translated to different languages.

- Add LICENSE_FILE
- Add libtiff.so to LIB_DEPENDS as required shared library
- Add desktop-file-utils to USES and sort it
- Add linguist to USE_QT4, because there are available messages to translate
- Add --disable-desktopfiles option to CONFIGURE_ARGS, which do not install scripts to register icons and menus
- Replace CFLAGS and CXXFLAGS with CPPFLAGS for include directory
- Improve sed patch by using & for replacement part
- Strip web-plugin library, install icons and desktop files on post-install stage
- Remove unneeded files after --disable-desktopfiles option from pkg-plist
- Add translated files, icons and desktop files to pkg-plist
Comment 1 lightside 2015-01-01 01:04:10 UTC
Created attachment 151171 [details]
The poudriere testport log (FreeBSD 10 amd64)
Comment 2 lightside 2015-01-05 07:15:38 UTC
Created attachment 151344 [details]
Proposed patch (since 370129 revision)

Removed installation of pixmap, because there are hicolor variants.
Comment 3 lightside 2015-02-25 00:00:45 UTC
Created attachment 153493 [details]
Proposed patch (since 370129 revision)

(In reply to comment #0)
> - Add linguist to USE_QT4, because there are available messages to translate

There is new devel/qt4-linguisttools port, which split from devel/qt4-linguist in ports r379843.

- Add linguisttools_build to USE_QT4, because there are available messages to translate
Comment 4 lightside 2015-02-25 00:01:33 UTC
Created attachment 153494 [details]
The poudriere testport log (FreeBSD 10 amd64)
Comment 5 lightside 2015-02-25 00:02:45 UTC
By the way, there is new 4.10 version with following changes:
- Bug fixes: layout, usability, preferences, locale selection
- Works with both Qt4 and Qt5
- Build uses automake/qmake hybrid (instead of autoconf/qmake).
- Layout annotations are honored in multipage mode
- Experimental OpenGL rendering 
- Slideshow mode

http://sourceforge.net/projects/djvu/files/DjView/4.10/
Comment 6 lightside 2015-02-25 05:58:40 UTC
Created attachment 153498 [details]
Proposed patch (since 370129 revision)
Comment 7 lightside 2015-02-28 03:19:08 UTC
This patch should be applied before following PRs:
bugs 198087.
bugs 198088.
Comment 8 lightside 2015-02-28 03:22:02 UTC
(In reply to comment #7)
> bugs 198087.
> bugs 198088.
bug 198087.
bug 198088.
Comment 9 commit-hook freebsd_committer 2015-09-27 21:02:23 UTC
A commit references this bug:

Author: rm
Date: Sun Sep 27 21:01:39 UTC 2015
New revision: 398050
URL: https://svnweb.freebsd.org/changeset/ports/398050

Log:
   graphics/djview4: port improvements

  There are some improvements for graphics/djview4 port to make it usable on
  desktop. For example, while there is a need to use register-djview-menu shell
  script (on post-install stage, which is not available currently) to setup the
  djview4 menu entries and icons, it is possible to install them manually, as
  described in ${WRKSRC}/desktopfiles/README file. Also this application is
  translated to different languages.

  - add LICENSE_FILE
  - add libtiff.so to LIB_DEPENDS as required shared library
  - add desktop-file-utils to USES and sort it
  - add linguist to USE_QT4, because there are available messages to translate
  - add --disable-desktopfiles option to CONFIGURE_ARGS, which do not install
    scripts to register icons and menus
  - replace CFLAGS and CXXFLAGS with CPPFLAGS for include directory
  - improve sed patch by using & for replacement part
  - strip web-plugin library, install icons and desktop files on post-install
    stage
  - remove unneeded files after --disable-desktopfiles option from pkg-plist
  - add translated files, icons and desktop files to pkg-plist

  PR:		196409
  Submitted by:	lightside <lightside@gmx.com>

Changes:
  head/graphics/djview4/Makefile
  head/graphics/djview4/pkg-plist
Comment 10 Ruslan Makhmatkhanov freebsd_committer 2015-09-27 21:02:37 UTC
Committed, thank you!
Comment 11 lightside 2015-09-27 22:16:54 UTC
Created attachment 161463 [details]
Proposed patch (since 398050 revision)

Hello, Ruslan.

Thanks for commit.

I think, there is a need to remove the second strip of nsdejavu.so file.
Between 3 and 4 revisions there was a patch to strip it, i.e. ports r387793:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/djview4/plugins/nsdejavu.so 

Where the proposed patch for 3 revision did the same:
.for f in ${WEBPLUGIN_FILES}
	@${STRIP_CMD} ${STAGEDIR}${WEBPLUGIN_DIR}/${f}
.endfor

% make -V WEBPLUGIN_DIR -V WEBPLUGIN_FILES
/usr/local/lib/djview4/plugins
nsdejavu.so

I attached the patch for the second variant, but the first variant is also works for current configuration with one nsdejavu.so file.
Comment 12 commit-hook freebsd_committer 2015-09-28 09:08:39 UTC
A commit references this bug:

Author: rm
Date: Mon Sep 28 09:08:03 UTC 2015
New revision: 398102
URL: https://svnweb.freebsd.org/changeset/ports/398102

Log:
  graphics/djview4: remove excessive STRIP_CMD

  PR:		196409
  Submitted by:	lightside <lightside@gmx.com>

Changes:
  head/graphics/djview4/Makefile