summaryrefslogtreecommitdiff
path: root/packages/fbreader/fbreader_0.8.2a.bb
blob: ca25bdc6207fb3d43f9711db39075c7316f20023 (plain)
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
DESCRIPTION = "FBreader is an ebook reader"
LICENSE = "GPL2"
HOMEPAGE = "http://only.mawhrin.net/fbreader/"
SECTION = "x11/utils"
PRIORITY = "optional"
DEPENDS = "gtk+ enca expat bzip2 libgpewidget virtual/libiconv"
PR = "r5"

# The RESOLUTION is defined at compile time which makes
# this package MACHINE specific.
PACKAGE_ARCH_${PN} = "${MACHINE_ARCH}"

SRC_URI = "http://only.mawhrin.net/fbreader/fbreader-sources-${PV}.tgz \
	   file://fbreader-0.8.2a_buildsys_oe.patch;patch=1 \
	   file://480x640-buildfix.patch;patch=1"
	   
SRC_URI_append_spitz = "\
		  file://zaurus-VGA.patch;patch=1"

SRC_URI_append_akita = "\
		  file://zaurus-VGA.patch;patch=1"

SRC_URI_append_htcuniversal = "\
		  file://zaurus-VGA.patch;patch=1"

# Set the defaults
READER_RESOLUTION = "240x320"
READER_ARCH	  = "openzaurus"
READER_GUI	  = "gpe"
READER_STATUS	  = "release"

# Set device specific overrides
READER_RESOLUTION_fic-gta01 = "480x640"
READER_RESOLUTION_spitz = "640x480"
READER_RESOLUTION_akita = "640x480"
READER_RESOLUTION_htcuniversal = "640x480"

FILES_${PN} += "${datadir}/FBReader ${datadir}/zlibrary"

CFLAGS_append = " RESOLUTION=${READER_RESOLUTION} INSTALLDIR=/usr"
EXTRA_OEMAKE = "CC='${CXX}' LD='${CXX}' OE_CFLAGS='${CXXFLAGS}' INCPATH='${STAGING_INCDIR}' LIBPATH='${STAGING_LIBDIR}'"

inherit pkgconfig

do_configure() {
	cd ${WORKDIR}/${PN}-${PV}
	mv makefiles/target.mk makefiles/target.mk.orig
	
	echo "TARGET_ARCH = ${READER_ARCH}" > makefiles/target.mk	
	echo "UI_TYPE = ${READER_GUI}" >> makefiles/target.mk
	echo "TARGET_STATUS = ${READER_STATUS}" >> makefiles/target.mk
	
	cd fbreader/data/help
	
	# FIXME: Add native _480x640 file with propper linebreaks
	ln -s MiniHelp.240x320.fb2 MiniHelp.openzaurus_480x640.fb2
}

do_install () {
        cd fbreader/${READER_ARCH}; oe_runmake .builddir RESOLUTION=${READER_RESOLUTION}
	cp -r data/* ${D}
}