diff options
author | zhujinxuan | 2015-07-07 02:43:46 +0800 |
---|---|---|
committer | zhujinxuan | 2015-07-07 02:43:46 +0800 |
commit | c9728c97d454d4a7ccfcbbd30230a0c1083338e0 (patch) | |
tree | 1ab0d787e696321daaf5c3b5191063414d8147f9 | |
download | aur-c9728c97d454d4a7ccfcbbd30230a0c1083338e0.tar.gz |
aur2aur4
-rw-r--r-- | .SRCINFO | 43 | ||||
-rw-r--r-- | GlobalParams.cc.patch | 3 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | configure.patch | 54 | ||||
-rw-r--r-- | utils.cpp.patch | 4 | ||||
-rw-r--r-- | utopia-documents.bash | 2 | ||||
-rw-r--r-- | utopia-documents.sh | 13 | ||||
-rw-r--r-- | utopia-documents.zsh | 2 |
8 files changed, 184 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ed237177680a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,43 @@ +pkgbase = utopia-documents + pkgdesc = PDF reader that displays interactive annotations on scientific articles. + pkgver = 2.4.4 + pkgrel = 1 + url = http://utopiadocs.cs.man.ac.uk + arch = i686 + arch = x86_64 + license = GPL + makedepends = raptor1 + makedepends = swig + makedepends = cmake + makedepends = glew + depends = libqglviewer-qt4 + depends = python2 + depends = boost + depends = boost-libs + depends = pcre + depends = ttf-ms-fonts + depends = qt4 + depends = qjson + depends = liblxqt-git + depends = python2-pillow + depends = python2-lxml + depends = python2-cssselect + depends = python2-suds + provides = utopia-documents + source = http://utopiadocs.cs.man.ac.uk/files/utopia-documents-2.4.4.zip + source = configure.patch + source = GlobalParams.cc.patch + source = utopia-documents.sh + source = utopia-documents.bash + source = utopia-documents.zsh + source = utils.cpp.patch + sha256sums = 80bcf57a6e1b53586e1a62137a0c4a74c411fc49fef2f9b9bfa9f8e9e8ecbc64 + sha256sums = 4c2b62839d22e26ee8e069416b30d8c2dde35ec72fc8b3e8851df2a763495b43 + sha256sums = b0cfa242c63e192e1099e83ea8e23430469bb8d9bb2a07f3ca3d336c78b8dcca + sha256sums = 9e4c9f9aee0b3bfa9625989f3de4de5032f7b656b5f6f050d206d1541e30d41a + sha256sums = 64524d3a3be66f403db44ef40772717aff38445e0e4208c15ac166fe2fcfad0a + sha256sums = 64524d3a3be66f403db44ef40772717aff38445e0e4208c15ac166fe2fcfad0a + sha256sums = 79e60cae2d746a2c323e328a4a2d6e6ef02ca5a2d2f244b6ccbd3229580d95d9 + +pkgname = utopia-documents + diff --git a/GlobalParams.cc.patch b/GlobalParams.cc.patch new file mode 100644 index 000000000000..67f9d8dfd9b2 --- /dev/null +++ b/GlobalParams.cc.patch @@ -0,0 +1,3 @@ +179a180,181 +> "/usr/share/fonts/Type1", +> "/usr/share/fonts/TTF/", diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6da5a9332f91 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Contributor: Zhu Jinxuan <zhujinxuan@gmail.com> +# Maintainer: Zhu Jinxuan <zhujinxuan@gmail.com> +# This PKGBUILD is also available in https://github.com/zhujinxuan/PKGBUILDs + +pkgname=utopia-documents +pkgver=2.4.4 +pkgrel=1 +pkgdesc="PDF reader that displays interactive annotations on scientific articles. " +arch=('i686' 'x86_64') +url='http://utopiadocs.cs.man.ac.uk' +license=('GPL') +depends=('libqglviewer-qt4' 'python2' 'boost' 'boost-libs' 'pcre' 'ttf-ms-fonts' 'qt4' 'qjson' 'liblxqt-git' + 'python2-pillow' + 'python2-lxml' + 'python2-cssselect' + 'python2-suds') +makedepends=( 'raptor1' 'swig' 'cmake' 'glew') +optdepends=() +provides=('utopia-documents') +conflicts=() +replaces=() +backup=() +options=() +install= +changelog= +source=("http://utopiadocs.cs.man.ac.uk/files/${pkgname}-${pkgver}.zip" "configure.patch" "GlobalParams.cc.patch" + "utopia-documents.sh" "utopia-documents.bash" "utopia-documents.zsh" + "utils.cpp.patch" ) +sha256sums=('80bcf57a6e1b53586e1a62137a0c4a74c411fc49fef2f9b9bfa9f8e9e8ecbc64' '4c2b62839d22e26ee8e069416b30d8c2dde35ec72fc8b3e8851df2a763495b43' 'b0cfa242c63e192e1099e83ea8e23430469bb8d9bb2a07f3ca3d336c78b8dcca' + '9e4c9f9aee0b3bfa9625989f3de4de5032f7b656b5f6f050d206d1541e30d41a' + '64524d3a3be66f403db44ef40772717aff38445e0e4208c15ac166fe2fcfad0a' + '64524d3a3be66f403db44ef40772717aff38445e0e4208c15ac166fe2fcfad0a' + '79e60cae2d746a2c323e328a4a2d6e6ef02ca5a2d2f244b6ccbd3229580d95d9' +) + +build() { + export Automoc4_DIR=/usr/lib/automoc4 + # unzip "${pkgname}-${pkgver}".zip + cd "${pkgname}-${pkgver}" + cp ../configure.patch ./ + # cp ../GlobalParams.cc.patch libcrackle/crackle/libxpdf/ + patch libcrackle/crackle/libxpdf/GlobalParams.cc ../GlobalParams.cc.patch + patch libambrosia/ambrosia/utils.cpp ../utils.cpp.patch + patch configure configure.patch + ./configure --release + cd build/Linux-Release + cp CMakeCache.txt CMakeCache.txt.1 + sed -i 's|CMAKE_INSTALL_PREFIX:PATH=\/usr|CMAKE_INSTALL_PREFIX:PATH=XXXX|g' CMakeCache.txt.1 + sed -i "s|XXXX|$pkgdir/usr|g" CMakeCache.txt.1 + cp CMakeCache.txt.1 CMakeCache.txt + make +} + +package() { + mkdir ${pkgdir}/etc/profile.d/ -p + install utopia-documents.bash --target-directory=${pkgdir}/etc/profile.d/ + install utopia-documents.sh --target-directory=${pkgdir}/etc/profile.d/ + install utopia-documents.zsh --target-directory=${pkgdir}/etc/profile.d/ + cd "${pkgname}-${pkgver}" + cd build/Linux-Release + make install + +} diff --git a/configure.patch b/configure.patch new file mode 100644 index 000000000000..238667879949 --- /dev/null +++ b/configure.patch @@ -0,0 +1,54 @@ +82,92c82,83 +< select yn in "Yes" "No"; do +< case $yn in +< Yes) +< mkdir -p "$SUGGEST" +< DEST="$SUGGEST" +< break +< ;; +< No) break +< ;; +< esac +< done +--- +> mkdir -p "$SUGGEST" +> DEST="$SUGGEST" +97,108c88 +< select yn in "Yes" "No"; do +< case $yn in +< Yes) +< rm -f CMakeCache.txt +< break +< ;; +< No) +< echo "Aborted configuration." +< exit 1 +< ;; +< esac +< done +--- +> rm -f CMakeCache.txt +113,128c93,98 +< select yn in "Yes" "No"; do +< case $yn in +< Yes) +< cd "$DEP" +< cmake -D "CMAKE_BUILD_TYPE:STRING=$TYPE" \ +< -C "CMakeConfig/configurations/$PLAT.txt" \ +< -C "CMakeConfig/configurations/common.txt" \ +< -G "$GEN" . || exit 1 +< make || exit 1 +< break +< ;; +< No) +< exit 1 +< ;; +< esac +< done +--- +> cd "$DEP" +> cmake -D "CMAKE_BUILD_TYPE:STRING=$TYPE" \ +> -C "CMakeConfig/configurations/$PLAT.txt" \ +> -C "CMakeConfig/configurations/common.txt" \ +> -G "$GEN" . || exit 1 +> make || exit 1 diff --git a/utils.cpp.patch b/utils.cpp.patch new file mode 100644 index 000000000000..07cd0b6a1ddf --- /dev/null +++ b/utils.cpp.patch @@ -0,0 +1,4 @@ +85c85 +< glShaderSource = (void (*)(GLuint, GLsizei, const GLchar**, const GLint*))glShaderSourceARB; +--- +> glShaderSource = (void (*)(GLuint, GLsizei, const GLchar* const*, const GLint*))glShaderSourceARB; diff --git a/utopia-documents.bash b/utopia-documents.bash new file mode 100644 index 000000000000..5f4ae52a2adc --- /dev/null +++ b/utopia-documents.bash @@ -0,0 +1,2 @@ + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/utopia-documents/lib/:/usr/lib/utopia-documents/python/:/usr/lib/utopia-documents/plugins/" diff --git a/utopia-documents.sh b/utopia-documents.sh new file mode 100644 index 000000000000..4ca9352ec91e --- /dev/null +++ b/utopia-documents.sh @@ -0,0 +1,13 @@ +# By Jinxuan Zhu, <zhujinxuan@gmail.com>, Snow @ AUR +# Based on autojump.sh + +shell=`echo ${SHELL} | awk -F/ '{ print $NF }'` + +# prevent circular loop for sh shells +if [ "${shell}" = "sh" ] ; then + return 0 +elif [ -s ~/.utopia-documents/etc/profile.d/utopia-documents.${shell} ]; then + source ~/.utopia-documents/etc/profile.d/utopia-documents.${shell} +elif [ -s /etc/profile.d/utopia-documents.${shell} ]; then + source /etc/profile.d/utopia-documents.${shell} +fi diff --git a/utopia-documents.zsh b/utopia-documents.zsh new file mode 100644 index 000000000000..5f4ae52a2adc --- /dev/null +++ b/utopia-documents.zsh @@ -0,0 +1,2 @@ + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/utopia-documents/lib/:/usr/lib/utopia-documents/python/:/usr/lib/utopia-documents/plugins/" |