Author: jim Date: Tue Jul 3 21:29:28 2018 New Revision: 1835025 URL: http://svn.apache.org/viewvc?rev=1835025&view=rev Log: Get macOS building again... Use (old) SDKROOT as needed for older platforms and also support the UDK versioning which was added for Linux, Solaris and FreeBSD but which broke macOS horribly. I *think* this is right. Sometimes, as much as dmake is a pain, the constant breakage due to the change to gbuild is sometimes much, much worse. Esp since we HAVE the sources for dmake.
Modified: openoffice/trunk/main/configure.ac openoffice/trunk/main/set_soenv.in openoffice/trunk/main/solenv/gbuild/platform/macosx.mk Modified: openoffice/trunk/main/configure.ac URL: http://svn.apache.org/viewvc/openoffice/trunk/main/configure.ac?rev=1835025&r1=1835024&r2=1835025&view=diff ============================================================================== --- openoffice/trunk/main/configure.ac (original) +++ openoffice/trunk/main/configure.ac Tue Jul 3 21:29:28 2018 @@ -3957,11 +3957,13 @@ if test "$_os" = "Darwin"; then fi MACOSX_SDK_PATH=$sdk_path + SDKROOT=$sdk_path fi fi AC_SUBST(MACOSX_DEPLOYMENT_TARGET) AC_SUBST(MACOSX_SDK_PATH) +AC_SUBST(SDKROOT) dnl =================================================================== Modified: openoffice/trunk/main/set_soenv.in URL: http://svn.apache.org/viewvc/openoffice/trunk/main/set_soenv.in?rev=1835025&r1=1835024&r2=1835025&view=diff ============================================================================== --- openoffice/trunk/main/set_soenv.in (original) +++ openoffice/trunk/main/set_soenv.in Tue Jul 3 21:29:28 2018 @@ -96,7 +96,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAV $SOLARSRC, $DEVROOT, $SOLARVER, $SOLARVERSION, $WORKDIR, $OUTDIR, $SOLARENV, $STAR_INIROOT, $STAR_INIROOTOLD, $STAR_STANDLST, $STAR_SSCOMMON, $STAR_SSOLARINI, $DMAKEROOT, $CLASSPATH, $XCLASSPATH, $COMPATH, $CXX_X64_BINARY, $LINK_X64_BINARY, $LIBMGR_X64_BINARY, - $MSPDB_PATH, $MIDL_PATH, $CSC_PATH, $MACOSX_DEPLOYMENT_TARGET, $MACOSX_SDK_PATH, + $MSPDB_PATH, $MIDL_PATH, $CSC_PATH, $MACOSX_DEPLOYMENT_TARGET, $MACOSX_SDK_PATH, $SDKROOT, $PATH, $SOLAREXTRAINC, $SOLAREXTRALIB, $SOLARLIB, $SOLARINC, $LOCALINI, $FRAMEWORKSHOME, $COMEX, $PERL, $COMP_ENV, $ILIB, $JAVAHOME, $PSDK_HOME, $DIRECTXSDK_LIB, $USE_NEW_SDK, $FRAME_HOME, @@ -1765,6 +1765,7 @@ if ( $platform =~ m/darwin/ ) # http://developer.apple.com/technotes/tn2002/tn2064.html ToFile( "MACOSX_DEPLOYMENT_TARGET", "@MACOSX_DEPLOYMENT_TARGET@", "e" ); ToFile( "MACOSX_SDK_PATH", "@MACOSX_SDK_PATH@", "e" ); + ToFile( "SDKROOT", "@SDKROOT@", "e" ); } if ( $platform =~ m/freebsd/ ) { Modified: openoffice/trunk/main/solenv/gbuild/platform/macosx.mk URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/gbuild/platform/macosx.mk?rev=1835025&r1=1835024&r2=1835025&view=diff ============================================================================== --- openoffice/trunk/main/solenv/gbuild/platform/macosx.mk (original) +++ openoffice/trunk/main/solenv/gbuild/platform/macosx.mk Tue Jul 3 21:29:28 2018 @@ -288,6 +288,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(subst \d,$$,$(RPATH)) \ $(T_LDFLAGS) $(gb_macos_LDFLAGS) \ $(if $(VERSIONMAP),$(gb_Library_VERSIONMAPFLAG) $(VERSIONMAP)) \ + $(if $(call gb_Library_is_udk_versioned,$(1)),-Wl$(COMMA)-h$(notdir $(1)).$(gb_UDK_MAJOR)) \ $(call gb_LinkTarget__get_liblinkflags,$(LINKED_LIBS)) \ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ @@ -295,7 +296,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \ $(LIBS) \ - -o $(1) \ + -o $(if $(call gb_Library_is_udk_versioned,$(1)),$(1).$(gb_UDK_MAJOR),$(1)) \ `cat $${DYLIB_FILE}` && \ $(if $(filter Library,$(TARGETTYPE)),\ $(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl Library $(LAYER) $(1) && \ @@ -303,6 +304,12 @@ $(call gb_Helper_abbreviate_dirs,\ rm -f $${DYLIB_FILE}) endef +define gb_LinkTarget__command_symlink_udk_versioned_library + $(if $(call gb_Library_is_udk_versioned,$(1)), + $(call gb_Helper_abbreviate_dirs,\ + rm -f $(1) && ln -s $(notdir $(1)).$(gb_UDK_MAJOR) $(1))) +endef + # parameters: 1-linktarget 2-cobjects 3-cxxobjects define gb_LinkTarget__command_staticlink $(call gb_Helper_abbreviate_dirs,\ @@ -318,6 +325,7 @@ endef define gb_LinkTarget__command $(call gb_Output_announce,$(2),$(true),LNK,4) $(if $(filter Library GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1),$(2))) +$(if $(filter Library,$(TARGETTYPE)),$(call gb_LinkTarget__command_symlink_udk_versioned_library,$(1))) $(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1))) endef @@ -375,7 +383,11 @@ endef define gb_Library_Library_platform $(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library_get_rpath,$(1)) $(call gb_LinkTarget_get_target,$(2)) : LAYER := $(call gb_Library_get_layer,$(1)) - +ifneq (,$(call gb_Library_is_udk_versioned,$(call gb_Library_get_target,$(1)))) +$(call gb_Library_get_target,$(1)) \ +$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS += \ + $(call gb_Library_get_target,$(1)).$(gb_UDK_MAJOR) +endif endef