summaryrefslogtreecommitdiffstats
path: root/graphics/photoprint/photoprint.SlackBuild
diff options
context:
space:
mode:
author Matteo Bernardini2020-02-24 11:30:13 +0100
committer Matteo Bernardini2020-02-24 11:30:13 +0100
commit27811f4c33fd0b9a2e7ea64a4fbf4969d4e56bd4 (patch)
tree3887c02a1345299dccb436665f332db2411deec8 /graphics/photoprint/photoprint.SlackBuild
parent5de2bc5ab8f479fb924d4c5b543c6e0a37999431 (diff)
downloadslackbuilds-27811f4c33fd0b9a2e7ea64a4fbf4969d4e56bd4.tar.gz
20200224.1 global branch merge.current-20200224.1
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'graphics/photoprint/photoprint.SlackBuild')
-rw-r--r--graphics/photoprint/photoprint.SlackBuild20
1 files changed, 18 insertions, 2 deletions
diff --git a/graphics/photoprint/photoprint.SlackBuild b/graphics/photoprint/photoprint.SlackBuild
index 387d6db429..565187bded 100644
--- a/graphics/photoprint/photoprint.SlackBuild
+++ b/graphics/photoprint/photoprint.SlackBuild
@@ -63,8 +63,6 @@ rm -rf $PRGNAM-$SRCVERSION
tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
cd $PRGNAM-$SRCVERSION
-find . -name "*.cpp" | xargs sed -i 's%glib/.*.h%glib.h%g'
-
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -72,6 +70,24 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# sed magic thanks to archlinux
+sed -i 's|^#include <glib/[^>]*>|#include <glib.h>|' \
+ gp_cppsupport/gprintersettings.cpp \
+ gp_cppsupport/gprinter.cpp \
+ pixbufthumbnail/egg-pixbuf-thumbnail.c
+# netpbm-typedef collides with std::tuple
+for __file in 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|' 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/' photoprint.cpp
+
LDFLAGS="-lX11" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \