[Libreoffice-commits] .: config_host.mk.in configure.ac extensions/Module_extensions.mk np_sdk/Module_np_sdk.mk postprocess/packcomponents Repository.mk scp2/InstallModule_ooo.mk scp2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 20 02:24:37 PST 2012


 Repository.mk                          |    9 ++++-
 config_host.mk.in                      |    3 +
 configure.ac                           |   51 ++++++++++++++++++---------------
 extensions/Module_extensions.mk        |   19 ++++++++----
 np_sdk/Module_np_sdk.mk                |    9 ++++-
 postprocess/packcomponents/makefile.mk |    2 -
 scp2/InstallModule_ooo.mk              |    3 +
 scp2/source/ooo/common_brand.scp       |    2 -
 scp2/source/ooo/file_library_ooo.scp   |    2 -
 scp2/source/ooo/file_ooo.scp           |   24 +++++++--------
 10 files changed, 75 insertions(+), 49 deletions(-)

New commits:
commit a6139f6fe6d4615c993a9b52b63b7d93c0c8ad4f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Nov 20 11:15:56 2012 +0100

    Key different browser plugin features to specific flags
    
    This is a rework of f9059d4eee8e53c0a6b531fff16e1fade58cb8b0 "Key all browser
    plugin features to --enable-nsplugin."  The problem with that was that Mac OS X
    supports pluging browser plugins into LO documents (which was originally
    controlled by --enable-mozilla) but not plugging LO into browser windows (which
    was originally controlled by --enable-nsplugin), so controlling the former with
    the same switch as the latter did not actually work.
    
    Thus I replaced the single ENABLE_NSPLUGIN feature flag with two dedicated ones,
    ENABLE_NPAPI_FROM_BROWSER (for plugging browser plugins into LO documents) and
    ENABLE_NPAPI_INTO_BROWSER (for plugging LO into browser windows).  The
    --enable-nsplugin configure switch is gone completely, setting the feature flags
    is always done fully automatically now.
    
    Change-Id: Iecf706637465e865c987563b5de489fa90b4c904

diff --git a/Repository.mk b/Repository.mk
index 82aac94..8dd9e27 100755
--- a/Repository.mk
+++ b/Repository.mk
@@ -187,14 +187,19 @@ $(eval $(call gb_Helper_register_executables,UREBIN,\
 
 endif
 
-ifeq ($(ENABLE_NSPLUGIN),YES)
+ifeq ($(ENABLE_NPAPI_FROM_BROWSER),YES)
 $(eval $(call gb_Helper_register_executables,OOO,\
-    nsplugin \
     pluginapp.bin \
 ))
 $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
     pl \
 ))
+endif
+
+ifeq ($(ENABLE_NPAPI_INTO_BROWSER),YES)
+$(eval $(call gb_Helper_register_executables,OOO,\
+    nsplugin \
+))
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
     npsoplugin \
 ))
diff --git a/config_host.mk.in b/config_host.mk.in
index a5f8f40..727bdc7 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -161,7 +161,8 @@ export ENABLE_LTO=@ENABLE_LTO@
 export ENABLE_MEDIAWIKI=@ENABLE_MEDIAWIKI@
 export ENABLE_MINIMIZER=@ENABLE_MINIMIZER@
 export ENABLE_MYSQLC=@ENABLE_MYSQLC@
-export ENABLE_NSPLUGIN=@ENABLE_NSPLUGIN@
+export ENABLE_NPAPI_FROM_BROWSER=@ENABLE_NPAPI_FROM_BROWSER@
+export ENABLE_NPAPI_INTO_BROWSER=@ENABLE_NPAPI_INTO_BROWSER@
 export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
 export ENABLE_OPENGL=@ENABLE_OPENGL@
 export ENABLE_OXYGENOFFICE=@ENABLE_OXYGENOFFICE@
diff --git a/configure.ac b/configure.ac
index 18d4277..5adc27e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1014,13 +1014,6 @@ AC_ARG_ENABLE(zenity,
         [Do not display a build icon in the notification area (on unix) during build.]),
 ,enable_zenity=yes)
 
-AC_ARG_ENABLE(nsplugin,
-    AS_HELP_STRING([--disable-nsplugin],
-        [Do not build NPAPI-based plugin features (allowing to plug LibreOffice
-         into browser windows, and to plug browser plugins into LibreOffice
-         documents.])
-)
-
 AC_ARG_ENABLE(cups,
     AS_HELP_STRING([--disable-cups],
         [Do not build cups support.])
@@ -1682,7 +1675,8 @@ WITH_SYSTEM_MOZILLA=no)
 AC_ARG_WITH(system-npapi-headers,
     AS_HELP_STRING([--with-system-npapi-headers],
         [Use NPAPI headers provided by system instead of bundled ones. Used in
-         extensions/source/nsplugin and extensions/source/plugin]),,
+         extensions/source/nsplugin (ENABLE_NPAPI_INTO_BROWSER=YES) and
+         extensions/source/plugin (ENABLE_NPAPI_FROM_BROWSER=YES)]),,
     [with_system_npapi_headers="$with_system_headers"]
 )
 
