forked from haikuports/haikuports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
djview-4.12.recipe
109 lines (99 loc) · 3.1 KB
/
djview-4.12.recipe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
SUMMARY="Viewer for DjVu documents"
DESCRIPTION="This package contains the djview4 viewer and browser plugin.
This new viewer relies on the DjVulibre library and the Qt toolkit.
Highlights:
- entirely based on the public djvulibre api.
- entirely written in portable Qt4/Qt5.
- works natively under Unix/X11, MS Windows, and MacOS X.
- continuous scrolling of pages
- side-by-side display of pages
- ability to specify a url to the djview command
- all plugin and cgi options available from the command line
- all silly annotations implemented
- display thumbnails as a grid
- display outlines
- page names supported (see djvused command set-page-title)
- metadata dialog (see djvused command set-meta)
- implemented as reusable Qt widgets"
HOMEPAGE="http://djvu.sourceforge.net/djview4.html"
COPYRIGHT="2006- Leon Bottou"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://downloads.sourceforge.net/djvu/djview-$portVersion.tar.gz"
CHECKSUM_SHA256="5673c6a8b7e195b91a1720b24091915b8145de34879db1158bc936b100eaf3e3"
SOURCE_DIR="djview4-$portVersion"
ADDITIONAL_FILES="djview4.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
djview$secondaryArchSuffix = $portVersion
cmd:djview$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libdjvulibre$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5OpenGL$secondaryArchSuffix
lib:libQt5PrintSupport$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libtiff$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
xlibe${secondaryArchSuffix}_devel
devel:libdjvulibre$secondaryArchSuffix >= 21.7
devel:libGL$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5DBus$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix
devel:libQt5OpenGL$secondaryArchSuffix
devel:libQt5PrintSupport$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libtiff$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoreconf
cmd:awk
cmd:convert
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:rsvg_convert
"
BUILD()
{
export LDFLAGS="-lnetwork"
NOCONFIGURE=1 ./autogen.sh
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
# we are not linux
rm -rf $dataDir/{applications,icons}
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="0"
local APP_NAME="DjView"
local LONG_INFO="$SUMMARY"
local APP_SIGNATURE="application/x-vnd.djview"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
-e "s|@APP_NAME@|$APP_NAME|" \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
$portDir/additional-files/djview4.rdef.in > djview4.rdef
addResourcesToBinaries djview4.rdef $binDir/djview
addAppDeskbarSymlink $binDir/djview DjView
}