From 029ef749887da636328245be6eb19ae1d02cece8 Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Sat, 4 Jan 2020 20:48:00 -0600 Subject: [PATCH] fotoxx: Update to 20.01 ; Fix musl build --- srcpkgs/fotoxx/files/libexecinfo.patch | 18 ++++++++++++++++++ srcpkgs/fotoxx/patches/musl.patch | 25 +++++++++++++++++++++++++ srcpkgs/fotoxx/template | 24 ++++++++++++++++-------- 3 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 srcpkgs/fotoxx/files/libexecinfo.patch create mode 100644 srcpkgs/fotoxx/patches/musl.patch diff --git a/srcpkgs/fotoxx/files/libexecinfo.patch b/srcpkgs/fotoxx/files/libexecinfo.patch new file mode 100644 index 00000000000..a98de4d7954 --- /dev/null +++ b/srcpkgs/fotoxx/files/libexecinfo.patch @@ -0,0 +1,18 @@ +diff --git Makefile Makefile +index 218aa2d..64bfe26 100644 +--- Makefile ++++ Makefile +@@ -47,7 +47,7 @@ CFLAGS = $(CXXFLAGS) $(CPPFLAGS) -c \ + -I/usr/include/libchamplain-0.12/ + + LIBS = `$(PKG_CONFIG) --libs gtk+-3.0` \ +- -lrt -lpthread -llcms2 -ltiff -lpng -ljpeg \ ++ -lrt -lpthread -llcms2 -ltiff -lpng -ljpeg -lexecinfo \ + -lclutter-1.0 -lclutter-gtk-1.0 -lchamplain-0.12 -lchamplain-gtk-0.12 + + ALLFILES = fotoxx.o f.widgets.o f.file.o f.gallery.o f.albums.o f.area.o f.meta.o \ +@@ -146,4 +146,3 @@ uninstall: + clean: + rm -f fotoxx + rm -f *.o +- diff --git a/srcpkgs/fotoxx/patches/musl.patch b/srcpkgs/fotoxx/patches/musl.patch new file mode 100644 index 00000000000..603b9f2017f --- /dev/null +++ b/srcpkgs/fotoxx/patches/musl.patch @@ -0,0 +1,25 @@ +diff --git f.file.cc f.file.cc +index 7c4f083..f2c9c07 100644 +--- f.file.cc ++++ f.file.cc +@@ -3493,16 +3493,16 @@ int find_imagefiles(cchar *folder, int flags, char **&flist, int &NF, int Finit) + + globflags = GLOB_NOSORT; + Fimages = Fthumbs = Fdirs = Frecurse = Fnolinks = 0; +- ++ + if (flags & 1) Fimages = 1; + if (flags & 2) Fthumbs = 1; + if (flags & 4) globflags += GLOB_PERIOD; + if (flags & 8) Fdirs = 1; + if (flags & 16) Frecurse = 1; + if (flags & 32) Fnolinks = 1; +- ++#ifdef GLOB_ONLYDIR + if (Fdirs && ! Fimages && ! Fthumbs) + globflags += GLOB_ONLYDIR; +- ++#endif + globdata.gl_pathc = 0; // glob() setup + globdata.gl_offs = 0; + globdata.gl_pathc = 0; diff --git a/srcpkgs/fotoxx/template b/srcpkgs/fotoxx/template index 9d9602e6ccf..63aeaf5fe14 100644 --- a/srcpkgs/fotoxx/template +++ b/srcpkgs/fotoxx/template @@ -1,6 +1,6 @@ # Template file for 'fotoxx' pkgname=fotoxx -version=19.20 +version=20.01 revision=1 wrksrc=fotoxx build_style=gnu-makefile @@ -13,17 +13,25 @@ maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://www.kornelix.net/fotoxx/fotoxx.html" distfiles="https://www.kornelix.net/downloads/downloads/fotoxx-${version}.tar.gz" -checksum=bfa6f20bc5121fbf521354ddf19489e0cfba1f8aa72db1e63fdb26fc5d935752 - -case "$XBPS_TARGET_MACHINE" in - *-musl) broken="execinfo.h is a GNU specific header, and doesn’t exist under musl.";; -esac +checksum=b7463c9fd9649111d428d68ca93f148650a3702958d83797e693763ce6a17963 if [ "$CROSS_BUILD" ]; then hostmakedepends+=" libchamplain-devel" fi +case "$XBPS_TARGET_LIBC" in + musl) + makedepends+=" libexecinfo-devel";; +esac + +pre_build() { +case "$XBPS_TARGET_LIBC" in + musl) + patch -Np0 < "$FILESDIR"/libexecinfo.patch;; +esac +} + post_install() { - rm -v ${DESTDIR}/usr/share/doc/fotoxx/{changelog.gz,copyright,fotoxx.man} - rm -rv ${DESTDIR}/usr/share/appdata + rm -rv ${DESTDIR}/usr/share/doc/fotoxx/{changelog.gz,copyright,fotoxx.man} \ + ${DESTDIR}/usr/share/appdata }