@@ -8390,7 +8384,8 @@ if test "$with_system_npapi_headers" = "yes"; then
     AC_LANG_POP([C])
 else
     AC_MSG_RESULT([internal])
-        dnl ...but will not be built/used unless ENABLE_NSPLUGIN is YES
+        dnl ...but will not be built/used unless ENABLE_NPAPI_FROM_BROWSER or
+        dnl ENABLE_NPAPI_INTO_BROWSER is YES
     SYSTEM_NPAPI_HEADERS=NO
 fi
 AC_SUBST(NPAPI_HEADERS_CFLAGS)
@@ -8556,24 +8551,33 @@ AC_SUBST(GRAPHITE_TARBALL)
 AC_SUBST([MINGW_GRAPHITE2_DLL])
 
 dnl ===================================================================
-dnl Check for nsplugin
+dnl Check for NPAPI interface to plug browser plugins into LibreOffice documents
 dnl ===================================================================
-AC_MSG_CHECKING([whether to build nsplugin extension])
-ENABLE_NSPLUGIN=NO
-if test $_os = Darwin -o $_os = iOS -o $_os = Android -o "$enable_headless" = "yes"; then
-    enable_gtk=no
+AC_MSG_CHECKING([whether to plug browser plugins into LibreOffice documents])
+if test "$_os" != Android -a "$_os" != iOS
+then
+    AC_MSG_RESULT([yes])
+    ENABLE_NPAPI_FROM_BROWSER=YES
+else
+    AC_MSG_RESULT([no])
+    ENABLE_NPAPI_FROM_BROWSER=NO
 fi
-if test "$enable_nsplugin" != "no"; then
-    if test "$enable_gtk" != "no"; then
-        AC_MSG_RESULT([yes])
-        ENABLE_NSPLUGIN=YES
-    else
-        AC_MSG_RESULT([no, disabled gtk2])
-    fi
+AC_SUBST(ENABLE_NPAPI_FROM_BROWSER)
+
+dnl ===================================================================
+dnl Check for NPAPI interface to plug LibreOffice into browser windows
+dnl ===================================================================
+AC_MSG_CHECKING([whether to plug LibreOffice into browser windows])
+if test "$_os" != Android -a "$_os" != Darwin -a "$_os" != iOS -a \
+        "$enable_headless" != yes -a "$enable_gtk" != no
+then
+    AC_MSG_RESULT([yes])
+    ENABLE_NPAPI_INTO_BROWSER=YES
 else
     AC_MSG_RESULT([no])
+    ENABLE_NPAPI_INTO_BROWSER=NO
 fi
-AC_SUBST(ENABLE_NSPLUGIN)
+AC_SUBST(ENABLE_NPAPI_INTO_BROWSER)
 
 AC_MSG_CHECKING([whether to use X11])
 dnl ***************************************
@@ -9416,6 +9420,9 @@ AC_SUBST(GTK3_CFLAGS)
 AC_SUBST(ENABLE_GTK3)
 
 AC_MSG_CHECKING([which VCLplugs shall be built])
+if test $_os = Darwin -o $_os = iOS -o $_os = Android -o "$enable_headless" = "yes"; then
+    enable_gtk=no
+fi
 ENABLE_GTK=""
 if test "x$enable_gtk" = "xyes"; then
     ENABLE_GTK="TRUE"
diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk
index 99ec13f..7bd6348 100644
--- a/extensions/Module_extensions.mk
+++ b/extensions/Module_extensions.mk
@@ -103,14 +103,10 @@ endif # DISABLE_ATL
 
 endif # WNT
 
-ifeq ($(ENABLE_NSPLUGIN),YES)
+ifeq ($(ENABLE_NPAPI_FROM_BROWSER),YES)
 
 $(eval $(call gb_Module_add_targets,extensions,\
-	Executable_nsplugin \
-	Library_npsoplugin \
 	Library_pl \
-	StaticLibrary_npsoenv \
-	WinResTarget_npsoplugin \
 ))
 
 ifeq ($(GUI),UNX)
