Fri Mar 14 22:33:27 2014 UTC ()
Add builtin gettext-lib support under SCO OpenServer 5.0.7/3.2.
But it is very old and is not recommended.


(ryoon)
diff -r1.44 -r1.45 pkgsrc/devel/gettext-lib/builtin.mk

cvs diff -r1.44 -r1.45 pkgsrc/devel/gettext-lib/builtin.mk (expand / switch to unified diff)

--- pkgsrc/devel/gettext-lib/builtin.mk 2013/11/23 11:29:35 1.44
+++ pkgsrc/devel/gettext-lib/builtin.mk 2014/03/14 22:33:27 1.45
@@ -1,47 +1,55 @@ @@ -1,47 +1,55 @@
1# $NetBSD: builtin.mk,v 1.44 2013/11/23 11:29:35 obache Exp $ 1# $NetBSD: builtin.mk,v 1.45 2014/03/14 22:33:27 ryoon Exp $
2 2
3.include "../../mk/bsd.fast.prefs.mk" 3.include "../../mk/bsd.fast.prefs.mk"
4 4
5BUILTIN_PKG:= gettext 5BUILTIN_PKG:= gettext
6 6
7BUILTIN_FIND_LIBS:= intl 7BUILTIN_FIND_LIBS:= intl
8BUILTIN_FIND_HEADERS_VAR:= H_GETTEXT H_GENTOO_GETTEXT \ 8BUILTIN_FIND_HEADERS_VAR:= H_GETTEXT H_GENTOO_GETTEXT \
9 H_NGETTEXT_GETTEXT 9 H_NGETTEXT_GETTEXT \
 10 H_OPNSVR5_GETTEXT
10BUILTIN_FIND_HEADERS.H_GETTEXT= libintl.h 11BUILTIN_FIND_HEADERS.H_GETTEXT= libintl.h
11BUILTIN_FIND_GREP.H_GETTEXT= \#define[ ]*__USE_GNU_GETTEXT 12BUILTIN_FIND_GREP.H_GETTEXT= \#define[ ]*__USE_GNU_GETTEXT
12BUILTIN_FIND_HEADERS.H_GENTOO_GETTEXT= libintl.h 13BUILTIN_FIND_HEADERS.H_GENTOO_GETTEXT= libintl.h
13BUILTIN_FIND_GREP.H_GENTOO_GETTEXT= gentoo-multilib/.*/libintl.h 14BUILTIN_FIND_GREP.H_GENTOO_GETTEXT= gentoo-multilib/.*/libintl.h
14BUILTIN_FIND_HEADERS.H_NGETTEXT_GETTEXT=libintl.h 15BUILTIN_FIND_HEADERS.H_NGETTEXT_GETTEXT=libintl.h
15BUILTIN_FIND_GREP.H_NGETTEXT_GETTEXT= char.*ngettext 16BUILTIN_FIND_GREP.H_NGETTEXT_GETTEXT= char.*ngettext
 17BUILTIN_FIND_HEADERS.H_OPNSVR5_GETTEXT= libintl.h
 18BUILTIN_FIND_GREP.H_OPNSVR5_GETTEXT= libgnuintl.h
16 19
17.include "../../mk/buildlink3/bsd.builtin.mk" 20.include "../../mk/buildlink3/bsd.builtin.mk"
18 21
19### 22###
20### Determine if there is a built-in implementation of the package and 23### Determine if there is a built-in implementation of the package and
21### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). 24### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
22### 25###
23# 26#
24# Gentoo Linux has an unusual scheme where /usr/include/libintl.h 27# Gentoo Linux has an unusual scheme where /usr/include/libintl.h
25# pulls in gentoo-multilib/$ARCH/libintl.h, where the latter is the 28# pulls in gentoo-multilib/$ARCH/libintl.h, where the latter is the
26# real libintl.h file. We can safely assume that this is GNU gettext 29# real libintl.h file. We can safely assume that this is GNU gettext
27# (in glibc). 30# (in glibc).
28# 31#
 32# SCO OpenServer 5.0.7/3.2 has an unusual scheme where /usr/include/libintl.h
 33# pulls in /usr/include/libgnuintl.h, where the latter is the real libintl.h.
 34#
