diff options
author | Peter Foley <pefoley2@verizon.net> | 2013-02-17 09:26:01 -0500 |
---|---|---|
committer | Peter Foley <pefoley2@verizon.net> | 2013-02-17 16:47:39 +0000 |
commit | fb1d11d9a54738562994ee6f7a5875f7a62d5863 (patch) | |
tree | 2c86879b5e934836e1b8cb0a52ce76d36345e351 | |
parent | c21916ad8a315a9dd7f23bf9aef0576975470a5a (diff) |
convert xpdf to gbuild and add to tail_build
Change-Id: Ie85f8092e0c37124508123a1d2f942f50f0740da
Reviewed-on: https://gerrit.libreoffice.org/2197
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Peter Foley <pefoley2@verizon.net>
-rw-r--r-- | Module_tail_build.mk | 1 | ||||
-rw-r--r-- | RepositoryExternal.mk | 6 | ||||
-rw-r--r-- | RepositoryModule_ooo.mk | 1 | ||||
-rw-r--r-- | sdext/Library_pdfimport.mk | 1 | ||||
-rw-r--r-- | tail_build/prj/build.lst | 2 | ||||
-rw-r--r-- | xpdf/ExternalPackage_xpdf.mk | 24 | ||||
-rw-r--r-- | xpdf/ExternalProject_xpdf.mk | 46 | ||||
-rw-r--r-- | xpdf/Makefile | 7 | ||||
-rw-r--r-- | xpdf/Module_xpdf.mk | 22 | ||||
-rw-r--r-- | xpdf/UnpackedTarball_xpdf.mk | 25 | ||||
-rw-r--r-- | xpdf/makefile.mk | 153 | ||||
-rw-r--r-- | xpdf/prj/build.lst | 2 | ||||
-rw-r--r-- | xpdf/prj/d.lst | 5 | ||||
-rw-r--r-- | xpdf/prj/dmake | 0 | ||||
-rw-r--r-- | xpdf/xpdf-3.02.patch | 2 | ||||
-rw-r--r-- | xpdf/xpdf-no-writable-literals.patch | 6 |
16 files changed, 138 insertions, 165 deletions
diff --git a/Module_tail_build.mk b/Module_tail_build.mk index 988eddac8599..0495dac8a328 100644 --- a/Module_tail_build.mk +++ b/Module_tail_build.mk @@ -210,6 +210,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_build,\ xmerge \ $(call gb_Helper_optional,DESKTOP,xmlhelp) \ xmloff \ + $(call gb_Helper_optional,XPDF,xpdf) \ xmlreader \ xmlscript \ xmlsecurity \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index d0ad921d254c..903186339ec3 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1741,8 +1741,12 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\ )) define gb_LinkTarget__use_poppler +$(call gb_LinkTarget_use_package,$(1),xpdf) + $(call gb_LinkTarget_set_include,$(1),\ - -I$(OUTDIR)/inc/xpdf \ + -I$(call gb_UnpackedTarball_get_dir,xpdf) \ + -I$(call gb_UnpackedTarball_get_dir,xpdf)/xpdf \ + -I$(call gb_UnpackedTarball_get_dir,xpdf)/goo \ $$(INCLUDE) \ ) diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk index 42565649e59c..cf85f6eba6a6 100644 --- a/RepositoryModule_ooo.mk +++ b/RepositoryModule_ooo.mk @@ -223,6 +223,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\ xmerge \ $(call gb_Helper_optional,DESKTOP,xmlhelp) \ xmloff \ + $(call gb_Helper_optional,XPDF,xpdf) \ xmlreader \ xmlscript \ xmlsecurity \ diff --git a/sdext/Library_pdfimport.mk b/sdext/Library_pdfimport.mk index ce171f28e588..260a39ce5000 100644 --- a/sdext/Library_pdfimport.mk +++ b/sdext/Library_pdfimport.mk @@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_static_libraries,pdfimport,\ $(eval $(call gb_Library_use_externals,pdfimport,\ boost_headers \ zlib \ + poppler \ )) $(eval $(call gb_Library_add_exception_objects,pdfimport,\ diff --git a/tail_build/prj/build.lst b/tail_build/prj/build.lst index b3643bb06134..e1851ff0cb1c 100644 --- a/tail_build/prj/build.lst +++ b/tail_build/prj/build.lst @@ -1,2 +1,2 @@ -tb tail_build : EXPAT:expat MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python3 XPDF:xpdf external solenv soltools NULL +tb tail_build : EXPAT:expat MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python3 external solenv soltools NULL tb tail_build\prj nmake - all tb_prj NULL diff --git a/xpdf/ExternalPackage_xpdf.mk b/xpdf/ExternalPackage_xpdf.mk new file mode 100644 index 000000000000..fd0a6117b294 --- /dev/null +++ b/xpdf/ExternalPackage_xpdf.mk @@ -0,0 +1,24 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,xpdf,xpdf)) + +$(eval $(call gb_ExternalPackage_use_external_project,xpdf,xpdf)) + +ifeq ($(COM),MSC) +$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/fofi.lib,fofi/fofi.lib)) +$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/Goo.lib,goo/Goo.lib)) +$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/xpdf.lib,xpdf/xpdf.lib)) +else +$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/libfofi.a,fofi/libfofi.a)) +$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/libGoo.a,goo/libGoo.a)) +$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/libxpdf.a,xpdf/libxpdf.a)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/xpdf/ExternalProject_xpdf.mk b/xpdf/ExternalProject_xpdf.mk new file mode 100644 index 000000000000..3ad1d9c5f558 --- /dev/null +++ b/xpdf/ExternalProject_xpdf.mk @@ -0,0 +1,46 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,xpdf)) + +$(eval $(call gb_ExternalProject_use_unpacked,xpdf,xpdf)) + +$(eval $(call gb_ExternalProject_register_targets,xpdf,\ + build \ +)) + +ifeq ($(OS),WNT) +ifeq ($(COM),GCC) +$(call gb_ExternalProject_get_state_target,xpdf,build): + cd $(EXTERNAL_WORKDIR) \ + && ./configure --without-x --enable-multithreaded --enable-exceptions \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + LDFLAGS="-Wl,--enable-runtime-pseudo-reloc-v2" \ + LIBS="-lgdi32" \ + && $(MAKE) \ + && touch $@ +else # COM=MSC +$(call gb_ExternalProject_get_state_target,xpdf,build): + cd $(EXTERNAL_WORKDIR) \ + && LIB="$(ILIB)" cmd.exe /d /c ms_make.bat \ + && touch $@ +endif +else # OS!=WNT +$(call gb_ExternalProject_get_state_target,xpdf,build): + cd $(EXTERNAL_WORKDIR) \ + && ./configure --without-x --without-libpaper-library --without-t1-library --enable-multithreaded --enable-exceptions \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + $(if $(SYSBASE),CFLAGS="-I$(SYSBASE)/usr/include") \ + $(if $(filter MACOSXP,$(OS)$(CPU)),CXXFLAGS="-malign-natural") \ + && MAKEFLAGS="$(subst r,,$(MAKEFLAGS))" $(MAKE) \ + && touch $@ +endif + +# vim: set noet sw=4 ts=4: diff --git a/xpdf/Makefile b/xpdf/Makefile new file mode 100644 index 000000000000..ccb1c85a04da --- /dev/null +++ b/xpdf/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/xpdf/Module_xpdf.mk b/xpdf/Module_xpdf.mk new file mode 100644 index 000000000000..88e9a2cb850e --- /dev/null +++ b/xpdf/Module_xpdf.mk @@ -0,0 +1,22 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,xpdf)) + +ifeq ($(SYSTEM_POPPLER),NO) + +$(eval $(call gb_Module_add_targets,xpdf,\ + UnpackedTarball_xpdf \ + ExternalPackage_xpdf \ + ExternalProject_xpdf \ +)) + +endif + +# vim: set noet sw=4 ts=4: diff --git a/xpdf/UnpackedTarball_xpdf.mk b/xpdf/UnpackedTarball_xpdf.mk new file mode 100644 index 000000000000..38fc61662530 --- /dev/null +++ b/xpdf/UnpackedTarball_xpdf.mk @@ -0,0 +1,25 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,xpdf)) + +$(eval $(call gb_UnpackedTarball_set_tarball,xpdf,$(XPDF_TARBALL))) + +$(eval $(call gb_UnpackedTarball_fix_end_of_line,xpdf,\ + ms_make.bat \ +)) + +$(eval $(call gb_UnpackedTarball_add_patches,xpdf,\ + xpdf/xpdf-3.02.patch \ + xpdf/xpdf-3.02-ooopwd.patch \ + xpdf/xpdf-3.02-gfxColorMaxComps.patch \ + xpdf/xpdf-no-writable-literals.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/xpdf/makefile.mk b/xpdf/makefile.mk deleted file mode 100644 index ddda497f3195..000000000000 --- a/xpdf/makefile.mk +++ /dev/null @@ -1,153 +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. -# -#************************************************************************* - -# dmake create_clean -- just unpacks -# dmake patch -- unpacks and applies patch file -# dmake create_patch -- creates a patch file - -PRJ=. - -PRJNAME=xpdf -TARGET=xpdflib - -# --- Settings ----------------------------------------------------- - -.INCLUDE: settings.mk - -.IF "$(SYSTEM_POPPLER)" == "YES" -dummy: - @echo "An already available installation of poppler should exist on your system." - @echo "Therefore xpdf provided here does not need to be built in addition." -.ENDIF - -# --- Files -------------------------------------------------------- - -TARFILE_NAME=xpdf-3.02 -TARFILE_MD5=599dc4cc65a07ee868cf92a667a913d2 -PATCH_FILES=$(TARFILE_NAME).patch xpdf-3.02-ooopwd.patch xpdf-3.02-gfxColorMaxComps.patch xpdf-no-writable-literals.patch - -CONFIGURE_DIR= -BUILD_DIR=$(CONFIGURE_DIR) - -.IF "$(SYSBASE)"!="" -.IF "$(EXTRA_CFLAGS)"!="" -CFLAGS:=$(EXTRA_CFLAGS) -CXXFLAGS:=$(EXTRA_CFLAGS) -.EXPORT : CFLAGS CXXFLAGS -.ENDIF # "$(EXTRA_CFLAGS)"!="" -.ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!="" -CFLAGS:=$(EXTRA_CDEFS) -CXXFLAGS+:=$(EXTRA_CDEFS) -.EXPORT: CFLAGS CXXFLAGS -.ENDIF - -.IF "$(OS)"!="WNT" -.IF "$(OS)"=="SOLARIS" -CFLAGS:=-O $(ARCH_FLAGS) -.IF "$(COM)$(CPU)" == "C52I" -CXXFLAGS:=-O2 $(ARCH_FLAGS) -.ELSE -CXXFLAGS:=-O $(ARCH_FLAGS) -.ENDIF -.IF "$(SYSBASE)" != "" -CXXFLAGS +:= -I$(SYSBASE)/usr/include -.END -LDFLAGS:=$(ARCH_FLAGS) -.EXPORT : CFLAGS CXXFLAGS LDFLAGS -.ENDIF - -CONFIGURE_ACTION=configure -CONFIGURE_FLAGS+=--without-x --without-libpaper-library --without-t1-library --enable-multithreaded --enable-exceptions - -.IF "$(OS)" == "MACOSX" -CONFIGURE_FLAGS += \ - --prefix=/@.__________________________________________________$(EXTRPATH) -.END - -.IF "$(CROSS_COMPILING)"=="YES" -CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) -.ENDIF - -.IF "$(OS)$(CPU)"=="MACOSXP" -CXXFLAGS+=-malign-natural -.EXPORT: CXXFLAGS -.ENDIF - -BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) -.ELSE -.IF "$(COM)"=="GCC" -LDFLAGS=-Wl,--enable-runtime-pseudo-reloc-v2 -.EXPORT : LDFLAGS - -CONFIGURE_ACTION=./configure -CONFIGURE_FLAGS+=--without-x --enable-multithreaded --enable-exceptions LIBS=-lgdi32 - -.IF "$(CROSS_COMPILING)"=="YES" -CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) -.ENDIF - -BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) -.ELSE -CONFIGURE_ACTION= -BUILD_ACTION= cmd.exe /d /c ms_make.bat -.ENDIF -.ENDIF - -CONVERTFILES=ms_make.bat -BUILD_FLAGS= - -OUT2INC= \ - fofi$/*.h \ - goo$/*.h \ - xpdf$/*.h \ - aconf.h \ - aconf2.h - -.IF "$(OS)"!="WNT" -OUT2LIB= \ - fofi$/lib*.a \ - goo$/lib*.a \ - xpdf$/lib*.a -.ELSE -.IF "$(COM)"=="GCC" -OUT2LIB= \ - fofi$/lib*.a \ - goo$/lib*.a \ - xpdf$/lib*.a -.ELSE -OUT2LIB= \ - fofi$/*.lib \ - goo$/*.lib \ - xpdf$/*.lib -.ENDIF -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_ext.mk -.INCLUDE : target.mk -.INCLUDE : tg_ext.mk diff --git a/xpdf/prj/build.lst b/xpdf/prj/build.lst index 527985ff0cf2..1868112d3487 100644 --- a/xpdf/prj/build.lst +++ b/xpdf/prj/build.lst @@ -1,2 +1,2 @@ xp xpdf : solenv soltools NULL -xp xpdf nmake - all xp_xpdf NULL +xp xpdf\prj nmake - all xp_xpdf NULL diff --git a/xpdf/prj/d.lst b/xpdf/prj/d.lst index efcb7eab693c..e69de29bb2d1 100644 --- a/xpdf/prj/d.lst +++ b/xpdf/prj/d.lst @@ -1,5 +0,0 @@ -mkdir: %_DEST%\inc\xpdf -..\%__SRC%\inc\*.h %_DEST%\inc\xpdf\*.h -..\%__SRC%\lib\lib*.a %_DEST%\lib -..\%__SRC%\lib\*.lib %_DEST%\lib -..\%__SRC%\bin\*.dll %_DEST%\bin diff --git a/xpdf/prj/dmake b/xpdf/prj/dmake deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/xpdf/prj/dmake +++ /dev/null diff --git a/xpdf/xpdf-3.02.patch b/xpdf/xpdf-3.02.patch index 9bf67f07af47..1bc1427e5d36 100644 --- a/xpdf/xpdf-3.02.patch +++ b/xpdf/xpdf-3.02.patch @@ -84,7 +84,7 @@ @@ -1,5 +1,5 @@ set CC=cl -set CFLAGS=/DWIN32 /I.. /I..\goo /I..\fofi /O2 /nologo -+set CFLAGS=/DWIN32 /D_MT /I.. /I..\goo /I..\fofi /O2 /nologo ++set CFLAGS=/DWIN32 /D_MT /I.. /I..\goo /I..\fofi /O2 /nologo %SOLARINC% set CXX=cl set CXXFLAGS=%CFLAGS% /TP set LIBPROG=lib diff --git a/xpdf/xpdf-no-writable-literals.patch b/xpdf/xpdf-no-writable-literals.patch index 9a1366e1613c..388734298b82 100644 --- a/xpdf/xpdf-no-writable-literals.patch +++ b/xpdf/xpdf-no-writable-literals.patch @@ -1,5 +1,5 @@ --- misc/xpdf-3.02/xpdf/Error.h.sav 2007-02-27 23:05:52.000000000 +0100 -+++ misc/build/xpdf-3.02/xpdf/Error.h 2012-10-09 23:24:12.002455791 +0200 ++++ misc/xpdf-3.02/xpdf/Error.h 2012-10-09 23:24:12.002455791 +0200 @@ -18,6 +18,6 @@ #include <stdio.h> #include "config.h" @@ -8,8 +8,8 @@ +extern void CDECL error(int pos, const char *msg, ...); #endif ---- misc/build/xpdf-3.02/xpdf/Error.cc.sav 2007-02-27 23:05:52.000000000 +0100 -+++ misc/build/xpdf-3.02/xpdf/Error.cc 2012-10-09 23:24:27.813569809 +0200 +--- build/xpdf-3.02/xpdf/Error.cc.sav 2007-02-27 23:05:52.000000000 +0100 ++++ build/xpdf-3.02/xpdf/Error.cc 2012-10-09 23:24:27.813569809 +0200 @@ -18,7 +18,7 @@ #include "GlobalParams.h" #include "Error.h" |