Makefile.am | 8 ++++++++ configure.ac | 12 ++++++++++++ loleaflet/Makefile.am | 1 + loleaflet/html/loleaflet.html.m4 | 29 ++++++++++++++++++++++------- 4 files changed, 43 insertions(+), 7 deletions(-)
New commits: commit 1ae4a32067c5e1892e47434fb94c7c1f224b7830 Author: Tor Lillqvist <t...@iki.fi> AuthorDate: Fri Aug 31 13:24:17 2018 +0300 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Mon Sep 3 17:10:19 2018 +0300 Factor out loleaflet/dist construction for iOS app building The idea is that on a Linux box you have a tree of online that you configure with --enable-iosapp. Then running 'make' there will only create the stuff in loleaflet/dist. That loleaflet/dist can then be copied to the Mac where you build the iOS app. (To me, this approach seemed for now simpler than to get all the PKG_CONFIG etc stuff working that running configure normally requires, and run all the node, npm, and associated crack, on a Mac.) Change-Id: Id2e495d0521922d0666fdab5fdcb5fcd460136f1 diff --git a/Makefile.am b/Makefile.am index a8901de71..141467a5e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,9 @@ +if ENABLE_IOSAPP + +SUBDIRS = loleaflet + +else + SUBDIRS = . test loleaflet export ENABLE_DEBUG @@ -357,3 +363,5 @@ endif # just run the build without any tests build-nocheck: all-am + +endif diff --git a/configure.ac b/configure.ac index 421fdd686..5d337ef42 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,11 @@ AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debugging, link with debugging version of Poco libraries])) +AC_ARG_ENABLE([iosapp], + AS_HELP_STRING([--enable-iosapp], + [Use in a tree where the only purpose is to build the HTML and CSS stuff + to be copied to a Mac where the iOS app is being built.])) + AC_ARG_ENABLE([seccomp], AS_HELP_STRING([--disable-seccomp], [Disable use of linux/seccomp.h header when kernel on target system does not support it. @@ -153,6 +158,13 @@ if test -n "$with_logfile" ; then fi AC_SUBST(LOOLWSD_LOGFILE) +ENABLE_IOSAPP= +if test "$enable_iosapp" = "yes"; then + ENABLE_IOSAPP=true +fi +AC_SUBST(ENABLE_IOSAPP) +AM_CONDITIONAL([ENABLE_IOSAPP], [test "$ENABLE_IOSAPP" = "true"]) + MAX_CONNECTIONS=20 AS_IF([test -n "$with_max_connections" && test "$with_max_connections" -gt "0"], [MAX_CONNECTIONS="$with_max_connections"]) diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index c5baba4b9..922a6242d 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -190,6 +190,7 @@ $(builddir)/dist/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 $(LOLEAFLET_HT $(builddir)/dist/bundle.css $(builddir)/dist/bundle.js @echo "Generating loleaflet.html..." @m4 -E -DDEBUG=$(ENABLE_DEBUG) \ + -DIOSAPP=$(ENABLE_IOSAPP) \ -DLOLEAFLET_CSS="$(subst $(SPACE),$(COMMA),$(LOLEAFLET_CSS_M4))" \ -DLOLEAFLET_JS="$(subst $(SPACE),$(COMMA),$(GLOBAL_JS) $(NODE_MODULES_JS) \ $(call LOLEAFLET_JS,$(srcdir)/build/build.js) \ diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4 index 87bcf697e..f41d80c4f 100644 --- a/loleaflet/html/loleaflet.html.m4 +++ b/loleaflet/html/loleaflet.html.m4 @@ -23,14 +23,29 @@ define([_foreachq],[ifelse([$#],[3],[],[define([$1],[$4])$2[]$0([$1],[$2],shift( }; window.addEventListener('message', PostMessageReadyListener, false); </script> -ifelse(DEBUG,[true],foreachq([fileCSS],[LOLEAFLET_CSS],[<link rel="stylesheet" href="/loleaflet/%VERSION%/fileCSS" /> -]),[<link rel="stylesheet" href="/loleaflet/%VERSION%/bundle.css" /> -])dnl +ifelse(IOSAPP,[true], + ifelse(DEBUG,[true], + foreachq([fileCSS],[LOLEAFLET_CSS],[<link rel="stylesheet" href="fileCSS" /> + ]), + [<link rel="stylesheet" href="bundle.css" /> + ]), + ifelse(DEBUG,[true], + foreachq([fileCSS],[LOLEAFLET_CSS],[<link rel="stylesheet" href="/loleaflet/%VERSION%/fileCSS" /> + ]), + [<link rel="stylesheet" href="/loleaflet/%VERSION%/bundle.css" /> + ])dnl +)dnl <!--%BRANDING_CSS%--> <!-- add your logo here --> -<link rel="localizations" href="/loleaflet/%VERSION%/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/> -<link rel="localizations" href="/loleaflet/%VERSION%/l10n/locore-localizations.json" type="application/vnd.oftn.l10n+json" /> -<link rel="localizations" href="/loleaflet/%VERSION%/l10n/help-localizations.json" type="application/vnd.oftn.l10n+json"/> -<link rel="localizations" href="/loleaflet/%VERSION%/l10n/uno-localizations.json" type="application/vnd.oftn.l10n+json" /> +ifelse(IOSAPP,[true], + [<link rel="localizations" href="l10n/localizations.json" type="application/vnd.oftn.l10n+json"/> + <link rel="localizations" href="l10n/locore-localizations.json" type="application/vnd.oftn.l10n+json"/> + <link rel="localizations" href="l10n/help-localizations.json" type="application/vnd.oftn.l10n+json"/> + <link rel="localizations" href="l10n/uno-localizations.json" type="application/vnd.oftn.l10n+json"/>], + [<link rel="localizations" href="/loleaflet/%VERSION%/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/> + <link rel="localizations" href="/loleaflet/%VERSION%/l10n/locore-localizations.json" type="application/vnd.oftn.l10n+json"/> + <link rel="localizations" href="/loleaflet/%VERSION%/l10n/help-localizations.json" type="application/vnd.oftn.l10n+json"/> + <link rel="localizations" href="/loleaflet/%VERSION%/l10n/uno-localizations.json" type="application/vnd.oftn.l10n+json"/>] +)dnl </head> <body style="user-select: none;"> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits