compat32*: remove builtin.mk files, not useful
compat32_fontconfig: stop depending on compat80-x11, not needed and breaks the build due to duplicate libfontconfig.
This commit is contained in:
parent
3d28e918b4
commit
96bf24361f
|
@ -1,117 +0,0 @@
|
|||
# $NetBSD: builtin.mk,v 1.19 2015/02/04 23:44:34 tnn Exp $
|
||||
|
||||
BUILTIN_PKG:= expat
|
||||
|
||||
BUILTIN_FIND_HEADERS_VAR:= H_EXPAT
|
||||
BUILTIN_FIND_HEADERS.H_EXPAT= expat.h
|
||||
|
||||
.include "../../mk/buildlink3/bsd.builtin.mk"
|
||||
|
||||
###
|
||||
### Determine if there is a built-in implementation of the package and
|
||||
### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
|
||||
###
|
||||
.if !defined(IS_BUILTIN.expat)
|
||||
. if empty(H_EXPAT:M__nonexistent__)
|
||||
IS_BUILTIN.expat= yes
|
||||
. else
|
||||
IS_BUILTIN.expat= no
|
||||
. endif
|
||||
.endif
|
||||
MAKEVARS+= IS_BUILTIN.expat
|
||||
|
||||
###
|
||||
### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
|
||||
### a package name to represent the built-in package.
|
||||
###
|
||||
.if !defined(BUILTIN_PKG.expat) && \
|
||||
!empty(IS_BUILTIN.expat:M[yY][eE][sS]) && \
|
||||
empty(H_EXPAT:M__nonexistent__)
|
||||
BUILTIN_VERSION.expat!= \
|
||||
${AWK} '/\#define[ ]*XML_MAJOR_VERSION/ { M = $$3 } \
|
||||
/\#define[ ]*XML_MINOR_VERSION/ { m = "."$$3 } \
|
||||
/\#define[ ]*XML_MICRO_VERSION/ { u = "."$$3 } \
|
||||
END { printf "%s%s%s\n", M, m, u }' \
|
||||
${H_EXPAT}
|
||||
BUILTIN_PKG.expat= expat-${BUILTIN_VERSION.expat}
|
||||
.endif
|
||||
MAKEVARS+= BUILTIN_PKG.expat
|
||||
|
||||
###
|
||||
### Determine whether we should use the built-in implementation if it
|
||||
### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
|
||||
###
|
||||
.if !defined(USE_BUILTIN.expat)
|
||||
. if ${PREFER.expat} == "pkgsrc"
|
||||
USE_BUILTIN.expat= no
|
||||
. else
|
||||
USE_BUILTIN.expat= ${IS_BUILTIN.expat}
|
||||
. if defined(BUILTIN_PKG.expat) && \
|
||||
!empty(IS_BUILTIN.expat:M[yY][eE][sS])
|
||||
USE_BUILTIN.expat= yes
|
||||
. for _dep_ in ${BUILDLINK_API_DEPENDS.expat}
|
||||
. if !empty(USE_BUILTIN.expat:M[yY][eE][sS])
|
||||
USE_BUILTIN.expat!= \
|
||||
if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.expat:Q}; then \
|
||||
${ECHO} yes; \
|
||||
else \
|
||||
${ECHO} no; \
|
||||
fi
|
||||
. endif
|
||||
. endfor
|
||||
. endif
|
||||
. endif # PREFER.expat
|
||||
.endif
|
||||
MAKEVARS+= USE_BUILTIN.expat
|
||||
|
||||
###
|
||||
### The section below only applies if we are not including this file
|
||||
### solely to determine whether a built-in implementation exists.
|
||||
###
|
||||
CHECK_BUILTIN.expat?= no
|
||||
.if !empty(CHECK_BUILTIN.expat:M[nN][oO])
|
||||
|
||||
. if !empty(USE_BUILTIN.expat:M[nN][oO])
|
||||
BUILDLINK_API_DEPENDS.expat+= expat>=1.95.4
|
||||
. else
|
||||
. if !empty(H_EXPAT:M${X11BASE}/*)
|
||||
. include "../../mk/x11.builtin.mk"
|
||||
. elif !empty(H_EXPAT:M/usr/*)
|
||||
BUILDLINK_PREFIX.expat= /usr
|
||||
. elif !empty(H_EXPAT:M/boot/common/*)
|
||||
BUILDLINK_PREFIX.expat= /boot/common
|
||||
. endif
|
||||
. endif
|
||||
|
||||
.endif # CHECK_BUILTIN.expat
|
||||
|
||||
# Fake pkg-config for builtin expat on NetBSD
|
||||
|
||||
.if !empty(USE_BUILTIN.expat:M[yY][eE][sS])
|
||||
. if !empty(USE_TOOLS:C/:.*//:Mpkg-config)
|
||||
do-configure-pre-hook: override-expat-pkgconfig
|
||||
|
||||
BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig
|
||||
EXPAT_PKGCFGF= expat.pc
|
||||
|
||||
override-expat-pkgconfig: override-message-expat-pkgconfig
|
||||
override-message-expat-pkgconfig:
|
||||
@${STEP_MSG} "Generating pkg-config file for builtin expat package."
|
||||
|
||||
override-expat-pkgconfig:
|
||||
${RUN} \
|
||||
${MKDIR} ${BLKDIR_PKGCFG}; \
|
||||
{ \
|
||||
${ECHO} "prefix=${BUILDLINK_PREFIX.expat}"; \
|
||||
${ECHO} "exec_prefix=\$${prefix}"; \
|
||||
${ECHO} "libdir=\$${exec_prefix}/lib"; \
|
||||
${ECHO} "includedir=\$${prefix}/include"; \
|
||||
${ECHO} ""; \
|
||||
${ECHO} "Name: expat"; \
|
||||
${ECHO} "Description: expat XML parser"; \
|
||||
${ECHO} "Version: ${BUILTIN_VERSION.expat}"; \
|
||||
${ECHO} "Libs: ${COMPILER_RPATH_FLAG}\$${libdir} -L\$${libdir} -lexpat"; \
|
||||
${ECHO} "Cflags: -I\$${includedir}"; \
|
||||
} >> ${BLKDIR_PKGCFG}/${EXPAT_PKGCFGF};
|
||||
. endif
|
||||
.endif
|
|
@ -32,7 +32,7 @@ CONFIGURE_ENV+= HASDOCBOOK=no
|
|||
BUILDLINK_PASSTHRU_DIRS+= ${PREFIX}/emul/netbsd32
|
||||
|
||||
PKGCONFIG_OVERRIDE= fontconfig.pc.in
|
||||
_PKG_CONFIG_LIBDIR= ${BUILDLINK_DIR}/emul/netbsd32/lib/pkgconfig:${BUILDLINK_DIR}/emul/netbsd32/lib/freetype2/pkgconfig:${BUILDLINK_DIR}/lib/pkgconfig:${BUILDLINK_DIR}/share/pkgconfig
|
||||
_PKG_CONFIG_LIBDIR= ${BUILDLINK_DIR}/emul/netbsd32/lib/freetype2/pkgconfig:${BUILDLINK_DIR}/emul/netbsd32/lib/pkgconfig:${BUILDLINK_DIR}/lib/pkgconfig:${BUILDLINK_DIR}/share/pkgconfig
|
||||
|
||||
PKG_SYSCONFSUBDIR= fontconfig
|
||||
|
||||
|
@ -99,12 +99,6 @@ TEST_TARGET= check
|
|||
CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q}
|
||||
.endif
|
||||
|
||||
# XXX: Unlink libs and *.pc files of fontconfig and freetype that comes with compat80-x11
|
||||
pre-configure:
|
||||
cd ${BUILDLINK_X11_DIR} && ${FIND} . -path "*fontconfig*" -type l -delete
|
||||
cd ${BUILDLINK_X11_DIR}/emul/netbsd32/lib && find . -name "*freetype*" -maxdepth 1 -type l -delete && find ./pkgconfig/ -name "*freetype2.pc*" -type l -delete
|
||||
cd ${BUILDLINK_X11_DIR}/lib && find . -name "*freetype*" -type l -delete && find ./pkgconfig/ -name "*freetype2.pc*" -type l -delete
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${FILESDIR}/30-pkgsrc-aliases.conf ${DESTDIR}${TMPLDIR}
|
||||
|
||||
|
@ -116,6 +110,6 @@ post-install:
|
|||
.include "../../devel/zlib/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.compat32_freetype2+= compat32_freetype2>=2.8.1
|
||||
.include "../../wip/compat32_freetype2/buildlink3.mk"
|
||||
.include "../../wip/compat80-x11/buildlink3.mk"
|
||||
#.include "../../wip/compat80-x11/buildlink3.mk"
|
||||
.include "../../wip/compat32_expat/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
# $NetBSD: builtin.mk,v 1.12 2019/04/26 15:05:14 gavan Exp $
|
||||
|
||||
BUILTIN_PKG:= fontconfig
|
||||
|
||||
BUILTIN_FIND_FILES_VAR:= H_FONTCONFIG
|
||||
BUILTIN_FIND_FILES.H_FONTCONFIG= \
|
||||
${X11BASE}/include/fontconfig/fontconfig.h
|
||||
|
||||
.include "../../mk/buildlink3/bsd.builtin.mk"
|
||||
|
||||
###
|
||||
### Determine if there is a built-in implementation of the package and
|
||||
### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
|
||||
###
|
||||
.if !defined(IS_BUILTIN.fontconfig)
|
||||
. if empty(H_FONTCONFIG:M__nonexistent__)
|
||||
IS_BUILTIN.fontconfig= yes
|
||||
. else
|
||||
IS_BUILTIN.fontconfig= no
|
||||
. endif
|
||||
.endif
|
||||
MAKEVARS+= IS_BUILTIN.fontconfig
|
||||
|
||||
###
|
||||
### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
|
||||
### a package name to represent the built-in package.
|
||||
###
|
||||
.if !defined(BUILTIN_PKG.fontconfig) && \
|
||||
!empty(IS_BUILTIN.fontconfig:M[yY][eE][sS]) && \
|
||||
empty(H_FONTCONFIG:M__nonexistent__)
|
||||
BUILTIN_VERSION.fontconfig!= \
|
||||
${AWK} '/\#define[ ]*FC_MAJOR/ { M = $$3 } \
|
||||
/\#define[ ]*FC_MINOR/ { m = "."$$3 } \
|
||||
/\#define[ ]*FC_REVISION/ { r = "."$$3 } \
|
||||
END { printf "%s%s%s\n", M, m, r }' \
|
||||
${H_FONTCONFIG}
|
||||
BUILTIN_PKG.fontconfig= fontconfig-${BUILTIN_VERSION.fontconfig}
|
||||
.endif
|
||||
MAKEVARS+= BUILTIN_PKG.fontconfig
|
||||
|
||||
###
|
||||
### Determine whether we should use the built-in implementation if it
|
||||
### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
|
||||
###
|
||||
|
||||
.if !defined(USE_BUILTIN.fontconfig)
|
||||
. if ${PREFER.fontconfig} == "pkgsrc"
|
||||
USE_BUILTIN.fontconfig= no
|
||||
. else
|
||||
USE_BUILTIN.fontconfig= ${IS_BUILTIN.fontconfig}
|
||||
. if defined(BUILTIN_PKG.fontconfig) && \
|
||||
!empty(IS_BUILTIN.fontconfig:M[yY][eE][sS])
|
||||
USE_BUILTIN.fontconfig= yes
|
||||
. for _dep_ in ${BUILDLINK_API_DEPENDS.fontconfig}
|
||||
. if !empty(USE_BUILTIN.fontconfig:M[yY][eE][sS])
|
||||
USE_BUILTIN.fontconfig!= \
|
||||
if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.fontconfig:Q}; then \
|
||||
${ECHO} yes; \
|
||||
else \
|
||||
${ECHO} no; \
|
||||
fi
|
||||
. endif
|
||||
. endfor
|
||||
. endif
|
||||
. endif # PREFER.fontconfig
|
||||
.endif
|
||||
MAKEVARS+= USE_BUILTIN.fontconfig
|
||||
|
||||
###
|
||||
### The section below only applies if we are not including this file
|
||||
### solely to determine whether a built-in implementation exists.
|
||||
###
|
||||
|
||||
.include "../../mk/x11.builtin.mk"
|
||||
|
||||
CHECK_BUILTIN.fontconfig?= no
|
||||
.if !empty(CHECK_BUILTIN.fontconfig:M[nN][oO])
|
||||
|
||||
. if !empty(USE_BUILTIN.fontconfig:M[nN][oO])
|
||||
BUILDLINK_API_DEPENDS.fontconfig+= fontconfig>=2.1nb2
|
||||
BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.1.3
|
||||
. endif
|
||||
|
||||
.endif # CHECK_BUILTIN.fontconfig
|
|
@ -1,98 +0,0 @@
|
|||
# $NetBSD: builtin.mk,v 1.18 2018/05/04 08:40:11 adam Exp $
|
||||
|
||||
BUILTIN_PKG:= freetype2
|
||||
|
||||
BUILTIN_FIND_FILES_VAR:= H_FREETYPE2 H_FREETYPE2_NEW
|
||||
BUILTIN_FIND_FILES.H_FREETYPE2= ${X11BASE}/include/freetype2/freetype/freetype.h
|
||||
BUILTIN_FIND_FILES.H_FREETYPE2_NEW= ${X11BASE}/include/freetype2/freetype.h
|
||||
|
||||
.include "../../mk/buildlink3/bsd.builtin.mk"
|
||||
|
||||
###
|
||||
### Determine if there is a built-in implementation of the package and
|
||||
### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
|
||||
###
|
||||
.if !defined(IS_BUILTIN.freetype2)
|
||||
. if empty(H_FREETYPE2:M__nonexistent__)
|
||||
IS_BUILTIN.freetype2= yes
|
||||
. elif empty(H_FREETYPE2_NEW:M__nonexistent__)
|
||||
IS_BUILTIN.freetype2= yes
|
||||
H_FREETYPE2:= ${H_FREETYPE2_NEW}
|
||||
. else
|
||||
IS_BUILTIN.freetype2= no
|
||||
. endif
|
||||
.endif
|
||||
MAKEVARS+= IS_BUILTIN.freetype2
|
||||
|
||||
###
|
||||
### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
|
||||
### a package name to represent the built-in package.
|
||||
###
|
||||
.if !defined(BUILTIN_PKG.freetype2) && \
|
||||
!empty(IS_BUILTIN.freetype2:M[yY][eE][sS]) && \
|
||||
empty(H_FREETYPE2:M__nonexistent__)
|
||||
BUILTIN_VERSION.freetype2!= \
|
||||
${AWK} 'BEGIN { p = ".0" } \
|
||||
/\#define[ ]*FREETYPE_MAJOR/ { M = $$3 } \
|
||||
/\#define[ ]*FREETYPE_MINOR/ { m = "."$$3 } \
|
||||
/\#define[ ]*FREETYPE_PATCH/ { p = "."$$3 } \
|
||||
END { printf "%s%s%s\n", M, m, p }' \
|
||||
${H_FREETYPE2}
|
||||
BUILTIN_PKG.freetype2= freetype2-${BUILTIN_VERSION.freetype2}
|
||||
.endif
|
||||
MAKEVARS+= BUILTIN_PKG.freetype2
|
||||
|
||||
###
|
||||
### Determine whether we should use the built-in implementation if it
|
||||
### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
|
||||
###
|
||||
.if !defined(USE_BUILTIN.freetype2)
|
||||
. if ${PREFER.freetype2} == "pkgsrc"
|
||||
USE_BUILTIN.freetype2= no
|
||||
. else
|
||||
USE_BUILTIN.freetype2= ${IS_BUILTIN.freetype2}
|
||||
. if defined(BUILTIN_PKG.freetype2) && \
|
||||
!empty(IS_BUILTIN.freetype2:M[yY][eE][sS])
|
||||
USE_BUILTIN.freetype2= yes
|
||||
. for _dep_ in ${BUILDLINK_API_DEPENDS.freetype2}
|
||||
. if !empty(USE_BUILTIN.freetype2:M[yY][eE][sS])
|
||||
USE_BUILTIN.freetype2!= \
|
||||
if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.freetype2}; then \
|
||||
${ECHO} yes; \
|
||||
else \
|
||||
${ECHO} no; \
|
||||
fi
|
||||
. endif
|
||||
. endfor
|
||||
. endif
|
||||
. endif # PREFER.freetype2
|
||||
.endif
|
||||
MAKEVARS+= USE_BUILTIN.freetype2
|
||||
|
||||
###
|
||||
### The section below only applies if we are not including this file
|
||||
### solely to determine whether a built-in implementation exists.
|
||||
###
|
||||
|
||||
.include "../../mk/x11.builtin.mk"
|
||||
|
||||
CHECK_BUILTIN.freetype2?= no
|
||||
.if !empty(CHECK_BUILTIN.freetype2:M[nN][oO])
|
||||
|
||||
. if !empty(USE_BUILTIN.freetype2:M[nN][oO])
|
||||
BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.1.3
|
||||
. else
|
||||
. if !empty(MACHINE_PLATFORM:MNetBSD-[67].*-*) && \
|
||||
(("${BUILTIN_VERSION.freetype2}" == "2.4.5") || \
|
||||
("${BUILTIN_VERSION.freetype2}" == "2.5.3"))
|
||||
_FT2_VER_MAP.2.5.3= 17.2.11
|
||||
_FT2_VER_MAP.2.4.5= 13.0.7
|
||||
SUBST_CLASSES+= fx-ft2-pc-version
|
||||
SUBST_STAGE.fx-ft2-pc-version= post-wrapper
|
||||
SUBST_MESSAGE.fx-ft2-pc-version= Fixes wrong module version in freetype2.pc
|
||||
SUBST_FILES.fx-ft2-pc-version= ${BUILDLINK_X11_DIR}/lib/pkgconfig/freetype2.pc
|
||||
SUBST_SED.fx-ft2-pc-version= -e 's|^\(Version:\).*|\1 ${_FT2_VER_MAP.${BUILTIN_VERSION.freetype2}}|'
|
||||
. endif
|
||||
. endif
|
||||
|
||||
.endif # CHECK_BUILTIN.freetype2
|
|
@ -1,98 +0,0 @@
|
|||
# $NetBSD: builtin.mk,v 1.10 2018/11/06 09:38:54 markd Exp $
|
||||
|
||||
BUILTIN_PKG:= libuuid
|
||||
|
||||
BUILTIN_FIND_FILES_VAR= UUID_PC
|
||||
BUILTIN_FIND_FILES.UUID_PC= /usr/lib/pkgconfig/uuid.pc
|
||||
BUILTIN_FIND_HEADERS_VAR= H_UUID
|
||||
BUILTIN_FIND_HEADERS.H_UUID= uuid/uuid.h
|
||||
BUILTIN_FIND_GREP.H_UUID= uuid_generate
|
||||
BUILTIN_FIND_LIBS:= uuid
|
||||
|
||||
.include "../../mk/buildlink3/bsd.builtin.mk"
|
||||
|
||||
##
|
||||
## Determine if there is a built-in implementation of the package and
|
||||
## set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
|
||||
##
|
||||
.if !defined(IS_BUILTIN.libuuid)
|
||||
IS_BUILTIN.libuuid= no
|
||||
. if (${OPSYS} == "Darwin" || !empty(BUILTIN_LIB_FOUND.uuid:M[yY][eE][sS])) \
|
||||
&& empty(H_UUID:M__nonexistent__)
|
||||
IS_BUILTIN.libuuid= yes
|
||||
. endif
|
||||
.endif
|
||||
MAKEVARS+= IS_BUILTIN.libuuid
|
||||
|
||||
###
|
||||
### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
|
||||
### a package name to represent the built-in package.
|
||||
###
|
||||
.if !defined(BUILTIN_PKG.libuuid) && \
|
||||
!empty(IS_BUILTIN.libuuid:M[yY][eE][sS])
|
||||
. if empty(UUID_PC:M__nonexistent__)
|
||||
BUILTIN_VERSION.libuuid!= ${SED} -n -e 's/Version: //p' ${UUID_PC}
|
||||
BUILTIN_PKG.libuuid= libuuid-${BUILTIN_VERSION.libuuid}
|
||||
. else
|
||||
BUILTIN_PKG.libuuid= libuuid-2.18 # whatever, as long as it is big enough
|
||||
. endif
|
||||
.endif
|
||||
|
||||
###
|
||||
### Determine whether we should use the built-in implementation if it
|
||||
### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
|
||||
###
|
||||
.if !defined(USE_BUILTIN.libuuid)
|
||||
. if ${PREFER.libuuid} == "pkgsrc"
|
||||
USE_BUILTIN.libuuid= no
|
||||
. else
|
||||
USE_BUILTIN.libuuid= ${IS_BUILTIN.libuuid}
|
||||
. if defined(BUILTIN_PKG.libuuid) && \
|
||||
!empty(IS_BUILTIN.libuuid:M[yY][eE][sS])
|
||||
USE_BUILTIN.libuuid= yes
|
||||
. for _dep_ in ${BUILDLINK_API_DEPENDS.libuuid}
|
||||
. if !empty(USE_BUILTIN.libuuid:M[yY][eE][sS])
|
||||
USE_BUILTIN.libuuid!= \
|
||||
if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libuuid:Q}; then \
|
||||
${ECHO} yes; \
|
||||
else \
|
||||
${ECHO} no; \
|
||||
fi
|
||||
. endif
|
||||
. endfor
|
||||
. endif
|
||||
. endif
|
||||
.endif
|
||||
MAKEVARS+= USE_BUILTIN.libuuid
|
||||
|
||||
###
|
||||
### The section below only applies if we are not including this file
|
||||
### solely to determine whether a built-in implementation exists.
|
||||
###
|
||||
CHECK_BUILTIN.libuuid?= no
|
||||
.if !empty(CHECK_BUILTIN.libuuid:M[nN][oO])
|
||||
. if !empty(USE_BUILTIN.libuuid:M[yY][eE][sS])
|
||||
BUILDLINK_TARGETS+= libuuid-fake-pc
|
||||
|
||||
. if ${OPSYS} == "SunOS"
|
||||
BUILDLINK_PASSTHRU_DIRS+= /lib
|
||||
LIBUUID_LDADD= -L/lib
|
||||
. endif
|
||||
|
||||
libuuid-fake-pc:
|
||||
${RUN} \
|
||||
${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
|
||||
src=${UUID_PC}; \
|
||||
dst=${BUILDLINK_DIR}/lib/pkgconfig/uuid.pc; \
|
||||
if ${TEST} -f $${src}; then \
|
||||
${LN} -sf $${src} $${dst}; \
|
||||
else \
|
||||
{ ${ECHO} "Name: uuid"; \
|
||||
${ECHO} "Description: Universally unique id library"; \
|
||||
${ECHO} "Version: ${BUILTIN_VERSION.libuuid}"; \
|
||||
${ECHO} "Libs: -L/usr/lib -luuid ${LIBUUID_LDADD}"; \
|
||||
${ECHO} "Cflags: -I/usr/include"; \
|
||||
} >$${dst} ;\
|
||||
fi
|
||||
. endif
|
||||
.endif # CHECK_BUILTIN.libuuid
|
|
@ -1,121 +0,0 @@
|
|||
# $NetBSD: builtin.mk,v 1.15 2019/05/06 08:20:32 wiz Exp $
|
||||
|
||||
BUILTIN_PKG:= mit-krb5
|
||||
|
||||
.include "../../mk/bsd.fast.prefs.mk"
|
||||
|
||||
BUILTIN_FIND_HEADERS_VAR:= H_MIT_KRB5
|
||||
.if !(empty(MACHINE_PLATFORM:MDarwin-9.*-*) && \
|
||||
empty(MACHINE_PLATFORM:MDarwin-1?.*-*))
|
||||
BUILTIN_FIND_HEADERS.H_MIT_KRB5= krb5/krb5.h
|
||||
.elif !empty(MACHINE_PLATFORM:MSunOS-*-*)
|
||||
BUILTIN_FIND_HEADERS.H_MIT_KRB5= kerberosv5/krb5.h
|
||||
.else
|
||||
BUILTIN_FIND_HEADERS.H_MIT_KRB5= krb5.h
|
||||
.endif
|
||||
BUILTIN_FIND_GREP.H_MIT_KRB5= Massachusetts Institute of Technology
|
||||
BUILTIN_FIND_FILES_VAR:= SH_KRB5_CONFIG
|
||||
BUILTIN_FIND_FILES.SH_KRB5_CONFIG= /usr/bin/krb5-config
|
||||
BUILTIN_FIND_FILES.SH_KRB5_CONFIG+= /usr/lib/mit/bin/krb5-config
|
||||
BUILTIN_FIND_GREP.SH_KRB5_CONFIG= ^[ ]*--version)
|
||||
|
||||
.include "../../mk/buildlink3/bsd.builtin.mk"
|
||||
|
||||
###
|
||||
### Determine if there is a built-in implementation of the package and
|
||||
### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
|
||||
###
|
||||
.if !defined(IS_BUILTIN.mit-krb5)
|
||||
IS_BUILTIN.mit-krb5= no
|
||||
. if empty(H_MIT_KRB5:M__nonexistent__) && empty(H_MIT_KRB5:M${LOCALBASE}/*)
|
||||
IS_BUILTIN.mit-krb5= yes
|
||||
. endif
|
||||
.endif
|
||||
MAKEVARS+= IS_BUILTIN.mit-krb5
|
||||
|
||||
###
|
||||
### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
|
||||
### a package name to represent the built-in package.
|
||||
###
|
||||
.if !defined(BUILTIN_PKG.mit-krb5) && \
|
||||
!empty(IS_BUILTIN.mit-krb5:M[yY][eE][sS])
|
||||
. if empty(SH_KRB5_CONFIG:M__nonexistent__)
|
||||
BUILTIN_VERSION.mit-krb5!= ${SH_KRB5_CONFIG} --version | \
|
||||
${SED} -e 's/.*release //' -e 's/-.*//' -e 's/).*//'
|
||||
. endif
|
||||
BUILTIN_VERSION.mit-krb5?= 1.4.0
|
||||
BUILTIN_PKG.mit-krb5= mit-krb5-${BUILTIN_VERSION.mit-krb5}
|
||||
.endif
|
||||
MAKEVARS+= BUILTIN_PKG.mit-krb5
|
||||
|
||||
###
|
||||
### Determine whether we should use the built-in implementation if it
|
||||
### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
|
||||
###
|
||||
.if !defined(USE_BUILTIN.mit-krb5)
|
||||
. if ${PREFER.mit-krb5} == "pkgsrc"
|
||||
USE_BUILTIN.mit-krb5= no
|
||||
. else
|
||||
USE_BUILTIN.mit-krb5= ${IS_BUILTIN.mit-krb5}
|
||||
. if defined(BUILTIN_PKG.mit-krb5) && \
|
||||
!empty(IS_BUILTIN.mit-krb5:M[yY][eE][sS])
|
||||
USE_BUILTIN.mit-krb5= yes
|
||||
. for dep__ in ${BUILDLINK_API_DEPENDS.mit-krb5}
|
||||
. if !empty(USE_BUILTIN.mit-krb5:M[yY][eE][sS])
|
||||
USE_BUILTIN.mit-krb5!= \
|
||||
if ${PKG_ADMIN} pmatch ${dep__:Q} ${BUILTIN_PKG.mit-krb5:Q}; then \
|
||||
${ECHO} "yes"; \
|
||||
else \
|
||||
${ECHO} "no"; \
|
||||
fi
|
||||
. endif
|
||||
. endfor
|
||||
. endif
|
||||
. endif
|
||||
.endif
|
||||
MAKEVARS+= USE_BUILTIN.mit-krb5
|
||||
|
||||
###
|
||||
### The section below only applies if we are not including this file
|
||||
### solely to determine whether a built-in implementation exists.
|
||||
###
|
||||
CHECK_BUILTIN.mit-krb5?= no
|
||||
.if !empty(CHECK_BUILTIN.mit-krb5:M[nN][oO])
|
||||
. if !empty(USE_BUILTIN.mit-krb5:M[yY][eE][sS])
|
||||
KRB5_CONFIG?= ${SH_KRB5_CONFIG}
|
||||
ALL_ENV+= KRB5_CONFIG=${KRB5_CONFIG:Q}
|
||||
|
||||
BUILDLINK_CPPFLAGS.mit-krb5!= ${SH_KRB5_CONFIG} --cflags
|
||||
BUILDLINK_LDFLAGS.mit-krb5!= ${SH_KRB5_CONFIG} --libs
|
||||
|
||||
#
|
||||
# The SunOS builtin krb5-config does not support all of the arguments that the
|
||||
# MIT version does so we install a fake script which strips them out.
|
||||
#
|
||||
. if ${OPSYS} == "SunOS"
|
||||
KRB5_CONFIG= ${BUILDLINK_DIR}/bin/krb5-config
|
||||
BUILDLINK_CPPFLAGS.mit-krb5+= -I/usr/include/gssapi
|
||||
BUILDLINK_LDFLAGS.mit-krb5+= -lgss
|
||||
BUILDLINK_TARGETS+= fake-krb5-config
|
||||
|
||||
.PHONY: fake-krb5-config
|
||||
fake-krb5-config:
|
||||
${RUN} \
|
||||
src=../../security/mit-krb5/files/krb5-config-wrapper.sh; \
|
||||
dst=${BUILDLINK_DIR}/bin/krb5-config; \
|
||||
if [ ! -f $${dst} ]; then \
|
||||
${ECHO_BUILDLINK_MSG} "Creating $${dst}"; \
|
||||
${ECHO} "#!${SH}" > $${dst}; \
|
||||
${SED} -e "s,@KRB5_CONFIG@,${SH_KRB5_CONFIG:Q},g" \
|
||||
$${src} >> $${dst}; \
|
||||
${CHMOD} +x $${dst}; \
|
||||
fi
|
||||
|
||||
. endif
|
||||
. else
|
||||
KRB5_CONFIG?= ${BUILDLINK_PREFIX.mit-krb5}/bin/krb5-config
|
||||
CONFIGURE_ENV+= KRB5_CONFIG=${KRB5_CONFIG:Q}
|
||||
MAKE_ENV+= KRB5_CONFIG=${KRB5_CONFIG:Q}
|
||||
. endif
|
||||
|
||||
.endif # CHECK_BUILTIN.mit-krb5
|
Loading…
Reference in New Issue