From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] fotoxx: fix build on musl
Date: Wed, 01 Jan 2020 03:34:15 +0100 [thread overview]
Message-ID: <20200101023415.Q3-R1FcR783BzHMu3dK4if8Bm8y7kEejCrG0JHzHMOk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-17717@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
There is an updated pull request by ndowens against master on the void-packages repository
https://github.com/ndowens/void-packages fotoxx
https://github.com/void-linux/void-packages/pull/17717
fotoxx: fix build on musl
I do not have a musl system, if someone can test to see if this will run fine
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
A patch file from https://github.com/void-linux/void-packages/pull/17717.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fotoxx-17717.patch --]
[-- Type: text/x-diff, Size: 3423 bytes --]
From be8faf9a1e5d03a7481c09e34ee8156b2d9926a0 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens04@gmail.com>
Date: Sun, 22 Dec 2019 21:33:27 -0600
Subject: [PATCH] fotoxx: fix build on musl
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
---
srcpkgs/fotoxx/files/libexecinfo_link.patch | 13 +++++++++++
srcpkgs/fotoxx/patches/musl_build.patch | 25 +++++++++++++++++++++
srcpkgs/fotoxx/template | 16 +++++++++----
3 files changed, 50 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/fotoxx/files/libexecinfo_link.patch
create mode 100644 srcpkgs/fotoxx/patches/musl_build.patch
diff --git a/srcpkgs/fotoxx/files/libexecinfo_link.patch b/srcpkgs/fotoxx/files/libexecinfo_link.patch
new file mode 100644
index 00000000000..858d9c3c869
--- /dev/null
+++ b/srcpkgs/fotoxx/files/libexecinfo_link.patch
@@ -0,0 +1,13 @@
+diff --git Makefile Makefile
+index e191e72..6922391 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 -lraw -ljpeg \
++ -lrt -lexecinfo -lpthread -llcms2 -ltiff -lpng -lraw -ljpeg \
+ -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 \
diff --git a/srcpkgs/fotoxx/patches/musl_build.patch b/srcpkgs/fotoxx/patches/musl_build.patch
new file mode 100644
index 00000000000..29a6e7f302b
--- /dev/null
+++ b/srcpkgs/fotoxx/patches/musl_build.patch
@@ -0,0 +1,25 @@
+diff --git f.file.cc f.file.cc
+index ef8d59a..de26b74 100644
+--- f.file.cc
++++ f.file.cc
+@@ -3344,16 +3344,17 @@ int find_imagefiles(cchar *folder, int flags, char **&flist, int &NF, int Finit)
+
+ globflags = GLOB_NOSORT;
+ Fimages = Fthumbs = Fdirs = Frecurse = 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;
+-
++
++#ifdef __GLIBC__
+ 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..86f0d07f925 100644
--- a/srcpkgs/fotoxx/template
+++ b/srcpkgs/fotoxx/template
@@ -15,14 +15,22 @@ 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
-
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" libchamplain-devel"
fi
+case "$XBPS_TARGET_LIBC" in
+ makedepends+=" libexecinfo-devel"
+ LDFLAGS="-lexecinfo";;
+esac
+
+pre_build() {
+ case "$XBPS_TARGET_LIBC" in
+ musl)
+ patch -Np0 < "$FILESDIR"/libexecinfo_link.patch ;;
+ esac
+}
+
post_install() {
rm -v ${DESTDIR}/usr/share/doc/fotoxx/{changelog.gz,copyright,fotoxx.man}
rm -rv ${DESTDIR}/usr/share/appdata
next prev parent reply other threads:[~2020-01-01 2:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-17717@inbox.vuxu.org>
2019-12-27 2:51 ` voidlinux-github
2019-12-27 2:52 ` voidlinux-github
2019-12-27 2:53 ` voidlinux-github
2019-12-27 2:53 ` voidlinux-github
2019-12-27 4:27 ` voidlinux-github
2019-12-27 9:41 ` voidlinux-github
2020-01-01 2:34 ` voidlinux-github [this message]
2020-01-05 2:00 ` [PR PATCH] [Closed]: " voidlinux-github
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200101023415.Q3-R1FcR783BzHMu3dK4if8Bm8y7kEejCrG0JHzHMOk@z \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).