mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-24 07:42:32 -04:00
Edit Book: Fix undocked windows not resizable on OS X
Caused by a regression in Qt. https://bugreports.qt.io/browse/QTBUG-46882 Also, add the build scripts for calibre dependencies on OSX and linux to the source tree.
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
easy_install --always-unzip -U appscript
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# Change the https URLs to http in setup.py
|
||||
|
||||
cd $SW/build/apsw-* && rm -rf build/* && \
|
||||
python setup.py fetch --version=3.8.6 --sqlite --missing-checksum-ok && python setup.py install
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd $SW/build/chmlib* && \
|
||||
#cp /usr/share/libtool/config.* . && \
|
||||
./configure --disable-dependency-tracking --disable-pread --disable-io64 --prefix=$SW && make && make install
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $SW/build/expat-* &&\
|
||||
./configure --prefix=$SW && make && make install
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
export FREETYPE_CFLAGS="-I$SW/include/freetype2"
|
||||
export FREETYPE_LIBS="-L$SW/lib -lfreetype -lz -lbz2"
|
||||
|
||||
cd $SW/build/fontconfig-2.* && \
|
||||
./configure --prefix=$SW --disable-static --disable-docs --with-expat=$SW --with-add-fonts=/usr/X11/lib/X11/fonts --disable-dependency-tracking && make && make install
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd $SW/build/freetype* && \
|
||||
./configure --disable-static --prefix=$SW && make && make install
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
export CFLAGS="$CFLAGS -DU_CHARSET_IS_UTF8=1"
|
||||
export CPPFLAGS="$CFLAGS"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
cd $SW/build/icu*/source && \
|
||||
./runConfigureICU MacOSX --disable-samples --prefix=$SW && make && make install && python ~/build/calibre/setup/installer/osx/fix_icu.py
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd $SW/build/libiconv-* && \
|
||||
./configure --enable-static --disable-dependency-tracking --disable-shared --prefix=$SW && make && make install
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
export libusbmuxd_CFLAGS=-I$SW/include
|
||||
export libusbmuxd_LIBS=-lusbmuxd
|
||||
export libplist_CFLAGS=-I$SW/include
|
||||
export libplist_LIBS=-lplist
|
||||
export libplistmm_CFLAGS=-I$SW/include
|
||||
export libplistmm_LIBS=-lplist++
|
||||
export openssl_CFLAGS=-I/usr/include
|
||||
export openssl_LIBS="-lcrypto -lssl"
|
||||
|
||||
cd $SW/build/libimobiledevice-* && ./configure --prefix=$SW --disable-dependency-tracking --without-cython --disable-static && make && make install
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd $SW/build/libjpeg-turbo* && \
|
||||
./configure --disable-dependency-tracking --enable-shared --with-jpeg8 --without-turbojpeg --prefix=$SW --host x86_64-apple-darwin NASM=$SW/bin/nasm && make -j2 && make install
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $SW/build/libtool*/libltdl && \
|
||||
./configure --prefix=$SW --disable-dependency-tracking --enable-ltdl-install && \
|
||||
make && make install
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
export LIBUSB_CFLAGS="-I$SW/include/libusb-1.0"
|
||||
export LIBUSB_LIBS="-L$SW/lib -lusb-1.0"
|
||||
export CFLAGS="$CFLAGS -DHAVE_ICONV"
|
||||
export LDFLAGS="$LDFLAGS -liconv"
|
||||
|
||||
cd $SW/build/libmtp-* && \
|
||||
./configure --disable-dependency-tracking --disable-static --prefix=$SW --with-libiconv-prefix=$SW && \
|
||||
make && make install
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
export CPPFLAGS=$CFLAGS
|
||||
|
||||
cd $SW/build/libpng* && \
|
||||
./configure --prefix=$SW --disable-dependency-tracking && make && make install
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $SW/build/libusb-* && \
|
||||
./configure --disable-dependency-tracking --disable-static --prefix=$SW && \
|
||||
make && make install
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $SW/build/libwebp-* && ./configure --prefix=$SW --disable-static && make && make install
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
cd $SW/build/libxml2-2.* && \
|
||||
./configure --prefix=$SW/private/libxml2 --disable-shared --enable-static --with-iconv=$SW --with-zlib=$SW --without-python --without-debug --disable-dependency-tracking && make && make install
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
cd $SW/build/libxslt-*
|
||||
./configure --prefix=$SW/private/libxml2 --disable-shared --without-python --without-debug --disable-dependency-tracking --with-libxml-prefix=$SW/private/libxml2 && make && make install
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
# lxml must be built with statically linked libxml2 and libxslt as python on
|
||||
# OS X loads the system version of these libraries, which can cause incompatibility
|
||||
# First run python setup.py install and abort it when it reaches the compiling phase
|
||||
|
||||
CC=gcc
|
||||
BTEMP=build/temp.macosx-10.7-x86_64-2.7
|
||||
BLIB=build/lib.macosx-10.7-x86_64-2.7
|
||||
PYH=$SW/python/Python.framework/Versions/Current/Headers
|
||||
LXML=src/lxml/includes
|
||||
LIBXML=$SW/private/libxml2
|
||||
|
||||
cd $SW/build/lxml-3* && rm -rf build/* && \
|
||||
echo Builiding extension modules... && \
|
||||
mkdir -p $BTEMP/src/lxml/ $BLIB/lxml/ && \
|
||||
$CC $CFLAGS -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I$LIBXML/include/libxml2 -I$LIBXML/include/libxslt -I/usr/include -I$PYH -I$LXML -c src/lxml/lxml.etree.c -o $BTEMP/src/lxml/lxml.etree.o -w -flat_namespace && \
|
||||
$CC $CFLAGS -bundle -undefined dynamic_lookup $BTEMP/src/lxml/lxml.etree.o $LIBXML/lib/libxml2.a $LIBXML/lib/libxslt.a $LIBXML/lib/libexslt.a $SW/lib/libz.a $SW/lib/libiconv.a -lm -o $BLIB/lxml/etree.so && \
|
||||
$CC $CFLAGS -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I$LIBXML/include/libxml2 -I$LIBXML/include/libxslt -I/usr/include -I$PYH -I$LXML -c src/lxml/lxml.objectify.c -o $BTEMP/src/lxml/lxml.objectify.o -w -flat_namespace && \
|
||||
$CC $CFLAGS -bundle -undefined dynamic_lookup $BTEMP/src/lxml/lxml.objectify.o $LIBXML/lib/libxml2.a $LIBXML/lib/libxslt.a $LIBXML/lib/libexslt.a $SW/lib/libz.a $SW/lib/libiconv.a -lm -o $BLIB/lxml/objectify.so && \
|
||||
python setup.py install
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd $SW/build/macfsevents* && \
|
||||
python setup.py install
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
export CPPFLAGS=$CFLAGS
|
||||
|
||||
cd $SW/build/mozjpeg && \
|
||||
./configure --prefix=$SW/private/mozjpeg --disable-dependency-tracking --disable-shared --with-jpeg8 --without-turbojpeg && make && make install
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd $SW/build/nasm* && \
|
||||
./configure --prefix=$SW && make -j2 && make install
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $SW/build/netifaces-* && python setup.py build && cp build/*/netifaces.so $SW/python/Python.framework/Versions/Current/lib/python*/site-packages/
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
SSLDIR=$SW/private/ssl
|
||||
|
||||
cd $SW/build/openssl-* && \
|
||||
rm -rf $SSLDIR && \
|
||||
./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 --openssldir=$SSLDIR && make && make install
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
export CPPFLAGS=$CFLAGS
|
||||
|
||||
cd $SW/build/optipng* && \
|
||||
./configure -prefix=$SW -with-system-libs && make && make install
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
export CFLAGS="$CFLAGS -mmacosx-version-min=10.7"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names -mmacosx-version-min=10.7"
|
||||
|
||||
cd $SW/build/Pillow* && \
|
||||
echo Disabling zip_safe && \
|
||||
python -c "f = open('setup.py', 'r+b'); raw = f.read(); import re; raw = re.sub(r'zip_safe\s*=\s*True', 'zip_safe=False', raw); f.seek(0); f.truncate(0); f.write(raw)" && \
|
||||
python setup.py install
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
export libxml2_CFLAGS="-I/usr/include/libxml2"
|
||||
export libxml2_LIBS="-L/usr/lib -lxml2"
|
||||
|
||||
cd $SW/build/libplist-* && \
|
||||
./configure --without-cython --disable-dependency-tracking --prefix=$SW && \
|
||||
make && make install
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
export CMAKE_INCLUDE_PATH=$SW/include
|
||||
export CMAKE_LIBRARY_PATH=$SW/lib
|
||||
|
||||
cd $SW/build/podofo* && \
|
||||
rm -rf podofo-build && mkdir podofo-build && \
|
||||
cd podofo-build && \
|
||||
|
||||
echo "Running cmake..." && \
|
||||
|
||||
# We set c++98 and libstdc++ as PoDoFo does not use C++11 and without that it
|
||||
# will be compiled with C++11 and linked against libc++, which means the PoDoFo
|
||||
# calibre extension would also have to be compiled and liked that way.
|
||||
cmake -G "Unix Makefiles" -Wno-dev \
|
||||
-DFREETYPE_INCLUDE_DIR=$SW/include/freetype2 \
|
||||
-DFREETYPE_LIBRARIES=-lfreetype \
|
||||
-DCMAKE_BUILD_TYPE=RELEASE \
|
||||
-DPODOFO_BUILD_SHARED:BOOL=TRUE \
|
||||
-DPODOFO_BUILD_STATIC:BOOL=FALSE \
|
||||
-DCMAKE_CXX_FLAGS="${CFLAGS} -std=c++98 -stdlib=libstdc++" \
|
||||
-DCMAKE_INSTALL_PREFIX=$SW \
|
||||
.. && \
|
||||
make VERBOSE=0 podofo_shared && \
|
||||
rm -rf $SW/lib/libpodofo*.dylib $SW/include/podofo && \
|
||||
mkdir $SW/include/podofo && \
|
||||
cp src/libpodofo.*.dylib $SW/lib && \
|
||||
cp -r podofo_config.h ../src/* $SW/include/podofo/ && \
|
||||
cd $SW/lib/ && install_name_tool -id $SW/lib/libpodofo* $SW/lib/libpodofo.* && ln -s libpodofo*.dylib libpodofo.dylib
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
export FONTCONFIG_CFLAGS="-I$SW/include/fontconfig -I$SW/include"
|
||||
export FONTCONFIG_LIBS="-L$SW/lib -lfontconfig"
|
||||
export FREETYPE_CFLAGS="-I$SW/include/freetype2 -I$SW/include"
|
||||
export FREETYPE_LIBS="-L$SW/lib -lfreetype -lz"
|
||||
export FREETYPE_CONFIG="$SW/bin/freetype-config"
|
||||
export LIBJPEG_LIBS="-L$SW/lib -ljpeg"
|
||||
export LIBPNG_LIBS="-L$SW/lib -lpng"
|
||||
export LIBPNG_CFLAGS="-I$SW/include/libpng12"
|
||||
|
||||
cd $SW/build/poppler* && \
|
||||
./configure --prefix $SW --without-x --enable-shared --disable-dependency-tracking --disable-silent-rules --enable-zlib --enable-splash-output --disable-cairo-output --disable-poppler-glib --disable-poppler-qt4 --disable-poppler-cpp --disable-gtk-test --enable-libjpeg --enable-compile-warnings=no && make V=1 && make install
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $SW/build/psutil-* && python setup.py build && cp -r build/lib*/* $SW/python/Python.framework/Versions/Current/lib/python*/site-packages/
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $SW/build/PyQt-gpl-* && \
|
||||
python configure.py --verbose --confirm-license -c -j10 --no-designer-plugin --no-qml-plugin --no-docstrings && \
|
||||
make -j2 && make install
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Edit setup.py
|
||||
|
||||
# Disable Tk by adding return 0 to the start of detect_tkinter_darwin
|
||||
|
||||
OPENSSL=$SW/private/ssl
|
||||
export CFLAGS="-I$OPENSSL/include $CFLAGS -DHAVE_LOAD_EXTENSION"
|
||||
export LDFLAGS="-L$OPENSSL/lib $LDFLAGS"
|
||||
|
||||
cd $SW/build/Python-* && \
|
||||
./configure --prefix=$SW --enable-framework=$SW/python --enable-ipv6 --enable-unicode=ucs2 --with-signal-module --with-threads --with-pymalloc --with-system-expat && make -j2 && make install
|
||||
|
||||
# Now create a symlink from ~/sw/bin/python to the newly installed python binary so that it becomes the default python
|
||||
# Install setuptools as described in windows/notes. Create symlink for ~/sw/bin/easy_install
|
||||
# Use setuptools to install the various python packages
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# See windows/notes.rst for instructions on slimming down Qt.
|
||||
# For versions of Qt < 5.6 you need to apply this patch:
|
||||
# https://codereview.qt-project.org/#/c/125923/
|
||||
|
||||
cd $SW/build/qt-* && \
|
||||
rm -rf build && mkdir build && cd build && \
|
||||
../configure -opensource -confirm-license -prefix $SW/qt -release -nomake examples -nomake tests -no-sql-odbc -no-sql-psql -no-qml-debug -I $SW/include -L $SW/lib && \
|
||||
make -j2 && rm -rf $SW/qt && make install
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $SW/build/sip-* && \
|
||||
python configure.py && make && make install
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
export CFLAGS="$CFLAGS -O2 -DSQLITE_ENABLE_LOCKING_STYLE"
|
||||
cd $SW/build/sqlite-* &&\
|
||||
./configure --prefix=$SW --disable-dependency-tracking --disable-static && make && make install
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Edit makefile.unix setting the vars as shown
|
||||
|
||||
CXX=g++
|
||||
CXXFLAGS=-O2 -arch x86_64 -dynamic
|
||||
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_SILENT -DSILENT
|
||||
STRIP=strip
|
||||
DESTDIR=$SW
|
||||
WHAT=RARDLL
|
||||
|
||||
cd $SW/unrar && make -fmakefile.unic lib && cp libunrar.so $SW/lib/libunrar.dylib
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Apply the patch to prevent detection of WiFi devices from http://www.mobileread.com/forums/showthread.php?t=255234
|
||||
|
||||
export libplist_CFLAGS="-I$SW/include"
|
||||
export libplist_LIBS="-L$SW/lib -lplist"
|
||||
export CPPFLAGS="$CFLAGS"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
cd $SW/build/libusbmuxd-* && \
|
||||
./configure --prefix=$SW --disable-dependency-tracking && \
|
||||
make && make install
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
cd $SW/build/zlib-* && \
|
||||
./configure --prefix=$SW && make && \
|
||||
libtool -static -o libz.a *.o && make install
|
||||
Reference in New Issue
Block a user