summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJi_M2017-04-24 00:31:03 +0200
committerJi_M2017-04-24 00:31:03 +0200
commit68d0fb7f345228fb0276e17d629f9fc540e515fc (patch)
tree69de63608d2c7b1921717c1bc1831ea698853595 /PKGBUILD
parent601eccf32d8ba1ad94c656f4e3718403f0d6a09c (diff)
downloadaur-photoprint.tar.gz
added prepare(), parallel build, moved '-lX11' to ./configure
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 32 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ddc2b541051e..76ab1f7efbb2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}