Skip to content

Commit

Permalink
app-text/ghostscript-gpl: fix zlib include path usage
Browse files Browse the repository at this point in the history
The ghostscript-gpl-9.12-sys-zlib.patch attempts to change the include
path from the local copy in the src to the common includedir flag set
by configure flags.  This generally works for native builds, but breaks
when cross-compiling.  Drop the patch and set the zlib src dir to the
temp dir instead.
  • Loading branch information
vapier committed Jan 8, 2016
1 parent ddc234a commit 31c685e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
8 changes: 8 additions & 0 deletions app-text/ghostscript-gpl/ghostscript-gpl-9.15-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ src_prepare() {
# http://pkgs.fedoraproject.org/cgit/ghostscript.git
EPATCH_SUFFIX="patch" EPATCH_FORCE="yes"
EPATCH_SOURCE="${WORKDIR}/patches/"
EPATCH_EXCLUDE="
ghostscript-gpl-9.12-sys-zlib.patch
"
epatch

if use djvu ; then
Expand All @@ -112,6 +115,11 @@ src_prepare() {
"${S}"/base/unix-dll.mak || die "sed failed"
fi

# Force the include dirs to a neutral location.
sed -i \
-e "/^ZLIBDIR=/s:=.*:=${T}:" \
configure.ac || die

# search path fix
# put LDFLAGS after BINDIR, bug #383447
sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
Expand Down
14 changes: 11 additions & 3 deletions app-text/ghostscript-gpl/ghostscript-gpl-9.18.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ src_prepare() {
# http://pkgs.fedoraproject.org/cgit/ghostscript.git
EPATCH_SUFFIX="patch" EPATCH_FORCE="yes"
EPATCH_SOURCE="${WORKDIR}/patches/"
EPATCH_EXCLUDE="ghostscript-gpl-8.64-noopt.patch
ghostscript-gpl-9.07-wrf-snprintf.patch
ghostscript-gpl-9.12-icc-missing-check.patch"
EPATCH_EXCLUDE="
ghostscript-gpl-8.64-noopt.patch
ghostscript-gpl-9.07-wrf-snprintf.patch
ghostscript-gpl-9.12-icc-missing-check.patch
ghostscript-gpl-9.12-sys-zlib.patch
"
epatch

epatch "${FILESDIR}"/${P}-gserrors.h-backport.patch
Expand All @@ -117,6 +120,11 @@ src_prepare() {
"${S}"/base/unix-dll.mak || die "sed failed"
fi

# Force the include dirs to a neutral location.
sed -i \
-e "/^ZLIBDIR=/s:=.*:=${T}:" \
configure.ac || die

# search path fix
# put LDFLAGS after BINDIR, bug #383447
sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
Expand Down

0 comments on commit 31c685e

Please sign in to comment.