2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

141 Commits

Author SHA1 Message Date
Tigran Aivazian
a1f9068d5b Factor out JPEG support into a module
This is to make adding support for new formats easier.
See the file pic_jpeg.h for the description of the interface that each
image format must support.
2012-10-12 09:36:08 +01:00
Tigran Aivazian
8ab0e7fcb8 Force the use of bash.
On some distributions (e.g. Ubuntu) the shell used for scripts is dash,
not bash and we explicitly rely on bash's features in the Makefile, so
we must guarantee that we are running with bash (not dash or anything
else).
2012-10-10 21:04:47 +01:00
Tigran Aivazian
55532b0cd6 Add picviewer.lua to LUA_FILES
We need to do this in order for picviewer.lua to be included when doing
"make customupdate".
2012-10-09 09:26:58 +01:00
Tigran Aivazian
b2b9f425dd Decode the JPEG's dimensions. 2012-10-08 18:54:44 +01:00
Tigran Aivazian
30de5e0a23 Initial commit of picviewer. 2012-10-08 16:39:03 +01:00
Tigran Aivazian
e9913dce40 Generate git-rev file at compile time.
The file git-rev containing the program's version should be generated at
kpdfview compile time rather than package generation time.
2012-10-07 15:05:00 +01:00
NiLuJe
fab4b29502 More comments on the whole unaligned access mess on FW 2.x. Don't even
think about setting the alignment trap to a mode that includes warn,
that simply kills the performance because of the storm of faults the
syslog gets...
2012-10-03 16:07:03 +02:00
NiLuJe
9cc3438fd2 Yep, -mno-unaligned-access is definitely needed with a GCC 4.7
ToolChain, the kernel used on FW 2.x is too old to handle unaligned
accesses properly.
2012-10-03 15:57:52 +02:00
NiLuJe
1f2b85e0de It's a spaaaaace! 2012-10-03 15:43:25 +02:00
NiLuJe
aa68e5250a Quote that to avoid potential issues... 2012-10-03 15:42:11 +02:00
NiLuJe
566d081503 Slightly nicer fix for building mupdf's .host stuff with CFLAGS in the env. 2012-10-03 15:24:06 +02:00
NiLuJe
c38c6dbea4 Add a note about -mno-unaligned-access (check my x-compile.sh script for
more details, I'll revisit this once Linaro 2012.10 comes out).
2012-10-03 15:07:48 +02:00
NiLuJe
2d5c952749 Split the backward compat stuff between CFLAGS/CXXFLAGS 2012-10-03 14:56:14 +02:00
NiLuJe
bd306da170 Don't use the backward compat flags on the host. Move to a dedicated
variable, with a few comments to explain ;).
2012-10-03 14:54:45 +02:00
NiLuJe
c312eaabf1 Add -fno-finite-math-only (after -ffast-math) to the ARM flags to avoid
MG 2012.03 pulling GLIBC_2.15 symbols from libm (because -ffast-math asks
for it).
I didn't see this on my own TC because it's using a much older glibc version (2.9).
2012-10-03 14:50:29 +02:00
NiLuJe
50386743ec revert the whole 'let's use ld' thing. It's useless, and might wreak
havoc on EMU builds picking up system libs instead of the bundled ones.
2012-10-03 14:24:40 +02:00
NiLuJe
29878a0a90 Make sure we're always building luajit statically, so ld doesn't pick a
shared version. Of course that explained the size difference :D.
2012-10-03 14:19:32 +02:00
NiLuJe
a79d29fd17 Fix the luajit clean fix (forgot to quote *_*).
Let ld do its job when linking, don't pass the static libs as object
files (we end up with a smaller native binary).
2012-10-03 13:56:36 +02:00
NiLuJe
36d4b5e22a Make sure we're building for the softfp float ABI, and not in Thumb.
Might fix #359
2012-10-03 13:37:36 +02:00
NiLuJe
bf032e5c6a Honor toplevel settings re: CC/FLAGS when building libdjvu. Define
_GNU_SOURCE to fix build with CS/MG TC. Fixes #341
2012-10-03 13:35:49 +02:00
NiLuJe
392f29f522 Let's do a distclean, actually. Less noise in git status that way. 2012-10-03 13:27:48 +02:00
NiLuJe
d4782d05e8 Don't require a cross-tc for cleanthirdparty (still confuzzled about why
luajit needs CFLAGS for a clean target, but, hey!). Fixes #357
2012-10-03 13:25:15 +02:00
Qingping Hou
14fdb90f58 revert commit 9127d1c9a1
As NiLuJe points out, that line is not needed, clean
stage of the popen Makefile will take care of it.
2012-10-03 05:39:40 -04:00
Qingping Hou
3623ad9afb Merge branch 'master' of github.com:hwhw/kindlepdfviewer 2012-10-02 21:39:27 -04:00
Qingping Hou
44a4e32c93 add HOSTAR for emu mode complie 2012-10-02 21:37:55 -04:00
Qingping Hou
9127d1c9a1 add popennslib to cleanthirdparty 2012-10-02 21:37:48 -04:00
NiLuJe
a3be10bb96 Reimplement kpdf.sh changes from PR#348 after the PR#352 merge, and fix
customupdate to actually bundle kpdf.sh in the new location
2012-10-03 03:02:41 +02:00
NiLuJe
c7fa11e7e9 Slight syntax tweak 2012-10-03 01:46:56 +02:00
NiLuJe
a2ce5dd101 Hello, tiny stupid typo! 2012-10-03 01:37:20 +02:00
NiLuJe
7bc80277e4 Don't checkout popen_noshell twice (it reverts parts of our patch) 2012-10-03 00:36:50 +02:00
NiLuJe
4356622186 Don't patch popen-noshell twice 2012-10-03 00:34:42 +02:00
NiLuJe
9cc106995d Properly fix the luajit *FLAGS mess 2012-10-03 00:29:10 +02:00
NiLuJe
ffe7be7085 Merge remote-tracking branch 'upstream/master' 2012-10-02 23:51:03 +02:00
NiLuJe
76714c453a Restore Makefiles tweaks 2012-10-02 23:50:34 +02:00
NiLuJe
5c76ef0f78 Fetch popen_noshell during fetchthirdparty, don't bundle it in our repo 2012-10-02 23:30:12 +02:00
Dobrica Pavlinusic
53a60495b5 use git describe to generate version
Last release had git annotate tag (added with git -a) so this is
now much better alternative to just git sha1
2012-10-02 23:24:13 +02:00
NiLuJe
4e861715e3 Fix a stupid typo 2012-10-02 23:21:14 +02:00
NiLuJe
3f5fe1e991 Use popen_noshell as a static lib instead of an object file. Use CHOST
instead of HOST (and allow it to be set from the env), use $(MAKE)
instead of make to allow using the jobserver properly, and remove the
dash from commands where we do care about the return code (or inhibit
errors the usual way: rm -f instead of -rm)
2012-10-02 23:18:28 +02:00
NiLuJe
44f69b55cd Revert Makefile changes potentially unsuitable for upstream 2012-10-02 03:29:31 +02:00
NiLuJe
6b245b9c80 Update the standalone testcase, too. 2012-10-02 03:11:16 +02:00
NiLuJe
d27f20d696 Fix input device closing, and fix lipc-wait-event handling (using
popen-noshell from http://code.google.com/p/popen-noshell/)
2012-10-02 02:16:22 +02:00
NiLuJe
1a746d6e8f Makefile tweaks for my TC 2012-10-02 02:09:43 +02:00
Tigran Aivazian
0c1eb1109e Be minimalistic wrt LDFLAGS
Passing CFLAGS and LDFLAGS to kpdfview link stage has no effect in our
particular case, so I ripped it out, leaving it only for the crengine.
2012-10-01 21:05:23 +01:00
Tigran Aivazian
2fefc96b79 Enable LTO for kpdfview and crengine
Enaling link time optimizations for kpdfview binary and crengine library
causes another slight performance increase --- almost negligible (1-2ms
per page) but still noticeable by precise measurements.
2012-10-01 12:35:16 +01:00
Tigran Aivazian
d2e3558add ARM-specific optimizations
Thanks to NiLuJe who pointed out that our generic -march=armv6 can be
replaced (for K2/K3/DX/DXG) with a more specific optimization:
-march=armv6j -mtune=arm1136jf-s -mfpu=vfp. This I have now done and
also passed ARM_CFLAGS value to CXXFLAGS which is then passed to
crengine build. Tested, works fine. The performance improvement is
negligible (a few ms per page, but seems to be consistently better, i.e.
not just plus/minus fluctuations).
2012-10-01 12:09:13 +01:00
Tigran Aivazian
5459cb18ae Build mupdf in release mode, not debug.
Thanks to NiLuJe who pointed out that we are building mupdf in debug
mode. Switching to "release" build reduced the size of the kpdfview
binary and did not cause any performance degradation (but no noticeable
improvement either --- the page handling times seem to be exactly the
same, i.e. fluctuating a couple of ms in both directions).
2012-10-01 10:49:31 +01:00
Tigran Aivazian
db077b2f34 Optimize compilation of cre.cpp
1. Remove unused "-lsdtc++" from the compilation stage as no linking is
done then.
2. Add our standard CFLAGS to the compilation of cre.cpp which brings in
-O3 -march=armv6 which enables optimizations.
It seemed strange that we compile a cpp file with gcc (as opposed to
g++), but I left it as is for now.
2012-09-29 10:02:55 +01:00
Tigran Aivazian
f77a201e0b Typo: --disable-largefiles -> --disable-largefile
As a result of a simple typo we were continuing to include LFS
support unnecessarily...
2012-09-28 23:23:49 +01:00
Tigran Aivazian
385f74222a Create static directories at build, not runtime.
Instead of calling lfs.mkdir() to create "./history" and "./screenshots"
at runtime it is easier to create them at package build time.
I hesitated whether to add "./clipboard" to this list but decided
against it as we can perhaps change current directory and then
all the code manipulating clipboard would break, so I left it as is.
2012-09-25 13:00:34 +01:00
Tigran Aivazian
4b5c33d4cd Optimize building djvulibre.
1. Don't build xmltools in the emulator
2. Remove duplicate --disable-desktopfiles
3. Don't build LFS support. The largest DjVu file I have ever published
was a highres facsimile edition of the London Walton Polyglot (1657)
which was a "mere" 1GB in size and I don't think anyone produced
anything bigger. Besides, storing DjVu files >2GB in size (even if
they existed, which I doubt) on a Kindle with only 3GB total storage
space is _exceedingly_ unlikely.
2012-09-25 10:32:39 +01:00