Bug 193604

Summary: [PATCH] www/cadaver build failure without NLS
Product: Ports & Packages Reporter: Klaus Aehlig <aehlig>
Component: Individual Port(s)Assignee: Josh Paetzel <jpaetzel>
Status: Closed FIXED    
Severity: Affects Only Me Flags: aehlig: maintainer-feedback? (jpaetzel)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch of src/cadaver.c ensuring that locale.h is included if setlocale(3) is used; to be placed in the files subdirectory none

Description Klaus Aehlig 2014-09-13 12:40:09 UTC
Created attachment 147269 [details]
Patch of src/cadaver.c ensuring that locale.h is included if setlocale(3) is used; to be placed in the files subdirectory

To reproduce:

cd /usr/ports/www/cdaver
make config # disable NLS
make build

This fails with the following message

[...]
===>  Building for cadaver-0.23.3_2
for d in lib/neon lib/intl; do (cd $d; /usr/bin/make); done
cc -DHAVE_CONFIG_H -I. -I./lib -I/usr/local/include -D_THREAD_SAFE -DLOCALEDIR=\"/usr/local/share/locale\" -I./src -O2 -pipe -fno-strict-aliasing -I/usr/local/include/neon -o src/cadaver.o -c src/cadaver.c
cc -DHAVE_CONFIG_H -I. -I./lib -I/usr/local/include -D_THREAD_SAFE -DLOCALEDIR=\"/usr/local/share/locale\" -I./src -O2 -pipe -fno-strict-aliasing -I/usr/local/include/neon -o src/common.o -c src/common.c
cc -DHAVE_CONFIG_H -I. -I./lib -I/usr/local/include -D_THREAD_SAFE -DLOCALEDIR=\"/usr/local/share/locale\" -I./src -O2 -pipe -fno-strict-aliasing -I/usr/local/include/neon -o src/commands.o -c src/commands.c
cc -DHAVE_CONFIG_H -I. -I./lib -I/usr/local/include -D_THREAD_SAFE -DLOCALEDIR=\"/usr/local/share/locale\" -I./src -O2 -pipe -fno-strict-aliasing -I/usr/local/include/neon -o src/ls.o -c src/ls.c
cc -DHAVE_CONFIG_H -I. -I./lib -I/usr/local/include -D_THREAD_SAFE -DLOCALEDIR=\"/usr/local/share/locale\" -I./src -O2 -pipe -fno-strict-aliasing -I/usr/local/include/neon -o src/cmdline.o -c src/cmdline.c
cc -DHAVE_CONFIG_H -I. -I./lib -I/usr/local/include -D_THREAD_SAFE -DLOCALEDIR=\"/usr/local/share/locale\" -I./src -O2 -pipe -fno-strict-aliasing -I/usr/local/include/neon -o src/options.o -c src/options.c
cc -DHAVE_CONFIG_H -I. -I./lib -I/usr/local/include -D_THREAD_SAFE -DLOCALEDIR=\"/usr/local/share/locale\" -I./src -O2 -pipe -fno-strict-aliasing -I/usr/local/include/neon -o src/utils.o -c src/utils.c
Bundled neon build not being used.
cc -DHAVE_CONFIG_H -I. -I./lib -I/usr/local/include -D_THREAD_SAFE -DLOCALEDIR=\"/usr/local/share/locale\" -I./src -O2 -pipe -fno-strict-aliasing -I/usr/local/include/neon -o src/edit.o -c src/edit.c
cc -DHAVE_CONFIG_H -I. -I./lib -I/usr/local/include -D_THREAD_SAFE -DLOCALEDIR=\"/usr/local/share/locale\" -I./src -O2 -pipe -fno-strict-aliasing -I/usr/local/include/neon -o src/version.o -c src/version.c
src/cadaver.c: In function 'main':
src/cadaver.c:859: error: 'LC_ALL' undeclared (first use in this function)
src/cadaver.c:859: error: (Each undeclared identifier is reported only once
src/cadaver.c:859: error: for each function it appears in.)
*** [src/cadaver.o] Error code 1
1 error
===> Compilation failed unexpectedly.
[...]


How to fix:

put the attached patch in the files subdirectory.
It ensures that locale.h is included whenever
setlocale(3) is used.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-09-13 12:40:09 UTC
Auto-assigned to maintainer jpaetzel@FreeBSD.org
Comment 2 Josh Paetzel freebsd_committer freebsd_triage 2015-01-13 18:08:34 UTC
Committed with r376979, Thanks.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-01-13 18:08:59 UTC
A commit references this bug:

Author: jpaetzel
Date: Tue Jan 13 18:08:03 UTC 2015
New revision: 376979
URL: https://svnweb.freebsd.org/changeset/ports/376979

Log:
  Fix build when deselcting NLS

  PR:	193604
  Submitted by:	aehlig@linta.de

Changes:
  head/www/cadaver/Makefile
  head/www/cadaver/files/patch-src__cadaver.c