diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2021-03-30 22:37:20 +0200 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2021-03-30 22:37:51 +0200 |
commit | 1bd791dae28b9af2b3e933939335a53fa303cfc9 (patch) | |
tree | f4a08a675e4b70eb43e18a80390fe5215053d717 /media-libs/freetype | |
parent | net-misc/openssh: stable 8.5_p1-r1 for sparc, bug #774090 (diff) | |
download | gentoo-1bd791dae28b9af2b3e933939335a53fa303cfc9.tar.gz gentoo-1bd791dae28b9af2b3e933939335a53fa303cfc9.tar.bz2 gentoo-1bd791dae28b9af2b3e933939335a53fa303cfc9.zip |
media-libs/freetype: Fixed build with sys-devel/slibtool
Closes: https://bugs.gentoo.org/775881
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'media-libs/freetype')
4 files changed, 148 insertions, 8 deletions
diff --git a/media-libs/freetype/files/freetype-2.10.4-dont_hardcode_libtool.patch b/media-libs/freetype/files/freetype-2.10.4-dont_hardcode_libtool.patch new file mode 100644 index 000000000000..310b5aaca935 --- /dev/null +++ b/media-libs/freetype/files/freetype-2.10.4-dont_hardcode_libtool.patch @@ -0,0 +1,42 @@ +From 597566b2301deeff4e9832aebdab1bf659a2accf Mon Sep 17 00:00:00 2001 +From: orbea <orbea@riseup.net> +Date: Mon, 22 Mar 2021 16:15:37 -0700 +Subject: [PATCH] * Makefile, mac/Makefile (LINK_CMD): Don't hard-code + `libtool`. + +--- + Makefile | 3 +-- + mac/Makefile | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 810142f..949402f 100644 +--- a/Makefile ++++ b/Makefile +@@ -165,8 +165,7 @@ else + + ifeq ($(PLATFORM),unix) + override CC = $(CCraw) +- LINK_CMD = $(subst /,$(SEP),$(OBJ_BUILD)/libtool) \ +- --mode=link $(CC) \ ++ LINK_CMD = $(LIBTOOL) --mode=link $(CC) \ + $(subst /,$(COMPILER_SEP),$(LDFLAGS)) + LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) $(LIB_CLOCK_GETTIME) + else +diff --git a/mac/Makefile b/mac/Makefile +index 73ae99c..52038a4 100644 +--- a/mac/Makefile ++++ b/mac/Makefile +@@ -68,8 +68,7 @@ else + LINK_ITEMS = $T$(subst /,$(COMPILER_SEP),$@ $<) + + CC = $(CCraw) +- LINK_CMD = $(subst /,$(SEP),$(OBJ_BUILD)/libtool) \ +- --mode=link $(CC) \ ++ LINK_CMD = $(LIBTOOL) --mode=link $(CC) \ + $(subst /,$(COMPILER_SEP),$(LDFLAGS)) + ifeq ($(findstring CoreServices,$(LDFLAGS)),) + LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) $(MATH) \ +-- +GitLab + diff --git a/media-libs/freetype/files/freetype-2.10.4-slibtool_build_fix.patch b/media-libs/freetype/files/freetype-2.10.4-slibtool_build_fix.patch new file mode 100644 index 000000000000..895a86c444d6 --- /dev/null +++ b/media-libs/freetype/files/freetype-2.10.4-slibtool_build_fix.patch @@ -0,0 +1,40 @@ +From 8e9447b32dae7e6c95bee3f878ee1877f9b628a4 Mon Sep 17 00:00:00 2001 +From: orbea <orbea@riseup.net> +Date: Mon, 22 Mar 2021 16:15:09 -0700 +Subject: [PATCH] [graph] Fix build with `slibtool`. + +* graph/rules.mk (GRAPH_LIB): Handle the case specially where +`LIBTOOL` is defined. +(COMPILE_GRAPH_LIB) <LIBTOOL>: Enable use of `dlopen`. +--- + rules.mk | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/graph/rules.mk b/graph/rules.mk +index 4903a38..a3f0de1 100644 +--- a/graph/rules.mk ++++ b/graph/rules.mk +@@ -12,7 +12,6 @@ + + + GRAPH_INCLUDES := $(subst /,$(COMPILER_SEP),$(TOP_DIR_2)/graph) +-GRAPH_LIB := $(OBJ_DIR_2)/graph.$(SA) + + GRAPH := $(TOP_DIR_2)/graph + +@@ -46,9 +45,11 @@ GRAPH_OBJS := $(OBJ_DIR_2)/gblblit.$(O) \ + # this value can be modified by the system-specific graphics drivers. + # + ifneq ($(LIBTOOL),) +- COMPILE_GRAPH_LIB = $(LIBTOOL) --mode=link $(CCraw) -static \ ++ GRAPH_LIB := $(OBJ_DIR_2)/graph.$(A) ++ COMPILE_GRAPH_LIB = $(LIBTOOL) --mode=link $(CCraw) -module -static \ + -o $(subst /,$(COMPILER_SEP),$@ $(GRAPH_OBJS)) + else ++ GRAPH_LIB := $(OBJ_DIR_2)/graph.$(SA) + COMPILE_GRAPH_LIB = ar -r $(subst /,$(COMPILER_SEP),$@ $(GRAPH_OBJS)) + endif + +-- +GitLab + diff --git a/media-libs/freetype/files/ft2demos-2.10.4-install_target.patch b/media-libs/freetype/files/ft2demos-2.10.4-install_target.patch new file mode 100644 index 000000000000..f3d7f8de43e4 --- /dev/null +++ b/media-libs/freetype/files/ft2demos-2.10.4-install_target.patch @@ -0,0 +1,58 @@ +From b88cd2f027e77bd26d1334fc13c4eda796423d19 Mon Sep 17 00:00:00 2001 +From: orbea <orbea@riseup.net> +Date: Wed, 24 Mar 2021 09:04:41 -0700 +Subject: [PATCH] [build] Add an `install` target for binaries and man pages. + +* Makefile (MANPAGES): New variable. +(install) <unix>: New target. +--- + Makefile | 19 ++++++++++++++++++- + 1 file changed, 18 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 949402f..8352f61 100644 +--- a/Makefile ++++ b/Makefile +@@ -194,7 +194,7 @@ else + $(LINK_LIBS) $(subst /,$(COMPILER_SEP),$(GRAPH_LIB)) \ + $(GRAPH_LINK) $(MATH) + +- .PHONY: exes clean distclean ++ .PHONY: exes clean distclean install + + + ################################################################### +@@ -317,6 +317,11 @@ else + # EXES += fttimer + # EXES += testname + ++ # Not all demo programs have a man page; we thus check for existence in a ++ # loop. ++ # ++ MANPAGES := $(foreach man,$(EXES),$(wildcard $(TOP_DIR_2)/man/$(man).1)) ++ + exes: $(EXES:%=$(BIN_DIR_2)/%$E) + + +@@ -567,6 +572,18 @@ else + $(GRAPH_LIB) $(COMMON_OBJ) $(FTCOMMON_OBJ) + $(LINK_NEW) + ++ ifeq ($(PLATFORM),unix) ++ install: exes ++ $(MKINSTALLDIRS) $(DESTDIR)$(bindir) \ ++ $(DESTDIR)$(mandir)/man1 ++ $(foreach bin,$(EXES), \ ++ $(LIBTOOL) --mode=install \ ++ $(INSTALL) $(BIN_DIR_2)/$(bin) \ ++ $(DESTDIR)$(bindir)/$(bin);) ++ $(foreach man,$(MANPAGES), \ ++ $(INSTALL) $(man) \ ++ $(DESTDIR)$(mandir)/man1/$(notdir $(man));) ++ endif + endif + + +-- +GitLab + diff --git a/media-libs/freetype/freetype-2.10.4.ebuild b/media-libs/freetype/freetype-2.10.4.ebuild index 6ede5206ae84..2a38b5388bee 100644 --- a/media-libs/freetype/freetype-2.10.4.ebuild +++ b/media-libs/freetype/freetype-2.10.4.ebuild @@ -148,6 +148,11 @@ src_prepare() { if ! use X; then sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die fi + + # Taken from upstream (https://bugs.gentoo.org/775881) + eapply "${FILESDIR}/${P}-slibtool_build_fix.patch" + eapply "${FILESDIR}/${P}-dont_hardcode_libtool.patch" + eapply "${FILESDIR}/ft2demos-2.10.4-install_target.patch" cd "${S}" || die fi @@ -204,15 +209,10 @@ multilib_src_compile() { multilib_src_install() { default - if multilib_is_native_abi && use utils; then + if multilib_is_native_abi && use utils ; then einfo "Installing utils" - rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die - dodir /usr/bin #654780 - local ft2demo - for ft2demo in ../ft2demos-${PV}/bin/*; do - ./libtool --mode=install $(type -P install) -m 755 "${ft2demo}" \ - "${ED}"/usr/bin || die - done + emake DESTDIR="${D}" FT2DEMOS=1 \ + TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install fi } |