[Libreoffice-commits] core.git: Module_tail_build.mk RepositoryExternal.mk RepositoryModule_ooo.mk sdext/Library_pdfimport.mk tail_build/prj xpdf/ExternalPackage_xpdf.mk xpdf/ExternalProject_xpdf.mk xpdf/Makefile xpdf/makefile.mk xpdf/Module_xpdf.mk xpdf/prj xpdf/UnpackedTarball_xpdf.mk xpdf/xpdf-3.02.patch xpdf/xpdf-no-writable-literals.patch

Peter Foley pefoley2 at verizon.net
Sun Feb 17 08:48:00 PST 2013


 Module_tail_build.mk                 |    1 
 RepositoryExternal.mk                |    6 +
 RepositoryModule_ooo.mk              |    1 
 sdext/Library_pdfimport.mk           |    1 
 tail_build/prj/build.lst             |    2 
 xpdf/ExternalPackage_xpdf.mk         |   24 +++++
 xpdf/ExternalProject_xpdf.mk         |   46 ++++++++++
 xpdf/Makefile                        |    7 +
 xpdf/Module_xpdf.mk                  |   22 +++++
 xpdf/UnpackedTarball_xpdf.mk         |   25 +++++
 xpdf/makefile.mk                     |  153 -----------------------------------
 xpdf/prj/build.lst                   |    2 
 xpdf/prj/d.lst                       |    5 -
 xpdf/xpdf-3.02.patch                 |    2 
 xpdf/xpdf-no-writable-literals.patch |    6 -
 15 files changed, 138 insertions(+), 165 deletions(-)

New commits:
commit fb1d11d9a54738562994ee6f7a5875f7a62d5863
Author: Peter Foley <pefoley2 at verizon.net>
Date:   Sun Feb 17 09:26:01 2013 -0500

    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 at libreoffice.org>
    Reviewed-by: Peter Foley <pefoley2 at verizon.net>

diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 988edda..0495dac 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 d0ad921..9031863 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 4256564..cf85f6e 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 ce171f2..260a39c 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 b3643bb..e1851ff 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 0000000..fd0a611
--- /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 0000000..3ad1d9c
--- /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 0000000..ccb1c85
--- /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 0000000..88e9a2c
--- /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 0000000..38fc616
--- /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 ddda497..0000000
--- 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 527985f..1868112 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 efcb7ea..e69de29 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 e69de29..0000000
diff --git a/xpdf/xpdf-3.02.patch b/xpdf/xpdf-3.02.patch
index 9bf67f0..1bc1427 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 9a1366e..3887342 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"


More information about the Libreoffice-commits mailing list