summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2016-03-26 09:33:42 +0100
committerFabian Groffen <grobian@gentoo.org>2016-03-26 09:34:36 +0100
commited70c7578c8f321f58b1c6c81ea478804b3fc0a6 (patch)
treeb60edff71b0bfb33a4e37d9a1b3cd5733b592cdb /app-arch
parentnet-libs/libssh: Fix broken configure defines (bug #576988 by Ben Kohler). (diff)
downloadgentoo-ed70c7578c8f321f58b1c6c81ea478804b3fc0a6.tar.gz
gentoo-ed70c7578c8f321f58b1c6c81ea478804b3fc0a6.tar.bz2
gentoo-ed70c7578c8f321f58b1c6c81ea478804b3fc0a6.zip
app-arch/p7zip: fix compilation on Darwin, bug #577344
Package-Manager: portage-2.2.28-prefix
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/p7zip/files/p7zip-15.14-darwin.patch13
-rw-r--r--app-arch/p7zip/p7zip-15.14.ebuild20
2 files changed, 23 insertions, 10 deletions
diff --git a/app-arch/p7zip/files/p7zip-15.14-darwin.patch b/app-arch/p7zip/files/p7zip-15.14-darwin.patch
new file mode 100644
index 000000000000..2db6de96d3e0
--- /dev/null
+++ b/app-arch/p7zip/files/p7zip-15.14-darwin.patch
@@ -0,0 +1,13 @@
+Darwin has wchar_h and wctypes_h.
+
+--- CPP/myWindows/config.h
++++ CPP/myWindows/config.h
+@@ -5,7 +5,7 @@
+ #define FILESYSTEM_IS_CASE_SENSITIVE 1
+ #endif
+
+- #if !defined(ENV_MACOSX) && !defined(ENV_BEOS)
++ #if !defined(ENV_BEOS)
+
+ /* <wchar.h> */
+ /* ENV_HAVE_WCHAR__H and not ENV_HAVE_WCHAR_H to avoid warning with wxWidgets */
diff --git a/app-arch/p7zip/p7zip-15.14.ebuild b/app-arch/p7zip/p7zip-15.14.ebuild
index bd19893aa898..a2efa2908bd9 100644
--- a/app-arch/p7zip/p7zip-15.14.ebuild
+++ b/app-arch/p7zip/p7zip-15.14.ebuild
@@ -30,6 +30,8 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${PN}_${PV}
src_prepare() {
+ epatch "${FILESDIR}"/${P}-darwin.patch
+
if ! use pch; then
sed "s:PRE_COMPILED_HEADER=StdAfx.h.gch:PRE_COMPILED_HEADER=:g" -i makefile.* || die
fi
@@ -38,8 +40,6 @@ src_prepare() {
-e 's:-m32 ::g' \
-e 's:-m64 ::g' \
-e 's:-pipe::g' \
- -e "/^CXX=/s:g++:$(tc-getCXX):" \
- -e "/^CC=/s:gcc:$(tc-getCC):" \
-e '/ALLFLAGS/s:-s ::' \
-e "/OPTFLAGS=/s:=.*:=${CXXFLAGS}:" \
-i makefile* || die
@@ -63,17 +63,17 @@ src_prepare() {
elif use x86; then
cp -f makefile.linux_x86_asm_gcc_4.X makefile.machine || die
elif [[ ${CHOST} == *-darwin* ]] ; then
- # Mac OS X needs this special makefile, because it has a non-GNU linker
- [[ ${CHOST} == *64-* ]] \
- && cp -f makefile.macosx_64bits makefile.machine \
- || cp -f makefile.macosx_32bits makefile.machine
+ # Mac OS X needs this special makefile, because it has a non-GNU
+ # linker, it doesn't matter so much for bitwidth, for it doesn't
+ # do anything with it
+ cp -f makefile.macosx_llvm_64bits makefile.machine
# bundles have extension .bundle but don't die because USE=-rar
# removes the Rar directory
sed -i -e '/strcpy(name/s/\.so/.bundle/' \
CPP/Windows/DLL.cpp || die
sed -i -e '/^PROG=/s/\.so/.bundle/' \
- CPP/7zip/Bundles/Format7zFree/makefile \
- $(use rar && echo CPP/7zip/Compress/Rar/makefile) || die
+ CPP/7zip/Bundles/Format7zFree/makefile.list \
+ $(use rar && echo CPP/7zip/Compress/Rar/makefile.list) || die
elif use x86-fbsd; then
# FreeBSD needs this special makefile, because it hasn't -ldl
sed -e 's/-lc_r/-pthread/' makefile.freebsd > makefile.machine
@@ -91,9 +91,9 @@ src_prepare() {
}
src_compile() {
- emake all3
+ emake CC=$(tc-getCC) CXX=$(tc-getCXX) all3
if use kde || use wxwidgets; then
- emake -- 7zG
+ emake CC=$(tc-getCC) CXX=$(tc-getCXX) -- 7zG
# emake -- 7zFM
fi
}