9f8836518b
seperately from ${CFLAGS}. This is currently used to pass -prefer-pic to libtool. We indeed to prefer PIC, which is necessary to avoid untoward relocs. While here, make sure that PKG_DESTDIR_SUPPORT is set in a consisent way from Makefile.lib. This fixes a problem where it would become unset under certain circumstances. These packages are basically ready for import now, though they do need more testing.
87 lines
2.3 KiB
Makefile
87 lines
2.3 KiB
Makefile
# $NetBSD: Makefile.lib,v 1.12 2008/03/20 20:29:23 bsadewitz Exp $
|
|
#
|
|
# This Makefile fragment is included by all packages that build libraries
|
|
# from the Mesa sources.
|
|
#
|
|
|
|
.include "../../wip/Mesa/Makefile.common"
|
|
|
|
DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX}
|
|
DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX}
|
|
DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX}
|
|
|
|
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
|
|
|
USE_LANGUAGES= c c++
|
|
USE_LIBTOOL= yes
|
|
USE_TOOLS+= gmake makedepend pkg-config
|
|
|
|
PATCHDIR= ${.CURDIR}/../MesaLib/patches
|
|
DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo
|
|
|
|
COPTS?= # empty
|
|
COPTS+= -prefer-pic # Make sure to build PIC libraries.
|
|
|
|
MAKE_ENV+= MAKE=${GMAKE:Q}
|
|
MAKE_ENV+= COPTS=${COPTS:M*:Q}
|
|
|
|
.include "../../mk/compiler.mk"
|
|
|
|
MESA_HZ?= 100
|
|
MAKE_ENV+= MESA_HZ=${MESA_HZ:Q}
|
|
.if ${OPSYS} == "NetBSD" && exists(/sbin/sysctl)
|
|
tmphz=\
|
|
${sysctl kern.clockrate || ${TRUE}\
|
|
:L:sh:ts,:S/,//gW:C/([^[0-9]]*)(=|[^ hz])*([^[0-9])//g:M[0-9]*}
|
|
. if !empty(tmphz) && (${tmphz} > 50) && (${tmphz} < 2001)
|
|
MESA_HZ= ${tmphz}
|
|
. endif
|
|
.endif
|
|
###
|
|
### XXX do we still want this?
|
|
###
|
|
.if ${OPSYS} == "SunOS"
|
|
. if ${MACHINE_ARCH} == "sparc"
|
|
. if !empty(PKGSRC_COMPILER:Msunpro)
|
|
BUILD_TARGET= sunos5
|
|
. else
|
|
BUILD_TARGET= sunos5-gcc
|
|
. endif
|
|
. else # i386
|
|
BUILD_TARGET?= pkgsrc
|
|
. endif
|
|
.elif ${OPSYS} == "Interix"
|
|
BUILD_TARGET= interix3
|
|
.else
|
|
BUILD_TARGET?= pkgsrc
|
|
.endif
|
|
|
|
RM_PATCH_BACKUP_DIRS= docs src/mesa src/glut/glx \
|
|
progs/demos progs/xdemos progs/glsl
|
|
pre-patch:
|
|
@ for fn in ${RM_PATCH_BACKUP_DIRS}; do \
|
|
${RM} -f ${WRKSRC}/$${fn}/*.orig; \
|
|
done
|
|
|
|
post-patch:
|
|
${CP} ${.CURDIR}/../MesaLib/files/configs/[a-z]* ${WRKSRC}/configs
|
|
|
|
post-install: install-headers
|
|
|
|
.PHONY: install-headers
|
|
install-headers:
|
|
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/GL
|
|
.for hdr in ${MESA_HEADERS}
|
|
if [ -f ${WRKSRC}/include/GL/${hdr:Q} ]; then \
|
|
${INSTALL_DATA} ${WRKSRC}/include/GL/${hdr:Q} \
|
|
${DESTDIR}${PREFIX}/include/GL; \
|
|
fi;
|
|
.endfor
|
|
|
|
SUBST_CLASSES+= fix-paths
|
|
SUBST_STAGE.fix-paths= pre-configure
|
|
SUBST_MESSAGE.fix-paths= Fixing absolute paths.
|
|
SUBST_FILES.fix-paths= src/*.c
|
|
SUBST_FILES.fix-paths+= scripts/*.sh
|
|
SUBST_SED.fix-paths= -e 's,"/usr/local,"${PREFIX},g'
|
|
SUBST_SED.fix-paths+= -e 's,"/var/log,"${VARBASE}/log,g'
|