Bug 248354 - www/gohugo: The EXTENDED flag doesn't seem to work
Summary: www/gohugo: The EXTENDED flag doesn't seem to work
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-29 20:45 UTC by Adam Jimerson
Modified: 2020-07-30 20:56 UTC (History)
1 user (show)

See Also:
ben.lavery: maintainer-feedback+


Attachments
svn diff to upgrade to 0.74.3_1 (1.12 KB, patch)
2020-07-30 20:46 UTC, ben.lavery@hashbang0.com
ben.lavery: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Jimerson 2020-07-29 20:45:30 UTC
Looking at the Makefile for gohugo there is an option that is enabled be default called "EXTENDED" that should cause hugo to be built with SASS/SCSS support, but that does not seem to be the case per this thread https://discourse.gohugo.io/t/problems-getting-started-with-hugo-pipes-to-process-scss/27224/2

If hugo did have the SASS/SCSS support the version output should be similar to "Hugo Static Site Generator v0.74.3/extended ..." rather than "Hugo Static Site Generator v0.74.3 ...". Doing a test build of gohugo v0.74.3 on my system I also don't see where the "-tags extended" build flag is passed in:

[code]
(cd /wrkdirs/usr/ports/www/gohugo/work/hugo-0.74.3;  for t in hugo; do  out=$(/usr/bin/basename $(echo ${t} |  /usr/bin/sed -Ee 's/^[^:]*:([^:]+).*$/\1/' -e 's/^\.$/hugo/'));  pkg=$(echo ${t} |  /usr/bin/sed -Ee 's/^([^:]*).*$/\1/' -e 's/^hugo$/./');  echo "===>  Building ${out} from ${pkg}";  /usr/bin/env XDG_DATA_HOME=/wrkdirs/usr/ports/www/gohugo/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/www/gohugo/work  HOME=/wrkdirs/usr/ports/www/gohugo/work TMPDIR="/tmp" PATH=/usr/local/libexec/ccache:/wrkdirs/usr/ports/www/gohugo/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe  -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS=""  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  "  MANPREFIX="/usr/local" CCACHE_DIR="/root/.ccache" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" CGO_ENABLED=1  CGO_CFLAGS="-I/usr/local/include"  CGO_LDFLAGS="-L/usr/local/lib"  GOARM= GOPATH=""  GOBIN="/wrkdirs/usr/ports/www/gohugo/work/bin"  GO_NO_VENDOR_CHECKS=1 /usr/local/bin/go build -v -buildmode=exe -ldflags=-s -mod=vendor  -o /wrkdirs/usr/ports/www/gohugo/work/bin/${out}  ${pkg};  done)
[/code]
Comment 1 ben.lavery@hashbang0.com 2020-07-30 06:17:41 UTC
Hi Adam, 

Thanks for reporting.  I've got a trip coming up over the weekend, but hope to get a chance to look at this before then.  If not I should get a chance early next week.
Comment 2 Adam Jimerson 2020-07-30 13:22:14 UTC
No worries, I can try taking a stab at it as well, should just be easy to make sure the "-tags extended" flag gets passed to the go build command I'll just need to review the go.mk file to see what is the best way to pass this in during the build step.
Comment 3 ben.lavery@hashbang0.com 2020-07-30 14:04:42 UTC
(In reply to Adam Jimerson from comment #2)

Found the issue - I accidentality removed the build instruction a couple of versions ago.  But it seems Hugo moved forward and broke some other bits.

I got some time over lunch and have a patch, just need to make sure it builds nicely, I should upload later today.
Comment 4 Adam Jimerson 2020-07-30 14:21:10 UTC
(In reply to ben.lavery@hashbang0.com from comment #3)

Great news, thanks!
Comment 5 ben.lavery@hashbang0.com 2020-07-30 20:46:59 UTC
Created attachment 216892 [details]
svn diff to upgrade to 0.74.3_1

Test builds completed.  Patch attached :) 

- portlint: OK (looks fine.)

- testport: OK (poudriere: <11.3-RELEASE, 11.4-RELEASE, 11.4-STABLE, 12.0-RELEASE, 12.1-RELEASE, and 12.1-STABLE>, < amd64/i386 >, <manpages + with/without extended> tested)

- testport: FAILED (poudriere: <13.0-CURRENT>, < i386 >, <manpages + without extended> tested)
13_0-CURRENT__i386-local-normal.log:*** Error code 1