29.if !defined(IS_BUILTIN.gettext) 35.if !defined(IS_BUILTIN.gettext)
30IS_BUILTIN.gettext= no 36IS_BUILTIN.gettext= no
31. if (empty(H_GETTEXT:M__nonexistent__) && \ 37. if (empty(H_GETTEXT:M__nonexistent__) && \
32 empty(H_GETTEXT:M${LOCALBASE}/*)) || \ 38 empty(H_GETTEXT:M${LOCALBASE}/*)) || \
33 (empty(H_GENTOO_GETTEXT:M__nonexistent__) && \ 39 (empty(H_GENTOO_GETTEXT:M__nonexistent__) && \
34 empty(H_GENTOO_GETTEXT:M${LOCALBASE}/*)) 40 empty(H_GENTOO_GETTEXT:M${LOCALBASE}/*)) || \
 41 (empty(H_OPNSVR5_GETTEXT:M__nonexistent__) && \
 42 empty(H_OPNSVR5_GETTEXT:M${LOCALBASE}/*))
35IS_BUILTIN.gettext= yes 43IS_BUILTIN.gettext= yes
36. endif 44. endif
37.endif 45.endif
38MAKEVARS+= IS_BUILTIN.gettext 46MAKEVARS+= IS_BUILTIN.gettext
39 47
40### 48###
41### Determine whether we should use the built-in implementation if it 49### Determine whether we should use the built-in implementation if it
42### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). 50### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
43### 51###
44.if !defined(USE_BUILTIN.gettext) 52.if !defined(USE_BUILTIN.gettext)
45. if ${PREFER.gettext} == "pkgsrc" 53. if ${PREFER.gettext} == "pkgsrc"
46USE_BUILTIN.gettext= no 54USE_BUILTIN.gettext= no
47. else 55. else
@@ -90,26 +98,29 @@ BUILTIN_LIBNAME.gettext= intl @@ -90,26 +98,29 @@ BUILTIN_LIBNAME.gettext= intl
90.else 98.else
91BUILTIN_LIBNAME.gettext= # empty (part of the C library) 99BUILTIN_LIBNAME.gettext= # empty (part of the C library)
92.endif 100.endif
93 101
94### 102###
95### The section below only applies if we are not including this file 103### The section below only applies if we are not including this file
96### solely to determine whether a built-in implementation exists. 104### solely to determine whether a built-in implementation exists.
97### 105###
98CHECK_BUILTIN.gettext?= no 106CHECK_BUILTIN.gettext?= no
99.if !empty(CHECK_BUILTIN.gettext:M[nN][oO]) 107.if !empty(CHECK_BUILTIN.gettext:M[nN][oO])
100 108
101. if !empty(USE_BUILTIN.gettext:M[yY][eE][sS]) 109. if !empty(USE_BUILTIN.gettext:M[yY][eE][sS])
102BUILDLINK_LIBNAME.gettext= ${BUILTIN_LIBNAME.gettext} 110BUILDLINK_LIBNAME.gettext= ${BUILTIN_LIBNAME.gettext}
 111. if !empty(OS_VARIANT:MSCOOSR5)
 112BUILDLINK_PREFIX.gettext= /usr/gnu
 113. endif
103. if empty(BUILTIN_LIBNAME.gettext) 114. if empty(BUILTIN_LIBNAME.gettext)
104BUILDLINK_TRANSFORM+= rm:-lintl 115BUILDLINK_TRANSFORM+= rm:-lintl
105. endif 116. endif
106. endif 117. endif
107 118
108# If using a built-in libintl that isn't from GNU gettext, then set up 119# If using a built-in libintl that isn't from GNU gettext, then set up
109# some GNU configure variables that are checked by modern gettext.m4 120# some GNU configure variables that are checked by modern gettext.m4
110# so that it will detect "GNU gettext" in the existing libintl. 121# so that it will detect "GNU gettext" in the existing libintl.
111# 122#
112. if defined(GNU_CONFIGURE) 123. if defined(GNU_CONFIGURE)
113. if !empty(USE_BUILTIN.gettext:M[yY][eE][sS]) 124. if !empty(USE_BUILTIN.gettext:M[yY][eE][sS])
114. if !empty(BUILTIN_LIB_FOUND.intl:M[yY][eE][sS]) 125. if !empty(BUILTIN_LIB_FOUND.intl:M[yY][eE][sS])
115CONFIGURE_ENV+= gt_cv_func_gnugettext_libintl="yes" 126CONFIGURE_ENV+= gt_cv_func_gnugettext_libintl="yes"