summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2011-12-17 19:46:38 +0100
committerMichael Stahl <mstahl@redhat.com>2011-12-17 22:11:12 +0100
commit2548d634c762ccc5eeda7f075ffa6ed3408474d2 (patch)
treee838a4b060d8d07d3311baef98a87e797eb6842f /extensions
parent21411e321ee8e430a81ec83297a88c3010f5ce8d (diff)
extensions: convert nsplugin to gbuild
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Executable_nsplugin.mk82
-rw-r--r--extensions/Library_npsoplugin.mk104
-rw-r--r--extensions/Module_extensions.mk26
-rwxr-xr-xextensions/WinResTarget_npsoplugin.mk35
-rw-r--r--extensions/prj/build.lst2
-rw-r--r--extensions/source/nsplugin/source/exports.dxp16
-rw-r--r--extensions/source/nsplugin/source/exports_wnt.dxp18
-rw-r--r--extensions/source/nsplugin/source/makefile.mk164
-rwxr-xr-xextensions/source/nsplugin/source/npsoplugin.def21
9 files changed, 268 insertions, 200 deletions
diff --git a/extensions/Executable_nsplugin.mk b/extensions/Executable_nsplugin.mk
new file mode 100644
index 000000000000..439424f2f1d3
--- /dev/null
+++ b/extensions/Executable_nsplugin.mk
@@ -0,0 +1,82 @@
+# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Peter Foley <pefoley2@verizon.net>
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+#
+
+$(eval $(call gb_Executable_Executable,nsplugin))
+
+$(eval $(call gb_Executable_add_api,nsplugin,\
+ offapi \
+ udkapi \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,nsplugin,\
+ extensions/source/nsplugin/source/so_closelistener \
+ extensions/source/nsplugin/source/so_instance \
+ extensions/source/nsplugin/source/so_env \
+ extensions/source/nsplugin/source/so_main \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,nsplugin,\
+ cppu \
+ cppuhelper \
+ sal \
+))
+
+ifeq ($(OS),SOLARIS)
+$(eval $(call gb_Executable_add_libs,nsplugin,\
+ -lsocket \
+ -lnsl \
+))
+endif
+
+ifeq ($(GUI),WNT)
+$(eval $(call gb_Executable_add_ldflags,nsplugin,\
+ $(OUTDIR)/lib/pathutils-obj.obj \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,nsplugin,\
+ extensions/source/nsplugin/source/nsp_windows \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,nsplugin,\
+ ws2_32 \
+ shell32 \
+ ole32 \
+ kernel32 \
+ user32 \
+ gdi32 \
+ winspool \
+ comdlg32 \
+ advapi32 \
+ oleaut32 \
+ uuid \
+))
+endif # WNT
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/extensions/Library_npsoplugin.mk b/extensions/Library_npsoplugin.mk
new file mode 100644
index 000000000000..e5710fed4fa8
--- /dev/null
+++ b/extensions/Library_npsoplugin.mk
@@ -0,0 +1,104 @@
+# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Peter Foley <pefoley2@verizon.net>
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+#
+
+$(eval $(call gb_Library_Library,npsoplugin))
+
+ifeq ($(SYSTEM_MOZILLA_HEADERS),YES)
+$(eval $(call gb_Library_set_include,npsoplugin,\
+ $$(INCLUDE) \
+ $(MOZILLA_HEADERS_CFLAGS)
+))
+else
+$(eval $(call gb_Library_set_include,npsoplugin,\
+ -I$(OUTDIR)/inc/npsdk \
+ $$(INCLUDE) \
+))
+endif
+
+ifeq ($(GUI),UNX)
+
+$(eval $(call gb_Library_add_ldflags,npsoplugin,\
+ $(OUTDIR)/lib/npunix.o \
+))
+
+$(eval $(call gb_Library_add_libs,npsoplugin,\
+ -ldl \
+))
+
+$(eval $(call gb_Library_use_external,npsoplugin,gtk))
+
+$(eval $(call gb_Library_add_defs,npsoplugin,\
+ -DMOZ_X11 \
+))
+
+ifeq ($(filter-out LINUX FREEBSD NETBSD OPENBSD DRAGONFLY,$(OS)),)
+$(eval $(call gb_Library_add_defs,npsoplugin,\
+ -DNP_LINUX \
+))
+endif
+
+endif # GUI=UNX
+
+ifeq ($(GUI),WNT)
+
+$(eval $(call gb_Library_add_ldflags,npsoplugin,\
+ $(OUTDIR)/lib/pathutils-obj.obj \
+ $(OUTDIR)/lib/npwin.obj \
+ /DEF:$(call gb_Helper_convert_native,$(SRCDIR)/extensions/source/nsplugin/source/npsoplugin.def) \
+))
+
+$(eval $(call gb_Library_add_linked_libs,npsoplugin,\
+ ws2_32 \
+ shell32 \
+ ole32 \
+ kernel32 \
+ user32 \
+ gdi32 \
+ winspool \
+ comdlg32 \
+ advapi32 \
+ oleaut32 \
+ uuid \
+))
+
+$(eval $(call gb_Library_add_defs,npsoplugin,\
+ -DENGLISH \
+))
+
+$(eval $(call gb_Library_add_nativeres,npsoplugin,npsoplugin_res))
+
+endif # GUI=WNT
+
+$(eval $(call gb_Library_add_exception_objects,npsoplugin,\
+ extensions/source/nsplugin/source/so_env \
+ extensions/source/nsplugin/source/npshell \
+))
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk
index d471c76fe663..78830783761b 100644
--- a/extensions/Module_extensions.mk
+++ b/extensions/Module_extensions.mk
@@ -49,6 +49,32 @@ $(eval $(call gb_Module_add_targets,extensions,\
endif
endif
+ifneq ($(WITH_MOZILLA),NO)
+
+$(eval $(call gb_Module_add_targets,extensions,\
+ Executable_nsplugin \
+))
+
+ifeq ($(GUI),WNT)
+$(eval $(call gb_Module_add_targets,extensions,\
+ Library_npsoplugin \
+ WinResTarget_npsoplugin \
+))
+endif # GUI=WNT
+
+ifeq ($(GUI),UNX)
+
+ifneq ($(ENABLE_GTK),)
+$(eval $(call gb_Module_add_targets,extensions,\
+ Library_npsoplugin \
+))
+endif # ENABLE_GTK
+
+endif # GUI=UNX
+
+endif # WITH_MOZILLA=YES
+
+
$(eval $(call gb_Module_add_check_targets,extensions,\
CppunitTest_extensions_test_update \
))
diff --git a/extensions/WinResTarget_npsoplugin.mk b/extensions/WinResTarget_npsoplugin.mk
new file mode 100755
index 000000000000..bba691713970
--- /dev/null
+++ b/extensions/WinResTarget_npsoplugin.mk
@@ -0,0 +1,35 @@
+# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Peter Foley <pefoley2@verizon.net>
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+#
+
+$(eval $(call gb_WinResTarget_WinResTarget,npsoplugin_res))
+
+$(eval $(call gb_WinResTarget_add_file,npsoplugin_res,extensions/source/nsplugin/source/nsplugin_oo))
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst
index c0cd9aad2870..e6144e5d14ed 100644
--- a/extensions/prj/build.lst
+++ b/extensions/prj/build.lst
@@ -21,8 +21,6 @@ ex extensions\source\dbpilots nmake - all ex_dbpilots ex_i
ex extensions\source\abpilot nmake - all ex_abpilot ex_inc NULL
ex extensions\source\logging nmake - all ex_logging ex_inc NULL
ex extensions\source\config\ldap nmake - all ex_ldap ex_inc NULL
-ex extensions\source\nsplugin\source nmake - u ex_nsplugin ex_inc NULL
-ex extensions\source\nsplugin\source nmake - w ex_nsplugin ex_inc NULL
ex extensions\util nmake - all ex_util ex_abpilot ex_dbpilots ex_logging ex_ldap ex_bib ex_plutil NULL
ex extensions\prj nmake - all ex_prj NULL
diff --git a/extensions/source/nsplugin/source/exports.dxp b/extensions/source/nsplugin/source/exports.dxp
deleted file mode 100644
index e8b697289c20..000000000000
--- a/extensions/source/nsplugin/source/exports.dxp
+++ /dev/null
@@ -1,16 +0,0 @@
-NPP_GetMIMEDescription
-NPP_GetValue
-NPP_Initialize
-NPP_GetJavaClass
-NPP_Shutdown
-NPP_New
-NPP_Destroy
-NPP_SetWindow
-NPP_NewStream
-NPP_WriteReady
-NPP_Write
-NPP_DestroyStream
-NPP_StreamAsFile
-NPP_URLNotify
-NPP_Print
-NPP_Shutdown
diff --git a/extensions/source/nsplugin/source/exports_wnt.dxp b/extensions/source/nsplugin/source/exports_wnt.dxp
deleted file mode 100644
index a27be8c38300..000000000000
--- a/extensions/source/nsplugin/source/exports_wnt.dxp
+++ /dev/null
@@ -1,18 +0,0 @@
-NPP_GetMIMEDescription
-NPP_Initialize
-NPP_Shutdown
-NPP_New
-NPP_Destroy
-NPP_SetWindow
-NPP_NewStream
-NPP_WriteReady
-NPP_Write
-NPP_DestroyStream
-NPP_StreamAsFile
-NPP_URLNotify
-NPP_Print
-NPP_Shutdown
-NP_GetEntryPoints
-NP_Initialize
-NP_Shutdown
-NP_GetMIMEDescription
diff --git a/extensions/source/nsplugin/source/makefile.mk b/extensions/source/nsplugin/source/makefile.mk
deleted file mode 100644
index 5b7476408a31..000000000000
--- a/extensions/source/nsplugin/source/makefile.mk
+++ /dev/null
@@ -1,164 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-PRJNAME=extensions
-TARGET=npsoplugin
-
-ENABLE_EXCEPTIONS=TRUE
-USE_DEFFILE=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-.IF "$(SYSTEM_MOZILLA_HEADERS)" == "YES"
-INCPRE+=$(MOZILLA_HEADERS_CFLAGS)
-.ELSE
-INCPRE=$(SOLARINCDIR)$/npsdk
-.ENDIF
-
-.IF "$(GUI)"=="UNX"
-
-# not sure about -DMOZ_X11 but otheriwse some struct member don't exist...
-CFLAGS+=-DMOZ_X11
-
-.IF "$(ENABLE_NSPLUGIN)"=="NO"
-
-dummy:
- @echo Nsplugin disabled, nothing to build
-
-.ELSE # ENABLE_NSPLUGIN
-.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || \
- "$(OS)"=="OPENBSD" || "$(OS)"=="DRAGONFLY"
-INC+= -DNP_LINUX
-.ENDIF
-PKGCONFIG_MODULES=gtk+-2.0
-.INCLUDE: pkg_config.mk
-.ENDIF # ENABLE_NSPLUGIN
-.ENDIF # "$(GUI)"=="UNX"
-.IF "$(GUI)"=="WNT"
-INC+= -DENGLISH
-.ENDIF
-
-
-# --- Files -------------------------------------
-
-SLOFILES= $(SLO)$/npshell.obj \
- $(SLO)$/so_env.obj
-
-SHL1OBJS= $(SLO)$/npshell.obj \
- $(SLO)$/so_env.obj
-
-.IF "$(GUI)"=="UNX"
-STDLIBS+=$(SOLARLIBDIR)$/npunix.o
-SHL1STDLIBS+=$(SOLARLIBDIR)$/npunix.o
-.ENDIF #UNX
-.IF "$(GUI)"=="WNT"
-SHL1OBJS+=$(SOLARLIBDIR)$/pathutils-obj.obj
-STDLIBS+=$(SOLARLIBDIR)$/npwin.obj
-SHL1STDLIBS+= $(SHELL32LIB) $(SOLARLIBDIR)$/npwin.obj
-
-.ENDIF
-
-OBJFILES=\
- $(OBJ)$/so_closelistener.obj\
- $(OBJ)$/so_instance.obj\
- $(OBJ)$/so_env.obj\
- $(OBJ)$/so_main.obj
-
-# --- Plugin executable -------------------------
-APP1TARGET=nsplugin$(EXEPOSTFIX)
-APP1OBJS=$(OBJFILES)
-
-APP1STDLIBS=\
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(SALLIB)
-
-.IF "$(OS)"=="SOLARIS"
-APP1STDLIBS+= -lsocket -lnsl
-.ENDIF
-
-.IF "$(GUI)"=="WNT"
-DEPOBJFILES=$(OBJ)$/nsp_windows.obj
-APP1OBJS+=$(OBJ)$/nsp_windows.obj $(SOLARLIBDIR)$/pathutils-obj.obj
-APP1STDLIBS+= $(WS2_32LIB) $(SHELL32LIB) $(OLE32LIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB) $(OLEAAUT32LIB) $(UUIDLIB)
-.ENDIF
-
-# --- Library -----------------------------------
-
-SHL1TARGET=$(TARGET)_so
-.IF "$(GUI)"=="WNT"
-SHL1STDLIBS+= $(WS2_32LIB) $(SHELL32LIB) $(OLE32LIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB) $(OLE32LIB) $(OLEAAUT32LIB) $(UUIDLIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB)
-.ENDIF
-
-SHL1DEPN=
-SHL1IMPLIB= i$(SHL1TARGET)
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-SHL1RPATH=OOO
-
-# ----- get some additional keys in versioninfo ------------
-SHL1ADD_VERINFO=nsplugin.rc
-SHL1DEPN+=$(SHL1ADD_VERINFO)
-
-DEF1NAME=$(SHL1TARGET)
-.IF "$(GUI)"=="UNX"
-DEF1EXPORTFILE=exports.dxp
-.ENDIF
-.IF "$(GUI)"=="WNT"
-DEF1EXPORTFILE=exports_wnt.dxp
-.ENDIF
-
-SHL2OBJS=$(SHL1OBJS)
-SHL2STDLIBS=$(SHL1STDLIBS)
-SHL2TARGET=$(TARGET)
-.IF "$(GUI)"=="WNT"
-SHL2STDLIBS+= $(WS2_32LIB) $(SHELL32LIB) $(OLE32LIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB) $(OLE32LIB) $(OLEAAUT32LIB) $(UUIDLIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB)
-.ENDIF
-
-SHL2DEPN=
-SHL2IMPLIB= i$(SHL2TARGET)
-SHL2DEF= $(MISC)$/$(SHL2TARGET).def
-SHL2RPATH=OOO
-
-# ----- get some additional keys in versioninfo ------------
-SHL2ADD_VERINFO=nsplugin_oo.rc
-SHL2DEPN+=$(SHL2ADD_VERINFO)
-
-DEF2NAME=$(SHL2TARGET)
-.IF "$(GUI)"=="UNX"
-DEF2EXPORTFILE=exports.dxp
-.ENDIF
-.IF "$(GUI)"=="WNT"
-DEF2EXPORTFILE=exports_wnt.dxp
-.ENDIF
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/extensions/source/nsplugin/source/npsoplugin.def b/extensions/source/nsplugin/source/npsoplugin.def
new file mode 100755
index 000000000000..160072a9f82e
--- /dev/null
+++ b/extensions/source/nsplugin/source/npsoplugin.def
@@ -0,0 +1,21 @@
+LIBRARY "npsoplugin.dll"
+
+EXPORTS
+ NPP_GetMIMEDescription
+ NPP_Initialize
+ NPP_Shutdown
+ NPP_New
+ NPP_Destroy
+ NPP_SetWindow
+ NPP_NewStream
+ NPP_WriteReady
+ NPP_Write
+ NPP_DestroyStream
+ NPP_StreamAsFile
+ NPP_URLNotify
+ NPP_Print
+ NPP_Shutdown
+ NP_GetEntryPoints
+ NP_Initialize
+ NP_Shutdown
+ NP_GetMIMEDescription