openbsd-ports/editors/openoffice3/patches/patch-odk_settings_settings_mk
robert f720b7a968 - update to openoffice.org 3.3rc3
- rework a port a little bit to be sync in the openoffice linux
  code and remove some hacks that we don't need anymore
- also use --as-needed while linking (which results in at least a 50% speed
  improovement)
- depend on more libraries from the system instead of using the internal
  ones
2010-11-09 18:40:04 +00:00

102 lines
2.4 KiB
Plaintext

$OpenBSD: patch-odk_settings_settings_mk,v 1.5 2010/11/09 18:40:04 robert Exp $
--- odk/settings/settings.mk.orig.port Thu Oct 21 13:50:20 2010
+++ odk/settings/settings.mk Sat Oct 23 18:40:07 2010
@@ -605,3 +605,97 @@ URE_MISC=$(OO_SDK_URE_HOME)/share/misc
endif
endif
+
+###########################################################################
+#
+# OpenBSD specific settings
+#
+###########################################################################
+ifneq (,$(findstring openbsd,$(PLATFORM)))
+# Settings for OpenBSD using gcc compiler
+
+PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
+
+# Default is openbsd on a intel machine
+PLATFORM=openbsd
+PACKAGE_LIB_DIR=openbsd_x86.plt
+UNOPKG_PLATFORM=OpenBSD_x86
+JAVA_PROC_TYPE=i386
+
+OS=OPENBSD
+PS=/
+CC=gcc
+LINK=g++
+LIB=g++
+ECHO=@echo
+MKDIR=mkdir -p
+CAT=cat
+OBJ_EXT=o
+SHAREDLIB_EXT=so
+SHAREDLIB_PRE=lib
+SHAREDLIB_OUT=$(OUT_LIB)
+
+GCC_VERSION=$(shell $(CC) -dumpversion)
+
+ifeq "$(shell echo $(GCC_VERSION) | cut -c 1)" "3"
+COMID=gcc3
+CPPU_ENV=gcc3
+else
+COMID=GCC
+CPPU_ENV=gcc2
+endif
+
+OSEP=\<
+CSEP=\>
+QUOTE=$(subst S,\,S)
+QM=\"
+SQM='
+ECHOLINE=@echo
+P2BG=&
+
+DEL=rm -f
+DELRECURSIVE=rm -rf
+COPY=cp
+URLPREFIX=file://
+
+# Include UDK version numbers
+include $(PRJ)/include/udkversion.mk
+
+SALLIB=-luno_sal
+CPPULIB=-luno_cppu
+CPPUHELPERLIB=-luno_cppuhelper$(COMID)
+SALHELPERLIB=-luno_salhelper$(COMID)
+REGLIB=-lreg
+STORELIB=-lstore
+STLPORTLIB=-lstlport_gcc
+
+EMPTYSTRING=
+PATH_SEPARATOR=:
+
+# -O is necessary for inlining (see gcc documentation)
+ifeq "$(DEBUG)" "yes"
+CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS)
+else
+CC_FLAGS=-c -O -fPIC -DPIC $(PTHREAD_CFLAGS)
+endif
+
+SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/openbsd"
+CC_INCLUDES=-I. -I$(OUT)/inc/examples -I$(PRJ)/include
+STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
+CC_DEFINES=-DUNX -DGCC -DOPENBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
+
+CC_OUTPUT_SWITCH=-o
+
+LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN'
+COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map
+
+EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined
+#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs
+LINK_LIBS=-L$(OUT)/lib -L$(PRJ)/$(PLATFORM)/lib -L"$(OFFICE_PROGRAM_PATH)" $(PTHREAD_LIBS)
+LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
+
+ifneq "$(OO_SDK_URE_HOME)" ""
+URE_MISC=$(OO_SDK_URE_HOME)/share/misc
+endif
+
+endif