Skip to content

Commit

Permalink
[Graphviz] Add patch to avoid running a foreign executable
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Jan 1, 2020
1 parent d182fa2 commit 0dd3782
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions G/Graphviz/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ version = v"2.42.3"
sources = [
"https://www2.graphviz.org/Packages/stable/portable_source/graphviz-$(version).tar.gz" =>
"8faf3fc25317b1d15166205bf64c1b4aed55a8a6959dcabaa64dbad197e47add",

"./bundled",
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/graphviz-*/
# This patch, adapted from
# https://github.com/termux/termux-packages/blob/3919557b20cf1b83ccaebc12058b841ff2cdf649/packages/graphviz/no-mkdefs.patch, avoids running a foreign executable when cross-compiling
atomic_patch -p1 ../patches/gvpr_no_mkdefs.patch
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target}
make -j${nproc}
make install
Expand Down
22 changes: 22 additions & 0 deletions G/Graphviz/bundled/patches/gvpr_no_mkdefs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- a/lib/gvpr/Makefile.am
+++ b/lib/gvpr/Makefile.am
@@ -57,7 +57,7 @@
mkdefs_SOURCES = mkdefs.c

gdefs.h: $(top_srcdir)/lib/gvpr/gprdata mkdefs$(EXEEXT)
- ./mkdefs$(EXEEXT) gdefs.h < $(top_srcdir)/lib/gvpr/gprdata
+ touch gdefs.h

EXTRA_DIST = $(man_MANS) $(pdf_DATA) gprdata mkdefs.c gdefs.h trie.c gvprlib.vcxproj*

--- a/lib/gvpr/Makefile.in
+++ b/lib/gvpr/Makefile.in
@@ -1078,7 +1078,7 @@
- @GROFF@ -Tps -man $(srcdir)/gvpr.3 | @PS2PDF@ - - >gvpr.3.pdf

gdefs.h: $(top_srcdir)/lib/gvpr/gprdata mkdefs$(EXEEXT)
- ./mkdefs$(EXEEXT) gdefs.h < $(top_srcdir)/lib/gvpr/gprdata
+ touch gdefs.h

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

0 comments on commit 0dd3782

Please sign in to comment.