summaryrefslogtreecommitdiff
path: root/xpdf
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2013-02-17 09:26:01 -0500
committerPeter Foley <pefoley2@verizon.net>2013-02-17 16:47:39 +0000
commitfb1d11d9a54738562994ee6f7a5875f7a62d5863 (patch)
tree2c86879b5e934836e1b8cb0a52ce76d36345e351 /xpdf
parentc21916ad8a315a9dd7f23bf9aef0576975470a5a (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>
Diffstat (limited to 'xpdf')
-rw-r--r--xpdf/ExternalPackage_xpdf.mk24
-rw-r--r--xpdf/ExternalProject_xpdf.mk46
-rw-r--r--xpdf/Makefile7
-rw-r--r--xpdf/Module_xpdf.mk22
-rw-r--r--xpdf/UnpackedTarball_xpdf.mk25
-rw-r--r--xpdf/makefile.mk153
-rw-r--r--xpdf/prj/build.lst2
-rw-r--r--xpdf/prj/d.lst5
-rw-r--r--xpdf/prj/dmake0
-rw-r--r--xpdf/xpdf-3.02.patch2
-rw-r--r--xpdf/xpdf-no-writable-literals.patch6
11 files changed, 129 insertions, 163 deletions
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"