openbsd-ports/editors/openoffice/patches/patch-odk_settings_settings_mk
kurt 94f8549435 Fix debug FLAVOR so it builds and installs binaries with symbols:
- add -dontstrip to packaging script to get useful debug binaries
installed
- remove --enable-debug since that makes the debug build too big (>18G)
for me to build. Add back later as a possible verbose_debug flavor.

Use PATCHORIG so that update-patches doesn't pickup internal .orig files.
Idea from espie@

Add a mutex to make the call to getpwuid thread safe.
2006-08-20 03:36:52 +00:00

102 lines
2.4 KiB
Plaintext

$OpenBSD: patch-odk_settings_settings_mk,v 1.2 2006/08/20 03:36:52 kurt Exp $
--- odk/settings/settings.mk.orig.port Thu Jul 13 08:03:58 2006
+++ odk/settings/settings.mk Fri Aug 18 15:47:43 2006
@@ -502,3 +502,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