diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2017-06-22 11:26:11 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2021-04-17 23:53:44 -0500 |
commit | daaf7128191a8b46ace84efe15a0ffb9466e7f24 (patch) | |
tree | 43b23f11bcc933dcbd4c1c802659f5c8b3713c9c /graphics | |
parent | aed4f1b654def276e7b5e741abc169e58fa4afb2 (diff) |
graphics/photoprint: Fix building with the newer glibc.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/photoprint/photoprint.SlackBuild | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/graphics/photoprint/photoprint.SlackBuild b/graphics/photoprint/photoprint.SlackBuild index 387d6db42965..565187bdedc0 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" \ |