Skip to content

Commit

Permalink
x11-fm/polo: respect CFLAGS to unbreak the build on recent -CURRENT
Browse files Browse the repository at this point in the history
Commit c57cd43 had pacified one particular warning which often
breaks Vala code compilation with Clang 16, thus correct fix is not
to force an older compiler, but to pass down our CFLAGS to valac(1)
together with -v option to make the actual compiler call visible in
the build logs.

Fixes:	09e56dc
  • Loading branch information
Alexey Dokuchaev authored and Alexey Dokuchaev committed Aug 24, 2023
1 parent facfa9b commit a49bc45
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
10 changes: 0 additions & 10 deletions x11-fm/polo/Makefile
Expand Up @@ -21,18 +21,8 @@ GH_ACCOUNT= teejee2008
USE_GNOME= cairo gdkpixbuf2 gtk30 libxml2 vte3

MAKEFILE= makefile

WRKSRC_SUBDIR= src

.include <bsd.port.options.mk>

.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
USES+= llvm:max=15
CC= clang${LLVM_VERSION}
CPP= clang-cpp${LLVM_VERSION}
CXX= clang++${LLVM_VERSION}
.endif

post-patch:
@${RM} ${WRKSRC}/share/polo/files/gtk-theme/*.orig
@${RM} ${WRKSRC}/share/polo/files/install-*.sh
Expand Down
21 changes: 20 additions & 1 deletion x11-fm/polo/files/patch-makefile
Expand Up @@ -2,14 +2,33 @@
+++ makefile
@@ -1,7 +1,7 @@
-SHELL=/bin/bash
-CFLAGS=--std=c99
+SHELL=/bin/sh
CFLAGS=--std=c99
+XCCFLAGS=$(foreach arg,$(CFLAGS),--Xcc=$(arg))

-prefix=/usr
+prefix=$(PREFIX)
bindir=$(prefix)/bin
sharedir=$(prefix)/share
localedir=$(sharedir)/locale
@@ -43,7 +43,7 @@ app-gtk:

#polo-gtk
valac -X -D'GETTEXT_PACKAGE="${app_name}"' \
- --Xcc="-lm" ${define_symbols} --Xcc="-O3" --thread \
+ --Xcc="-lm" ${define_symbols} ${XCCFLAGS} -v --thread \
Common/Main.vala \
Gtk/*.vala \
Utility/*.vala \
@@ -60,7 +60,7 @@ app-util-gtk3:

app-util-disk:
valac --Xcc="-lm" -X -D'GETTEXT_PACKAGE="${app_name}"' \
- "polo-disk.vala" Console/*.vala --Xcc="-O3" -o polo-disk --pkg posix --pkg gio-unix-2.0 --pkg gee-0.8
+ "polo-disk.vala" Console/*.vala ${XCCFLAGS} -v -o polo-disk --pkg posix --pkg gio-unix-2.0 --pkg gee-0.8

app-translations:

@@ -101,17 +101,15 @@ install:
mkdir -p "$(DESTDIR)$(sharedir)/${app_name}"
mkdir -p "$(DESTDIR)$(sharedir)/pixmaps"
Expand Down

0 comments on commit a49bc45

Please sign in to comment.