Skip to content

Commit

Permalink
editors/openoffice-4: make build more robust
Browse files Browse the repository at this point in the history
The openoffice build system puts the the ports include directories
(including /usr/local/include) earlier in the list than it's internal
and bundled module include directories.  When building on a live
system without poudriere, this can cause the build to pick up unwanted
include files from ports rather than the include files internal to
the build.  This can cause strange build failures.

Fix this problem by putting the directories for installed ports at
the end of the list.

Reported by:	Jan Henrik Sylvester <me@janh.de>
  • Loading branch information
DonLewisFreeBSD committed Mar 10, 2023
1 parent 2e279f5 commit bbb04a6
Show file tree
Hide file tree
Showing 2 changed files with 415 additions and 0 deletions.
34 changes: 34 additions & 0 deletions editors/openoffice-4/files/patch-solenv_gbuild_platform_freebsd.mk
@@ -0,0 +1,34 @@
--- solenv/gbuild/platform/freebsd.mk.orig 2021-04-02 12:58:22 UTC
+++ solenv/gbuild/platform/freebsd.mk
@@ -188,13 +188,13 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
mkdir -p $(dir $(call gb_CObject_get_dep_target,$(2))) && \
$(gb_CC) \
- $(DEFS) $(CFLAGS) \
+ $(DEFS) \
-c $(3) \
-o $(1) \
-MMD -MT $(call gb_CObject_get_target,$(2)) \
-MF $(call gb_CObject_get_dep_target,$(2)) \
-I$(dir $(3)) \
- $(INCLUDE))
+ $(INCLUDE) $(CFLAGS))
endef

# convert parametters filesystem root to native notation
@@ -212,13 +212,13 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \
$(gb_CXX) \
- $(DEFS) $(CXXFLAGS) \
+ $(DEFS) \
-c $(3) \
-o $(1) \
-MMD -MT $(call gb_CxxObject_get_target,$(2)) \
-MF $(call gb_CxxObject_get_dep_target,$(2)) \
-I$(dir $(3)) \
- $(INCLUDE_STL) $(INCLUDE))
+ $(INCLUDE_STL) $(INCLUDE) $(CXXFLAGS))
endef


0 comments on commit bbb04a6

Please sign in to comment.