diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | photoprint.install | 15 |
3 files changed, 44 insertions, 17 deletions
@@ -1,9 +1,7 @@ -# Generated by mksrcinfo v8 -# Tue Aug 30 23:13:20 UTC 2016 pkgbase = photoprint - pkgdesc = PhotoPrint is a utility designed to assist in the process of printing digital photographs under Linux and other UNIX-like operating systems. + pkgdesc = A gtk-utility designed to assist printing of digital photographs with PDF-preview, adjustable page size, multiple images per page and optional border styles. pkgver = 0.4.2rc2 - pkgrel = 7 + pkgrel = 8 url = http://www.blackfiveimaging.co.uk/index.php?article=02Software%2F01PhotoPrint install = photoprint.install arch = i686 @@ -1,12 +1,15 @@ +# Co-Maintainer: Ji_M (ji_m at mailbox dot org) +# 2017-04-22 added prepare(), parallel build, moved '-lX11' to ./configure +# Maintainer: kaptoxic (kaptoxic at yahoo dot com) # Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com) # adpoted from Caved since pkgver=0.4.0-pre1 pkgname=photoprint arch=(i686 x86_64) pkgver=0.4.2rc2 -pkgrel=7 +pkgrel=8 license=('GPL') -pkgdesc="PhotoPrint is a utility designed to assist in the process of printing digital photographs under Linux and other UNIX-like operating systems." +pkgdesc="A gtk-utility designed to assist printing of digital photographs with PDF-preview, adjustable page size, multiple images per page and optional border styles." url="http://www.blackfiveimaging.co.uk/index.php?article=02Software%2F01PhotoPrint" depends=('gtk2' 'gutenprint' 'lcms' 'netpbm' 'libjpeg' 'libtiff' 'hicolor-icon-theme' 'desktop-file-utils') makedepends=('gutenprint' 'cups') @@ -15,14 +18,35 @@ install=${pkgname}.install source=(http://www.blackfiveimaging.co.uk/photoprint/photoprint-0.4.2-pre2.tar.gz) md5sums=('fbd33857d37081846df43cb52a9db3a8') +prepare() { + local __BUILD_DIR="${srcdir}/photoprint-0.4.2-pre2" + # old include style + sed -i 's|^#include <glib/[^>]*>|#include <glib.h>|' \ + "${__BUILD_DIR}/gp_cppsupport/gprintersettings.cpp" \ + "${__BUILD_DIR}/gp_cppsupport/gprinter.cpp" \ + "${__BUILD_DIR}/pixbufthumbnail/egg-pixbuf-thumbnail.c" + # netpbm-typedef collides with std::tuple + for __file in "${__BUILD_DIR}"/imagesource/*.{h,cpp}; do + sed -i \ + -e 's|^\(using namespace std;\)|// \1|' \ + -e 's|<<[[:blank:]]*\(endl[[:blank:];]*\)|<< std::\1|g' \ + -e 's|^[^#]\([[:blank:]]\)*\([io]*fstream[[:blank:]]\)|\1std::\2|g' \ + -e 's#\([[:blank:]|&~^,()=+-]\)\(ios::\)#\1std::\2#g' \ + "$__file" + done + sed -i '116s|false|NULL|' "${__BUILD_DIR}/effects/ppeffect.cpp" + # limit use of 'g_type_init()' to GLIB<2.35 (deprecated use) + sed -i 's/^\([[:blank:]]*g_type_init();[[:blank:]]*\)$/#if !GLIB_CHECK_VERSION(2,35,0)\n\1\n#endif/' "${__BUILD_DIR}/photoprint.cpp" +} + build() { - cd ${srcdir}/photoprint-0.4.2-pre2 - for file in $(find -name '*.c' -or -name '*.cpp' -or -name '*.h'); do sed -i 's|#include <glib/[^>]*>|#include <glib.h>|' $file ; done - ./configure --prefix=/usr - make CFLAGS="$CFLAGS -lX11" || return 1 + # usually #CPUs/Cores/HTs+1 is a good value for parallel build jobs + local __PARALLEL_JOBS=$((`grep -c '^processor' /proc/cpuinfo`+1)) + cd "${srcdir}/photoprint-0.4.2-pre2" + ./configure --prefix=/usr LIBS=-lX11 && make -j"$__PARALLEL_JOBS" || return 1 } package() { - cd ${srcdir}/photoprint-0.4.2-pre2 - make DESTDIR=${pkgdir} install + cd "${srcdir}/photoprint-0.4.2-pre2" + make DESTDIR="${pkgdir}" install } diff --git a/photoprint.install b/photoprint.install index e76d3a1c4849..2a11cfc7cc60 100644 --- a/photoprint.install +++ b/photoprint.install @@ -1,19 +1,24 @@ +## (Ji_M) +## update Desktop Environment +__update_DE() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + update-desktop-database -q +} + ## arrg 1: the new package version post_install() { - post_upgrade + __update_DE } ## arg 1: the new package version ## arg 2: the old package version post_upgrade() { - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor - update-desktop-database -q + __update_DE } ## arg 1: the old package version post_remove() { - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor - update-desktop-database -q + __update_DE } # vim:set ts=2 sw=2 et: |