@@ -122,7 +118,18 @@ $(eval $(call gb_Module_add_targets,extensions,\
 endif
 endif
 
-endif # ENABLE_PLUGIN=YES
+endif # ENABLE_NPAPI_FROM_BROWSER=YES
+
+ifeq ($(ENABLE_NPAPI_INTO_BROWSER),YES)
+
+$(eval $(call gb_Module_add_targets,extensions,\
+	Executable_nsplugin \
+	Library_npsoplugin \
+	StaticLibrary_npsoenv \
+	WinResTarget_npsoplugin \
+))
+
+endif # ENABLE_NPAPI_INTO_BROWSER=YES
 
 ifeq ($(OS),MACOSX)
 $(eval $(call gb_Module_add_targets,extensions,\
diff --git a/np_sdk/Module_np_sdk.mk b/np_sdk/Module_np_sdk.mk
index 81c3742..673ee5f 100644
--- a/np_sdk/Module_np_sdk.mk
+++ b/np_sdk/Module_np_sdk.mk
@@ -27,11 +27,10 @@
 
 $(eval $(call gb_Module_Module,np_sdk))
 
-ifeq ($(ENABLE_NSPLUGIN),YES)
+ifneq (,$(filter YES,$(ENABLE_NPAPI_FROM_BROWSER) $(ENABLE_NPAPI_INTO_BROWSER)))
 
 $(eval $(call gb_Module_add_targets,np_sdk,\
 	Package_inc \
-	StaticLibrary_nputils \
 ))
 
 ifeq ($(SYSTEM_NPAPI_HEADERS),NO)
@@ -40,6 +39,12 @@ $(eval $(call gb_Module_add_targets,np_sdk,\
 ))
 endif
 
+ifeq ($(ENABLE_NPAPI_INTO_BROWSER),YES)
+$(eval $(call gb_Module_add_targets,np_sdk,\
+	StaticLibrary_nputils \
+))
+endif
+
 endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk
index d8d6edd..25c55e4 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -298,7 +298,7 @@ my_components += \
     component/wizards/com/sun/star/wizards/web/web
 .END
 
-.IF "$(ENABLE_NSPLUGIN)" == "YES"
+.IF "$(ENABLE_NPAPI_FROM_BROWSER)" == "YES"
 my_components += component/extensions/source/plugin/pl
 .END
 
diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk
index d9c6f57..5816861 100644
--- a/scp2/InstallModule_ooo.mk
+++ b/scp2/InstallModule_ooo.mk
@@ -39,7 +39,8 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
 	ENABLE_KDE \
 	ENABLE_KDE4 \
 	ENABLE_LIBLANGTAG \
-	ENABLE_NSPLUGIN \
+	ENABLE_NPAPI_FROM_BROWSER \
+	ENABLE_NPAPI_INTO_BROWSER \
 	ENABLE_ONLINE_UPDATE \
 	ENABLE_OPENGL \
 	ENABLE_TDE \
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 6617e4a..53299c9 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -624,7 +624,7 @@ File gid_Brand_File_Bin_Libxml2
 End
 #endif
 
-#if defined ENABLE_NSPLUGIN
+#if defined ENABLE_NPAPI_INTO_BROWSER
 File gid_Brand_File_Lib_Npsoplugin
     BIN_FILE_BODY;
     Name = SPECIAL_NAME(npsoplugin);
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 1e038f8..deeca82 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -934,7 +934,7 @@ SPECIAL_LIB_FILE(gid_File_Lib_DeploymentGui,deploymentgui)
 
 STD_LIB_FILE(gid_File_Lib_DeploymentMisc, deploymentmisc)
 
-#if defined ENABLE_NSPLUGIN
+#if defined ENABLE_NPAPI_FROM_BROWSER
 STD_LIB_FILE( gid_File_Lib_Pl , pl)
 #endif
 
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index b732248..c3e3a83 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -102,8 +102,7 @@ File gid_File_Basic_Tutorials
     Name = "basicsrvtutorials.zip";
 End
 
-#ifdef ENABLE_NSPLUGIN
-
+#if defined ENABLE_NPAPI_INTO_BROWSER
 File gid_File_Exe_Nsplugin
         BIN_FILE_BODY;
         Styles          = (PACKED);
@@ -114,18 +113,8 @@ File gid_File_Exe_Nsplugin
     Name = "nsplugin.exe";
   #endif
 End
-
-#if defined(UNX) && !defined(QUARTZ)
-File gid_File_Bin_Pluginapp
-    BIN_FILE_BODY;
-    Dir = gid_Brand_Dir_Program;
-    Name = "pluginapp.bin";
-    Styles = (PACKED);
-End
 #endif
 
-#endif // ENABLE_NSPLUGIN
-
 File gid_File_Bin_Gengal
     BIN_FILE_BODY;
     Dir = gid_Brand_Dir_Program;
@@ -159,6 +148,17 @@ End
 
 #endif
 
+#if defined ENABLE_NPAPI_FROM_BROWSER && defined UNX && !defined QUARTZ
+
+File gid_File_Bin_Pluginapp
+    BIN_FILE_BODY;
+    Dir = gid_Brand_Dir_Program;
+    Name = "pluginapp.bin";
+    Styles = (PACKED);
+End
+
+#endif
+
 #ifdef UNX
 
 File gid_File_Bin_Open_Url


More information about the Libreoffice-commits mailing list